Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 4,476 through 4,500 (of 32,481 total)
  • Author
    Search Results
  • #190122
    Robin W
    Moderator

    But i have a question it is correct solution? No performace issue ?

    yes it has a performance issue, every line of code has a performance issue.

    No idea by what you mean ‘is it the correct solution’ This is a help service for bbpress not a free bespoke website service. I have already gone beyond the usual to help you.

    It is up to you to decide the balance of SEO against performance, not me.

    #190114
    Robin W
    Moderator

    this does that

    add_filter( 'bbp_get_reply_content', 'rew_remove_code_tags', 10, 2 );
    
    function rew_remove_code_tags ($content, $reply_id) {
    	if (!is_user_logged_in()) {
    		$content = preg_replace('~<code(.*?)</code>~Usi', "", $content);
    	}
    	
    return apply_filters( 'rew_remove_code_tags', $content, $reply_id );
    }
    #190112
    streng
    Participant

    Ok i find a solution i just change flag /i for flag /s

    $content = preg_replace("/<code>.+?<\/code>/S", "", $content);

    But i have a question it is correct solution? No performace issue ?

    #190107
    streng
    Participant

    Thanks, but it work only if text between code is on one row. If someune post log test separated by rows, then didnt work properly.
    Any idea how to fix ?

    #190024

    In reply to: How to add a sidebar

    tommy5725
    Participant

    Hi Stephen,

    Check out this: https://codex.bbpress.org/layout-and-functionality-examples-you-can-use/#26-creating-a-bbpress-specific-sidebar

    Pascal.

    Hello,
    I have tried the info provided at the above referenced link. It sucessfully adds the sidebar option to the widgets area of the dashboard. but i still do not see a sidebar on the pages. I’m thinking it’s the coding in the second part. It states that it’s for the twenty-fifteen theme. I’m using Twenty-Seventeen. Any ideas?

    Thanks,
    Töm

    #190017
    keralat
    Participant

    We have WordPress version 4.9.4 and tried to install bbPress on our site yesterday. Our site is http://www.oen.org

    I have successfully created a forum index using shortcode and populated one forum with a topic. However, when I click on the Forum name from the index, I get taken to a page that merely includes our nav menu and footer (see screenshots below). I cannot get to a page that displays the forum topics. Any ideas what might be going on?

    Forum index:
    Forum index

    Forum page:
    Forum page

    #190013

    In reply to: Visual pbs ?

    Robin W
    Moderator

    lots of questions !

    1. ◾Each time i push a picture, this code appears : “[Caption id=”xxxx” align=”aligncenter” width=”468″> xxxxxxxxxx (…) [/caption]“, but if i keep this, this will be printed online. I need to delete this caption insert for better visuals. Is it normal ?

    I don’t know what you are doing to create the picture – please describe your steps

    2. ◾The user avatar in forum list (for example) is smaller than it will be. Normal ?

    yes that is normal. To amend it you would need to amedn a template. If you confirm that you have and know how to use FTP, I will give you some instructions

    3. ◾Each post modification is notified under the post… But if i edit 15 times a post, it will be 15 rows about this modifications ?

    if you install my style pack plugin

    bbp style pack

    then once activated go to

    dashboard>settings>bbp Style Pack>topic/reply styling item 12 you can limit the number shown and if you go to
    dashboard>settings>bbp Style Pack>topic/topic/reply form items 7 & 8 let you switch off this feature

    4. ◾In responsive mode (mobile), the post height is mid-screen only… It’s difficult to read… any idea ?

    I tried it – it seemed easy to read to me – please explain exactly what you want

    #190012
    Robin W
    Moderator

    it’s just that we are both writing amendments to the same code.

    if you go to

    dashboard>tools>bbp toolkit>information you will see a line saying

    Change the separator between the subforums on the forum index page to

    change that to newline and you should be good to go

    #190002
    Robin W
    Moderator

    Add this to your functions file

    add_filter( 'bbp_get_reply_content', 'rew_remove_code_tags', 10, 2 );
    
    function rew_remove_code_tags ($content, $reply_id) {
    	if (!is_user_logged_in()) {
    		$content = preg_replace("/<code>.+?<\/code>/i", "", $content);
    	}
    	
    return apply_filters( 'rew_remove_code_tags', $content, $reply_id );
    }
    #189998
    streng
    Participant

    Hi,

    I try to acchieve to hide all content between code tags from public users. I want to show this content only for logged users. Any idea how to achieve this?

    The main reason why I want to do this is that, between code tags sometime contain content like quotation which can impact my SEOrank because isnt unique.

    Thanks

    #189951

    Topic: Visual pbs ?

    in forum Troubleshooting
    matevoun
    Participant

    Hi,

    i’ve got some visual problems :

    • Each time i push a picture, this code appears : “[Caption id=”xxxx” align=”aligncenter” width=”468″> xxxxxxxxxx (…) [/caption]“, but if i keep this, this will be printed online. I need to delete this caption insert for better visuals. Is it normal ?
    • The user avatar in forum list (for example) is smaller than it will be. Normal ?
    • Each post modification is notified under the post… But if i edit 15 times a post, it will be 15 rows about this modifications ?
    • In responsive mode (mobile), the post height is mid-screen only… It’s difficult to read… any idea ?

    You can check this on our forum here :
    -=> Forums Saint-Antonin

    Thank you for your help.
    Sorry for my English, i’m French. 🙂

    #189942

    Topic: Page security

    in forum Installation
    dmb1319
    Participant

    WordPress version – 4.9.3
    Theme – Generate Press Pro
    bbPress version – 2.5.14
    link to your site – nuatv.com
    Simple WordPress Membership – 3.6.0

    I use Simple WordPress Membership to secure member only pages on our site, including the BBPress Forum index. The Forum is on a protected page with the shortcode:
    [bbp-forum-index]
    The index page is listed in the WordPress pages.
    However, if I open a forum post page like:

    General discussion


    this page does NOT appear in the list of WordPress pages and therefore I cannot apply access settings to the page.

    Where ARE the various forum pages and how can I get to them to set access permissions? I want to restrict forum access to site members only.

    #189926

    Topic: New install

    in forum Installation
    webcrawler2050
    Participant

    Hey All,

    So i’ve just installed the plugin. All working great, fab, thank you!

    However, i’ve created some someforums BUT when I go to the actual forum front end i get this

    Database Errors
    Query Call Stack Component Error Code Error Message
    SELECT SQL_CALC_FOUND_ROWS wasp_posts.ID
    FROM wasp_posts
    INNER JOIN wasp_postmeta
    ON ( wasp_posts.ID = wasp_postmeta.post_id )
    WHERE 1=1
    AND wasp_posts.post_parent = 656
    AND ((()))
    AND ( wasp_postmeta.meta_key = ‘_bbp_last_active_time’ )
    AND wasp_posts.post_type = ‘topic’
    AND (wasp_posts.post_status = ‘publish’
    OR wasp_posts.post_status = ‘closed’
    OR wasp_posts.post_status = ‘private’
    OR wasp_posts.post_status = ‘hidden’)
    GROUP BY wasp_posts.ID
    ORDER BY wasp_postmeta.meta_value DESC
    LIMIT 0, 15
    apply_filters(‘template_include’)
    wp-includes/plugin.php:203
    bbp_template_include()
    wp-content/plugins/bbpress/includes/core/sub-actions.php:436
    apply_filters(‘bbp_template_include’)
    wp-includes/plugin.php:203
    bbp_template_include_theme_compat()
    wp-content/plugins/bbpress/includes/core/theme-compat.php:559
    BBP_Shortcodes->display_forum()
    wp-content/plugins/bbpress/includes/common/shortcodes.php:241
    bbp_get_template_part()
    wp-content/plugins/bbpress/includes/core/template-functions.php:43
    bbp_locate_template()
    wp-content/plugins/bbpress/includes/core/template-functions.php:105
    load_template(‘~/wp-content/plugins/bbpress/templates/default/bbpress/content-single-forum.php’)
    wp-includes/template.php:690
    bbp_has_topics()
    wp-content/plugins/bbpress/includes/topics/template.php:203
    WP_Query->__construct()
    wp-includes/class-wp-query.php:3336
    WP_Query->query()
    wp-includes/class-wp-query.php:3230
    WP_Query->get_posts()
    wp-includes/class-wp-query.php:2821
    Plugin: bbpress 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘))) AND ( wasp_postmeta.meta_key = ‘_bbp_last_active_time’ ) AND wasp_posts.’ at line 1

    #189922
    Robin W
    Moderator

    ok, I’ve done a very basic version in my style pack plugin, which would let you use a shortcode in say a widget.

    bbp style pack

    once installed go to

    dashboard>settings>bbp style pack>shortcodes and see the last one

    In our case, we have only 5 forums and we were thinking it would be nice to show the same information available in the “Forums” section in the backend of WordPress where it displays a column of the number of subscribers for each forum.

    Pascals tollkit will show the number of sucsbribers in the backend as a column

    bbP Toolkit

    I need to do much more to do what you want for the rest.

    #189916
    brent0r
    Participant

    I’m not sure if this is displayed correctly or not. Appears the li code is dropping outside of the post. It also breaks the template.

    #189908
    Robin W
    Moderator

    Possible? – not without a load of bespoke code – I’m afraid

    #189895
    Robin W
    Moderator

    ok, just posting for anyone searching in future

    THIS IS A WORKING VERSION

    This code allows a standard gravity form lets it be saved as a gravity forum, but on saving also creates a new topic form for a specific forum

    add_action( 'gform_after_submission', 'set_post_content', 10, 2 );
    
    function set_post_content( $entry, $form ) {
    	//set the forum ID that the topic will be saved to
    	$forum_ID = '31086' ;
    	
    	if (!function_exists('bbp_insert_topic')) {
                require_once '/includes/topics/functions.php';
            }
    		
    		//getting post
    		$post_form = get_post($entry['post_id']) ;
    		$title = $post_form->post_title;
    		$content = $post_form->post_content;
    
            // The topic data.
            $topic_data = array(
            'post_parent'       => $forum_ID, // forum ID of Projects  hard coded
            'post_status'       => bbp_get_public_status_id(),   // Subscribed users can see this
            'post_content'      => $content,
            'post_title'        => $title,
            'comment_status'    => 'open',
            'menu_order'        => 0
            );
    
            // The topic meta.
            $topic_meta = array(
            'forum_id'    =>  $forum_ID,
            'reply_count' => 0
    		);
    
            $post_id = bbp_insert_topic($topic_data, $topic_meta);
               
    }
    #189891
    Robin W
    Moderator

    @jkw217 if you can confirm my post above – ie

    can you confirm that

    “5 random reply posts that arent working:
    – all have ‘0’ for post_parent.
    – all have a postmeta _bbp_topic_id #

    I need to know that you

    a) have EXACTLY the same problem and
    b) have the postmeta as above

    then I can give you some code

    #189885
    Robin W
    Moderator

    can you confirm that

    5 random reply posts that arent working:
    – all have ‘0’ for post_parent.
    – all have a postmeta _bbp_topic_id #

    and I can give you some code

    #189883
    carriercarrier
    Participant

    Hi again
    I tried the forum-class, but it only added “text” to my forum see http://prntscr.com/i9yywx.
    I have added the abpve CSS code to my theme.

    Its this tag-cloud widget http://prntscr.com/i9z0m6 that I would like to show above the “forum title, if possible.

    Is there something Im missing here?

    #189880
    Robin W
    Moderator

    or you could link to the ‘forum’ class as it is just before the title

    eg

    .forum::before { 
         content: "Read this: ";
    } 
    #189879
    Robin W
    Moderator

    As it’s above the title, then it’s before bbpress kicks in.

    you could try

    if (is_bbpress) {
    echo 'hello' ;
    }

    but may not work

    Or try to add something to your theme page.php or equivalent before the title
    Something like (this won’t work it’s just to start you off!)

    $array = (2925, 3567,4567) ;
    if (in_array ($page_id, $array)) {
    echo 'hello' ;
    }

    where 2925 etc are forum ID’s

    #189863

    In reply to: # Postname concept

    Robin W
    Moderator

    try this

    a.bbp-reply-permalink {
    display : none !important;
    }
    #189862

    In reply to: # Postname concept

    keshabee
    Participant

    sorry but the style code did not work.
    what i want to hide is those things post numbers like #456, #4654

    hope to hear from you soon, Thank you

    #189861

    In reply to: # Postname concept

    Robin W
    Moderator

    put this in your custom css area

    .bbp-reply-permalink {
    display : none ;
    }
Viewing 25 results - 4,476 through 4,500 (of 32,481 total)
Skip to toolbar