BuddyDev

Search

Replies

  • Keymaster
    (BuddyDev Team)
    Posts: 24774
    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: 24774

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

  • Keymaster
    (BuddyDev Team)
    Posts: 24774

    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: 24774

    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: 24774

    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: 24774

    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: 24774

    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: 24774

    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

  • Keymaster
    (BuddyDev Team)
    Posts: 24774

    Hi Richard,
    Welcome to BuddyDev.
    My apologies for the inconvenience with MediaPress.

    MediaPress utilizes plugins.php from your theme’s template or theme compat template.

    Is the gallery loop n user profile working? If yes, then It will be a very strange issue. If that is not working, then you will need to check if you have the members/single/plugins.php preset in your overrides or not?

    Can you please tell me if the gallery list on user profile is working or is it just the gallery directory?

    Thank you
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 24774

    Hi Ernesto,
    Welcome to BuddyDev forums.

    You are doing it correctly. Using “blogs” object will list all blog activity. This plugin does not control the content. It simply delegates the task to BuddyPress for listing the items based on your options.

    For newer blog posts( After BuddyPress 2.3 ), They do not record the whole blog post, so only a part should be listed. For older blog posts, BuddyPress does have issues with longer posts. That’s why you are seeing this.

    Though I understand the need for listing title, that will be much beyond the scope of this plugin. The only solution as I see is using css to hide the content and let the title be there.

    If you want to go through that way, please do let me know. I will assist with css.