Idea for WP3 Menu Usage
I really like the idea of the plugin and it seems to work great … I’m still playing with the menu location options (waiting until I get back on my desktop with Firebug) but I had one thought regarding the WP3 menus and how they are used.
What if we had the option (or default behavior) to have the first link in the menu become the title in the BP Admin Bar? Basically skip outputting the title. That would allow it to have a custom link instead of always linking back to the homepage (since you can’t give a menu title a link). I think there would be a few things to work out like what to do, but if this were an option in the Admin area, you could preface that with something telling people to only create the first menu as the parent, or that any children of the first item will be treated as parents, or however you felt worked best/easiest.
If you think this is something you’d consider putting into your plugin, I’d be happy to help look into what needed to be done to achieve this functionality while I mess around with menu bar location some next week.
Thanks for such a cool plugin!
That is harder to implement than it is to imagine. The reason the top link is there is it’s necessary to provide the drop down functionality, and it took a fair bit of work to be able to grab the menu title to use. In absolutely correct and proper markup coding a top link should be active and go to the primary page for the child links – not always possible with these sorts of sites.
The overriding issue to this – and I did think about this originally fwiw – is that the new WP menus are massively flawed and fail to deal with two aspects of the older wp list menus which are understanding nested pages or pages that are children of other pages so that one would automagically have a drop down markup structure i.e correctly nested ul/li arrangements and the second issue is that the new menus make the mistake of imposing too much markup structure, the menus wrap the menu items not only in li elements but a ul as well and it’s that that cause issues, there is not an easy method to removing the parent ul structure if there were it would mean that single links could be created by the user and added to the adminbar with ease, but that is an aspect I’ll resolve one way or another at some point, somehow,
The link actually should not use the root slash but rather the hash or pound character out of habit and for historical reasons I avoid the hash sign when roughing out links due to IE inability to understand it correctly in past versions.
The root slash now needs to be changed to a ‘#’ so that the link – if clicked – simply returns the same position or simply remove the ‘href’ altogether.
Thanks for such a detailed and in-depth reply to a question I really didn’t know how to answer!
Cool, I appreciate that explanation, and I see now what you mean about it being rather hard to implement. I did end up working with one other option, and other than an extra ending ul tag, I really like how it turned out and will share it here in hopes that it helps you guys brainstorm. I don’t expect it to be a solution you use as I don’t have the options and everything, but I think it will work better for me, so I wanted to share what I did… I put a couple screen caps at http://picasaweb.google.com/andrewteg/WP as well
I created a menu in the admin knowing that any top level items will be on the admin bar as new drop down menus. Then I modified the output of the custom wp_menu_nav (below) to not show the title but go straight into the output of the menu itself. Also, for IE8 compatibility mode (I assume IE7 and know IE6’s admin bar is a wreck anyways) I had to add an extra tag to close the main-nav
- on the Community Drop Down which is how I ended up with an extra closing ul tag. IE8 and FF don’t seem to care.
”, ‘menu_class’=> ‘main-nav’, ‘fallback_cb’ => ”, ‘theme_location’ => ‘bp_adminbar_pages1’)) ?>
Anyways, I hope that helps. I think overall that may be a good solution for me because I can move the 5 menu bars around and insert things before Notifications and things like that if I want. Plus with each of the 5 I can create unlimited top level menu items so I’m not limited to just 5, although that’s probably all I would want with screen width considerations of course.
Thanks for such a great explanation. I do agree with you that the new WP menu system is definitely still needing some more options or abilities and optionally removing the parent ul and having things automatically nest would be awesome!
Thanks again to you both for a great idea and plugin … it’s great source code to study!
IE8 should never be dropped into ‘Compatibility Mode’ for any bp site or for that matter any fairly new site or site written by a standards aware developer as all you are doing is asking IE8 to throw out all it’s standards improvements and to render in the old broken style of IE6/7 and even better and an utter horror to those of us that had to deal with it over the years it re-introduces the nightmare construct called ‘hasLayout’ which even IE developers could never really fully explain. ‘Compatibility Mode’ is simply there to serve site code written – essentially – badly, hacked to death to get it to work specifically for IE6/7.
Doing as you have with that code example would only work if you pull the entire ‘bp_adminbar_pages1’ out of the parent ul li otherwise you will get a mal-formed block of markup with incorrect nesting of elements within the parent ul construct, it is possible to pull it out yet still have it render to the adminbar but you would then have a sibling ul and would need to factor in styling for it to match the original ul i.e floating the li elements or displaying inline /inline-block, that could be achieved semi automagically if it was ensured the rulesets and tokens for the ul were classes and that the new ul received the same class (off top of my head can’t remember the primary tokens/styling for the elements, ‘main-nav’ obviously). This has me thinking that there might be a sort of workaround that while far from ideal might serve as a stop gap until better solution found.
is there a way to make the admin bar look the same… through out the whole site. Meaning to regular members? when i add the community section it shows in my admin bar menu, but when i log in as a regular member all i see is my account, notifications, and my blogs. HELP PLS!
Could you post a link to your site so I can take a look?
Hmm… looks like you’ve modified the plugin code, or have another plugin installed that also acts on the adminbar. I can’t provide support for modified code unless I can see the entire code.
Post the code to pastebin.com and give a link to it. I can’t offer any guarantees, but I’ll see if I can help.
i thought i had removed the other plug in… must of reactivated it by accident. Its working fine now. Got another question though:
im wondering if its possible to treat the WPMU + Buddypress the following way. I’ve noticed that once a new blog/site is created by a user its pretty much creating their own new site. What i would like it to be like is to be able to create the new site/blog part but that the there’s only one community behind it. So that the other sites would be pretty much just blogs while the community as a whole was one, linking to the main sites’. Another thing i noticed is that a registered user in the main site cant log in into the site created within the main site.
The idea is to have “XYZ” site as a hub for multiple niche cultures so each niche will have its own site/blog but it’ll still interact with the full community of diverse cultures.
Hope i explained my self correctly.
Group blogs wouldnt cut it, since each site/blog needs a different theme since each have different purposes.
from what i noticed, the admin bar changes depending the site/blog. So im thinking the solution would be to force the main site’s admin bar through out the sites. That way regardless if someone makes a new site, the admin bar still will link to http://www.site.com/blog/groups instead of http://www.site.com/blog/newSITE/groups. And then just add to the admin bar a menu section with the respective niche sites.
My Account | Notifications | Community | Network (or sites)
then “network” would have”
-Niche site 1
-Niche site 2
It sounds like you’re experiencing the same problem as @mark211 as described in this post:
I’ve provided him with a temporary solution that may help you too. Until I figure out a better way to redirect BP urls, this will have to do. read through the thread starting with the above post.
Hope this helps!
Oh yeah, the features you described are planned for a future release: enable custom configuration options on main site only, sub-blogs only or both. No idea on when that will be done though as I’m currently working on a new theme.
awesome. That worked for me. Thanks a lot.
This is a random idea maybe your interested in developing it.
“user account type”
While most communities have just one profile type (i.e. “member”), you may want to have more than one.
For example, if you are building a community for musicians and their fans, you can create a separate profile type for each. Musicians will get one set of profile questions (e.g. “Band Name”, “Genre”, “Instruments”) and fans will get a different set of profile questions (e.g. “Name”, “Favorite Musicians”, “Favorite Genres”). There is no limit to the number of profile types you can create.
and im sure that could be mixed with a membership plug in to then have specific accounts have a fee.
but the main idea of it is to be able to have different profile fields for the user.
new question… how could i change the login redirect. Its redirecting to the main site’s homepage… i want it to redirect it to the page they where when they clicked logged in. I found this:
`<a href="” title=”Login”>Login`
maybe replacing the login link with that would do it… i just cant find that link… _>” title=”>_>” class=”bbcode_smiley” />
what you think?
ok so i found the bar.. and i changed
and it kinda worked… for some reason is its grabbing the link to the last post or something but its grabbing the link either way. But even though its grabbing the link after loging in it redirects to the dashboard. So previously it would listen to the bp admin bar but now it seems to get over written…
Please continue this in another thread… this is a forum for the plugin
@brajesh has a code snippet to redirect users to their profile. Looking at his code might help:
And a plugin that pretty much does the same:
Check the codex for other template tags too. You never know what you might find in there!
- The topic ‘Idea for WP3 Menu Usage’ is closed to new replies.