Forum Replies Created
-
In reply to: Adding menu items to the admin bar
quick adjustment to give choice on wp_list_pages, but this ought to be carried through to the wp_nav_menus which I’ll leave as an exercise for the class
In reply to: Adding menu items to the admin barOk get what you wanted for the wp_list-pages running horizontally, trouble with that is with a fixed width layout one might run out of space, testing on my fluid layout and the adminbar looked far too crowded.
It would be possible to offer some form of configuration file that would would allow for certain defaults to be set by the user to flip flop between dropdown and horizontal. be nice to be able to kep that seperatly from the plugin so it didn’t get overwritten with upgrades though.
I have checked in WP 3.0 and loose checks on 2.9.2 but those conditionals should hold good.
I would take my suggestion and remove those exclude parameters as they may cause issues if someone had page ids that matched (unlikely)
Problem in doing this as a plugin is that you have to allow the user to be in control of values and parameters and is what causes the issue with top level links for the wp_nav_menus. When I ran up my function for adding various links to adminbar it was and is run from bp-custom and under my control so I could add/change these values at will as required.
In reply to: Adding menu items to the admin barI’ve had to do a fairly extensive rewrite on the function for a number of reasons:
1/ There was a significant degree of malfomed ul child nesting which prevents drop down aspects working correctly primarily I’ve removed the opening and closing UL elements as they are not required and cause issues.
2/ Not sure how the wp_list_pages was intended to work but with the parameter ‘title_li’ declared as empty you correctly remove the wrapping elements but would need to add UL elements manually wrapping the function call for the dropdown to function correctly.
3/ Added back in the wp_nav_menu function calls but wrapped them in a check to see if WP 3.0 is running i.e are the new menu available if not hide altogether.
Also added a reverse check to remove the wp_list_pages function if using the new menus as there is little point in both and the new menu system serves better.
4/ Changed region and menu top link names to ‘pages’ but this area is a fundamental issue as it cant be known what the user sets as menu names, ideally one shouldn’t hard code values but retrieve them from the admin menu area, but this proves far too hard to work out (asked a question on WP support but haven’t had a reply and I don’t expect one – sadly there is little codex documentation of any depth on the new menus.)
This issue applies to the wp_list_pages as well as you can’t really pass any values for ‘include’ and ‘exclude’ as these values can’t be known so you ought to remove those values you have hardcoded (I have left them in).
If I can get some guidance on how to fetch values from the menu backend view such as menu names then it will be possible to make the menus far more effective but have spent quite a while trawling through the core WP files for nav-menu and it’s not obvious and too time consuming.
I have copied the revised code to this pastebin page, give it a check over, but don’t assume I have things all correct, run it as plugin copy 2
In reply to: Sidebar sticking to the bottom of the pageHmm yet you did move the sidebar back to where I told you it needed to live!
In reply to: Sidebar sticking to the bottom of the pageAt some point you have made some changes to your layout or something has if this theme is essentially the bp-default the #sidebar is in the wrong position for a floated sidebar following after content elements.
#sidebar needs to be inside #container not outside – move #sidebar just before the closing tag for #container.
In reply to: Adding menu items to the admin bar@pcwriter
The error with the function has_nav_menus() can be easily rectified with a check for 3.0 I’ll look at your code and make some adjustments later.You possibly ought to have delayed submitting the plugin to the repository until a few checks had been run on the plugin, looking closer at the function I think some adjustments need to be made to the markup as it’s looking like malformed nested elements are rendering.
I’ll try and add corrections later and return to you.
In reply to: Where is the bbpress forum?As is starting to appear the case a large majority of issues people have are often tracked down to simply using custom themes, it’s a wee bit frustrating.
There are two paramount troubleshooting actions to follow that establish very quickly where the root cause of issues lies and ought to always be followed first and foremost – and we should have asked the theme question far earlier on which is where we were remiss.
1/ Disable any custom theme – check if an issue still occurs when running the BP-default theme.
2/ Disable any plugins other than the absolute bare minimum to run BP to establish whether there are plugin conflicts.
In reply to: Adding menu items to the admin barI would say yes, but let Ray confirm that, I realise that my issue was probably running this in bp-custom before BP had intialised? as I was throwing errors on function calls so would think you should check if BP is active but Ray will know how best to proceed.
Did you not include the menu region code I showed in that earlier thread as that adds to the usefulness of the plugin, if no menus are added to the menu region then nothing will run, just adds a extra ability to add custom links through the WP interface.
In reply to: Adding menu items to the admin barRay your pate bin example is what I had, have to admit though it doesn’t work for me run from bp-custom or functions my original using $blog_id does though, anyhow this is pcwriters script so I’ll back off for the minute.
In reply to: Adding menu items to the admin barYou have to add the global to the function scope. functions create a new scope and you need to bring the variable into that scope so it’s available to the function.
Christian to troubleshoot something on your behalf you really need to provide something to go on i.e a link to the site or at the least some more detail on your setup; otherwise you are asking for people to guess at what’s wrong and generally that does not find favour amongst coders on tech forums.
In reply to: Adding menu items to the admin barYeah I did scope the variable, didn’t check what was available i.e dump it should have guessed at blog_id though, but I’m trying not to work at the moment
In reply to: Adding menu items to the admin bar@r-a-y thanks Ray thought there was something other than I had. edit// Running this function in bp-custom.php or functions.php and I can’t get anything out of $current_blog and scoped just about everything I can think of.
@pcwriter what portion of the function are you wrapping, I was simply thinking that the ul containing the community links was wrapped and removed if not primary blog, but I think I’m probably missing what you are attempting to achieve. Try dropping back to the $blog_id until Ray has a moment to clarify.
In reply to: Adding menu items to the admin barThis works after a bit of fussing

