Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 10,401 through 10,425 (of 32,511 total)
  • Author
    Search Results
  • #153342
    Peter Kriegel
    Participant

    I post only to confirm that I have a similar issue.

    I have enabled the Crayon Button to Post code over the crayon Popup.
    It inserts allways the pre Tag with a class attribute.
    If I Post as Admin with Crayon Syntax Highlighter in bbPress all is fine.
    If I post as a User the angle brackets of the preliminary pre Tag are geting masked like so:
    & lt; pre class=”lang:arduino decode:true crayon-selected” & gt;

    If I remove the class attribute and put in a simple < pre > all works fine.

    @netweb
    Thank you for your workaround I will Ty it!

    #153341
    naaatasha
    Participant

    Where can I insert this long code? I’m beginner in bbpress 🙁

    #153330

    In reply to: Two forum index pages?

    Robin W
    Moderator

    bbpress has two ways to display the forums – see

    Step by step guide to setting up a bbPress forum – Part 1

    You just have a page called chat, whilst the slug is still set to forum, so the latter is what the breadcrumb shows.

    so you need to do two things

    1. change the slug to chat
    2. get bbpress to use your template with a sidebar

    I was trying to fix no. 2 first

    Suggest you refer the issue to you theme provider

    #153328
    Robin W
    Moderator

    so if you wanted to change ‘Create New Topic’ to ‘hello mother’ you would do

    //This function changes the text wherever it is quoted
    function change_translate_text( $translated_text ) {
    	if ( $translated_text == 'Create New Topic' ) {
    	$translated_text = 'hello mother';
    	}
    	return $translated_text;
    }
    add_filter( 'gettext', 'change_translate_text', 20 );
    
    #153323
    Toby
    Participant

    Not quite sure if I understand exactly what you want, but one of these should help..

    If you want to display a search form at the top of single topics add the following to your functions.php file:

        function my_bbp_topic_search_form(){
            ?>
            <div class="bbp-search-form">
         
                <?php bbp_get_template_part( 'form', 'search' ); ?>
         
            </div>
            <?php
        }
        add_action( 'bbp_template_before_single_topic', 'my_bbp_topic_search_form' );

    If you want a search form at the top of single forums (or sub forums) use the following in your functions.php file:

        function my_bbp_forum_search_form(){
            ?>
            <div class="bbp-search-form">
         
                <?php bbp_get_template_part( 'form', 'search' ); ?>
         
            </div>
            <?php
        }
        add_action( 'bbp_template_before_single_forum', 'my_bbp_forum_search_form' );

    If you want to limit results to the topic or forum in question that will be a little more tricky but the following post will point you in the right direction (it shows you how to limit searching to a single forum – you’ll need to customise further to apply it to a single topic): http://sevenspark.com/tutorials/how-to-search-a-single-forum-with-bbpress.

    Hope that helps.

    #153317

    In reply to: Two forum index pages?

    Robin W
    Moderator

    ok, make a copy of this file and rename it bbpress.php

    put this file in the root of your theme

    ie

    wp-content/themes/%yourthemename%/bbpress.php

    where %yourthemename% is the name of your theme!

    Then amend as follows

    change

    // Sidebar
     /////////////////////////////////////////////
     if ($themify->layout != “sidebar-none”): get_sidebar(); endif; ?>
    

    to

    // Sidebar
     /////////////////////////////////////////////
     get_sidebar();  ?>
    

    This will then force bbpress to use a forum with a sidebar

    #153302
    akyboy
    Participant

    Hi Guys,

    I would like to see link to last post in my Forum Widget but i cannot figure out.

    This is the code for widget i use:

    <!-- This file is used to markup the widget for Recent Topics info -->
    <table><!-- AKKI - dodao alajment left AUG 22 2014 -->
        <tr align="left">
        	<th>Topics</th>
        	<th>Posts</th>
        </tr>
    
        <?php while ( $widget_query->have_posts() ) :
                	  $widget_query->the_post();
                      $topic_id    = bbp_get_topic_id( $widget_query->post->ID );
     	?>
        <tr>
        	<td>
                <a class="bbp-forum-title" href="<?php bbp_topic_permalink( $topic_id ); ?>"><?php bbp_topic_title( $topic_id ); ?></a>
            </td>
            <td>
            	<?php echo bbp_get_topic_post_count($topic_id, false);?>
            </td>
        </tr>
        <?php endwhile; ?>
    </table>

    If you can please tell me what should i replace to get link to last post on my forums?

    Thanks

    #153284
    NLBlackEagle
    Participant

    I found the way to fix the gray out issue for most people. However this didnt worked for me.

    In this folder: /wp-content/plugins/bbpress/templates/default/css
    Open up bbpress.css and find #bbpress-forums .status-closed,

    I changed color: #ccc; to #000;

    This should have fixed the gray out issue. However it did not worked =/

    This is a paste of the bbpress.css file: I changed line 59

    http://www.hastebin.com/ilehunucay.css

    #153280

    In reply to: Two forum index pages?

    Robin W
    Moderator

    this is probably a theme page issue

    see

    Step by step guide to setting up a bbPress forum – Part 1

    depending on your theme, you may need to do some renaming and editing of files – reda the article and then come back if you need further help

    #153277
    Robin W
    Moderator

    Put the following in your functions file

    //This function changes the text wherever it is quoted
    function change_translate_text( $translated_text ) {
    	if ( $translated_text == 'old text' ) {
    	$translated_text = 'new text';
    	}
    	return $translated_text;
    }
    add_filter( 'gettext', 'change_translate_text', 20 );
    

    you can put in multiple lines eg

    if ( $translated_text == 'old text1' ) {
    	$translated_text = 'new text1';
    	}
    if ( $translated_text == 'old text2' ) {
    	$translated_text = 'new text2';
    	}
    

    Functions files and child themes – explained !

    #153275
    lmcookie62
    Participant

    Hi, i’m getting in a twist trying to sort out my forum index page. It seems like i have 2 versions of it.

    When i setup my forum i created a new page called ‘chat’ and added the [bbp-forum-index]shortcode to it. Everything at first looks to be working great but when i click the index page in my breadcrumbs it takes me to a different index page called ‘forum’ which doesnt have the custom side bar that i set up (which is visible on my ‘chat’ index page and topic pages. One interesting thing is that this ‘forum’ index page picks up my theme styles nicely but my ‘chat’ one loses my theme font.

    I have tried changing my forum slug to ‘chat’ to match my new page and this does resolve the breadcrumb/2 index page issue. BUT i then lose my custom side bar and still dont have the font styling.

    I’m confused on what is going on here so i’m not clear where i need to head to get this sorted out. Should i be making my slug and forum page be named the same or is it that i need to work out why i have two index page? Any advice would be massively appreciated.

    As a note, i used wp tweaks for my custom side bar although i already had SimplePage side bars installed which i use elsewhere on my site. Also, my site uses a custom permalink structure that includes category/post name rather than just the standard postname structure

    I am using wp 4.0, bbpress v2.5.4 and here is a link to my site

    Chat

    Many thanks

    #153273
    xprt007
    Participant

    Hi

    If you mean “3. Creating a forum page”, method 2, I tried that & was able to create this forum using the shortcode => [bbp-forum-index].

    On the Forum settings page & “/wp-admin/post-new.php?post_type=forum” page, it seems this only deals with the forum supposed according to the bbpress default settings to appear at /forums, but consistently wont.

    Does it mean all the forums & subforums have to be created using shortcodes (if so, any link where to find them?).

    This problem is not being experienced on another site sharing the same web hosting account, and has a separate domain. In the root of this particular, problematic site is some web directory. I wonder whether its moved the site to?

    I had a similar issue of consistent failure of accessing /recipes, generated by the recipepress reloaded plugin showing the recipe archive page, even with recommended default settings & permalinks, but just like the bbpress forum at /forums, it had the right url, but content of the site/blog front page. The plugin author, though said it was a bug in the plugin & changes in the code corrected the problem described here. Correct link now here.

    Could there be anything in this root folder .htaccess of the web directory (unrelated to WordPress), which may be causing this & affecting the functioning of bbpress (& not other plugins like Buddypress & co) or WordPress proper & in directory.com/wordpress & even in wordpress.directory.com? I ma not conversant with .htaccess & co. 😉

    So just wondering what to do next.

    Thank you for taking the time to look into this.

    Kind regards

    #153267
    Robin W
    Moderator
    #153255
    janfeng
    Participant

    There codes looks complicated. Can u tell me which capabilities is allow user close their’s topics. @_@

    #153252
    galiulinr
    Participant

    Oh great, Robin. It works for me. Thank you very much!

    <?php
    $idbbp = get_post_meta($post->ID, 'idbbp', true);
    $forum_id = bbpress()->current_forum_id = $idbbp;
    $x='[bbp-single-topic id ="'.$forum_id.'"]';
    echo do_shortcode($x);
    ?>

    #153251
    Robin W
    Moderator

    you won’t be changing subscriber – that is a wordpress role – bbpress has it’s own roles, and probably that is participant.

    I’m sure you can , but haven’t tried so don’t have code offhand.

    Suggest you just create a new custom role, and then set your bbpress user to it.

    #153249
    Robin W
    Moderator

    ok, well without spending hours recreating your issue, I’d suggest you try

    <?php
     $idbbp = get_post_meta($post->ID, 'idbbp', true);
     $forum_id = bbpress()->current_forum_id = $idbbp;
    $x='[bbp-single-forum id forum id ="'.$forum_id.'"]‘ ;
     echo do_shortcode( $x);
    
    
    #153247
    galiulinr
    Participant

    I installed the plugin Easy digital downloads that creates custom record types post_type = download. I edited single.php file removed <? Php comments_template ();?> And I want to insert the code to show the theme of the forum bbpress renamed to the new file single-download.php
    In the custom field on the product page I insert ID Forum.

    #153244
    Robin W
    Moderator

    see

    https://codex.bbpress.org/bbpress-user-roles-and-capabilities/

    and you’ll see a capability for a user to close their own topics.

    you need to either amend the participant role, or create a new role with this capability

    see https://codex.bbpress.org/custom-capabilities/

    #153242
    Robin W
    Moderator

    sorry but what is the ‘page comment form ‘, where on ‘each page’ are you putting the code, and what is ‘each page’

    I am trying to hep you, but you do need to do a detailed response so that I can help.

    For instance

    ” I go into dashboard and select forums and then edit the xx forum and change the content from … to….”

    or

    ‘I edit the page.php file and in line xxx I add YYY’

    #153236
    galiulinr
    Participant

    Hi, Robin!
    I want to replace on the page comment form on the relevant topic in the forum. To do this, on each page I create a custom field in which prescribe ID created threads.
    echo do_shortcode( ‘[bbp-single-forum id forum id =”custom_field”]‘ );
    does not work.

    Robin W
    Moderator

    i have created custom role’s (parent and teacher)

    How have you done this – using a plugin or by coding?

    set dynamic role for bbpress forum itself

    Layout and functionality – Examples you can use

    #153231
    Robin W
    Moderator

    Possibly lots of things.

    I appreciate that you English may not be good, but can you explain in more detail what you are trying to do?

    Also

    1. php won’t work in a page without a plugin
    2. there is no shortcode display_forum
    2. normally you’d use

    [bbp-single-forum id=$forum_id]

    in a page and in php you’d use

    echo do_shortcode( ‘[bbp-single-forum id forum id =”5”]‘ );

    #153230

    In reply to: Hueman theme issue

    Robin W
    Moderator
    #153228
    Robin W
    Moderator

    ok, some themes don’t like this way to display.

    so I try

    Step by step guide to setting up a bbPress forum – Part 1

    look at item 3 and try method 2.

    If that doesn’t work then come back

Viewing 25 results - 10,401 through 10,425 (of 32,511 total)
Skip to toolbar