BuddyDev

Search

Replies

  • Keymaster
    (BuddyDev Team)
    Posts: 25132

    Thank you Richard.
    It will be helpful for not only MediaPress but other plugins too that adds nested pages on user pages.
    Thank you for posting it here, It will certainly help others too.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25132

    Thank you Hans and Ernesto.
    Glad it is fixed 🙂

  • Keymaster
    (BuddyDev Team)
    Posts: 25132
    Brajesh Singh on in reply to: Variable Outside Function #1810

    Hi,
    Have you tried this

    
    
    function my_custom_subnav() {
    	global $bp;
            global $collection_term;
    	$collection_term_slug = preg_replace('/\s+/', '-', $collection_term); // replace spaces with hyphens.
    	  $collection_term_slug = preg_replace('/[^A-Za-z0-9\-]/', '', $collection_term); // Removes special chars.
    	$screen_function_name = 'subnav_function_to_show_' . $collection_term_slug;
    	
    
    	bp_core_new_subnav_item( array( 
    		'name' => $collection_term,  
    		'slug' => $collection_term_slug,  
    /* rest of the code */
    
    

    and make sure that you initialize $collection_term before making a call to

    
    
    my_custom_subnav()
    
    

    That should work. Can you please give it a try. If you are initializing $collection_term in another function, then declare it global there too. Also, It must be initialized before call to the function.

  • Keymaster
    (BuddyDev Team)
    Posts: 25132

    Hi Pellet,
    My apologies for the inconvenience. Which strings are you trying to translate?

  • Keymaster
    (BuddyDev Team)
    Posts: 25132

    Thank you Richard.
    You are right about the cause. I am glad you found it. BuddyPress dynamically replaces actual content with the generated content( and in this case WordPress was regenerating excerpt based on that generated content). the_content() is the right function.

    use bp_is_user() for conditional testing since it will fix problem with other plugins too.

    Hope that helps.

  • Keymaster
    (BuddyDev Team)
    Posts: 25132

    Hi Richard,
    Thank you for the update.

    Yes, if it is still happening with the parent theme then your child themes functions.php is not causing it.

    That is a premium theme, so I can not do much for now. Please do take your rest and when you are back, Let us check it on your server and I will troubleshoot it there.

    Thank you
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25132

    This code is fine.
    As far as I checked on the site, activating other themes make this work but when I reactivated your theme, the page went away.

    So, It is confirmed that it is some modification in the theme causing this.

    Can you please think of any such modifications in your functions.php? or can you please activate the parent theme and see if that works?

  • Keymaster
    (BuddyDev Team)
    Posts: 25132

    Thank you. Please do send the details. If the Username plugin is working that means your plugins.php is working fine. it is something else then.

    Looking forward to the details.

    Thank you
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25132

    Hi Richard,
    Thank you for the details.

    Will it be feasible for you to allow me to check the site. A temporary normal username and site link will work for me.

    If possible, Please PM me the details and I will quickly check the issue.

    Thank you
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25132

    Hi James,
    1. The BuddyBlog + Simple Front End post allows users to blog form their profile
    2. Blog Categories for Groups is a little bit limited at the moment, It only allows admin and mods to post. There are hooks to allow everyone to post and control. These will change in next couple of weeks as I have half refactored this plugin and will be releasing an update (stuck due to a Theme) that will make it at par with BuddyBlog.

    Thank you
    Brajesh