global $blog_id;
Then wrap the ul in :
<?php if($blog_id == ‘1’): ?>
<?php endif; ?>
That’s a bit rough and ready and not tested greatly. $current_site should have worked and provides more objects to use but didn’t seem to work for me.
In reply to: Adding menu items to the admin barAh erm…
Not sure of the issues and would have to set up a test for myself, if it’s simply not displaying those links on sub blogs can you not use a conditional to check whether the main site is being viewed i.e site_id = 1 or whatever the correct method is.If and when I get a moment I’ll try and set up your code with the added menu functions I added and have a play around; I sort of wandered off from the add menu function I built to compensate for lack of adminbar dasboard links on single WP installs as I desided to run as Multi site and simply disable create blogs and the main directory link.
In reply to: Where is the bbpress forum?Are you sing a theme other than BP-Default? have you definitely got ‘Buddypress -> Componant Setup -> Groups ‘Let users create, join and participate in’ enabled
In reply to: Where is the bbpress forum?Not sure in the case of this particular thread what the issue is or what needs figuring out, I’m puzzled,creating a new group should be obvious and not something hard to see so wonder if there is another problem. The philosophical quandaries you posed on the other thread are a slightly different matter; tend to agree in part and spend a fair bit of my time staring at installs wondering how they could perhaps work better or not or make more sense for the end user.
In reply to: How to change forum SLugAlways check through any available documentation in case there are relevant topics and examples:
https://codex.buddypress.org/how-to-guides/customizing-labels-messages-and-urls/Not sure you can do what you want easily though.
In reply to: Where is the bbpress forum?You have BP activated don’t you? do you not therefore have a series of main links e.g ‘Activity’, ‘Groups’, ‘Forums'(an agregated view of any from topics in the groups)
Clicking that top level ‘Group’ link should show a list of groups with an option to create more. If not do you have any options disabled in the BP menu links in the dashboard.
In reply to: Where is the bbpress forum?Not sure but no? Groups activity streaming to forum, in what sense? within a group you can add updates or start/reply to forum topics both those should appear in the general activity streams, but perhaps I misunderstood you.
Create groups should be a clearly visible ‘Button’ when looking at the Groups Directory.
In reply to: E-mail domains blacklist doesn’t workNot sure why this wasn’t in core! or why there’s been so much faffing around on this topic when your solution looks pretty straightforward!
An issue as I see it is to some extent nomenclature what is a ‘Domain’? is a domain ‘example.com’ or ‘.com’ the answer ought to be that they both are or at least one is a TLD which to my minnd is still a ‘domain’
One possible fault with this issue appears to me to lie with the wording of the WP/MPMU – > WPMS options for limited and banned emails ; we have for Limited domains ‘ If you want to limit site registrations to certain domains. One domain per line. ‘ so I figure I’ll add .’com’ now the only registrations I will accept are from emails addresses residing in that domain space, but this doesn’t work and any email addies such as ‘joeuser@example.com’ are blocked. So ‘Limited email domains’ is just that limited to full domains and as such not greatly useful, there are many domains in existence how do I know which I want to allow, this limiting only suits something like a corporate environment where you definitely knew you only wanted registrations from your own domain or a limited few others.
Far far more useful would have been if this was a white list and allowed you to set TLDs and then perhaps further block specific domains within that TLD.
At the moment with your script I think there’s an issue? If you have set a domain in ‘limited’ then that will overrule a banned domain your script is voided, which may be fine under the circumstances.
Remove the ‘limited’ entry and your script appears to work fine, thanks for working a solution up; sadly though it’s a matter of hacking core files which isn’t good.
Can you add this as a Trac ticket patch/enhancement for 1.3 please then it may get added to core.
In reply to: Activation Code after New Member RegistrationYou sure you haven’t installed a plugin somewhere down the line? Wasn’t there a plugin to disable the activation key process?
In reply to: how upgrade an old bp theme, please?Like Boone I went through the process of moving a bp-sn theme to BP 1.2 install and used the backwards compatibility plugin, while I succeeded more or less I had an uneasy feeling that it wasn’t the best or most rebust approach and felt there would be issues awaiting around the corner so I eventually took the decision to build afresh for that layout based on BP-Default, although it cost time I wasn’t planning on spending at that moment especially having allocated and used time working with the backwards compatibility plugin in the long run it was the best choice.
In reply to: BuddyPress-Links 0.4.x Releases and Support@nickmy I thought somewhere in this stream of comments mrmaz stated that stable was released 0.4.1?
Try it out on a test site install and see how it fares, but try and separate styling issues from plugin script ones.
In reply to: how upgrade an old bp theme, please?It’s not a dummy question but there is little to go on, the best I can suggest is that you start of afresh create a child theme (which it sounds as though you have done) and start to add your old styles in and try and re-create the previous layout based on the new default theme, more than this and you would need to provide far more detail but i don’t think it would help, just a case of getting stuck in really and asking questions as and when you get stuck.