The MU forums have moved to WordPress.org

Adding a menu item (13 posts)

  1. stutley
    Member
    Posted 16 years ago #

    I have set up a support forum for my users. But I would like to make it more available by adding a menu item to the admin menu. How would I go about that?

    I tried to just add another line i menu.php, but that doesn't seem to work :)

  2. samchng
    Member
    Posted 16 years ago #

    Add it in your footer or header. Depending on your site layout actually.

  3. andrea_r
    Moderator
    Posted 16 years ago #

    I edited the admin footer to include the link. Didn't want my users cluttering up the WP support forum. It's bad enough that the wp.com users do. ;)

    No, I didn't remove the links to WP, I just labelled them as such and then added the link to our support blog.

    If you really wanted an admin menu item, then I would look at a plugin or theme that adds one and see how they did it. (I am not sure offhand what the call is, I just make stuff look pretty.)

  4. stutley
    Member
    Posted 16 years ago #

    Ooh, sometimes I surprise myself :D

    So I opened up menu.php and added this line:

    $menu[45] = array('Support', 'manage_options', 'support.php');

    The '45' might change depending on how many options may be commented out.

    Then I simply placed a support.php in the admin-directory with a header('Location...'); to the support-forum and voila! :)

  5. samchng
    Member
    Posted 16 years ago #

    Good workaround!

    But why do you use '45'?

  6. drmike
    Member
    Posted 16 years ago #

    It's bad enough that the wp.com users do.

    And we over at WP.com get all those pesky WP.org users. :)

    Another idea would be to add it into the Meta Widget if you're using it.

  7. stutley
    Member
    Posted 16 years ago #

    Samchng > menu.php basically defines to arrays: menu and submenu, which are both self-explanatory.

    I opened up my menu.php where the first menu-item was labelled with a 0, the second with 5 and so on. The last one was labelled with 40, so I thought it might work with 45 on one more menu-item - and it did :D

    I can't give you the programming details, because I haven't really looked into it. I just used common sense :)

    drmike > I already added it to the Meta Widget as well. Plus, using widgets in the first place, some users might not have the meta enabled at all? :) However, I'm concerned that first-time bloggers might find the admin-area confusing or difficult and thus won't even get to the actual blog before giving up. So for now I want the Support-menu item to be as visible as possible as soon as the user logs on. If my forum gets too cluttered I'll do my best to answer all questions in it :)

  8. drmike
    Member
    Posted 16 years ago #

    Stutley, that's a good idea. You might even want to place it within your blue bar along the top if you want high visability.

    You might even want to send them a link to teh forums as well when you send them your welcoming email.

  9. stutley
    Member
    Posted 16 years ago #

    > You might even want to send them a link to teh forums as well when you send them your welcoming email.

    Oh, I didn't think about that one .. Thanks ;D

  10. drmike
    Member
    Posted 16 years ago #

    Even have a better one that might help. :)

    - Open up wp-inst/wp-includes/wpmu-functions.php in your handy dandy text editor.

    - Do a search for 'wordpress.com'

    - Lookie. That's where WPMu adds in the standard links that get kicked out on a new blog. Take two seconds to add a line like the following:

    $wpdb->query("INSERT INTO $wpdb->links (link_url, link_name, link_category, link_owner, link_rss) VALUES ('http://forums.tdjc.be/', 'Support Forum', 1, '$userID', '');");

    - Upload it to your server.

    Hope this helps as well. :)
    -drmike

  11. stutley
    Member
    Posted 16 years ago #

    Hehe, I did that too - I'm spamming my bloggers with links to the support forum :D

  12. samchng
    Member
    Posted 16 years ago #

    stutley, haha I think your users will flood your support forum with questions. lol

  13. drmike
    Member
    Posted 16 years ago #

    Right now it's empty :)

    I haven't brought in the support ticket system yet. I rather not as I contract out our first level support and don't want to add in a bunch more to it since we pay per account and I'm planning on using this as a free service and SEO.

About this Topic