Robin W (@robin-w)

Forum Replies Created

Viewing 25 replies - 13,076 through 13,100 (of 14,243 total)
  • @robin-w

    Moderator

    can you give us a link to your website?

    @robin-w

    Moderator

    ‘You can pass wp_query args into bb_has_topics(), but I can only only come up with code that shows topics from one forum – not multiple forums.’

    I’m afraid I don’t have time at the moment to do lots of coding for others, but take a look at this plugin

    bbp Private Groups

    Look at includes/topics.php for how I did this for private groups – called pg_has_topics, it may give you some help – I used ‘post__in’ to create a list of topics to display

    So you could do a coupe of loops to create this list and the pass that to the bbp_has_topics function.

    ‘post__in’ is realy, useful sometimes

    see

    https://codex.wordpress.org/Class_Reference/WP_Query

    @robin-w

    Moderator

    if marked private, then your csv compare should pick that up !

    @robin-w

    Moderator

    ok, could be lots of things, presume you’ve referred back to your developer?

    and presume this is a new installation of bbpress, so has never worked?

    I’d start by trying :

    Plugins

    Deactivate all but bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.

    Themes

    If plugins don’t pinpoint the problem, switch to a default theme such as twentytwelve, and see if this fixes.

    @robin-w

    Moderator

    Great stuff !

    It always amazes me how long I spend to produce so little code 🙂

    Bet you learned a lot along the way though!

    @robin-w

    Moderator

    great !

    @robin-w

    Moderator

    @robkk

    ‘I would like the topic starter label throughout a topic , for whatever number pages it may have ‘

    So Stephen’s advice is good then, follow his link and put the topic at the start of each page !

    In reply to: Freshness Date Format

    @robin-w

    Moderator

    great -come back if you need to !

    @robin-w

    Moderator

    great – so you’re fixed ?

    @robin-w

    Moderator

    Sorry, yes I have been elsewhere.

    Sorry I’m not good enough to know how to do this, hopefully someone will be along to help you – sorry !

    @robin-w

    Moderator

    ok, may be a little rough, but seems to work

    put this in your functions file

    //This function adds the author to the reply
    function reply_display_author () {
    	global $countr ;
    	if ($countr == 5 ) {
    	echo '<span class="bbp-topic-started-by">' ;
    	printf( __( 'Topic started by: %1$s', 'bbpress' ), bbp_get_topic_author_link( array( 'size' => '14' ) )) ; 
    	echo '</span>' ;
    	}
    	else {
    	return ;
    	}
    	}
    	
    	add_action ('bbp_theme_before_reply_content', 'reply_display_author') ;
    	

    and then create a file called bbpress in the root of your theme and copy across loop-replies.php

    then amend from line 42 so that it reads

    <?php if ( bbp_thread_replies() ) : ?>
    
    			<?php bbp_list_replies(); ?>
    			
    			
    		<?php else : ?>
    			<?php global $countr ;
    			$countr=-1 ; ?>
    		
    			<?php while ( bbp_replies() ) : bbp_the_reply(); ?>
    			
    			<?php 
    			$countr ++ ; 
    			
    			<?php bbp_get_template_part( 'loop', 'single-reply' ); ?>
    
    			<?php endwhile; ?>
    			
    			
    		<?php endif; ?>

    seems to do the trick !

    @robin-w

    Moderator

    ok, so do you get this when you click edit on the profile page, or when you try to access the profile page?

    @robin-w

    Moderator

    Is it all or just some users?

    try setting yourself up with a new username and participant and see if you can replicate the problem.

    what are they/you seeing – ie do they get the edit option?

    @robin-w

    Moderator

    This dropped into your functions file puts it in every reply – just thinking about how you’re get every 5th !

    //This function adds the author to the reply
    function reply_display_author () {
    	if( get_post_type() == 'reply' ) {
    	echo '<span class="bbp-topic-started-by">' ;
    	printf( __( 'Topic started by: %1$s', 'bbpress' ), bbp_get_topic_author_link( array( 'size' => '14' ) )) ; 
    	echo '</span>' ;
    	}
    	else {
    	return ;
    	}
    	}
    add_action ('bbp_theme_before_reply_content', 'reply_display_author') ;

    @robin-w

    Moderator

    Great – keep looking – there must be a reason , and if not database, then next will be
    checking plugins are the same (inc version)
    wordpress is the same (inc version) and
    theme is the same (inc version).
    Then it would be either

    file corruption, so re-installing all the above software.
    or server issue, check server specific files, check same php, MySQL and other software versions.

    but there must be a cause !

    @robin-w

    Moderator

    So your test site works, but you live site doesn’t?

    If there on the same servers, then it has to be a difference in either settings (database) or code.

    I’d try to work out which by backing up my test site, and then restoring my live site database to it

    see https://codex.bbpress.org/creating-a-test-site/

    for details if you’re not familiar.

    That should let you see which is it, and you can progress from there

    come back and let us know how you get on

    In reply to: Freshness Date Format

    @robin-w

    Moderator

    great – if you need the 5.2 version, come back and I’ll cut a version for you and put it on my website.

    @robin-w

    Moderator

    could be done with code, but suspect not sufficient demand that anyone has coded it !

    @robin-w

    Moderator

    post a link to the site, and I’ll take a look

    In reply to: Freshness Date Format

    @robin-w

    Moderator

    ok, php version use different code see

    https://codex.wordpress.org/Widgets_API

    The widget can then be registered using the widgets_init hook: 
    
    PHP 5.3+ only: 
    add_action( 'widgets_init', function(){
         register_widget( 'My_Widget' );
    });
    
    PHP 5.2+: 
    add_action('widgets_init',
         create_function('', 'return register_widget("My_Widget");')
    );
    
    

    I’m using code for 5.3 + – so if your site is using earlier, you would need to amend the line.

    @robin-w

    Moderator

    “Still working on the forums page and ultimately would like more control over the breadcrumb, like changing the Home URL, or removing Home alltogether, in which I’ve used another plugin to turn it into a dash.”

    Layout and functionality – Examples you can use

    on the forum display, still think given that it says “continue reading” I suspect that your theme is treating this as a post, and just giving what it thinks is an ‘excerpt’.

    Try creating a file in the root of your theme called bbpress.php and putting the following code into it

    <?php
    /**
     * bbPress wrapper template.
     
     */
    
    get_header(); ?>
    
    <?php while( have_posts() ): the_post(); ?>
    
    	<?php the_content(); ?>
    
    <?php endwhile; ?>
    
    <?php get_footer(); ?>
    
    

    @robin-w

    Moderator

    Great – glad you’re fixed !

    @robin-w

    Moderator

    Sorry, yes I do understand your English, but I don not understand what you are trying to do.

    Can you give an example of what you wish to change?

    @robin-w

    Moderator

    ‘I have the theme setup running on two domains, the one i use for testing, the funny thing is when posting on that site, the first post of the thread is shown.’

    This would tend to suggest that something is different or not set the same. Are both on remote servers, or is one on a local PC running wamp or mamp?

    Not showing a topic is a common symptom, but with many different causes, so there is no one solution.

    There are a number of things you can try.

    Resetting permalinks – sometimes fixes – in your WordPress Administration Screens navigate to Settings > Permalinks, select a different permalink structure and save. Then select your preferred permalink structure and save again.

    Repair Forums – Dashboard>tools>forums>repair forum and run one at a time.

    Plugins

    Deactivate all but bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.

    Themes

    If plugins don’t pinpoint the problem, switch to a default theme such as twentytwelve, and see if this fixes.

    @robin-w

    Moderator

    I can if you give me a bit more detail 🙂

    What are you trying to do?

Viewing 25 replies - 13,076 through 13,100 (of 14,243 total)