Forum Replies Created
-
Ok… I cut and pasted the code, and that had introduced some control characters that messed everything up.
However, the routine to change the tab order is not working for me… I went for the following:
function ka_change_profile_tab_order() {
global $bp;$bp->bp_nav = 10;
$bp->bp_nav = 20;
$bp->bp_nav = 30;
$bp->bp_nav = 50;
$bp->bp_nav = 60;
$bp->bp_nav = 70;
}add_action( ‘bp_setup_nav’, ‘ka_change_profile_tab_order’, 999 );
But, that results in some strange markup being created:
A new tab is displayed at the start with no content –
[li id=”-personal-li”]
[a id=”user-” href][/a]
[/li]and the profile and messages tabs are not in the right order. I get the following rendered:
nonsense (see above) – messages – profile – activity – groups – following – settings
I added these functions as described, but neither had any effect in my theme. Is there something else missing?
In reply to: dynamically create new sets of profile fields@boonebgorges – Great that you think it can be done with the existing tables (I was considering adding some additional tables keyed on the user profile id). The hook into xprofile at the right place is what I was looking for.
We are going to filter out profile fields where the user hasn’t input a value anyway (and not display them). I take it this is as simple as checking whether the field value is an empty string. Although, as you point out, you would still want these displayed on the edit page.
So, it’s check for NULL and check for standard field (vs. extended field) name as well.
In reply to: dynamically create new sets of profile fieldsbump! Anyone else tried to do this… it seems a reasonably fundamental thing to want to do with profile fields?
In reply to: activity stream post ID?p.s. @hoodiemark – in answer to your second question. I don’t think a filter is a good way to solve this one…
We wanted to avoid displaying post content for blog posts in the activity stream.
The filter options only seemed to let us control how the activity for a blog post was created in the first place, not how much of it was displayed in the stream.
If we’d used the filter to stop the ‘unwanted’ content being added in the first place, it would have meant it was also unavailable in places where it was wanted (e.g. the blog post widget seems to rely on the activity template).
I hope that makes sense!
In reply to: activity stream post ID?@hoodiemark – don’t know if you fixed this one, but the call you need is:
if (bp_get_activity_type() == ‘new_blog_post’) : bp_activity_secondary_item_id(); endif;
The post_id is the secondary_item_id, so no need to go trying to traverse deeper into the data structure.
You have two calls you can use:
bp_activity_secondary_item_id()
This echoes the idbp_get_activity_secondary_item_id()
This returns the idHow do we start including this stuff in the Codex?
Thanks guys (both solutions work) –
I’m always forgetting to hook calls to the init action in bp-custom.php. I won’t again!
In reply to: WordPress theme vs BuddyPress themeHi, we always create a child theme derived from the BuddyPress default theme (we are on our 5th commercial BP project at the moment).
We customise heavily, change an awful lot of the CSS, and tear our hair out at the masses of unnecessary divs and classes. But, on the other hand it does give us a huge head start – BuddyPress needs a lot of template files and loops that aren’t in standard WordPress themes.
If you are happy with the default structures and functionality, you can get a long way quickly with this approach. Styling the layouts to your needs.
If you want to add new functionality, seriously enhance the loops, and so on – you are in for a bigger challenge – it’s not as easy as WordPress theming, you quickly end up in hooks, filters and plugins (which you can usually avoid in standard WP theming), and a fairly restricted API (which is due to get better, and better documented). The joys of building on the sands of a still relatively early stage project.
Good luck – I’m sure you’ll create a great site.
Roger
p.s. setting up a child theme is straightforward – a few lines in your style.css. We typically mimic the folder structure of the default theme, copy over just the files we are specialising (most of them!), and work from there. Only strange thing is functions.php – a functions.php in your child theme doesn’t override the one in the parent theme, both are used.
p.p.s. I can’t comment on the theme pack plugin… I haven’t used it
Thanks for posting… that’s an excellent quick lookup for something I have on a project todo list
In reply to: How to translit buddypress another languije?Check this Group – it has lots of threads on localization / translation:
go to settings > reading in your admin backend.
Choose: Front page displays a static page and select Activity Stream
Cheers,
RogerIn reply to: Updates Only in Activity Stream
I’m no fan of hiding things with CSS – the code is still ‘cluttering’ up the html – best to remove it in the html/php source file.Thanks for the lead on the suggestions from @boone using custom filters in the functions.php file.
In reply to: Updates Only in Activity StreamHi,
I advise doing this in your own child theme:
You’ll have to modify the /activity/index.php file. In there you can change your activity stream loop to just return status updates, and you can also remove the dropdown filter.
This page gives some guidance on modifying the activity stream loop, including the filter you’ll need just for status updates:
https://codex.buddypress.org/developer-docs/custom-buddypress-loops/the-activity-stream-loop/Cheers,
RogerIn reply to: Alternative to bbpress@ashfame – it’s not quite that simple. Yes, have a standalone installation. Then, to give smooth integration, you also want to ensure you have single sign on (i.e. not having sign on separately for both the forums and BuddyPress network), and you want to see your activity on the forums being shown in your profile activity stream on BuddyPress (this needs callback routines when events happen in the forum software, you’ll have to code these so that they call the BuddyPress activity API correctly).
In reply to: is a global forum possible?@djpaul – your solution on here kind of works, but still introduces concepts that confuse the user. They are made to ‘join a group’, when all they wanted to do was post on a forum (to you and me it’s trivial, but not to the ordinary user)… other confusing things happen… e.g. on this site – I click on a thread under the Support top level tab, and suddenly find that I have been thrown into the Community tab (because the actual forum / thread is in a group). Again, as a normal user I’m confused – I was in support, and suddenly I’m in Community without choosing to go there.
So, from a technical viewpoint, it works, but from a usability viewpoint, it’s not really delivering.
We need somewhere to discuss usability – is there anywhere?
@lisame – the pricing policy for @sbrajesh plugin software is his own choice as an independent developer. It seems really inexpensive to me (although I don’t like the recurring subscription model for this kind of one-off purchase). As @gregfielding notes, he provides excellent help on the forums. But I’m getting off track.
Full featured global forums would be nice in BuddyPress, but I don’t think it’s where the core development should be (strong, flexible core profile features would be nice). By the same score, I don’t think the Group / Forum approach should have become so integral.
It would be nice to see a more loosely coupled approach – strong support for profile integration with 3rd party forum solutions, i.e. leave the forum function to specialist forum developers, but ensure activity, sign on, etc. can be integrated with BuddyPress.
So many threads on forums – would be nice to see them pulled together!
In reply to: Alternative to bbpressYou can also look at simple:press – some work has been done integrating that with BuddyPress
@lisa – I share your frustration with the BuddyPress approach to forums; every client we have worked with (6 in total now) has asked for standard forums to be integrated, and not the BuddyPress Group / Forum approach.
The BuddyPress Group / Forum idea might be an interesting technical approach (and logical from a data modelling point of view), but unfortunately doesn’t seem to have been an end user requirements driven decision.
The best approach to get full functioning standards forums (working with a BuddyPress site) is to disable the BuddyPress forums (a simple checkbox in the admin system), and install your forum solution separately – you’ll then want to ensure you have single sign on, and integration with the activity stream – there is some work documented already to do this with simple:press and bbPress (search on their community forums), but I’m not aware of an out of the box fully functioning solution.
Of course, you’ll also want to design your theme to seamlessly integrate the forums.
[aside: I noticed an announcement re: bbPress being moved into WordPress as a plugin. The announcement also said it was being coded by @jjj, one of the core BuddyPress deveIopers. I don’t know how this will affect the functionality of bbPress (more or less featured?), or whether it will integrate a standalone forums solution into BuddyPress by default. Any more info on this @djpaul or @jjj?]
In reply to: Introducing JobBoardr@travel-junkie – that’s an interesting plugin – we had a project a few months back where it would have been useful. I’ve also just posted to say we need a job board on BuddyPress.org. I’ve got a couple of projects that could use a freelance BP developer, but nowhere to advertise the opportunities.
In reply to: bbpress functionality in buddypressBuddyPress doesn’t integrate the full version of bbPress you are expecting. Instead, it just uses a very restricted version integrated into BuddyPress groups.
Basic forum admin functions are available from within the group admin.
If you want full featured forums with BuddyPress, you’ll have to integrate a standalone forum solution. bbPress and simple:press are candidates – I opened a thread about this recently. Search bbPress vs simple:press
In reply to: create custom activity query streamAnd this page details how to change the default tab:
https://codex.buddypress.org/how-to-guides/changing-internal-configuration-settings/
Good luck… let me know if it works!
In reply to: create custom activity query streamThere are some code snippets in this previous post (I don’t know if they still work, or if there is an easier solution, for 1.2.5):
In reply to: How to Remove Admin Bar from Buddypress 1.1https://codex.buddypress.org/how-to-guides/modifying-the-buddypress-admin-bar/
Note: if you put the remove action / add action etc in functions.php (rather than bp-custom.php) then you don’t need to wrap them in a function.
You will need to create pages (in your wp-admin backend), and perhaps design bespoke page templates (html / php) if you want to enhance the basic layout of these pages. You would then implement your navigation menu to link to these pages.
This is WordPress rather than BuddyPress specific, so you will be best to visit the WordPress help pages:
https://codex.wordpress.org/Pages
https://codex.wordpress.org/TemplatesIn reply to: Additional Registration Requirementscheck out the plugin from @travel-junkie
In reply to: Auto add new members to group?Will this do what you need… it lets you (as admin) directly add members to a group:
oh, we removed the bp_create_excerpt() call as well, as we want to show the whole update:
Change:
$latest_update = trim( strip_tags( bp_create_excerpt( $update, 40 ) ) );
to
$latest_update = trim( strip_tags( $update ) );