Forum Replies Created
-
I assume the errors in your div html are because of the forum software and they are fixed in your code?
The only things I can think of are…
- it doesn’t like the iframe
- another filter is messing with it
I’ll have a closer look at it in an hour or two and play around with it and get back to you.
On a sidenote: BuddyPress provides something out of the box for what you require… if you paste in the url to the youtube video in the activity content – it should automatically embed it. Are you certain you require the shortcode?
the filter I mentioned above
`
add_filter(‘bp_get_activity_content_body’, ‘do_shortcode’); // Adds shortcodes to activity content.
`will add it to the content of all activity (including on the profile page and groups)
If you need to add it to activity actions as well, you can also use
`
add_filter(‘bp_get_activity_action’, ‘do_shortcode’); // Adds shortcodes to activity action.
`@indirakrishna – Chat is a huge area, and there are all kinds of solutions (some better than others) 🙂
It depends on how you need the chat plugin to function, really.
https://wordpress.org/extend/plugins/bowob/
https://wordpress.org/extend/plugins/buddypress-ajax-chat/
https://wordpress.org/extend/plugins/envolve-chat/@enriksen –
To ‘do’ shortcodes in different content areas, you will need to filter do_shortcode() into certain functions. See the WordPress codex for documentation on do_shortcode() https://codex.wordpress.org/Function_Reference/do_shortcode and add_filter: https://codex.wordpress.org/Function_Reference/add_filterTo add it to the activity stream, you’ll want to add
`add_filter(‘bp_get_activity_content_body’, ‘do_shortcode’); // Adds shortcodes to activity content.`Xprofile is similar:
`add_filter(‘bp_get_the_profile_field_value’, ‘do_shortcode’); // Adds shortcodes to xprofile content.`You can find a list of filters in BuddyPress in bp-{component}/bp-{component}-filters in the buddypress files.
eg: https://buddypress.trac.wordpress.org/browser/trunk/bp-xprofile/bp-xprofile-filters.phpRemember that this will allow all shortcodes to be used [which is why it’s not on by default], currently there is no way to pick and choose what shortcodes to allow short of using a plugin such as https://wordpress.org/extend/plugins/bbpress2-shortcode-whitelist/.
@stobywan – Please don’t create new threads, there is a response that is waiting for an answer at https://buddypress.org/support/topic/registration-form-not-submitting-2/
You’re more likely to get a response via answering the questions there. By not responding to questions, those who are attempting to help assume that it is fixed and move on and help others.
@chrchcol – this seems like the same issue – http://premium.wpmudev.org/forums/topic/fatal-error-when-trying-to-access-group-forums-in-buddypress
From Jeff in that thread:
Thanks so much for all of your input… turns out all that I needed to do was re-do the setup for the forums pointing it to the old bb-config.php file.
After completing that step, all the forums worked again without a hitch and no data was lost.
Was going to say that copying the groups directory, doing a find/replace, creating a loader and modifying a few things (like calling the active components array – don’t forget manually telling bp your component is active) has worked for me in the past.
The easiest way to find the ID of individual activitys is by hovering over the timestamp. There will be a url like activity/p/127/ – the number at the end is the ID.
Another option is to edit your templates and echo `bp_get_activity_id()` inside the activity stream loop.
@resom – BuddyPress doesn’t properly support capabilities (in the current release) except for some basic is_super_admin checking.
The moderator/keymaster/forum roles are from BBpress. And currently have no uses inside buddypress.
In 1.7 (the next release) the core devs have been working on making this better – See: https://buddypress.trac.wordpress.org/ticket/2348 for developer discussions on this.
@tarkham for the fatal errors being posted, If you download trunk, you need to rename the directory to ‘buddypress’ as it defaults to ‘trunk’ and BP_PLUGIN_DIR is hardcoded to ‘/buddypress’.
It really does depend on the site and how large it is. I have one (closed) site just for me and afew friends (a legacy-facebook experience before they started opening up), and hostgator shared hosting works really well for it.
Anything larger though (and anything open to the public) and you will want to upgrade.
Just thought I’d add this, since not everyone needs/wants a large site.
If you’re developing it on trunk (which you probably should be at this stage), you’ll also be able to use buddypress()->loggedin_user; instead of declaring globals everywhere.
Then easiest way to show a message on the registration page is to edit the template in your theme and replace the default message. https://buddypress.trac.wordpress.org/browser/trunk/bp-themes/bp-default/registration/register.
If you want an alternative way, there is numerous action hooks within the file, so you can add the message via a plugin.
function cc_registration_notice() {
echo 'You will get a link in email to activate your account after registration';
}
add_action( 'bp_before_registration_submit_buttons', 'cc_registration_notice');
There is filter hooks in the function which you should use instead of modifying core, but assuming you’re just modifying core for temporary testing purposes only, you will need to modify the $mode variable as it defines mode 2 (login via wp) by default (https://buddypress.trac.wordpress.org/browser/trunk/bp-core/bp-core-catchuri.php#L463)
For production purposes, there is a $redirect url arg (which can be filtered with ‘bp_core_no_access’) that you should use to set your custom login.
does this help?
@Deceth – the easiest way to do this is to remove the content in the activity/post-form.php file in your theme. https://buddypress.trac.wordpress.org/browser/tags/1.6.2/bp-themes/bp-default/activity/post-form.php the second easiest is to go through the theme and remove all includes to that template.
For an alternative idea, you could create a shortcode that shows the contents within it to members of a group or a site role or just certain users (if the targeted members dont change often) by using conditionals and targeting the ids of the members.
You may find this useful – https://buddypress.org/2009/05/customizable-slugs-in-buddypress/
You can change the members slug by defining the BP_MEMBERS_SLUG constant before BuddyPress defines the default (eg. In wp-config or plugins/bp-custom.php is a fool-proof way to do that).
As Ben said, BuddyPress has local avatar uploading AND gravatar intergration built in.
Is the theme removing core functionality?Additionally, you can use a plugin for photo gallery features (there are loads. I tend to use BPmedia by rtCamp these days)
@Gazen – I don’t think there is a plugin, however here is a tutorial that may help you achieve it.
http://blog.themeforest.net/tutorials/how-to-create-pdf-files-with-php/
I hate the edit lock here.
Just to clarify: you’ll need to create a new bp_has_activities (copy/paste and change prefix) add that code in (you could edit another scope, eg friends but I recommend making new scopes) when making new scopes, you’ll also need to add it to the
if ( 'just-me' == $scope || 'friends' == $scope || 'groups' == $scope || 'favorites' == $scope || 'mentions' == $scope ) {
line (inside bp_has_activities)The above will create a new scope called friendsnme and show both friends and the logged in user in the activity feed. Untested use at your own risk.
Example option (Really quickly coded. untested.)
case 'friendsnme':
if ( bp_is_active( 'friends' ) )
$friends = friends_get_friend_user_ids( $user_id );
$me = array(bp_loggedin_user_id());
$friendsnme = array_merge_recursive($friends, $me);
if ( empty( $friendsnme ) )
return false;$user_id = implode( ',', (array) $friendsnme );
break;@marutim – sorry, should have mentioned that i didnt actually test it when i posted that but i just tried it on a site and it seems to work, and I can’t see anything wrong with the code you posted.
Not sure why its not working for you.You could try outputting a “>”; since I just noticed its killing the page after the feed header’s started and it doesn’t close the HTML, but If your browser was sensitive to bad html you still shouldn’t have seen feed as wp would have killed it… So I don’t think its that…
One option could be to create your own title function that mimics what bp_page_title() used to do then using that tutorial to output it (the conditional hasn’t changed)