The MU forums have moved to WordPress.org

Need guidance to set up a unversal main page (5 posts)

  1. pax2003
    Member
    Posted 18 years ago #

    I am currently customizing the home page of my word press installation.
    Unlike the default, this page will be setup to change based on what user view it.
    in one of the areas on the main page,
    There is a 'MyBlogs'
    this will show a list of the blogs you own. I want it to print like this:
    example: blogname role edit view

    paxes_blog adminstrator edit view
    computer_news editor edit view
    (edit and view are links)

    the function get_blog_list() gets me most of the information, like url or blog id. but it does not give me what role they have. I also want to use the blog title, and not its url title.

    I tried changing variable in $current_blog, and then use 'get_option' but it will still only work on the root blog.

  2. pax2003
    Member
    Posted 18 years ago #

    I think I just realized that get_blog_list() might not be exactly what I want.

    I have tried to find the code to display the blog list menu for the current user (the one in the upper left hand corrner in wp-admin). when you put your mouse over it, it drops down with the list of your blogs. I want to be able to get that list, as well as user role.

  3. pax2003
    Member
    Posted 18 years ago #

    where can I go to get more programming / technical help for this.

    I might just look through the database myself and figure this out. I hate to do it when there is clearly a method for it already.

    I want a function to give me a list of owned blog and role status in a array. Lets say the function was called get_user_blogs()

    $data = get_user_blogs("username")

    I want the contents of $data to be fallowing:

    Array(
    Array(
    ["blog_name"] => "My Blog!",
    ["blog_uri"] => "/mblog/",
    ["blog_role"] => "administrator"
    ),
    Array(
    ["blog_name"] => "Title Of Blog!",
    ["blog_uri"] => "/tblog/",
    ["blog_role"] => "editor"
    )
    )

    something of equivalent would be fine

  4. mikeboy3
    Member
    Posted 18 years ago #

    well, I wouldnt know how to help you with codes, however, the Admin area has a very similar funtion in the top bar, it displays a list of blogs you own, so you give that a look, maybe you find the code you are looking for.

  5. lunabyte
    Member
    Posted 18 years ago #

    Um, have you looked through the functions in wpmu-function.php?

About this Topic

  • Started 18 years ago by pax2003
  • Latest reply from lunabyte