Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 11,626 through 11,650 (of 32,521 total)
  • Author
    Search Results
  • #147736
    Steve Truman
    Participant

    Hi Guys

    A conflict exists with bbPress and the WooSidebars plugin

    The conflict causes the whole forum to return a 503 Error. After much digging found the problem comes from this bbPress function

    bbp_get_topic_title() function

    and is fixed by changing

    $title = get_the_title( $topic_id )

    to

    $topic = get_post( $topic_id );
    $title = $topic->post_title;

    Hope you can add that fix to your next version update – Thank you – Steve

    #147731
    Giacomo
    Participant

    An easy way to achieve the second option would be to copy paste this code at the end of the file named functions.php in your current theme folder.

    Make sure to create a backup of the file functions.php first. And always do the changes on a test server, not the live one.

    
    function rsb_limit_posting( $retval ) {
    
    	// count topics of the current user
    	$topic_count = bbp_get_user_topic_count_raw( get_current_user_id() );
    	// if they are 10 or more, do not allow him to create new topic
    	if ( $topic_count > 9 ) return false;
    	// otherwise return the default 
    	return $retval;
    
    }
    add_filter( 'bbp_current_user_can_access_create_topic_form', 'rsb_limit_posting' );
    

    The code above hide the “new topic form” for users who posted 10 or more topics.

    Hope it helps… good luck!

    #147719
    NewSha
    Participant

    I want the users to get email alerts every time their forum role changes.

    Namely, I want to notify users only if their role has changed to Participant.

    I found a way to do this with standard WordPress roles, but it doesn’t work with bbPress roles.

    http://clicknathan.com/web-design/notify-a-wordpress-user-when-their-role-has-been-changed-to-a-specific-role/

    I tried changing if ($new_role == 'contributor') to if ($new_role == 'participant') and even to this if ($new_role == 'bbp_participant') – nothing worked.

    WordPress version: 3.8.2
    bbPress version: 2.5.3

    #147697

    In reply to: Full Width Forum Help

    Robin W
    Moderator

    try taking out the three lines

    <div class=”aside”>
    
    <?php get_sidebar( ‘primary’ ); // Loads the sidebar-primary.php template. ?>
    
    </div>
    

    That div class is probably creating a space for the sidebar

    #147689
    Seedsoms
    Participant

    The profile edit page seems to be broken. When I view it all I see is

    Profile Topics Started Replies Created Favorites Subscriptions Edit Name Name First Name Last Name Nickname Display Name Seedsoms Contact Info Contact Info Website About Yourself About Yourself Biographical Info Account […]

    I assume I’m supposed to be able to edit a lot of these values, such as “Edit Name” or “About Yourself” but it’s all just static text. The […] you see above is linked, but linked back to the profile edit page I am already on.

    #147687

    In reply to: Full Width Forum Help

    watstyl08
    Participant

    Thanks for your response! I’ve done that – and it takes the sidebar away, but no luck on getting bbpress to go full-width.

    At least with that small modification to my bbpress.php, I know bbPress is pointed to the right template — now I just need to figure out what code is preventing the full-width format.

    Link to my forum:

    http://www.ibeacon.com/forums/

    #147686

    In reply to: Full Width Forum Help

    Robin W
    Moderator

    I’d take out the line

    <?php get_sidebar( ‘primary’ ); // Loads the sidebar-primary.php template. ?>

    as that is loading a sidebar !

    #147685
    watstyl08
    Participant

    Hey everyone,

    I’m having a bit of trouble getting my Forum into full-width format. I’m using the Oxygen theme which by default has a left and right sidebar.

    I’ve already copied my “page-template-fullwidth.php”, renamed it as “bbpress.php”, and installed bbPress WP Tweaks to make sure that bbPress is injecting itself into the “bbpress.php” template.

    Given what I’ve read – this should’ve done the trick. I’m wondering if it’s something weird with Oxygen Theme’s templates. I’ve included the code of the Full Width Template i’m using here below. Does anyone see anything out of the ordinary that could be preventing me from getting full-width formatting?

    <?php
    /**
    * Template Name: Full Width
    *
    * Full width page template with no sidebar.
    *
    * @package Oxygen
    * @subpackage Template
    */

    get_header(); // Loads the header.php template. ?>

    <div class=”aside”>

    <?php get_sidebar( ‘primary’ ); // Loads the sidebar-primary.php template. ?>

    </div>

    <?php do_atomic( ‘before_content’ ); // oxygen_before_content ?>

    <div class=”content-wrap”>

    <div id=”content”>

    <?php do_atomic( ‘open_content’ ); // oxygen_open_content ?>

    <div class=”hfeed”>

    <?php if ( have_posts() ) : ?>

    <?php while ( have_posts() ) : the_post(); ?>

    <?php do_atomic( ‘before_entry’ ); // oxygen_before_entry ?>

    <div id=”post-<?php the_ID(); ?>” class=”<?php hybrid_entry_class(); ?>”>

    <?php do_atomic( ‘open_entry’ ); // oxygen_open_entry ?>

    <?php echo apply_atomic_shortcode( ‘entry_title’, ‘[entry-title permalink=”0″]’ ); ?>

    <div class=”entry-content”>

    <?php the_content( __( ‘Continue reading <span class=”meta-nav”>→</span>’, ‘oxygen’ ) ); ?>

    <?php wp_link_pages( array( ‘before’ => ‘<p class=”page-links”>’ . __( ‘Pages:’, ‘oxygen’ ), ‘after’ => ‘</p>’ ) ); ?>

    </div><!– .entry-content –>

    <?php echo apply_atomic_shortcode( ‘entry_meta’, ‘<div class=”entry-meta”>[entry-edit-link]</div>’ ); ?>

    <?php do_atomic( ‘close_entry’ ); // oxygen_close_entry ?>

    </div><!– .hentry –>

    <?php do_atomic( ‘after_entry’ ); // oxygen_after_entry ?>

    <?php do_atomic( ‘after_singular’ ); // oxygen_after_singular ?>

    <?php endwhile; ?>

    <?php endif; ?>

    </div><!– .hfeed –>

    <?php do_atomic( ‘close_content’ ); // oxygen_close_content ?>

    </div><!– #content –>

    <?php do_atomic( ‘after_content’ ); // oxygen_after_content ?>

    <?php get_footer(); // Loads the footer.php template. ?>

    #147684
    Robin W
    Moderator

    the following code in your function file will remove the subscribe

    function remove_subscribe () {
    $retval=false ;
    return $retval ;
    }
    
    add_filter( 'bbp_get_topic_subscribe_link', 'remove_subscribe' );

    ‘share’ is a buddypress function I suspect – sorry I know nothing of buddypress !

    #147677
    Robin W
    Moderator

    There are all sorts of backdoors that a ‘page/post’ restricting plugin doesn’t cover for bbpress

    For instance :

    search is usually forum wide
    http://www.mysite.com/topics
    http://www.mysite.com/replies
    looking at topics/replies created in a user profile
    recent topics widget
    recent replies widget

    all usually just bypass a plugin written for pages.

    which is why I wrote the private groups plugin

    https://wordpress.org/plugins/bbp-private-groups/

    There is no reason why it shouldn’t work alongside your members with members protecting your pages & posts, and private groups protecting your forums.

    BUT you do have to set users up to see restricted forums, and this is manual. It is quick to do (just a setting within the user settings), but if you have an automated joining process, then you would need to add a manual step (or write some code!)

    #147676
    Robin W
    Moderator

    If it is text within wordpress/bbpess then the following code in you functions file will change it

    //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 );
    

    But ‘text’ may be made up of code. For instance in your ‘create new topic in’ – the word topic may actually be a variable (I haven’t looked !), and the wrap around text used elsewhere for instance ‘create topic in’, ‘create reply in’, ‘create forum in’

    Daniel Tara
    Participant

    On my local server search results URLs get pretty permalinks and search works. On my live server the query string is shown and no search results are returned.

    I did a test by manually entering the search URL as it was prettyfied on my local server and surprisingly search works.

    The search URL that bbPress returns looks like this and returns no results:
    http://www.onedesigns.com/support/search?action=bbp-search-request&bbp_search=pinboard

    The prettified link for the same search looks like this:
    http://www.onedesigns.com/support/search/pinboard

    So the search engine works and apparently it’s the permalinks that cause the issue. Changing or resaving WordPress’ permalink setting didn’t make any difference.

    A var_dump for bbp_search returns NULL.

    The only difference between my local server and live server is that on my local server I use Apache and on my live serve nginx + Varnish.

    Is there any incompatibility between bbPress and nginx or Varnish? Are there any permalink configurations I must apply?

    Thank you

    #147671
    Killerrabbit2
    Participant

    WP V. 3.9.1
    bbPress v 2.5.4

    I’ve been banging my head against the wall on this one.

    Here is what I need to do:

    I have users who need to register for different forums. Each specific forum has restrictions. I am using the S2Member plugin. I can with their shortcodes restrict content within a page. I then can restrict a forum listing when I use a bbPress short code within a page.

    The problem is that bbPress dynamically creates topic pages, thus I can not put any shortcode logic in to restrict who sees the topics.

    S2Member has some code that works to restrict content with a function. However, using bbPress conditional tags don’t work. I can use the native conditional tags which do.

    Below is my code that I can’t seem to get working:

    add_action ("wp", "my_custom_capabilities");
    
    function my_custom_capabilities ()
    	{
    	if(bbp_is_topic_tag('Global'))
    		{
    		header ("Location: ".S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_URL);
    		exit();
    		}
    	}

    Ideas?!

    #147662
    sniffertje
    Participant

    I installed BBpress on wordpress, but when using HTML tags then these are not working.
    They are also not white or anything, it’s totally not in the post. Bold, Italic etc are working fine.

    For example which code is not working:

    #147650

    In reply to: Latest 5 Topics?

    Robin W
    Moderator

    I’ve just started working on a plugin that will have some additional shortcodes in it

    the only functional one so far is the ability to show the latest xx topics

    you can download it from here

    bbp additional shortcodes

    you use the shortcode

    [bbp_display_topic_index show=’5′]

    #147645
    annakyn
    Participant

    I would like to display the latest 5 topics, exactly as displayed on the homepage of bbpress. How do I go about this, I can’t seem to see a shortcode that would work?

    #147635
    Robin W
    Moderator

    and the second problem…

    the logon widget is held in :

    wp-content>plugins>bbpress>includes>common>widgets.php

    I suspect you’ll already know that it is bad practice to alter core files, as they get overwritten on upgrades.

    You’d do better to fork the code into your functions file, rename and create your own widget based on that.

    #147628
    Robin W
    Moderator

    ok, you’ll need to add the following to your functions file

    //this function removes the "this topic contains..." and "this forum contains..."  text
    function no_description ($retstr) {
    $retstr="" ;
    return $retstr ;
    }
    
    add_filter ('bbp_get_single_topic_description', 'no_description' ) ;
    add_filter ('bbp_get_single_forum_description', 'no_description' ) ;
    
    //This function changes the text wherever it is quoted
    function change_translate_text( $translated_text ) {
    	if ( $translated_text == 'Your account has the ability to post unrestricted HTML content.' ) {
    	$translated_text = '';
    	}
    	if ( $translated_text == 'Oh bother! No topics were found here!' ) {
    	$translated_text = '';
    	}
    	return $translated_text;
    }
    add_filter( 'gettext', 'change_translate_text', 20 );
    
    #147624
    Stephen Edgar
    Keymaster

    I’ll have to take a closer look at this as I have thought/presumed that all vBulletin v3.x installs include the ‘topic tags’ table tagthread irrespective of if they are used or not.

    That said because of that error the import stopped, the good thing is that if you click ‘Start’ again it will resume from where it left of, in this case it will start importing your ~300,000 replies. (Just ensure you use the same settings for the import as your outlined above).

    I’ll try to get to this on the weekend whilst I’m updating many of the other importers 🙂

    #147623
    Mareva
    Participant

    Hi!

    I use the 1.7 version.

    Listen… When I red your last message, I began to make a clean installation of my bbPress forum with Private Groups plugin on a server (I developp on localhost) in order to give you an access and to make it easier for you to check what should be wrong with the plugin.
    At the beginning, everything seemed to work correctly (without any bug)!

    Then I changed the slug of my 2 forums (slug? I don’t know if it is the right word in english. I mean, the name that is directly used in the permalink).
    … and issues appeared!
    – When no top level forum is defined, any logged user can see all forums in the index (even if visibility option is not activated in Private groups). He can’t access to the “private” one but he see it.
    – Search don’t hide ‘private group’ topics and replies from search results.

    I tried to definitly delete the forums and create them again but it didn’t change anything…
    So what? … I don’t know!

    I will send you an email in a few minutes (I’ve found your address on your site) with further informations (access code to my site)

    Regards,
    mareva

    #147617
    master412160
    Participant

    What does this insert in the db that I need to remove manually?

    Because my blog messed up because of this plugin. It is poorly coded to deal with the following situation:

    Owner doesn’t want to get hacked because he has user ID 1 so he creates a new admin account and changes his previous account data to the new one.

    This the plugin does not handle well…

    Now I got no forum rules tab in user list, all forum roles are loaded in the blog roles.

    Sudar Muthu
    Participant

    With the recent bbPress update, the way notification is sent is changed. Earlier individual emails are sent to each people, but now only one email is sent with all the email address in bcc. I guess this is done to prevent email bottleneck. But this seems to have caused a issue in my setup.

    I use wpmandrill to send emails through the mandrill service. With the new change, the to and from address is changed to a default “do not reply” email address that is calculated using the current domain name. The code is present in the bbpress/includes/common/functions.php


    $do_not_reply = '<noreply@' . ltrim( get_home_url(), '^(http|https)://' ) . '>';

    So it becomes <nobody@domain.com>

    When this address is used as “to” address, the mandrill service thinks that it is an invalid email address because of the angle brackets.

    I went through the code, but there is no filter to change the $do_not_reply variable.

    #147614
    quaffapint
    Participant

    Hi,

    Odd indeed – it’s driving me batty trying to go through all the code and determine what function could be doing this.

    I’ve turned off any other bbpress related plugin I had, switched to standard Twenty Fourteen theme. I then go in as anonymous on a different browser, create a new topic and then I can’t even see the topic I just created (nor any other anonymous person’s topics).

    The topic gets created, looks fine and I can see it. It’s just anonymous users can’t see any anonymous posts.

    #147609
    Robkk
    Moderator

    solved my own problem

    found this

    Add “Resolved” to Closed Topics in bbPress

    instead of using function.php

    i threw this into loop-single-topic ,
    the way i have my topics arranged it shows below the title

    for closed label

    <?php
       $topic_id = bbp_get_topic_id();
       if ( get_post_type( $topic_id ) == bbp_get_topic_post_type() && bbp_is_topic_closed( $topic_id ) )
          echo '<span class="closed">[CLOSED]</span>';
    ?>

    for sticky label

    <?php
       $topic_id = bbp_get_topic_id();
       if ( get_post_type( $topic_id ) == bbp_get_topic_post_type() && bbp_is_topic_sticky( $topic_id ) )
          echo '<span class="sticky">[STICKY]</span>';
    ?>
    #147604
    Kaluh
    Participant

    Hi There,

    I’m working on my forum and i’m customizing my profile page(the one you can see other people’s reccords and number of posts)

    the only thing i get to see are:

    Forum Role
    Topics Started
    Replies Created

    the fields in the code look like:
    <p class="bbp-user-forum-role"><?php printf( __( 'Forum Role: %s', 'bbpress' ), bbp_get_user_display_role() ); ?></p>

    i’m just wondering how to show first/lastname or only lastname.

    hope you can help,

    Best regards,

    Kaluh

Viewing 25 results - 11,626 through 11,650 (of 32,521 total)
Skip to toolbar