Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 11,676 through 11,700 (of 32,521 total)
  • Author
    Search Results
  • yoosuke
    Participant

    Good evening MrRobinW and MrStephenEdgar!
    Japan is currently rainy season.
    I like rainy days as well as sunny days.

    Well, I need your help again…(Of course my website is going well these days!)

    This time, I wanna remove a <option> tag
    with adding php function into “function.php” of WordPress.

    At a create-topic page, users can select one specific forum.
    And the souse code is like…

    <label for="bbp_forum_id">in forum</label><br />
    <select name="bbp_forum_id" id="bbp_forum_id" tabindex="103">
    <option value="" class="level-0">select๏ผš</option>
    <option class="level-0" value="1">Apple</option>
    <option class="level-0" value="2">Banana</option>
    <option class="level-0" value="3">Grapes</option>
    <option class="level-0" value="4">Elephant</option>
    </select>

    In my website, these 4 forums has been set to the public,
    and I don’t wanna change the setting.

    However, I do not show the last one (Elephant!) to every users at the time.
    In this case, what code should I put into the “function.php” of WordPress.

    For me, The case is too difficult to solve.orz
    Would you please advice me…

    many thanks

    WordPress: ver3.9.1
    bbPress: ver2.5.3

    Lumartist
    Participant

    Hello everyone!

    First let me say, that I am not sure if the problem is coming from bbpress. Please let me know it is a general problem.

    The reason I am posting the problem here is, that it appeared right after todays bbpress-update, and there’s also a reference in the message.

    This is the error message I am reciving (debugging enabled):

    Warning: mysql_connect(): Headers and client library minor version mismatch. Headers:50535 Library:50617 in /home/www/xxx/www/wp-includes/wp-db.php on line 1372

    Strict Standards: Redefining already defined constructor for class Tehnik_BBPress_Permissions_Load in /home/www/xxx/www/wp-content/plugins/tehnik-bbpress-permissions/tehnik_bpp_init.php on line 35

    Notice: bbp_setup_current_user was called incorrectly. The current user is being initialized without using $wp->init(). Please see Debugging in WordPress for more information. (This message was added in version 2.3.) in /home/www/xxx/www/wp-includes/functions.php on line 3245

    Notice: bp_setup_current_user was called incorrectly. The current user is being initialized without using $wp->init(). Please see Debugging in WordPress for more information. (This message was added in version 1.7.) in /home/www/xxx/www/wp-includes/functions.php on line 3245

    Strict Standards: Declaration of BP_Poke_Component::setup_globals() should be compatible with BP_Component::setup_globals($args = Array) in /home/www/xxx/www/wp-content/plugins/bp-poke/bp-poke-component.php on line 57

    Strict Standards: Declaration of BP_Poke_Component::includes() should be compatible with BP_Component::includes($includes = Array) in /home/www/xxx/www/wp-content/plugins/bp-poke/bp-poke-component.php on line 57

    The strange thing is, that I am running an exact mirror of the page and db on a subdomain, where I am testing plugins, etc. There I am not getting the error.

    I did had a search on google, but couldn’t find anything helpful. As I am not a coder or server-tech myself, I am a bit lost here. I did try a few things, like disableing plugins, or enabling another theme. But nothing helped so far.

    Here’s a list of plugins I am using right now:

    • (BuddyDev)BP Poke
    • Advanced Custom Fields
    • bbPress
    • bbPress New Topics
    • BuddyPress
    • CodeStyling Localization
    • iThemes Security
    • Members
    • Regenerate Thumbnails
    • Require Featured Image
    • rtMedia for WordPress, BuddyPress and bbPress
    • Tehnik BBPress Permissions
    • WP Smush.it

    I thought it might be a problem with iThemes Security, so I tryed to disable a few things, and also disabled the whole plugin. But the problem is still the same.

    Thanks for your help in advance!

    Best regards,

    Lumartist

    dilasso
    Participant

    Hi,

    My bbpress is working fine. I just want the recent topics to be displayed on my forum-root-page.

    The site can be found here http://schole.at/intern/ (you cannot see the forum index, as the site forum is private, but the site shows the problem anyway).

    I use a page with shortcodes. Using the shortcode [bbp-forum-index] just displays the forum index. But when i try to use the shortcode [bbp-topic-index] the result is as u can see in the link above: it just shows the shortcode itselve.

    I would just like to have the recent topics to be diplayed as they are here in the forum root on bbpress.org/forums

    Thanx for your help.

    Wordpress 3.9.1
    bbpress 2.5.4.
    Theme: Dynamik Website Builder on Genesis Framework

    Stephen Edgar
    Keymaster

    This will do what you after https://gist.github.com/ntwb/8167699 ๐Ÿ™‚

    Pick and choose what you want and remove the rest

    
    /**
     * Register these bbPress views:
     *  - Popular Topics
     *  - Unpopular Topics
     *  - Random Topic
     *  - Recently Closed
     *  - Tagged Test
     *  - All Topics
     *  - Open (Not Closed)
     *
     * @uses bbp_register_view() To register the view
     */
    function ntwb_register_custom_views() {
    	bbp_register_view( 'popular-topics', __( 'Popular Topics' ), array( 'meta_key' => '_bbp_reply_count', 'orderby' => 'meta_value_num' ), false );
    	bbp_register_view( 'unpopular-topics', __( 'Unpopular Topics' ), array( 'meta_key' => '_bbp_reply_count', 'orderby' => 'meta_value_num', 'order' => 'asc' ), false );
    	bbp_register_view( 'random-topic', __( 'Random Topic' ), array( 'orderby' => 'rand' ), false );
    	bbp_register_view( 'closed', __( 'Recently Closed' ), array( 'post_status' => 'closed' ), false );
    	bbp_register_view( 'taggedtest', __( 'Tagged Test' ), array( 'topic-tag' => 'test' ) );
    	bbp_register_view( 'all-topics', __( 'All Topics' ), array( 'order' => 'DESC' ), false );
    	bbp_register_view( 'open', __( 'Open (Not Closed)' ), array( 'post_status' => 'publish' ), false );
     
    }
    add_action( 'bbp_register_views', 'ntwb_register_custom_views' );
    
    #147490

    In reply to: Get rid of #

    JLent14
    Participant

    I put this CSS code in and it fixed the forums. Is this the same fix your’re talking about?

    table.forum td img.avatar {
    float: none;
    margin: 0 5px -8px 0;
    width: 20px;
    }

    #147489
    Robkk
    Moderator

    nevermind i pretty much got it

    looked at https://bbpress.org/forums/topic/freshness-link/

    used <?php bbp_forum_last_topic_title(); ?> to get the title of the last recent topic

    and some code i had that robin gave me some time ago

    end function is this

    <div class="bbp-forum-last-topic-name"><a href="<?php bbp_forum_last_topic_permalink(); ?>" title="<?php bbp_forum_last_topic_title(); ?>"><?php bbp_forum_last_topic_title(); ?></a></div>
    <span class="bbp-last-post-by-author"><?php printf( __( '%1$s', 'bbpress' ),bbp_get_forum_freshness_link( array() ) ); ?></span>
    <?php _e(' by ', 'bbp'); ?>
    <span class="bbp-forum-freshness-author"><?php bbp_author_link( array( 'post_id' => bbp_get_forum_last_active_id(), 'size' => 14 ) ); ?></span>
    Jerry
    Participant

    I thought I was getting good at digging into the codex and css files and using themes to customize, until I tried this. This widget sits in a sidebar and lets the user selects the most popular topics for display, or topics with no replies. I simply want to change the wording for those selections. For example, I want to change “Most popular topics” to “Most Reviewed Books”

    Here is a link to one of my pages. You can see the widget links I want to change under “View List of Books” http://whosgotbooks.com/book-reviews/

    I have tried using firebug to figure out where this is, and done exhaustive word searching within bbpress files. I am at a loss. Please help.

    #147481
    Stephen Edgar
    Keymaster

    I’m really not sure what else I can suggest, my recommendation still stands to upgrade WordPrress and bbPress to the latest versions.

    The only other suggestion that ‘may’ work when using bbPress 2.5.4 without the Thesis Theme compat is to add a bbPress wrapper template in your theme directory that may stop issue 2 from occurring.

    Try creating a file in the root of your theme called bbpress.php and putting the following code into it

    
    <?php
    /**
     * bbPress wrapper template.
     
     */
    
    get_header(); ?>
    
    <?php while( have_posts() ): the_post(); ?>
    
    	<?php the_content(); ?>
    
    <?php endwhile; ?>
    
    <?php get_footer(); ?>
    
    #147479

    In reply to: Missing naviation

    Stephen Edgar
    Keymaster

    bbPress and BuddyPress include the pagination at the top and bottom by default.

    Your custom theme appears to not do that, most likely the template you need to edit is either content-single-topic.php or content-single-topic-lead.php and look for something similar to:

    
    <?php bbp_get_template_part( 'pagination', 'replies' ); ?>
    
    <?php bbp_get_template_part( 'loop',       'replies' ); ?>
    

    And change that to:

    
    <?php bbp_get_template_part( 'pagination', 'replies' ); ?>
    
    <?php bbp_get_template_part( 'loop',       'replies' ); ?>
    
    <?php bbp_get_template_part( 'pagination', 'replies' ); ?>
    

    If your not comfortable doing that then contact the theme author for details.

    #147477
    Stephen Edgar
    Keymaster

    That will not work on it’s own, it was part of the original code that @Lynq did for http://teamoverpowered.com/forums/

    You would probably be best of setting up @Lynq’s solution and then tweaking the changes you want.

    #147454
    jacuzzy
    Participant

    Alright, did not bump any topic > 12 months, and will not do so.

    So here’s where I’m at: Figured out a fresh bbPress install from 2.1 and above has issue 1 resolved for me.
    But with bbPress 2.4.1, the version I’m running, I still needed the most updated bbPress-Thesis compatibility pack to fix issue 2. Unfortunately, the bbPress compatibility pack only goes up to 1.2.4 (what I’m now running), and was only actively being updated until bbPress 2.1 or so.
    I tried running a clean bbPress 2.5.3 (no compatibility pack), and issue 2 occurs. Adding the compatibility pack breaks 2.5.3 completely (and I’ve not invested time looking into code).

    What’s happening now is that issue 1 (HTML for editor inside editor when editing topics) is now occurring when I try to edit replies. So I’m still having issues with the visual editor.

    What puzzles me is that in the Thesis forums, some other users talked about having troubles with their visual editor as well, even with the latest (1.2.4) compatibility pack. But supposedly, someone found a fix and crossposted it in this topic and in the Thesis forums. In the Thesis forums, he claims that this fix is implemented since bbPress 2.2, but I’m running 2.4 and still having issues with the editor?

    The code fix in the above link also does not work for me, since in 2.4.1, bbp_replace_the_content is no longer a method that exists in theme-compat.php. Considering that the symptoms of my current issue seems to be the same as original issue #1, I would think the fix would have something to do with a similar problem where a function is being called twice, but have no idea where to begin looking. Any ideas?

    #147448
    Stephen Edgar
    Keymaster
    #147446

    In reply to: Newby a little lost

    Stephen Edgar
    Keymaster

    If your users copy and paste the Photobucket ‘direct url’ to a topic or reply on a new line by itself the the link will be automatically added.

    If you want to use the IMG tag then <img src="http://example.com/example.jpg" /> is what you need, note the IMG tag uses < and not [/]

    #147430
    Robin W
    Moderator

    ok, have you tried either of the options in the following

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

    #147412

    In reply to: Can't see any topics

    Stephen Edgar
    Keymaster

    Sorry but you only asked how to reset bbPress 1 day 3 hours ago as I write this :/

    I’d suggest setting up a test install and see if you still have the same issue, you can then compare the settings between both sites.

    https://codex.bbpress.org/creating-a-test-site/

    #147398
    wplove3268
    Participant

    I checked out the script in Chrome’s JavaScript console and got this:

    “Uncaught ReferenceError: QTags is not defined” around the 5th line of code:

    edButtons[110] = new QTags.TagButton( ‘code’, ‘code’, ‘', '‘, ‘c’ );
    QTags._buttonsInit();

    That looks like it might be it. Any thoughts on how to define the QTags?
    Thanks in advance for the help.

    wplove3268
    Participant

    I recently installed the eMember plugin (from Tips and Tricks HQ) and have been running bbPress and the Royal Slider slideshow plugin on my site. When all three plugins are running, however, my home page slideshow stops working. I contacted Royal Slider about the issue and they got back to me saying there is a JS error that is blocking the execution of the slideshow-and the source of it was bbPress.

    My site: dev.detoxtheworld.com
    Wordpress version 3.8.1
    Running bbPress version 2.5.3
    I’ve tested the problem using a default theme and it still occurs.

    Here is the script from which the conflict originates: http://dev.detoxtheworld.com/wp-content/plugins/bbpress/templates/default/js/editor.js

    https://bbpress.trac.wordpress.org/browser/tags/2.5.3/templates/default/js/editor.js

    Can anyone tell me what the problem might be and, even better, how to fix it?

    Mod Edit: I removed the code and added a link to the source for improved readability.

    Stephen Edgar
    Keymaster

    Hmmm… What you have outlined sounds like it should be working.

    The one bit I am not sure about is you appear to only be describing WordPress roles and not also including bbPress’ roles in your description above.

    Have you run the bbPress Repair Tool “Remap existing users to default forum roles”?(Tools->Forum)

    This will set the users their bbPress role. The default role is Participant (You can change the default role via bbPress settings)

    As outlined in the roles docs the bbPress role Particpant role includes the capability read_private_forums which in effect means any private forums can be read by users who are logged in, this would include your members and officers WordPress roles if you assign these WordPress role users the bbPress Participant role. If you assign your Officers WordPress role the bbPress Moderator role they will be able to read hidden forums because they have the read_hidden_forums bbPress capability.

    #147382
    scottpoulin
    Participant

    also add:
    add_filter( 'bbp_replies_pagination', 'my_pagination' );
    add_filter( 'bbp_search_results_pagination', 'my_pagination' );

    Though I couldn’t get the search results piece to work – those don’t seem to paginate at all, could be a plugin conflict or something though.

    #147381
    scottpoulin
    Participant

    I had a feeling there would be an easier way than a new plugin. Add this to your theme’s functions.php:

    function my_pagination( $args ) {
    	$args['prev_text'] = 'previous';
    	$args['next_text'] = 'next';
    	return $args;
    }
    add_filter( 'bbp_topic_pagination', 'my_pagination' );
    jbroskos
    Participant

    Hey Everyone,

    We migrated from Simple:Press today to bbPress and so far all is well after a little cleanup, but now I am noticing that we are experiencing issues with permissions within the roles and capabilities. We have 2 tiers of registered users which are our members and our officers. With this we have 2 seperate categories and forums within them with members only being able to see/edit the members forum and officers being able to see/edit the members forum and the officers forum.

    According to here on bbPress, this should be possible as our “members” role would have the “read_private_forums” capability assigned to it and our “officers” role would have that capability as well as the “read_hidden_forums” capability assigned to it. Unfortunately…this is not working properly, our “members” role is not able to view there forum, so in the mean time, I’ve enabled the “read_hidden_forums” capability per and that seems to have “solved” the issue, however now there is no way to restrict access to the officers forum (Which I’ve temporarily deleted until this can be resolved).

    Any help/input/ideas would be appreciated. This should work from what I am reading, so not sure why.

    Thank you!

    —–
    Running:
    WP v3.9.1
    bbPress v2.5.3

    #147376
    JosiahW
    Participant

    I have no idea how to code or debug ๐Ÿ™

    #147375
    Stephen Edgar
    Keymaster

    It is not helpful, there have been vast changes to bbPress codebase since those posts and will only further confuse things.

    Stephen Edgar
    Keymaster

    Here is Robin’s code updated to only show the website if it is not blank:

    
    function user_profile_bbp_website_information()	{
    //this function adds the website to the profile display menu
    	$url=bbp_get_displayed_user_field( 'user_url' ) ;
    	if ( ! empty($url) ) {
    		$label1 =  $rpi_options['item1_label'] ;
    		echo "<p>" ;
    		printf ( __( 'Website : ', 'bbpress' ));
    		$url='<a href="'.$url.'">'.$url.'</a>';
    		echo $url;
    		echo"</p>" ;
    	}
    }
    add_action ('bbp_template_after_user_profile', 'user_profile_bbp_website_information') ;
    

    To add the location you want to add this, this will add the field to their profile so they can edit and update it, you then just duplicate the code from either Robin’s or mine and replace $url with $location and user_url with location:

    
    function ntwb_user_contact_methods_location( $user_contact ){
    
    	/* Add user contact methods */
    	$user_contact['location'] = __('Location');
    
    	return $user_contact;
    }
    add_filter('user_contactmethods', 'ntwb_user_contact_methods_location');
    
    #147370

    Add some debug logging to bbp_set_current_user_default_role() to narrow down the cause,(likely with dumping out the call stack.)

    You should be able to cowboy code something if you’re able to reproduce the issue with a test user account. If you’re able to come up with explicit instructions on how to duplicate this on an installation that only has bbPress running, I’d love to fix anything that isn’t behaving correctly.

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