Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for '+.+default+.+'

Viewing 25 results - 1,026 through 1,050 (of 6,775 total)
  • Author
    Search Results
  • #196829
    Robin W
    Moderator

    create a directory on your theme called ‘bbpress’
    ie wp-content/themes/%your-theme-name%/bbpress

    where %your-theme-name% is the name of your theme

    find
    wp-content/plugins/bbpress/templates/default/bbpress/form-user-register.php
    Make a copy of this file, and put in in the directory called bbpress that you created above, so you end up with
    wp-content/themes/%your-theme-name%/bbpress/form-user-register.php
    bbPress will now use this template instead of the original
    and you can amend this file.

    #196764

    In reply to: phpBB import (again)

    Gregg
    Participant

    Resolved!

    Grab a cup of coffee and a seat and I’ll tell you the story of how you might be able fix this. It may take several hours so be prepared…

    Situation I was in:
    Older version of phpBB 3.1v and wanting to port all topics, replies, and users to bbPress (latest version at the time). A handful of issues existed that were causing more trouble than they were worth. Host of the old site is GoDaddy. The new site is on WP Engine.

    Forum Stats (approx)
    Users: 2200
    Topics: 7800
    Replies: 22500

    Outcome:
    Successfully ported all topics, replies, and users to bbPress.

    Updated phpBB
    REMOVE ALL MODS, STYLES, anything that’s not a part of the out-of-the-box install. Then follow the upgrade instructions. Make backups (I kept a copy of the existing site on my local machine and duplicate database on the host). I found these instructions most helpful: https://www.phpbb.com/support/docs/en/3.2/ug/upgradeguide/upgrade31/

    The Issues
    There were two issues I ran into (in different flavors but it turns out they just stemmed from these two). 1st – utf8 formatting and 2nd missing fields. These issues are with the import and NOT the upgrade for phpBB. I was able to resolve those issues by making sure I followed the instructions on that link to the letter.

    The first error (I don’t remember the exact error string but it was either utf8mb4 or just utf8 but it simply means the database holds the data in an older format. The solution is to export the date from the database then create a new database and restore the data into it. By creating the new database the fields will use the proper format and when the restoration is complete this issue should be resolved.

    The second error was a little more mysterious – as in I’m not sure why it happened but essentially the import routine is looking for fields that don’t exist in the phpBB install even after I successfully updated it. The solution was to create the fields needed. How?

    How to create the fields to get rid of the missing field errors
    Note I created a copy of the functioning database on my phpBB install so I could screw it up and not hurt the functioning website. So here’s an example.

    The error I got basically said the script couldn’t find “users.user_from” in the database I was trying to import from. That’s not an exact quote but the gist. So I edited the copy of my database and added the missing field (user_from) to the table it was looking for it in (users) using datatype VARCHAR and length of 255 (all else was left to default). I had to do this about a dozen times between the users, topics, and forums tables.

    I should note I imported all of my users as well. I had to try this whole process several times. I’ve spent 40+ hours trying to figure this all out (I’m not that familiar with phpBB or bbPress) but the actual process once I figured out the issues – took about 6 hours – mostly waiting for the script to process the data. If your import bombs – read the error and look carefully at what it’s looking for or doesn’t like. Most likely it’s looking for something that’s not there.

    I was worried that the connections between topics and replies and users would somehow be messed up. But in the end, it looks like it all came out fine. I’m pretty sure I’ll find something amiss – that’s my cynical side but maybe I’ll be pleasantly surprised.

    Good luck!

    #196722

    In reply to: Trackbacks

    Robin W
    Moderator

    I just looked in trac, and fixing this is now a 2.8 goal.

    However this looks like it might help

    // Force ping_status on bbPress post types 
    add_filter( 'pings_open', 'rew_force_ping_status' ); 
    
    function rew_force_ping_status( $open, $post_id = 0 ) { 
    
    // Get the post type of the post ID 
    $post_type = get_post_type( $post_id ); 
    // Default return value is what is passed in $open 
    $retval = $open; 
    // Only force for bbPress post types 
    switch ( $post_type ) { 
    case bbp_get_forum_post_type() : 
    case bbp_get_topic_post_type() : 
    case bbp_get_reply_post_type() : 
    	$retval = false; 
    break; 
    // Allow override of the override 
    return apply_filters( 'rew_force_ping_status', $retval, $open, $post_id, $post_type ); 
    } 
    #196598
    Robin W
    Moderator

    ok, take the change above out.

    Then find
    wp-content/plugins/bbpress/templates/default/bbpress/loop-single-reply.php
    Make a copy of this file to your pc

    The edit this file to be this

    <?php
    
    /**
     * Replies Loop - Single Reply
     *
     * @package bbPress
     * @subpackage Theme
     */
    
    ?>
    <div class='rew-border'>
    <div id="post-<?php bbp_reply_id(); ?>" class="bbp-reply-header">
    
    	<div class="bbp-meta">
    
    		<span class="bbp-reply-post-date"><?php bbp_reply_post_date(); ?></span>
    
    		<?php if ( bbp_is_single_user_replies() ) : ?>
    
    			<span class="bbp-header">
    				<?php _e( 'in reply to: ', 'bbpress' ); ?>
    				<a class="bbp-topic-permalink" href="<?php bbp_topic_permalink( bbp_get_reply_topic_id() ); ?>"><?php bbp_topic_title( bbp_get_reply_topic_id() ); ?></a>
    			</span>
    
    		<?php endif; ?>
    
    		<a href="<?php bbp_reply_url(); ?>" class="bbp-reply-permalink">#<?php bbp_reply_id(); ?></a>
    
    		<?php do_action( 'bbp_theme_before_reply_admin_links' ); ?>
    
    		<?php bbp_reply_admin_links(); ?>
    
    		<?php do_action( 'bbp_theme_after_reply_admin_links' ); ?>
    
    	</div><!-- .bbp-meta -->
    
    </div><!-- #post-<?php bbp_reply_id(); ?> -->
    
    <div <?php bbp_reply_class(); ?>>
    
    	<div class="bbp-reply-author">
    
    		<?php do_action( 'bbp_theme_before_reply_author_details' ); ?>
    
    		<?php bbp_reply_author_link( array( 'sep' => '<br />', 'show_role' => true ) ); ?>
    
    		<?php if ( bbp_is_user_keymaster() ) : ?>
    
    			<?php do_action( 'bbp_theme_before_reply_author_admin_details' ); ?>
    
    			<div class="bbp-reply-ip"><?php bbp_author_ip( bbp_get_reply_id() ); ?></div>
    
    			<?php do_action( 'bbp_theme_after_reply_author_admin_details' ); ?>
    
    		<?php endif; ?>
    
    		<?php do_action( 'bbp_theme_after_reply_author_details' ); ?>
    
    	</div><!-- .bbp-reply-author -->
    
    	<div class="bbp-reply-content">
    
    		<?php do_action( 'bbp_theme_before_reply_content' ); ?>
    
    		<?php bbp_reply_content(); ?>
    
    		<?php do_action( 'bbp_theme_after_reply_content' ); ?>
    
    	</div><!-- .bbp-reply-content -->
    
    </div><!-- .reply -->
    </div>
    
    <div class='rew-spacer'><p/> </div>

    Then put this in the directory called bbpress that you created above, so you end up with
    wp-content/themes/%your-theme-name%/bbpress/loop-single-reply.php

    Finally in your theme’s custom css area put

    
    #bbpress-forums ul.bbp-replies {
    border : none ;
    }		
    
    .rew-border {
    border: 1px solid #eee;
    }		
    #196588
    Robin W
    Moderator

    ok,

    create a directory on your theme called ‘bbpress’
    ie wp-content/themes/%your-theme-name%/bbpress

    where %your-theme-name% is the name of your theme

    find
    wp-content/plugins/bbpress/templates/default/bbpress/loop-replies.php
    Make a copy of this file to your pc

    The edit this file to add this line after line 50

    <div class='rew-spacer'> <p/> </div>

    so you end up with

    <?php bbp_get_template_part( 'loop', 'single-reply' ); ?>
    
    <div class='rew-spacer'> <p/> </div>

    Then put this in the directory called bbpress that you created above, so you end up with
    wp-content/themes/%your-theme-name%/bbpress/loop-replies.php

    You may need to do some styling to get it how you want it, but I would need to see your site to help on that

    #196407
    bennny91
    Participant

    Hello all, recently upgraded to PHP 7.2 on WPengine and our BBpress Forums has decided to throw a HTTP error 500.

    The error message shown in log:

    [Wed Nov 21 2018] [php7:error] PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function blockchain_replace_the_title(), 1 passed and exactly 2 expected in /nas/content/live/ep18/wp-content/themes/blockchain/inc/default-hooks.php:60\nStack trace:\n#0 [internal function]: blockchain_replace_the_title(‘Forums’)\n#1 /nas/content/live/ep18/wp-includes/class-wp-hook.php(286): call_user_func_array(‘blockchain_repl…’, Array)\n#2 /nas/content/live/ep18/wp-includes/plugin.php(203): WP_Hook->apply_filters(‘Forums’, Array)\n#3 /nas/content/live/ep18/wp-content/plugins/bbpress/includes/core/theme-compat.php(519): apply_filters(‘the_title’, ‘Forums’)\n#4 [internal function]: bbp_template_include_theme_compat(‘/nas/content/li…’)\n#5 /nas/content/live/ep18/wp-includes/class-wp-hook.php(286): call_user_func_array(‘bbp_template_in…’, Array)\n#6 /nas/content/live/ep18/wp-includes/plugin.php(203): WP_Hook->apply_filters(‘/nas/content/li…’, Array)\n#7 /nas/content/live/ep18/wp-content/plugins/bbpress/includes/core/sub-actions.php(436): apply_filters(‘bbp_temp in /nas/content/live/ep18/wp-content/themes/blockchain/inc/default-hooks.php on line 60, referer: https://ep18.wpengine.com/

    Can anyone help?

    Is BBpress compatible with PHP 7.2?

    Thanks
    Ben

    #196307
    Robin W
    Moderator

    It could be a theme or plugin issue issue, so you’ll need to test to find out which

    Themes

    As a test switch to a default theme such as twentyfifteen, and see if this fixes.

    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.

    Then come back

    #196287
    Robin W
    Moderator

    lots of ways to do this, you might want to have a think about the best for you

    I have a plugin called

    Private groups

    which lets you set up groups and may be the best solution

    alternately

    if you are able to ftp and edit files the message is held in

    wp-content/plugins/bbpress/templates/default/bbpress/feedback-no-forums.php

    so

    create a directory on your theme called ‘bbpress’
    ie wp-content/themes/%your-theme-name%/bbpress

    where %your-theme-name% is the name of your theme

    find
    wp-content/plugins/bbpress/templates/default/bbpress/feedback-no-forums.php
    Make a copy of this file, and put in in the directory called bbpress that you created above, so you end up with
    wp-content/themes/%your-theme-name%/bbpress/feedback-no-forums.php
    bbPress will now use this template instead of the original
    and you can amend this

    so go into it and amend the message to what you desire.

    You could instead put this in your functions file or put it in a code plugin such as

    PHP code snippets (Insert PHP)

    function rew_change_text( $translated_text, $text, $domain ) {
    	if ( $text == 'Oh bother! No forums were found here!' ) {
    	$translated_text = 'whatever you want it to say in here!' ;
    	}
    	return $translated_text;
    }
    
    add_filter( 'gettext', 'rew_change_text', 20, 3 );
    
    #196256
    GeekyJules
    Participant

    I’m trying to write a conditional statement to auto tag new topics based on forum.

    This is what I have so far

    add_action ( 'bbp_insert_topic', 'myprefix_assign_tag_to_post' , 10, 1 );
    add_action ( 'bbp_new_topic', 'myprefix_assign_tag_to_post', 10, 1 );
    add_action ( 'bbp_edit_topic', 'myprefix_assign_tag_to_post', 10, 1 );
    
    function myprefix_assign_tag_to_post($topic_id) {
    if( bbp_is_forum ( '168' ) && bbp_current_user_can_publish_topics() ) {
    	wp_set_post_terms( $topic_id, 'introductions', 'topic-tag', true );
    }
    
    elseif( bbp_is_forum ( '1343' ) && bbp_current_user_can_publish_topics() ) {
    		wp_set_post_terms( $topic_id, 'discovery', 'topic-tag', true );
    
    }
    }
    

    The problem is, this automatically tags the new topics with “Introductions” regardless of the forum. I tried replacing ‘bbp_is_forum’ with ‘bbp_is_single_forum’, and the same thing happens. I’ve tried replacing it with ‘bbp_is_forum_archive’ and nothing happens. I’ve even tried replacing the ID with slug, with and without the single quotes, trying it with just one IF statement, and I’m not getting the desired results.

    I also tried using is_page, hoping it would be using the default WordPress call since it used in the functions.php for topics. No joy.

    So, if someone could please tell me what I should be using instead of is_forum, is_single_forum, is_etc, that would be great.

    #196220
    BrianHenryIE
    Participant

    I’ve been working on a converter to import our Invision v4 forum to bbPress. I’ve got the users, forums and topics all importing reasonably well.

    https://github.com/EnhancedAthlete/bbPress-Invision-v4-Converter

    I’m having trouble with the titles which are stored in a language table:

    core_sys_lang_words

    | word_id | ... | word_app | ... | word_key | word_default | word_custom | ...
    | 8379 | ... | forums | ... | forums_forum_2 | Generic Discussion | Generic Discussion | ...

    To retrieve a single forum title, I can use:
    SELECT word_default as forum_name FROM ipbforum.core_sys_lang_words WHERE word_key = CONCAT('forums_forum_', 2)

    or to retrieve them all, something like:

    
    SELECT word_default 
    FROM ipbforum.core_sys_lang_words 
    WHERE word_app = 'forums' 
    	AND word_key IN 
        (SELECT CONCAT(prefix, id)  FROM 
    		(SELECT 'forums_forum_' as prefix, ipbforum.forums_forums.id 
            FROM ipbforum.forums_forums) 
            AS t)
    

    Or all with the forum ids:

    
    SELECT ipbforum.core_sys_lang_words.word_default as forum_name, word_key_table.forum_id as forum_id 
    FROM ipbforum.core_sys_lang_words, 
    	(SELECT CONCAT(prefix, id) AS word_key, 
    					id AS forum_id 
    			FROM 
    				(SELECT 'forums_forum_' AS prefix, 
    								ipbforum.forums_forums.id 
    						FROM ipbforum.forums_forums) 
                            AS temp)
    	AS word_key_table
    WHERE ipbforum.core_sys_lang_words.word_key = word_key_table.word_key
    

    but I’m struggling to figure out how to write that in the BBP_Converter_Base extended class field_map[].

    I’ve looked at some other converters and don’t see anything similarly complicated so I’m assuming there’s a more straightforward way.

    Any pointers appreciated! Once this is figured, the converter should be good enough for most people’s use.

    #196109
    lookingahead
    Participant

    Oh wow — I figured it out, nm!! 🙂

    You can do it via CSS….like this:

    #group-admins {
      pointer-events: none;
      cursor: default;
      text-decoration: none;
      color: black;
    }

    And in bbPress apparently that is the correct way to write that code; the #group-admins part will likely work for everyone, just as it is, because it appears to be the default name for that.

    Whew!

    lookingahead
    Participant

    @robin-w oh, i used a string modifier to change ‘forum’ to ‘discussion’ — that is how i got the tabs in buddypress groups to say ‘discussion’ versus ‘forum’

    i’ll go back and modify it to say ‘chat’ later, but for now many things in the site that used to say ‘forum’ say ‘discussion’….because i can change that at-will and it’s not causing conflicts, i’ve not updated it yet to say ‘chat.’

    the problem that is currently unmovable though is the group forum slug name; it still says ‘forum’ at the end of all buddypress groups. that was unaffected by the string modifier, and is apparently hard-coded.

    i went to the wp_options table and it does currently say ‘chat’…..sooooo…….apparently that setting is not being used in buddypress when it creates group forum slugs. it is defaulting to ‘forum’ no matter what i do.

    is there another place within bbpress where the instructions on how to create a slug for any type of forum whatsoever is listed…even ‘hard-coded’ as a default setting?

    lookingahead
    Participant

    @robin-w oh no worries on this being a ‘new’ thing for you to hear — as someone who does not work with buddypress like yourself you’re never going to hear this. it’s because it is a way that bbpress sends information to buddypress when buddypress pulls info from bbpress into it, when it uses bbpress programming to create ‘group forums.’

    it’s not a bug; it’s how the interface between bbpress and buddypress works.

    at least, that’s what i’m gathering now, after reading other people’s posts with the same issue in forums all over the web.

    so my question to you now: what is the file that bbpress uses to say what the slug is — the URL name, which in this case is just ‘forum’….not ‘forums’ but ‘forum’ — so i can alter that?

    i HHAAAATE altering core files, but in this case it’s likely needed.

    whatever ‘default URL/slug’ command is used when buddypress pulls in forum creation/function into bbpress……chances are, that is the file i will (gulp!) need to modify.

    i’m guessing that the same code/file is used to be the ‘default slug name’ in bbpress. which is….’forum’

    what file does that? creates a default ‘forum’ in the URL/slug when a forum is created?

    Robin W
    Moderator

    what is confusing me is that in

    dashboard>settings>forums>single forum slug you have

    discussion where I have forum, and it is this slug that is the extra one showing in the url.

    Why you have discussion, I have no idea, I have not seen this before

    all I can suggest is that it could be a theme or plugin issue issue, so you’ll need to test to find out which

    Themes

    As a test switch to a default theme such as twentyfifteen, and see if this fixes.

    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.

    and see what is setting this to discussion

    Then come back

    lookingahead
    Participant

    @robin-w LOLOLOL — ‘the work of the devil’ hahaha….yeah it’s pretty messed up as a program goes at times, hahaha…. 😀

    disabled, did not fix

    the buddypress people said on another thread to someone else asking the same question to ask it here, because it was a bbpress issue….now you tell me to go ask it there, because it might be a buddypress issue LOL

    i even tried modifying the ‘bp-custom.php’ file for setting the name of the default URL slug; nada (tho that is a buddypress thing, figured i’d mention it here to show you how long i’ve been trying to solve this)

    isn’t there a plugin out there that can accomplish the ‘change the default URL slug for forums’ issue?

    lookingahead
    Participant

    Hi!

    So….aaaallll I really want to do is change the default URL path for each new forum.

    I do not want the word ‘forum’ to be in any URL, not ever. I want the word ‘forum’ to be ‘chat’ — not ‘forum’….

    Example:
    – current default URL path: https://sitename.com/interaction/talk-name/forum/
    – desired default URL path: https://sitename.com/interaction/talk-name/chat/

    No matter what I do to set it up in the ‘settings’ area in WordPress, ‘forum’ is tacked on to the end of the URL….I don’t want the term, ‘forum’ to be ANYWHERE — I want ‘chat’ to be there instead.

    Suggestions?

    #195865

    In reply to: Spam Forum Topics

    Robin W
    Moderator

    @illuminstr

    If you do not have caching software that might be not accepting the change to the settings, then

    It could be a theme or plugin issue issue, so you’ll need to test to find out which

    Themes

    As a test switch to a default theme such as twentyfifteen, and see if this fixes.

    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.

    Then come back

    #195847
    Robin W
    Moderator

    you’ll need to do some fault finding

    It could be a theme or plugin issue issue, so you’ll need to test to find out which

    Themes

    As a test switch to a default theme such as twentyfifteen, and see if this fixes.

    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.

    Then come back

    #195609
    ljubomir69
    Participant

    One more question, if I switch to default theme will I lost all settings in the theme currently activated on site? Same question for plugins..

    #195602
    Robin W
    Moderator

    ok, I presume you meant this code

    //code to add tutor role 
     
    function add_new_roles( $bbp_roles )
    {
        /* Add a role called tutor */
        $bbp_roles['bbp_tutor'] = array(
            'name' => 'Tutor',
            'capabilities' => custom_capabilities( 'bbp_tutor' )
            );
     
        return $bbp_roles;
    }
     
    add_filter( 'bbp_get_dynamic_roles', 'add_new_roles', 1 );
     
    function add_role_caps_filter( $caps, $role )
    {
        /* Only filter for roles we are interested in! */
        if( $role == 'bbp_tutor' )
            $caps = custom_capabilities( $role );
     
        return $caps;
    }
     
    add_filter( 'bbp_get_caps_for_role', 'add_role_caps_filter', 10, 2 );
     
    function custom_capabilities( $role )
    {
        switch ( $role )
        {
     
            /* Capabilities for 'tutor' role */
            case 'bbp_tutor':
                return array(
                    // Primary caps
                    'spectate'              => true,
                    'participate'           => true,
                    'moderate'              => false,
                    'throttle'              => false,
                    'view_trash'            => false,
     
                    // Forum caps
                    'publish_forums'        => false,
                    'edit_forums'           => false,
                    'edit_others_forums'    => false,
                    'delete_forums'         => false,
                    'delete_others_forums'  => false,
                    'read_private_forums'   => true,
                    'read_hidden_forums'    => false,
     
                    // Topic caps
                    'publish_topics'        => true,
                    'edit_topics'           => true,
                    'edit_others_topics'    => false,
                    'delete_topics'         => false,
                    'delete_others_topics'  => false,
                    'read_private_topics'   => true,
     
                    // Reply caps
                    'publish_replies'       => true,
                    'edit_replies'          => true,
                    'edit_others_replies'   => false,
                    'delete_replies'        => false,
                    'delete_others_replies' => false,
                    'read_private_replies'  => true,
     
                    // Topic tag caps
                    'manage_topic_tags'     => false,
                    'edit_topic_tags'       => false,
                    'delete_topic_tags'     => false,
                    'assign_topic_tags'     => true,
                );
     
                break;
     
            default :
                return $role;
        }
    }

    so with that code loaded to my site, if I go to

    dashboard>users>all users and edit a user, I can change them to the tutor role, and back again and it saves.

    Can you confirm you are using the above code, and that it does not save if you perform the above ?

    #195599
    Robin W
    Moderator

    if you actually posted ‘After clicking on register button wp shows wp-login.php page but without login form. Only -1 in upper left corner.’ on a wordpress forum, why would they even mention bbpress? Youy must have asked a question mentioning bbpress.

    I have looked at the issue and it is a wordpress issue, but general advice

    It could be a theme or plugin issue issue, so you’ll need to test to find out which

    Themes

    As a test switch to a default theme such as twentyfifteen, and see if this fixes.

    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.

    Then come back

    #195585

    In reply to: Integration with WP

    liyacaty
    Participant

    When u load wordpress function inside bbpress. U already integrate both design point and database point. You only need to add WP template tags inside bbpress template.and mostly use wp default functons.

    #195561
    Robin W
    Moderator

    It could be a theme or plugin issue issue, so you’ll need to test to find out which

    Themes

    As a test switch to a default theme such as twentyfifteen, and see if this fixes.

    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.

    Then come back

    #195460
    Robin W
    Moderator

    @clivesmith

    If you fine with code, then this is how I would go about it

    1. create a split in topic & replies, so you have a place to put the ‘featured reply’
    Use this piece of code in your functions file

    bbp_show_lead_topic

    2. then you’ll need a flag for the featured reply.

    This code does an ‘advert’ flag for a topic, but has much of the code you’d need to do a flag for a reply to show it is featured – I’ll leave you to work out which bits you’ll need, but the key is the hook to

    add_action( 'bbp_theme_before_topic_form_submit_wrapper', 'at_checkbox' );

    change this to

    add_action( 'bbp_theme_before_reply_form_submit_wrapper', 'at_checkbox' );

    amend the references from topic to reply

    and add some if(bbp_keymaster() ) to make it only show for you, and you will be most of the way there

    // show the "Mark if it is an advert" checkbox on topic form
    	add_action( 'bbp_theme_before_topic_form_submit_wrapper', 'at_checkbox' );
    		
    function at_checkbox() {
        // Text for the topic form
    	global $topic_advert_text ;
    	?>
    		<p>
    
    			<input name="at_advert" id="at_advert" type="checkbox"<?php checked( '1', at_is_advert( bbp_get_topic_id() ) ); ?> value="1" tabindex="<?php bbp_tab_index(); ?>" />
    
    			<?php if ( bbp_is_topic_edit() && ( get_the_author_meta( 'ID' ) != bbp_get_current_user_id() ) ) : ?>
    
    				<label for="at_advert"><?php echo '<span class="dashicons dashicons-awards"></span>'.$topic_advert_text.'</label>' ;?>
    
    			<?php else : ?>
    
    				<label for="at_advert"><?php echo '<span class="dashicons dashicons-awards"></span>'.$topic_advert_text.'</label>' ;?>
    
    			<?php endif; ?>
    
    		</p>
    <?php
    }
    	
    //check if topic is advert
    function at_is_advert( $topic_id = 0 ) {
    	
    	$retval 	= false;
    
    	if ( ! empty( $topic_id ) ) {
    		$retval = get_post_meta( $topic_id, 'at_topic_is_advert', true );
    	}
    	return (bool) apply_filters( 'at_is_advert', (bool) $retval, $topic_id );
    }
    
    // save the advert state
    		add_action( 'bbp_new_topic',  'at_update_topic' );
    		add_action( 'bbp_edit_topic',  'at_update_topic' );
    
    //update topic 
    function at_update_topic( $topic_id = 0 ) {
    
    		if( isset( $_POST['at_advert'] ) )
    			update_post_meta( $topic_id, 'at_topic_is_advert', '1' );
    		else
    			delete_post_meta( $topic_id, 'at_topic_is_advert' );
    
    	}

    3. amend content-single-topic-lead.php in your child theme’s bbpress directory.

    by

    create a directory on your theme called ‘bbpress’
    ie wp-content/themes/%your-theme-name%/bbpress

    where %your-theme-name% is the name of your theme

    find
    wp-content/plugins/bbpress/templates/default/bbpress/content-single-topic-lead.php
    Make a copy of this file, and put in in the directory called bbpress that you created above, so you end up with
    wp-content/themes/%your-theme-name%/bbpress/content-single-topic-lead.phpbbPress will now use this template instead of the original and you can amend this

    This then you can use to add some code

    if (at_is_advert( $reply_id )) then….. display this reply

    and you should be there

    so

    the reply form will show a checkbox to make a reply featured available only to say keymaster, and as keymaster you can edit a topic to make it a featured
    the content_single_topic_lead will check if a reply is featured and then show it if it is

    I wish I had the time to code this all for you, but please if you do work oyt some code, post back here for other to benefit

    #195425
    Robin W
    Moderator

    ok, I would strongly suspect you membership wall, presumably a plugin – not a lot we can do if it is.

    This generic help should let you define where the issue is

    It could be a theme or plugin issue issue, so you’ll need to test to find out which

    Themes

    As a test switch to a default theme such as twentyfifteen, and see if this fixes.

    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.

    Then come back

Viewing 25 results - 1,026 through 1,050 (of 6,775 total)
Skip to toolbar