Forum Replies Created
-
In reply to: HTML in Profile Field again!
if you want your users to upload images on their profile, i suggest you to use MediaPress.
@friloo, i’m using this to add an iframe (for soundcloud) on profiles. On profile, i have a field called Soundcloud and members can enter a track ID. This number is given by Souncloud in the “share” code below each sound.
function set_video_field( $field_value ) { $bp_this_field_name = bp_get_the_profile_field_name(); // field name (case sensitive) if( $bp_this_field_name == 'Soundcloud' ) { $field_value = strip_tags( $field_value ); $field_value = '<iframe width="100%" height="300" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/'.$field_value.'&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&visual=true"></iframe>'; } return $field_value; } add_filter( 'bp_get_the_profile_field_value','set_video_field');The tricky part is related to soundcloud and concern the field_value.
The original embed code looks like this:
<iframe width="100%" height="300" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/198713943&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&visual=true"></iframe>In this example, it is
198713943, the rest is hardcoded in the function. The user has only to enter the reference number of the track, not the whole embed code.Needs probably some tutorial or heavy education 😉
In reply to: Sponsored Adsyou can also read the doc and try to modify the activity template to your need.
https://codex.buddypress.org/template-updates-2-1/#activity-filter
and search for similar topics:
https://buddypress.org/support/search/custom+activity+page/In reply to: How to put ads on activity streamPease, don’t double post ! You already asked for this here:
https://buddypress.org/support/topic/sponsored-ads/#post-240508I’m closing this topic as duplicate.
In reply to: Call Widget (BuddyPress) Log In from a ThemeThe code is in /buddypress/bp-core/bp-core-widgets.php
In reply to: Username displaying as ‘@Admin’ on profileCan you test with another theme ? Also are you using some cutom template for profiles, or a plugin or a custom function ?
See if you have this in your template:
<h2 class="user-nicename">@<?php bp_displayed_user_mentionname(); ?></h2>The original is in bp-templates/bp-legacy/buddypress/members/single/members-header.php
Maybe your theme or custom work is using something other than
bp_displayed_user_mentionname();php memory limit is used to calculate the cache size of php scripts.
Manually transfering content to DB has nothing to do with that.
Deactivate all plugins except BP and if you use custom functions in your theme or via bp-custom.php, remove them provisory, while testing your install.FYI, WP recommends 40Mo (single) or 64Mo (MS) and by using BP, a recommend size is 128M. The maximum you can set anyway is 256Mo. (which is largely enough for a script)
See doc in wp-admin/admin.php:138Some usefull tips/recommendations can be found here.
In reply to: Account Type Pro Plugin – need HELP !!Double post. Topic is closed.
Conversation can be continued from here.In reply to: Add friend button everywhereHere a button example on blog page which let you add a post author as friend.
function bpfr_add_friend_button() { // fetch post author id $user_id = get_the_author_meta( 'ID' ); // calling the button $mybutton = bp_add_friend_button( $user_id ); // condition if ( ( is_user_logged_in() && is_page( 'blog' ) ) ){ echo $mybutton; } } // create the new action hook add_action( 'custom_zone', 'bpfr_add_friend_button' );Add this code to your child-theme functions.php, or to bp-custom.php
And here the hook to add to template (child-theme) at the appropriate place.
<?php do_action( 'custom_zone' ); ?> to template (generally single.php of your theme)In reply to: Changing labels without localizationHi @henrywright,
it’s not exactly a problem ;-), more a pure php fact.
As of WP Codex about gettext filter (codex.wordpress.org/Plugin_API/Filter_Reference/gettext)
This filter hook is applied to the translated text by the internationalization functions (__(), _e(), etc.). IMPORTANT: This filter is always applied even if internationalization is not in effect, and if the text domain has not been loaded. If there are functions hooked to this filter, they will always run. This could lead to a performance problem.Some related articles:
In reply to: How to add filter to Groups members in buddypressMy buddypress version is 1.2.7
This version is about 5 years old. Update BP, as mentionned filter are now all buit in.
In reply to: Changing labels without localization@joshdrok, have you installed the po/mo i made for you ?
@henrywright ‘s trick is a good alternative ONLY for a few strings (< 10). Using that filter force gettext to recalculate each string and slow down a site if it is used intensively. Use that with caution and only in the very rare case you have no other possibility.
In reply to: I NEED HELP! REGISTRATION PAGE NOT WORKINGHow did you create that download box on the register page ? This is not part of BP or WP.
In reply to: Nothing works after update to 2.2.3.1http://www.careercoach.it/members/ shows the list correctly.
It’s the main “member” menu who doesn’t work with your ??? member types (player/coach/corporate)
Check the link.
If you want to use member types, follow here.In reply to: wysiwig toolbar on group description?For basic security consideration, a form field is strictly restricted to text only. That’s why you haven’t access to a text editor for a group description field.
If despite this, you want add some html tags to the group description, you can remove some of the filters. But be warned that that will create a security hole on your site and don’t expect help for such a sensible hack !
Read also here.
In reply to: Changing labels without localizationThey are so many topics on this forum explaining how to do this ! If you think it’s not correctly documented, add your contribution to the Codex.
That said, i made you a working buddypress-en_US file you can download with almost(hopefully) all groups related strings changed to Alliance. Some are not modified, but you can add your own words with poEdit.
Of course you can customize it, but as that need to rewrite the whole who’s online class, you would perhaps prefer to use an already made work ?
Try BuddyPress Friends On-Line, which comes with a friend on-line widget.
Install it, activate the widget and you’re done.
Could be a solution:
https://wordpress.org/plugins/bp-show-friends/In reply to: End User BlogYou already have a blog if you run WordPress.
Depending of how many authors you expect, and money you have, you can opt for MS and allow a complete blog (like the main blog) to each user. But a blogging farm is a BIG project who need space and powerfull server ressource. BuddyPress is tailored for that. But are you tailored to assume ? 😉A good compromise for small and middle project is BuddyPress Groupblog wich comes with P2, an extra front-end editor theme. So you have two answer in one plugin.
BuddyPress handles essentially members. Publishing is WP’s job and giving users a possibility of front-end publishing instead of back-end is an endless pros and contras discussion. And in any case, a long front-end dev work. At least.
Please, search and read a bit !
https://buddypress.org/support/search/en_US.mo/In reply to: [Resolved] Warning: strstr(): Empty needleThat issue was solved in BP 2.2.2
A topic with some explanation can be read here.You’re using a theme which latest release was 2013, before WP changed page title handling.
Suggest you use a more recent one. Try also one of Twenty’s theme to check that the error message is no more there, and that your page title is correctly showing.In reply to: Messages break themeYou’re welcome ! 😉
To get rid of such styling issues, use a dev tool like Firebug to get the right CSS class name…In reply to: Messages break themeSorry, i’m wrong. I checked again and effectively, the alternate colors are weird.
Add this to theme’s custom option (wp-admin/themes.php?page=WeaverX > tab main option > tab fonts&custom > custom css rules)It’s a rasta example, so you can see how it works. You just have to modify the colors to your needs.
div.message-content { color: yellow!important; /*#FFFFFF;*/ } #buddypress div.message-box { background-color:green!important; /* transparent!important; */ } #buddypress div#message-thread div.alt { background: red!important; /* #CCC; */ }May this help. 😉
In reply to: My search page returns to the activity pageBP doesn’t use a specific search page like WordPress does. Try to adjust your theme via a child theme or see theme support.
Codex is your friend !In reply to: Messages break themeIf you used some custom code in the past for this theme, is it possible that it still is in a child theme or in one of your theme settings ?
I tested it without any modification and it is working. Even if i agree the contrast on that Black&White theme is a bit pale.
You say nothing about another colored theme ? Is it the same issue ?
In reply to: Broken links after resoring backup (multisite)Have you re-saved permalinks ? That’s good practice after heavy DB management ! 😉 Simply click on “save”. If it doesn’t change, use one of BP tools to recalculate the links.