The MU forums have moved to WordPress.org

Sitewide Admin Blogroll (11 posts)

  1. djsteve
    Member
    Posted 17 years ago #

    I've been pondering dozens of ways to add a list of links to my favorite blogs on the system, across all blogs that are running in my MU site.

    Are there any calls that I could put into each blog theme that would pull a links_list from the admin's list (or another user or anything like that for that matter?)

    I've pondered rss widgets, and all kinds of ideas for this..

  2. SteveAtty
    Member
    Posted 17 years ago #

    Wouldn't the easiest way to be to find the blogroll widget code, and then adjust the code so that it does a union across the blogroll entries for the current log and the blogroll for blog1 (or a completely separate blogroll table)

  3. mrjcleaver
    Member
    Posted 17 years ago #

    Have you tried adding a filter on the relevant hook?

  4. lunabyte
    Member
    Posted 17 years ago #

    Or maybe just making an mu-plugin that has the list hardcoded, and then you add a call to its function to each themes sidebar manually before/after widgets appear?

  5. mrjcleaver
    Member
    Posted 17 years ago #

    Problem with that is you'd need to alter each theme. The filter (written as a mu-plugin) should work with any theme.

  6. drmiketemp
    Member
    Posted 17 years ago #

    Just add the list to your blogroll widget code.

  7. mrjcleaver
    Member
    Posted 17 years ago #

    You mean modify the core distribution?

  8. lunabyte
    Member
    Posted 17 years ago #

    If you run a filter, then you have to "assume" the user has that widget added to their sidebar. IF they don't, the filter/plugin is useless.

    So yes, you would have to modify (one time) each theme, so that it would include the list you create, which would be one list that you modify.

    Or, you could make your own action call in the sidebar, that then does the work.

    Like do_action('sidebar') and then make an mu plugin that then plugs into that function, and spits out the list.

    Overall, I'm assuming that you want this list there, regardless of what the end user wants. Which, the only way to get around that is to get your hands dirty a bit.

  9. djsteve
    Member
    Posted 17 years ago #

    I would not mind editing the themes to add the code.. just not sure which code to add.. something like get_links_list(-1) or something I am assuming?

    I like the idea of the union that Steveatty talked about, but if I decided to make some themes available without the admin blogroll (for premium users one day I hope) then I would still have to go theme to theme.. so..

    not sure where the blogroll widget code is, but that is a neat idea..

    I would imagine having a few of these lists would be cool for highlighting blogs on the system across all blogs, and then maybe another instance of the plug in for external sponsored links perhaps..

    If there was a an easy way to pull the list from another blog on the system as well, then I could use the blogroll I created for another blog that I made "What's hot on (mydomain)" -

    Anyone have a code example I could put in a theme to try this out?

    I am assuming that he admin's main blog is -1, and then the code to pull from another blog would be it's it's id?

  10. djsteve
    Member
    Posted 17 years ago #

    Is this essentially what this plug in does - (the menu mangement plugin) ?

    I just found this and it may fit the bill as reading the directions it says that some code can be added into a theme and pull lists with variables...
    `

  11. lunabyte
    Member
    Posted 17 years ago #

    You're looking at things that are blog specific.

    You want something that is site wide, and not editable by the end user, right?

    There isn't going to be a miracle deal, but the solution is simple.

    Make a function. A very simple one that prints back a list of links. Echo, print, stop/start php, however you want to do it.

    Drop it in mu-plugins.

    Call the function from the sidebar of each theme, before or after the widget code.

    Done.

    When you need to edit it, you have 1 file to edit, and that's it.

    You can even add in globals for widget before/after, and widget title before/after so that you don't have to worry about each individual theme.

About this Topic

  • Started 17 years ago by djsteve
  • Latest reply from lunabyte