Robin W (@robin-w)

Forum Replies Created

Viewing 25 replies - 5,476 through 5,500 (of 14,247 total)
  • @robin-w

    Moderator

    ok, understand

    if you just want that then

    add_filter(  'gettext',  'rew_bbpress_translate', 20 , 3  );
    
    function rew_bbpress_translate( $translated, $text, $domain ) {
    	if ($domain == 'bbpress') {
         $words = array(
                            
                            'Reply To:' => 'Svar till:',
    			            );
         $translated = str_replace(  array_keys($words),  $words,  $translated );
    	}
         return $translated;
    }

    Put this in your child theme’s function file – or use

    Code Snippets

    @robin-w

    Moderator

    great – glad you are fixed

    In reply to: Make Forum Full Width

    @robin-w

    Moderator

    I saw that you had changed it.

    that’s fine, if I am the last remark, then I know it needs no further action.

    we leave topics open in case others want to add their views ๐Ÿ™‚

    In reply to: Make Forum Full Width

    @robin-w

    Moderator

    not sure anyone is in charge of WordPress, but if you asked about making bbpress wider then they would say ask bbpress ๐Ÿ™‚

    anyway as I say, it is your theme, not WordPress or bbpress, that is doing this.

    In reply to: Make Forum Full Width

    @robin-w

    Moderator

    sorry, theme related not bbpress

    @robin-w

    Moderator

    is bbpress not translated in Swedish ?

    In reply to: Make Forum Full Width

    @robin-w

    Moderator

    looks pretty full width to me – have you refreshed your browser?

    the theme is setting a width of 90% well before bbpress gets involved.

    you could try

    .both-sidebars .container {
    	width: 100% !important ;
    }

    but that will affect the whole site

    @robin-w

    Moderator

    and this is looking at someone’s bbpress profile?

    ie

    mysite.com/users/&username%/edit/

    @robin-w

    Moderator
    add_action( 'bbp_theme_after_reply_content', 'new_reply_additional_fields', 10 );
    function new_reply_additional_fields() {
    $new_reply_additional_fields = 'Above is my personal opinion';
    	echo "<p id='new_reply_additional_fields'><font color=red font size='4pt'>".$new_reply_additional_fields."</p>";	
    }

    @robin-w

    Moderator

    install bbpress

    then

    dashboard>tools>forums>import forums and select vbulliten

    @robin-w

    Moderator

    ok so change

    <div class="nk-gap-2"></div>

    to

    <div class="nk-gap-2"></div>
    		<?php
    		$reply_id = bbp_get_topic_last_reply_id () ;
    		echo '<span class="bbp-reply-author">'.bbp_get_reply_author_link( array( 'post_id' => $reply_id, 'type' => 'both', 'size' => 14 ) ) ;
    		?>

    @robin-w

    Moderator

    ok, so either it is a different version of that template or the function is firing from another hook.

    since you seem to have access to the files, can I suggest you search for ‘Reply To: ‘ exactly as it appears on your site, and see if you can find where it is in the theme. The template or file will get us there I hope

    @robin-w

    Moderator

    ok, hopefully that’s just a refinement of order

    try changing

    add_action ('bbp_theme_before_topic_started_by' , 'rew_reply_author' , 10 ) ;

    to

    add_action ('bbp_theme_before_topic_started_by' , 'rew_reply_author' , 5 ) ;

    or

    add_action ('bbp_theme_before_topic_started_by' , 'rew_reply_author' , 15 ) ;

    @robin-w

    Moderator

    so forum list in different order for different pages

    eg

    page 1

    forum 1
    forum 2
    forum 3

    page 2
    forum 2
    forum 3
    forum 1

    The answer will be yes, but not for free, but just trying topclarify the question

    @robin-w

    Moderator

    hmmm…ok bbpress can have issues on local sites, which is what I hoped then above would clear.

    so ‘Viewing the default pages and โ€˜Hello Worldโ€™ post is OK though, if any help. ‘ is that same as before, or is helped by the above and was wrong before?

    @robin-w

    Moderator

    ok, they’ve done it by a function by the look of it.

    so try this

    add_action ('bbp_theme_before_topic_started_by' , 'rew_reply_author' , 10 ) ;
    
    function rew_reply_author () {
    	$reply_id = bbp_get_topic_last_reply_id () ;
    	echo '<span class="bbp-reply-author">'.bbp_get_reply_author_link( array( 'post_id' => $reply_id, 'type' => 'both', 'size' => 14 ) ) ;
    }

    Put this in your child theme’s function file – or use

    Code Snippets

    then come back and let me know where this appears, we might need to adjust

    @robin-w

    Moderator

    just overwrite your code with the above – that code works

    @robin-w

    Moderator

    I just amended the above, so try it again in case you loaded the wrong version !

    @robin-w

    Moderator
    add_action( 'bbp_theme_before_reply_form_content', 'rew_additional_field' );
    function rew_additional_field($post){
    	?>
    	<select name="rew_additional_field" id="rew_additional_field">
    		<option value="enqury">Enquiry</option>
    		<option value="complaint">Complaint</option>
    		<option value="feedback">Feedback</option>
    	</select>
    	
    	
    	<select name="rew_additional_field_2" id="rew_additional_field_2">
    		<option value="enqury2">Enquiry2</option>
    		<option value="complaint2">Complaint2</option>
    		<option value="feedback2">Feedback2</option>
    	</select>
    	<?php
    }
     
    
    add_action('bbp_new_reply_post_extras', 'rew_save_additional_field');
    
    function rew_save_additional_field($reply_id){ 
        global $post;
        if(isset($_POST["rew_additional_field"])) {
            update_post_meta ($reply_id, 'rew_additional_field', $_POST["rew_additional_field"]) ;
    	}
        if(isset($_POST["rew_additional_field_2"])) {
            update_post_meta ($reply_id, 'rew_additional_field_2', $_POST["rew_additional_field_2"]) ;
    	}
    }
    
    add_action('bbp_theme_before_reply_content', 'rew_show_additional_field');
    
    function rew_show_additional_field () {
    $reply_id = bbp_get_reply_id();
    	$field = get_post_meta($reply_id, 'rew_additional_field', true);
    	if (!empty ($field)) {
    		echo "Type: ". ucfirst($field)."<br>"; 
    	}	
    	$field_2 = get_post_meta($reply_id, 'rew_additional_field_2', true);
    	if (!empty ($field_2)) {
    		echo "Type: ". ucfirst($field_2)."<br>";  
    	}
    }

    @robin-w

    Moderator

    so does that not work ?

    @robin-w

    Moderator

    ok, painting bedroom windows so I’ll come back later with a response ๐Ÿ™‚

    @robin-w

    Moderator

    so have you added Reply To: Topic name to the template ?

    @robin-w

    Moderator

    easier to start again

    this works

    add_action( 'bbp_theme_before_reply_form_content', 'rew_additional_field' );
    function rew_additional_field($post){
    	?>
    	<select name="rew_additional_field" id="rew_additional_field">
    		<option value="enqury">Enquiry</option>
    		<option value="complaint">Complaint</option>
    		<option value="feedback">Feedback</option>
    	</select>
    	<?php
    }
     
    
    add_action('bbp_new_reply_post_extras', 'rew_save_additional_field');
    
    function rew_save_additional_field($reply_id){ 
        global $post;
        if(isset($_POST["rew_additional_field"])) {
            update_post_meta ($reply_id, 'rew_additional_field', $_POST["rew_additional_field"]) ;
    	}
    }
    
    add_action('bbp_theme_before_reply_content', 'rew_show_additional_field');
    
    function rew_show_additional_field () {
    $reply_id = bbp_get_reply_id();
      $field = get_post_meta($reply_id, 'rew_additional_field', true);
      if (!empty ($field)) {
    	echo "Type: ". ucfirst($field)."<br>";  
      }
    }

    @robin-w

    Moderator

    quickest way is

    add_filter(  'gettext',  'rew_bbpress_translate', 20 , 3  );
    
    function rew_bbpress_translate( $translated, $text, $domain ) {
    	if ($domain == 'bbpress') {
         $words = array(
                            
                            'Website' => 'WhatsApp no'
                 );
         $translated = str_replace(  array_keys($words),  $words,  $translated );
    	}
    
         return $translated;
    }

    Put this in your child theme’s function file – or use

    Code Snippets

    @robin-w

    Moderator

    ok, so the threads above have one poster asking about having this as a single forum, and another about not having ‘no forum’

    what are you wishing to achieve?

Viewing 25 replies - 5,476 through 5,500 (of 14,247 total)