Forum Replies Created
-
@modemlooper not sure when the function was depreciated, no record of it in the BP 1.8 code?
@hnla thanks, i’ll do that in future. I’ll have a read through the rest of the guidelines too as I’d never come across the article before
In reply to: HTML filtering of profile feildsTo my knowledge, profile fields accept HTML. Have you tried inserting tags to see? try adding
<strong>test</strong>to a profile field to see if the text is bolded.In reply to: HTML filtering of profile feilds@harpeml do you want to disallow all HTML tags? or allow certain ones?
In reply to: 2.0 top features – ideas@anointed with reference to the large number of joins throughout the code and speed issues – where would you say speed improvements can be made in BP?
In reply to: 2.0 top features – ideasI’d love big new features to be left up to plugins and 2.0 to focus on speed improvements and code optimisations which will all make for a zippy user experience.
In reply to: Change default email wordpress@mydomain.com@synaptic I didn’t realise the auto emails were sent from ‘wordpress’@mydomain so thanks for this!
The code does go into your theme’s functions.php file. This is what I have:
function custom_wp_mail_from( $email ) { $handle = 'laurentdesserrey'; $find = 'http://'; $replace = ''; $link = get_bloginfo( 'url' ); $domain = str_replace( $find, $replace, $link ); return $handle . '@' . $domain ; } add_filter( 'wp_mail_from', 'custom_wp_mail_from' );Note: change the handle. I’ve used ‘laurentdesserrey’ but you could use ‘admin’ or ‘support’ or ‘info’ – whichever works best for you.
Reference: https://codex.wordpress.org/Plugin_API/Filter_Reference/wp_mail_from_name
In reply to: Passing user role to custom xprofile fieldI wanted to avoid editing templates
I suppose you could achieve what you’re trying to do by using a bunch of action hooks although the advantage of theme template files is they are there to be edited.
Hopefully you’ll be able to get your plugin approach to work! Perhaps it might be worth throwing BP Profile Search into the mix. It offers some improvements over the standard BP member search.
In reply to: Search formCopy bp_message_search_form() to your theme’s functions.php file then change the name to custom_message_search_form(). You can then use the custom search form function in your theme templates.
In reply to: Passing user role to custom xprofile fieldEssentially it sounds like you need two roles. Band and fan.
Then, once a ‘band’ user has logged in after they’ve registered you want them to be able to embed music into their profile. Users of role ‘fan’ won’t be able to do this.
On those requirements, why isn’t it as easy as the process outlined in my post?
Once you have separated the fans from the bands at the point of registration as outlined in my post, you can treat them as discrete entities in BuddyPress. Throughout your theme files you just do some simple logic
if ( is a band ) { // this is a band so let the band play } else { // this is a fan so do something else }Hope this info helps.
In reply to: Problem editing email templates (notifications)You could try Welcome Pack
In reply to: Problem editing email templates (notifications)You can usually update content of these emails via a filter. See the Codex for more info https://codex.wordpress.org/Function_Reference/add_filter
For example, to filter the email body for message notifications, use
messages_notification_new_message_message. To filter the subject line, usemessages_notification_new_message_subjectHope this info helps.
In reply to: Future of BuddyPress?JJJ’s work on the notifications component pretty much answers that question. If you look at the updates in the Trac ticket you’ll see just how much time and effort he has put in over the past month.
In reply to: 1.9 top features – ideasI’m looking forward to the new notifications component! Notifications facilitate interaction – now they’re going to be super charged!
In reply to: Passing user role to custom xprofile fieldAh I see! Can you try setting up a new profile field called ‘Role’ – make it of type option list and have ‘fan’ and ‘band’ as the options available.
This field will then appear on the registration form. As a user signs up they’ll choose if they are a fan or a band. Then that info will be saved as an xprofile field and will be searchable. To my knowledge there is no custom code needed.
In reply to: Passing user role to custom xprofile fieldRemember you asked the same question in another thread few weeks ago
Can you dig out the link and paste it here? I’m trying to understand your exact requirements – and maybe that will help. If I asked the same question then it is possible that I found a solution to it already
In reply to: Transition Effects on Activity/Member/Homeif ( jq(this).hasClass('no-ajax') ) return;Without looking at buddypress.js, I’m 99.63% sure this tells the script to return (stop executing the function) if a particular page element has class ‘no-ajax’. If the purpose of the function is just to add transition effects then you could add the no-ajax class to the page element to stop the transition effects from happening.
In reply to: Passing user role to custom xprofile field@noizeburger yep, it is for use in your templates. For example, your page template could look like this:
<?php get_header(); ?> // put the code here <?php get_footer(); ?>In reply to: Password problemAlso on another topic I would like the site admin to use the registration page to add new users but if the site admin is logged on then they cannot view the page because of redirects, is there a way to turn this off some how?
I’d raise each different question you have as a separate thread. That way, the thread title will catch the eye of readers that might be able to help with that specific question.
In reply to: Trim Field TextDo you want to trim the text on output? Or do you want to accept a maximum number of characters on user input?
In reply to: Passing user role to custom xprofile field@noizeburger I think I get what you mean. To show all members of type ‘fan’ in a “fan directory” you would do this
<?php $fans = get_users( array( 'role' => 'fan' ,'fields'=>'ID') ); $fans = implode( ',', $fans ); if ( bp_has_members( '&include=' . $fans ) ) : while ( bp_members() ) : bp_the_member(); // you can output whatever you like here such as member name, avatar, role and so on // we will output just member name for now echo bp_member_name(); endwhile; else: echo 'Sorry, no fans'; endif; ?>In reply to: Transition Effects on Activity/Member/Home1: There is some inconsistency, yes.
2: It isn’t specific to your installation. bp-default implements the transition effects (see global.js) in certain but not all places
3: bp-default, whilst a fantastic theme in my opinion, has come to the end of it’s life and will be retired in 1.9 (currently in beta). Look out for the brand new and improved template currently slated for BP 2.0
Hope this info helps!
In reply to: Buddypress Integration with Magazon ThemeHave you tried contacting the theme author?
In reply to: Passing user role to custom xprofile fieldAre you trying to limit member search results to members of a specific role? e.g. include ‘subscriber’ but exclude ‘author’, ‘editor’ and so on?
@mercime I should have added more info
It is default behaviour when the WP static front page is set to “Register”. I actually came up with a way of doing what I needed with the help from folks over at Stack Overflow:
http://stackoverflow.com/questions/20039607/different-wordpress-front-page-for-logged-out-and-logged-in-usersMy final code after some minor tweaks to the accepted answer is:
function bp_custom_front_page() { if ( ! is_admin() ) { if ( is_user_logged_in() ) { $page = get_page_by_title( 'Contact' ); update_option( 'page_on_front', $page->ID ); update_option( 'show_on_front', 'page' ); } else { $page = get_page_by_title( 'About' ); update_option( 'page_on_front', $page->ID ); update_option( 'show_on_front', 'page' ); } } } add_action( 'init', 'bp_custom_front_page' );In reply to: [Resolved] no support on wordpress latest version@mayur-hotkar what doesn’t work with WP 3.7.1?