Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 14,151 through 14,175 (of 32,585 total)
  • Author
    Search Results
  • Daniel J. Lewis
    Participant

    I’m also interested in this, especially with allowing my forum members to use some BBcodes, like spoiler, b, i, and others. (I transitioned from a phpBB board, so I want to make a smooth transition for my users.)

    I’ve been looking for a plugin to do this, but haven’t found anything. I’m thinking of making a simple plugin to do this by popping up a window (via jQuery) that will take the content of their post editor and display it with my CSS and processing the shortcodes. It sounds easy to me, but I could be really wrong.

    b a
    Participant

    Hello,

    For now my query looks like this.

    global $wpdb;
    $myrows = $wpdb->get_results("
    	SELECT * 
    	FROM $wpdb->posts 
    	WHERE (post_type = 'reply' OR post_type = 'topic')
    	AND post_status = 'publish'
    	ORDER BY post_date DESC 
    	LIMIT 0, 15
    ");

    I made this at begining when just started developing project and now going to finish I want to make it more formal.

    I think I’m gonna go with “query_posts”, but I’m still wondering how to hide posts that normal user is restricted to view. I’m talking about forum visability
    Do I check user_can(moderate) and then two ways to query my post?

    Any suggestions?

    #135213
    Daniel J. Lewis
    Participant

    I figured this out. I had to add this in my bbpress_functions:

    function my_topic_class($classes) {
    	$classes[] = 'test-class';
    	return $classes;
    }
    add_filter( 'bbp_get_topic_class','my_topic_class' );
    #135212
    Daniel J. Lewis
    Participant

    How do we implement this? I tried replacing

    <ul id="bbp-topic-<?php bbp_topic_id(); ?>" <?php bbp_topic_class(); ?>>

    with

    <ul id="bbp-topic-<?php bbp_topic_id(); ?>" <?php echo bbp_get_topic_class('test-class'); ?>>

    but the test class doesn’t show. I know I’m working with the right line of code because I can remove the class part altogether and see it removed from my site.

    #135199
    blg002
    Participant

    I want to add a line of text beneath the avatar and other info in each topic reply. I can just hardcode it into loop-single-reply.php (line 47ish). But I’m wondering how i could do this in my functions.php file, i imagine id have to hook into bbp_get_reply_author_link somehow.

    Zé Fontainhas
    Participant

    From https://bbpress.trac.wordpress.org/ticket/2151 ,here’s a quick hack to turn bbPress activity recording on, on sites that have the Discourage search engines option checked. Put this somewhere in functions.php or in your own plugin’s code:

    
    <?php
    
    add_filter( 'bbp_is_site_public', 'yourownprefix_enable_bbp_activity', 10, 2);
    
    function yourownprefix_enable_bbp_activity( $public, $site_id ) {
    	return true;
    }
    
    ?>
    
    #135189
    Marcin Biegun
    Participant

    1. create bbpress directory in your theme directory
    2. copy there loop-single-forum.php from /wp-content/plugins/bbpress/templates/default/bbpress
    3. add wherever you wish the image to appear:
    <?php echo get_the_post_thumbnail($post_id, 'full'); ?>

    #135179
    dtbaker
    Participant
    #135178
    ZebraW
    Participant

    In our website here: http://thehousingforum.com , we use the bbp-forum-index shortcode to list the forum boards. But we want the forum boards to show up more like they are here: http://www.swnk.org/forums/ , which is shows them in a vertical way with Topics, Posts etc. I’m assuming that you have to edit the CSS to do this? Any quick and easy solution? Thanks.

    #135175

    In reply to: Add forum roles

    blg002
    Participant

    For posterities sake, i think i figured this out thanks to this article. I was close just had few things I didn’t know about, hopefully I’m not doing anything too terrible.

    
    function add_custom_role( $bbp_roles ) {
      $bbp_roles['my_custom_role'] = array( 
        'name' => 'My Custom User',
        'capabilities' => bbp_get_caps_for_role( bbp_get_participant_role() ) // i just want them to have the same capabilities as participants
      );
    
      return $bbp_roles;
    }   
    add_filter( 'bbp_get_dynamic_roles', 'add_custom_role', 1 );
    
    #135172

    In reply to: Add forum roles

    blg002
    Participant

    wondering if anyone has a quick snippet of code that answers @anallabres initial question.

    #135161
    remedy01
    Participant

    Hello,

    Is it possible to limit the number of topics displayed with the [“bbp-topic-index”] shortcode?

    Thanks,
    Ian

    #135159
    Heartwood
    Participant

    I’m puzzled by that as well. My quick solution is to add the following to my theme’s stylesheet:

    .bbp-breadcrumb-current {display: none;}

    #135158
    Drover
    Participant

    I found THIS in the Codex, which almost tells me what I need. But where do I place the new, modified file?

    Thanks.

    #135156
    Timo Reith
    Participant

    After about two hours I could find a solution for me. It turned out that current_user_can( 'bbp_forums_admin' ) resulted in false. This is why I could not access the menu or even write replies although the user admin showed me as WP administrator and forum keymaster.

    I wanted to check why my user did not have the capability “bbp_forums_admin” and installed the plugin Capability Manager Enhanced. After activation of the plugin everything worked fine again. All menu items showed up and I could post replies. Maybe this plugin fixed what bbpress messed up after updating to 2.3.2…

    gowdemon
    Participant

    @kevinjohngallagher
    Hi, I tried installing the plugin since I am not good with codes. When I tried to activate the plugin I got the following error.

    “The package could not be installed. PCLZIP_ERR_BAD_FORMAT (-10) : Unable to find End of Central Dir Record signature.”

    Any idea how to fix it?

    #135147
    GGGamers
    Participant

    Hi i want to add a button (create new post) which is when click user can able to make a new post…I will do just same like wordpress forum do here is the link( http://wordpress.org/support/forum/installation). I basically add the button that simple work in the same as like wordpress (Add new) button can do..
    please guide me how can i do that, tell me the code if any aur where should i add the code.Thanks

    #135145
    Laughing Cat
    Participant

    The pagination count (count of pages) for my topic archive is wrong.
    The page count (and clickable links in the generated page navigation) says 16 pages. But actually only pages from 1 to 13 will work (from 14 to 16 will return 404).

    Forum archives and individuall discussion (replies) pagination will work fine.

    I’ve set to display 15 discussions per page. If I change this number the pagination count might change as well but the error will stay (just the total count will change, but again it adds up a couple of pages that shouldn’t be there). This happens also if I use the shortcode to show up latest discussions (topics).

    I tried to reset the counters in forum tools, but didn’t produce a change.

    I tried to force the number of queried posts per page (topics per page) via pre_get_posts filter, but doesn’t change the pagination error.

    I don’t know how to solve this. I’m using bbp 2.3.2 and wp 3.5.2. Buddypress is also installed. No legacy forums/groups activated.

    #135143
    Laughing Cat
    Participant

    Happens to me too.

    Sometimes it logs me in after a while, but if I do searches or read replies the code is all messed up, I have parts of template files inside the reply or search loop. I think you have some serious bug.

    #135137
    remedy01
    Participant

    Hello,

    I am trying to add the logged in user’s forum topics to my BuddyPress site in a custom sidebar. I keep getting this error message:

    Fatal error: Call to undefined function bp_has_forum_topics()

    ..when inserting the following:

    <?php locate_template( array( 'forums/forums-loop.php' ), true ); ?>

    How can I easily list the logged in user’s forum posts without relying on the recent topics widget that ships with bbPress?

    Thanks

    #135133
    Robin W
    Moderator

    I hope this has a very simple solution.

    I need to either stop a BBpress template-tags function from happening, or over-ride it with a new one, but want to do this from a plugin, rather than amending BBpress code.

    Is there a line of code that simply stops a function within BBpress, or a quick way to overwrite one using a plugin.

    More detail below

    I want to revise the bbp_single_topic_description which is currently used in content-single-topic.php to show the phrase “This topic contains 2 replies, has 2 voices etc.” below a post

    The bbp_single_topic_description is defined in /includes/topics/template-tags.php

    I have written a pluggin that creates a new function, and uses the bbp_template_before_single_topic action hook in content-single-topic.php to display the new wording .

    ie

    add_action( 'bbp_template_before_single_topic',  'btv_single_topic_description');
    function btv_single_topic_description( $args = '' ) {
    	CODING STUFF;
    	}

    But I need to stop the old wording displaying as well as this.

    I have three approaches

    1. Just comment out the appropriate line in content-single-topic.php – simple to do, but of course gets overwritten by new releases
    2. Do something in the plugin that stops bbp_single_topic_description from working using code within my plugin – if this is easy, that is what I’d like to do, but as the function doesn’t have an action hook as far as I know, I don’t know how to remove it.
    3. Do something to make my function replace/overwrite the bbpress function, so that I don’t have to hook it anywhere?

    Can anyone help me with either 2 or 3 – I hope it’s an easy answer, but am stumped !

    #135131
    dbungard
    Participant

    I’m trying to make it so that only members of a certain s2member view specific styles in ONLY that forum. Please see below – it’s not working but Im not sure how to call the forum.

       <?php 
    	if (forum("professional-membership-2")){
    	if (current_user_can("access_s2member_level0")){ 
    echo '<style>
    .bbp-reply-form{display:none;}
    </style>';
    } elseif (current_user_can("access_s2member_level1")){
    echo '<style>
    .bbp-reply-form{display:none;}
    </style>';
    } elseif (current_user_can("access_s2member_level2")){
    echo '<style>
    .bbp-reply-form{display:none;}
    </style>';
    } elseif (current_user_can("access_s2member_level3")){
    echo '<style>
    .bbp-reply-form{display:none;}
    </style>';
    } else {
    }  
     }  ?>
    #135130
    cymnet
    Participant

    Hi there,
    I have recently installed bbPress on our site.
    It is a great feature.

    However,
    if you take a look at:
    http://cym.org/webmaster/support/forum/front-end-support/

    You will notice that the area where we can insert a new heading is covered up by the text editor.

    I cant find the code to amend the layout for this.

    Help!

    #135127
    bchhun
    Participant

    WordPress version: 3.5.2
    bbPress version: 2.3.2
    Number of plugins: 1 (bbpress)
    Active theme: Twenty-twelve
    Environment: Virtual machine built with Vagrant.
    Folder rights ?: All good.
    Have I fiddled with bbpress source code ?: not yet.

    I’m having the same issue as multiple topics I’ve seen here.

    The Nonce hidden field is in the form (inspected with Chrome dev tools) but I always get the “ERROR: Are you sure you wanted to do that?”

    Nonce error

    Ünsal Korkmaz
    Participant

    Shortcode to display posts like ShowCase:
    http://theme.firmasite.com/showcase-shortcode/

    I would like to hear your suggestions on this. Please send a comment in post.

Viewing 25 results - 14,151 through 14,175 (of 32,585 total)
Skip to toolbar