Forum Replies Created
-
In reply to: Help with external images
Perhaps this could help
In reply to: Changing the complete sign up button in registrationYou’d have to style it through CSS. Here’s a very short example of how you could code it.
#buddypress #signup-form input[type=submit]{ width: 100%; background: #055a92; color: #fff; padding: 12px; margin-bottom: 20px; }In reply to: Add user to group automaticallyThis should work
add_action( 'bp_core_activated_user', 'join_group_on_signup'); function join_group_on_signup( $user_id ){ $group_id = 13; //change it to the group ID of your choice groups_join_group( $group_id, $user_id ); }– or just in an iframe like this
<?php global $bp; $user_id = get_the_author_id(); //Fill out the PROFILE FIELD NAME with your own field name $Twitch_Data = xprofile_get_field_data( 'PROFILE FIELD NAME', $user_id ); if ( ! empty( $Twitch_Data) ) { ?> <iframe src="https://player.twitch.tv/?channel=<?php echo $Twitch_Data ?>&parent=www.yourwebsite.com" frameborder="0" allowfullscreen="true" scrolling="no" height="378" width="620"></iframe> <?php } ?>Your iframe needs a parent to be shown, twitch doesn’t allow live streams to be shown in embeds without it. Here’s an example:
<iframe src="https://player.twitch.tv/?channel=NAMEOFCHANNEL&parent=www.yourwebsite.com" frameborder="0" allowfullscreen="true" scrolling="no" height="378" width="620"></iframe>Otherwise you could always do something like this and alter the buddypress member templates to fit it whereever you want.
<?php global $bp; $user_id = get_the_author_id(); //Fill out the PROFILE FIELD NAME with your own field name $Twitch_Data = xprofile_get_field_data( 'PROFILE FIELD NAME', $user_id ); if ( ! empty( $Twitch_Data) ) { ?> <div id="twitch-embed"></div> <script src="https://player.twitch.tv/js/embed/v1.js"></script> <script type="text/javascript"> new Twitch.Player("twitch-embed", { channel: "<?php echo $Twitch_Data ?>" }); </script> <?php } ?>The user would then go ahead and fill in their own channel name in the Buddypress profile field you’ve provided for them.
In reply to: BuddyPress Profile TabsI see now. From looking at the plugin code it could use some cleaning up, although its still fine to use.
If you’d like to have more control, and you know how to code, you could override the
buddypress/members/single/profile/profile-loop.php(in BP Nouveau) and create a loop with tabs instead.It should be easily doable with js modifications or using pure CSS using radio inputs.
Here’s an example – use the js from something like https://codepen.io/liav80/pen/KzpWzy and alter the loop in profile-loop.php (as an example) to be
<?php if ( bp_has_profile() ) : ?> <div id="wrapper"> <?php while ( bp_profile_groups() ) : bp_the_profile_group(); ?> <?php if ( bp_profile_group_has_fields() ) : ?> <?php bp_nouveau_xprofile_hook( 'before', 'field_content' ); ?> <?php while ( bp_profile_fields() ) : bp_the_profile_field(); ?> <?php if ( bp_field_has_data() ) : ?> <div data-tabname="<?php bp_the_profile_field_name(); ?>"> <div class="tabs-inner"><?php bp_the_profile_field_value(); ?></div> </div> <?php endif; ?> <?php bp_nouveau_xprofile_hook( '', 'field_item' ); ?> <?php endwhile; ?> <?php bp_nouveau_xprofile_hook( 'after', 'field_content' ); ?> <?php endif; ?> <?php endwhile; ?> <?php bp_nouveau_xprofile_hook( '', 'field_buttons' ); ?> </div> <?php endif; ?>It should give you a start to change things from there.
In reply to: BuddyPress Profile TabsCould you elaborate? Currently this is an already built in function in Buddypress.
Go to your wordpress dashboard followed by clicking on Users > Profile fields > click on the button called “Add new field group” and you got a new tab you can fill out with profile fields.
In reply to: Extending buddyPress notification featuresYou’re asking about two separate things.
The Buddypress notifications doesn’t need modified templates to send new notifications – it needs custom coding for it to be expanded.
Here’s an example in how to create a new type of buddypress notification:
https://gist.github.com/modemlooper/9693b591d8c36288496d
Here’s where its described in the buddypress codex:
There is no limitation to the amount of notifications your website or plugin has if thats how you want it, it just needs to be coded in.
In reply to: How to add a div above the members profile.You could insert the conditional code for all member pages, for instance, in a template like so
<?php if ( bp_is_user() ) { ?> <!-- your code --> <?php } ?>If you’d rather only display it for logged in users and on their own profile, you’d do something like
<?php if ( bp_is_my_profile() && is_user_logged_in() ) { ?> <!-- your code --> <?php } ?>etc..
In reply to: Each member’s home pageYou could always customize your own templates and change it to your behest.
You can get an idea about how to start it out here https://codex.buddypress.org/themes/theme-compatibility-1-7/a-quick-look-at-1-7-theme-compatibility/
From then on its just about coding it to your own set standards.
In reply to: Restrict access to the group members listSomething like this should work
function remove_group_member_nav_item() { if ( ! bp_is_group() || is_super_admin() ) { return; } $slug = bp_get_current_group_slug(); bp_core_remove_subnav_item( $slug, 'members' ); } add_action( 'bp_actions', 'remove_group_member_nav_item' );In reply to: Members pageYou could override the template to showcase your own unique one. Here’s some more info on it.
In reply to: Role access and stop ‘request access’ buttonTry this for an easier overview.
function bp_remove_group_join_button( $button, $group ) { $user = wp_get_current_user(); $banned_roles = array( 'y_member', 'e_member', // add as many member types as you want ); if (array_intersect($banned_roles, $user->roles)) { return ''; } return $button; } add_filter( 'bp_get_group_join_button', 'bp_remove_group_join_button', 10, 2);In reply to: How I can display the notifications in a popupMaybe this plugin could help you with the notifications https://wordpress.org/plugins/bp-live-notification/
In reply to: Oversize images in activity feed?You can change it yourself through CSS, if you right click on the picture and choose inspect element you can see the name and specifications of the element to change.
Here’s some good links from another forum helper on it.
~ https://developers.google.com/web/tools/chrome-devtools/css/reference#view
~ https://developer.mozilla.org/en-US/docs/Tools/Page_Inspector/How_to/Examine_and_edit_CSSOtherwise you could probably get help from the Aardvark theme developers or RTmedia.
In reply to: Creating a searchable social mediaSure its possible if the coding is right… 🙂
An easier way would probably be to do searchable/clickable hashtags instead, this way you wouldn’t need extra fields to fill in on the single activities.
Perhaps you can use this. It’ll give you a activity shortcode you can put anywhere and specify as you’d like.
In reply to: Duplicate Topics and RepliesYou could probably just hide it using CSS like so
.buddypress #activity-filter-by option:nth-last-child(-n+2){ display:none; }Though I’d recommend finding the flaw and correcting it rather than just hiding it.
In reply to: Remove @MentionsI end up with the code showing at the top of my site and the @mentions still showing.
You mentioned this though – it sounds like you perhaps misplaced the code. Where did you insert it?
In reply to: Remove @MentionsI’ve tried a fresh install of Buddypress with a standard wordpress theme and can’t replicate your issue.
The following code still works for both the bp legacy and bp nouveau templates.
add_filter( 'bp_activity_do_mentions', '__return_false' );Perhaps you have something else bugging it somewhere in your theme or plugins.
Otherwise it might be best just hiding it through plain css for the time being, e.g.
.buddypress #activity-mentions-personal-li, .buddypress #activity-mentions, .buddypress .user-nicename { display:none!important }In reply to: dark modeYou’d have to ask your theme developer, Buddypress doesn’t have dark mode nor slideshow images.
In reply to: Confirmation Email Not Working againThere’s a lot of different things which could bug it.
A good start would be to test the emails your server is sending through a service like https://www.mail-tester.com/ . It will evaluate the things you need to improve in order to overcome the usual spam filters of popular email services.
In reply to: Unable to activate componantsPerhaps there’s something your theme hiding it or maybe you haven’t created the pages for the components yet?
In reply to: Best way to extend templatesThe template you made overrides the current Buddypress one, this means whenever there’s an update to the buddypress template – best practice is to update yours accordingly as well.
That being said, there’s usually not that many changes made to the templates to keep it stringent.
In reply to: Notification on UserProfileStart with the basics, did you change your theme to see if the issue is theme based?
Did you turn off your other plugins to see if its another plugin is interfering?
There are two different notification pages inside the members area, are they both blank?
you-website.com/members/user-name/notifications/
you-website.com/members/user-name/notifications/read/Go through each step and narrow down your search to locate the bug.