Helping you Build Your Own Social Network!

Faster, better and easier!

Add All Nav Links to BP Adminbar

(22 posts) (6 voices)
  • Started 1 year ago by Patrick
  • Latest reply from Brajesh Singh

  1. Just thought I'd give a shout out to all the friendly folk here at Buddydev...

    Thanks to loads of help from @hnla over at bp.org, I’ve popped my cherry and got my 1st plugin into the repo… hurray!

    This plugin aggregates all Buddypress directory and WordPress page links into the BP Adminbar.

    All BP directory pages (Members, Groups, Forums, etc.) are collected in a Community dropdown, including any directories from added plugins like BP-Links or BP-Gallery. All WP pages appear in dropdowns that respect whatever page order you have set in your WP backend. Child and grandchild pages appear in flyout subnavs.

    Several user configuration options have been included so you can customize your new admin/navbar to your heart’s content.

    http://buddypress.org/community/groups/add-all-nav-links-to-bp-adminbar/
    http://wordpress.org/extend/plugins/add-all-nav-links-to-bp-adminbar/

    Posted 1 year ago #
  2. I said it there and I'll say it here again - congratulations!
    :-)

    Posted 1 year ago #
  3. Congrats Patrick :)

    Posted 1 year ago #
  4. Thanks guys!

    It's a fun and educating exercise... next step is learning how to make an admin UI so users don't need to edit the php to configure the options.

    More fun... yay :-)

    Posted 1 year ago #
  5. So . . . for those of us dreaming of doing the same thing . . . do you have some words of wisdom?

    Congratulations! That is exciting and even more so will be the tons of downloads that will come. Right?

    I'm going to check it out. This could make ANY theme actually functional with bp, right?

    Posted 1 year ago #
  6. @roydeanjr

    Well, I don't know about ANY theme ;-) I mean, some themes seem to have a quirky nature and just don't want to play nice.

    In others, some elements targeted by the plugin may have names that don't correspond to those used. For example, in Cosmic Buddy, the hideMainNav configuration option doesn't work because it targets ul#nav. CB uses #top-bar for the main nav, so that would need to be changed manually in bp-wp-navbar.php

    I've tested it on many themes that are a child of bp-default and it works flawlessly on them all. If you have a theme that uses the same element names as targeted, it should work fine. However, if the names are different, matching them in bp-wp-navbar.php should make it work with just about any theme.

    EDIT - Oh yeah, words of wisdom...
    To upload files to the repo (via subversion), install TortoiseSVN
    http://tortoisesvn.net/downloads

    Here's a simple tutorial I found that takes most of the "huh?" out of the process.
    http://zenverse.net/host-your-plugin-at-wordpressorg-using-subversion-svn/

    Posted 1 year ago #
  7. Thank you for the advise. Beauty of community . . . we share, we grow! Thanks.

    Posted 1 year ago #
  8. @roydeanjr

    You're welcome!

    I saw your other post at bp.org about my theme and it's inspired me to try my hand at releasing a bp theme based on mine. It will incorporate the features of my latest and greatest plugin ;-) and include a fully widgetized front page template that allows for different content to be shown to logged-in v logged-out users.

    But first, I need to learn how to make admin panels for the WP backend so users don't need to edit code to change plugin or theme options.

    ...we share, we grow

    Posted 1 year ago #
  9. Yes, yes, yes. If I could code php/wp very well I would share much more than I consume. I appreciate this community very much. Thank you for all you do.

    Posted 1 year ago #
  10. Hi Patrick,
    You are doing a great job by learning,doing and sharing :)

    try this article on wp codex for admin settings page
    http://codex.wordpress.org/Adding_Administration_Menus

    Posted 1 year ago #
  11. Thanks Brajesh,

    Coming from one of my mentors, that's high praise indeed!

    I've been going over the page you mentioned for a while now, as well as this one:
    http://codex.wordpress.org/Creating_Options_Pages

    I've managed to get an admin screen located under "Settings" > "BP-WP-Navbar" with radio buttons and labels for the various options.

    That's step 1. Now for step 2: tie everything together.

    Lots of fun! :-)

    Posted 1 year ago #
  12. Little update to the question raised earlier by @roydeanjr about this plugin working with any theme.

    As it is now, the hide/show config options of my plugin use css (display:none;) to hide elements, but that means
    a: the code is still loaded and shows in the source, and
    b: if specified container IDs aren't used by theme "X", the plugin won't hide them 'cuz it can't find them.

    A preferable way is using remove_action, but that's causing a few hiccups, notably with respect to the site name (#admin-bar-logo), which just isn't playing nice.

    If I can get that to work, the plugin WILL work with ANY theme 'cuz it won't rely on css to do its magic, and none of the code targeted by the config options will be loaded. Yay.

    Stay tuned... :-)

    Posted 1 year ago #
  13. @Brajesh

    Maybe you can help clue me in on something I'm stuck on...

    I’ve managed to get my head around creating an admin panel for my plugin's configuration options with the basic hide/show function labels/radio buttons (under Settings in the WP backend).
    Code here: http://pastebin.com/F29UtJFh

    Tables are created in the database but I can’t figure out what I need to change in the main file to save the option values to the database so they take effect (the user config options are defined at the top of the file, and the functions are at the end).
    Code here: http://pastebin.com/36VtRWYd

    So far, so good… but I’m stuck. Would you happen to have any clues or guidance on this bit?

    :-)

    Posted 1 year ago #
  14. Thats a great plugin idea @Patrick
    However i tested it on a theme i just created and wouldn't display,
    I've been using my own custom menu's for about 4mth now,
    Just inserted the code into BP_Core_Adminbar but with each update i had re-add it,
    So with my new theme I've inserted the code into the themes Functions,
    I've used your id of "Community" i had it as "links" before then and has the basic nav's
    ie: gallery, activity, members, groups just the usual i could call from buddypress
    I also had to create my own adminbar.css for backend as i wanted the adminbar to run through the site the same, It also will only show for users logged in.

    But a great plugin for people, You should of come up with this yrs ago instead, lol.
    Anyway keep up the great work, Will be waiting for next version to test with my other themes.

    Posted 1 year ago #
  15. Version 2.0 is out! http://wordpress.org/extend/plugins/add-all-nav-links-to-bp-adminbar/

    All user configuration options are now available through an admin panel under “Settings” > “BP-WP-Navbar”.

    Enjoy :-)

    Posted 1 year ago #
  16. Just made v2.1beta available for download from my site:
    http://nowrecovery.com/downloads/add-all-nav-links-to-bp-adminbar2.1beta2.zip

    All user configuration options are now available in the admin panel under "Settings" > "BP-WP-Navbar"
    - Hide or display the main theme navigation
    - Hide or display the site name in your new adminbar
    - Hide or display the Login and Signup links in the adminbar
    - Hide or display the “Visit Random” menu
    - Select whether to display top-level Wordpress pages horizontally or in a dropdown menu
    - Define the label for the dropdown in Wordpress 2.x
    - If you’re running WP3.x, the plugin will fetch whatever custom menu labels you assign and display them in the admin bar along with all child pages in dropdowns
    - Define the label for the Buddypress directory dropdown (default = “Community”)
    - Define the font, font-weight and font-style for all menu items
    - Define ALL colors: navbar background, main and sub menu item backgrounds, border, text and hover colors too
    - Set the overall width of the navbar and of sub-menus
    - Set the height of all menu items
    - Adjust margins where required
    - Reposition your fancy new custom navbar anywhere you like, relative to your theme so it scrolls with your pages

    This is a whole new ballgame. I'm hoping some of the kind folks here will take my baby for spin so any bugs can be swatted before I update the repo. Please let me know what you think in the plugin group at bp.org.

    @Brajesh Sorry for hijacking your forum, but I'm really eager for some user feedback on my 1st plugin :-)

    Posted 1 year ago #
  17. Hi Patrick,
    Just tested the plugin.
    Every thing works perfectly as you have mentioned. Great work!

    noticed a small glitch in the current version though, on first activation, the drop down menu does not get a title and simply an arrow appears(no text like community).

    Of course it showed the title when I put the name of bp-admin bar menu in the plugin settings.

    I guess, using some default text for drop down will be a good thing instead of no text.

    PS: There is nothing like hijacking the forum. I am glad to see you using it for the better purpose :) You are always welcome to use it and I will appreciate the feedback of all of our helpful community :)

    Posted 1 year ago #
  18. Can't figure out wath is my sites's problem but I can't make it work!
    No dropdown menu, no community menu... just some change in the position of nav bar, and hide/view
    I've tried with 2-3 themes and nothing.
    I've copied the css in style.css... nothing...
    I've probably miss something.
    I'm working to get those dropdown menu for a moment (without success due to my lack of knowledge)

    Posted 1 year ago #
  19. @Brajesh

    Thanks for the positive vote!

    Yes, the current version (available from the repo) requires manual entry of menu names in the plugin settings. It's not a glitch, it's just when that version was released 2 weeks ago, the means to automatically call the menu titles in WP3 hadn't been fully worked out yet.

    The beta of the next release does it all though!

    @claudegagn

    In WP3, it can be a bit tricky at first, getting used to how custom menus work. For example, the order of menu items in any menu can be completely independent of any page order you may have set in "Pages". In other words, you can have top-level pages in 1 menu, and child pages in another. Might be a weird idea, but it illustrates how flexible the custom menus can be. Also, remember to save changes every time you make them to any menu.

    You can download the beta from my site. You shouldn't have any problems with it. Here's the link again:
    http://nowrecovery.com/downloads/add-all-nav-links-to-bp-adminbar2.1beta2.zip

    Upload the add-all-nav-links-to-bp-adminbar folder to your plugins directory and activate. Go to "Settings" > BP-WP-Navbar" and have some fun with all the new configuration options.

    Oh yeah, and have fun!

    Posted 1 year ago #
  20. Couldn't wait any longer :-) . So here it is folks: V2.1 of Add-All-Nav-Links-to-BP-Adminbar is in the repo.

    This version includes a major enhancement: WP3 custom menus are now fetched and displayed automatically... you still need to create your own menus though ;-)

    The dashboard admin panel has been revamped to include all kinds of additional user configuration options.
    - Define the font, font-weight and font-style for all menu items
    - Define ALL colors: navbar background, main and sub menu item backgrounds, border, text and hover colors too
    - Set the overall width of the navbar and of sub-menus
    - Set the height of all menu items
    - Adjust margins where required
    - Reposition your fancy new custom navbar anywhere you like, relative to your theme so it scrolls with your pages

    All this has been added to what you could already do in the earlier version:
    - Hide or display the main theme navigation
    - Hide or display the site name in your new adminbar
    - Hide or display the Login and Signup links in the adminbar
    - Hide or display the "Visit Random" menu
    - Select whether to display top-level Wordpress2.x pages horizontally or in a dropdown menu
    - Define the label for the Buddypress directory dropdown (default = "Community")

    Next version? The next major update will have a few more user configuration surprises, a prettier admin panel, and more streamlined code (specifically where css styling is concerned).

    You can grab version 2.1 from BP: http://buddypress.org/community/groups/add-all-nav-links-to-bp-adminbar
    ...or from WP: http://wordpress.org/extend/plugins/add-all-nav-links-to-bp-adminbar

    If you like the plugin, please DO vote for it in the WP repo! (Comments and reviews don't hurt either ;-) )

    Have fun!

    Posted 1 year ago #
  21. Heads up!

    Add-All-Nav-Links-to-BP-Adminbar just got a whole lot more flexible. Here are the enhancements to the latest update:

    - Added the ability to simply resize and/or reposition the adminbar without having it scroll with your pages. Along with color scheme configuration, you can now theme your adminbar to match the look & feel of your site just by checking a few boxes.
    - Added the ability to enable or disable the addition of WordPress pages and/or Buddypress components. It should be up to you to decide to add them, not the plugin. Now you can.
    - Cleaned up the new paginated admin section by moving all the help & additional info to a side panel revealed on mouseover for each feature.

    You can grab the current version 2.1.1 at Buddypress.org, or from the Wordpress repo.

    The next update will enable you to apply all changes to just the main site/blog, or to your entire network (still gotta figure out how to code that function though!)

    Have fun! :-)

    Posted 1 year ago #
  22. Wow, Looks good going to upgrade and check :)
    Keep up the good work!

    Posted 1 year ago #

Reply

You must log in to post.