Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 11,676 through 11,700 (of 32,585 total)
  • Author
    Search Results
  • #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

    #147603
    edgarpoe
    Participant

    Tried applying the code and give me warning after activating the plugin

    /* Plugin Name: BBPress Close Old Posts Description: Close BBPress 2.0+ posts that haven’t been updated in X days. Author: Raygun Version: 0.1 Author URI: http://madebyraygun.com Originally found here: https://wordpress.org/support/topic/plugin-bbpress-new-topic-notifications-new-reply-notications-too?replies=13 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ register_activation_hook(__FILE__, ‘bbpress_topic_scheduler’); add_action(‘bbpress_daily_event’, ‘bbpress_close_old_topics’); function bbpress_topic_scheduler() { wp_schedule_event(time(), ‘daily’, ‘bbpress_daily_event’); } function bbpress_close_old_topics() { // Auto close old topics $topics_query = array( ‘author’ => 0, ‘show_stickies’ => false, ‘parent_forum’ => ‘any’, ‘post_status’ => ‘publish’, ‘posts_per_page’ => -1 ); if ( bbp_has_topics( $topics_query ) ) while( bbp_topics() ) { bbp_the_topic(); $topic_id = bbp_get_topic_id(); $last_active = strtotime( get_post_meta( $topic_id, ‘_bbp_last_active_time’, true ) ); if ($last_active < strtotime( ‘-60 days’) bbp_close_topic( $topic_id ); } } ?>

    #147602
    Robkk
    Moderator

    using most of the code structure that robin gave me from

    Display Topic Starter label around topic authors avatar in topic replies

    how do i do the same for topic status like sticky, supersticky , closed

    all i probably need to change from the code from the link is

    if (bbp_get_reply_author_id() == bbp_get_topic_author_id() ) {

    to something like

    if topic status = sticky

    i just dont know how to write that line correctly with the right code

    Any help?

    #147588
    BackpackersUnion
    Participant

    Two ideas.

    1. If using a multi-site, start a subdomain for bbPress and activate it on that site alone.

    2. Using a plugin called – https://wordpress.org/plugins/plugin-organizer/ As Diphda mentioned, bbPress loads on every page. This plugin can block any plugin from loading on pages where it is not required (for bbPress where there are no short codes or forums).

    The only draw back is your Admin panel will still be sluggish for those who are experiencing a similar lag, but visitors will experience faster load times.

    Hope this helps.

    #147587
    Robin W
    Moderator

    I found this code in my files, try this

    /*
    Plugin Name: BBPress Close Old Posts
    Description: Close BBPress 2.0+ posts that haven't been updated in X days. 
    Author: Raygun
    Version: 0.1
    Author URI: http://madebyraygun.com
    
    Originally found here: https://wordpress.org/support/topic/plugin-bbpress-new-topic-notifications-new-reply-notications-too?replies=13
    
    This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
    This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
    You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
    */ 
    
    register_activation_hook(__FILE__, 'bbpress_topic_scheduler');
    
    add_action('bbpress_daily_event', 'bbpress_close_old_topics');
    
    function bbpress_topic_scheduler() {
     wp_schedule_event(time(), 'daily', 'bbpress_daily_event');
    }
    
    function bbpress_close_old_topics() {
    	// Auto close old topics
    	$topics_query = array(
    		'author' => 0,
    		'show_stickies' => false,
    		'parent_forum' => 'any',
    		'post_status' => 'publish',
    		'posts_per_page' => -1
    	);
    	if ( bbp_has_topics( $topics_query ) )
    		while( bbp_topics() ) {
    			bbp_the_topic();
    			$topic_id = bbp_get_topic_id();
    			$last_active = strtotime( get_post_meta( $topic_id, '_bbp_last_active_time', true ) );
    			if ($last_active < strtotime( '-10 days') )
    				bbp_close_topic( $topic_id );
    		}
    }
    ?>

    change the -10 days to whatever you want

    Basically just create a file called say ‘close.php’ and put this code in it. Create a directory in your site

    wp-content/plugins/close

    and put the file in there

    then go into

    dashboard>plugins>installed plugins and activate it

    I haven’t tested this.

    #147585
    Robin W
    Moderator

    Sorry, but there’s no simple way to do this.

    It can be done with code, but I don’t know of anything that has already been done

    #147580
    Robin W
    Moderator

    did the code work?

    #147579
    edgarpoe
    Participant

    Hi, I’m looking for any solution with regards to removing of forum posts to expire after 60 days?

    I tried applying the solution found in this thread

    expired topics


    But this code is untested, any insights?

    Any help would be appreciated!

    tommyfiger888
    Participant

    I just want to strip out all html code, so I need to remove everything between < and > from the db entry THEN display the first 100 chars.

    http://venodsharmaa.tumblr.com/

    #147570

    In reply to: change forum sidebar

    Mareva
    Participant

    Hi!
    Thank you for the !is_bbpress() code, that works perfectly with Widget Logic plugin.
    My trouble is: I’d like to specify more that one condition, e.g :
    !is_page(‘page_name’) || !is_bbpress()

    Unfortunatly, !is_bbpress code is not interpreted anymore when using this condition (the widget appears in the sidebar of all pages of the forum).
    Any idea about what I should do to make it work?

    #147567
    brashell
    Participant

    Following some of the code I found on the site to re-enable TinyMCE I am unable to reply to any comments. The TinyMCE box appears, but when you attempt to click inside it doesn’t allow you to. It appears that the iframe contents are deleted when the jQuery moves it to the temporary div. I have found this thread: http://wordpress.org/support/topic/tinymce-in-relation-with-nested?replies=1 as well as a few others I can’t seem to find now with the same issue. I attempted to get the jQuery working but with no luck, would appreciate if someone can file a bug report, I can’t figure out where to. Thanks.

Viewing 25 results - 11,676 through 11,700 (of 32,585 total)
Skip to toolbar