Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 12,851 through 12,875 (of 32,503 total)
  • Author
    Search Results
  • Shmoo
    Participant

    I know they don’t try to keep information from us but it can be frustrated at times if you wanna learn something but for X reasons you can’t find it or you just can’t understand it :S

    And it becomes extra frustrated if you know for sure something similar works 1000 times easier inside WordPress out of the box.

    The link you gave me explained it very well, I’ve read it twice and now I made my very first filter.

    bbPress

    
    // Adding extra CSS
    function shmoo_extra_css( $classes ) {
    		$classes[] = 'tab-row';
    		return $classes;
    }
    add_filter( 'bbp_get_topic_class', 'shmoo_extra_css' );
    

    Doing the same thing in WordPress

    
    <?php body_class( 'tab-row' ); ?>
    

    Because this simply doesn’t work.

    
    <?php bbp_topic_class( 'tab-row' ); ?>
    
    #141598

    In reply to: Upgrading WordPress

    Shmoo
    Participant

    We can’t tell you if your site will break or not because we don’t know what your developer has customized and how he has doen that.

    The best solution is something you should always do. Back-up your WordPress site so that you can always go back to a safe position if your update doesn’t work or breaks some functionality.

    Always make sure you have back-ups of your site.
    https://codex.wordpress.org/WordPress_Backups

    #141596
    SickSquirrel
    Participant

    I run 3.7 right now. I was afraid to upgrade WP in case there wee issues with bbPress. So … if I update to 3.81 (the latest) can I expect issues or should it go smoothly?

    I hired someone o set up my site with WP and bbPress. He hasn’t worked on the site after that so if I run into issues, I’m stuck. I’m only online two hours a day and can no longer code or fix errors (due to illness).

    I’m leery about upgrading but know I have to do it.

    #141590
    mabbas64
    Participant

    I’m customizing my bbpress a bit.
    How do I generate new replies. I have to display some Login credentials as a 2nd reply – everytime a new topic is created. I couldn’t find anything about generating replies from code via Google or via searching on these forums.

    Thank you.

    Robin W
    Moderator

    shmoo,

    don’t think there’s any conspiracy to keep this stuff secret, rather that the clever people who write this stuff are generally the same type of people who hate documenting – they enjoy the code and getting it to do stuff, not the this is how I did it.

    I’d love to see a crib on the structure of the bbPress plugin – a list of the directories and files, and a description of what each file did – eg loop-single-forum.php does this, and content-single-topic does that etc. but unless I do one, don’t think it will happen.

    I’ll try to unravel the filter side of the plugin at some stage !

    #141587
    Shmoo
    Participant

    What happens if you do the same inside a WP Blog Post ?

    Do you have the right Twitter link?

    
    
    

    Edit:

    Looks like it doesn’t work here at bbPress.org as well so maybe a core problem 🙁

    Shmoo
    Participant

    Thanks, IF I knew how it worked I would also like to write about it but for some reason they keep this very secretly while 98% of all bbPress changes have to happen through filters.

    I’ve read the WP Codex about this a few times but I just don’t see it, I can’t connect the dots + all tutorials online are often talking about this in a global way, they make up ‘some’ function and add it to another ‘something’ function.
    Pippin often has easy to follow tutorials but I lost him in the second picture.

    A Quick Introduction to Using Filters

    Respect for your link!
    I will make some time for it and read it very slowly today, looks like a very good one because I saw a heading HOW to SPOT a filter!

    #141579
    KaitlinFNF
    Participant

    Hey there, yes – I made a code error accidentally (random space) and then left to run some errands. That’s fixed now, but was not a part of the 404 User issue, which pre-existed the syntax thing : )

    #141560
    KaitlinFNF
    Participant

    Hello,

    Clicking a username from within the BBPress section generates a 404 error.

    I’ve done extensive research on this problem, and haven’t been able to find a fix in the forums so far.

    I’ve deactivated all plugins besides BBPress – no dice.
    I’ve switched the default theme and still get the 404.
    I’ve changed the permalinks and the subscriber role – didn’t make a difference.

    Some code fixes I’ve found in the forums just make it so that the 404 page doesn’t generate, but it shows a blank page, which isn’t really the point. I need it to actually go the member profile.

    I believe all of the software is up to date:
    Wordpress v3.8
    BBPress v2.5.3
    Theme is Dante, v 1.5.1

    Here is a user link: essential-essentials.com/forums/user/Essential-Essentials/

    (The site is still very much in development)

    Thank you for any help you can provide : )

    Shmoo
    Participant

    I’ve look at it a few times in the WordPress Codex and it probably explains GREATLY how it works and what it does but maybe I just don’t get it.

    I understand the concept of taking a function that exists <—> edit it <—> return it to WP Core but how!

    Lets say I just simply want to replace the text inside a HTML “… class=”bbp-topic-spam-link”> ” of the spam link.

    First step I do is search for the function: bbp_topic_spam_link()

    Second step found it inside plugins/bbpress/includes/topics/template.php [ line 2832 ]

    Third step copy the entire function to my functions.php file or plugins functions file.

    Fourth step, edit the code that you want to edit but after that, how do you add the filter to this function to make it a new or your function.

    
    /**
     * Output the spam link of the topic
     * @uses bbp_get_topic_spam_link() Topic spam link
     */
    function bbp_topic_spam_link( $args = '' ) {
    	echo bbp_get_topic_spam_link( $args );
    }
    
    	/**
    	 * Return the spam link of the topic
    	 */
    	function bbp_get_topic_spam_link( $args = '' ) {
    
    		// Parse arguments against default values
    		$r = bbp_parse_args( $args, array(
    			'id'           => 0,
    			'link_before'  => '',
    			'link_after'   => '',
    			'sep'          => ' | ',
    			'spam_text'    => esc_html__( 'Spam',   'bbpress' ),
    			'unspam_text'  => esc_html__( 'Unspam', 'bbpress' )
    		), 'get_topic_spam_link' );
    
    		$topic = bbp_get_topic( bbp_get_topic_id( (int) $r['id'] ) );
    
    		if ( empty( $topic ) || !current_user_can( 'moderate', $topic->ID ) )
    			return;
    
    		$display = bbp_is_topic_spam( $topic->ID ) ? $r['unspam_text'] : $r['spam_text'];
    		$uri     = add_query_arg( array( 'action' => 'bbp_toggle_topic_spam', 'topic_id' => $topic->ID ) );
    		$uri     = wp_nonce_url( $uri, 'spam-topic_' . $topic->ID );
    		$retval  = $r['link_before'] . '<a href="' . esc_url( $uri ) . '" class="bbp-topic-spam-link">' . $display . '</a>' . $r['link_after'];
    
    		return apply_filters( 'bbp_get_topic_spam_link', $retval, $r );
    	}
    

    Thanks.

    cdonahue
    Participant

    Solved!

    Added this code to the bottom of my ‘page’ template, as that appears to be the default page for bbpress:

    if (is_bbpress()) {
    get_sidebar(forum);
    } ?>

    et voila.

    Asynaptic
    Participant

    where do you put the shortcode?

    Shmoo
    Participant

    Well the normal ‘WordPress’ workflow would be something like this..

    Register a new Sidebar inside your functions.php
    – Duplicate the default sidebar.php file inside your theme folder and call the duplicated file sidebar-bbpress.php
    – Open sidebar-bbpress.php and change the default mark-up.
    – Go inside that community.php page template what is showing your forums page and search for the tag <?php get_sidebar(); ?> and change it to <?php get_sidebar( ‘bbpress’ ); ?>

    Save it and that should do the job.

    If everything goes well it will load the sidebar-bbpress.php if not it falls back to the default sidebar.php

    #141539
    avgmatt
    Participant

    I have tried everything to get any kind of buttons to show up either visual and html. If they do show, I click on them and they disappear forever with that user account.

    I am using Genesis framework and have tried multiple themes and no change.

    http://averageoutdoorsman.com/forums/
    user: demo
    pword: demo

    I have tried “bbPress Enable TinyMCE Visual Tab” plugin with no help. I have added the code to show visual in mytheme/functions file. Nothing. Really need help with this.

    #141538
    Shmoo
    Participant

    Finally after 2 years I got a result to give each forum it’s own template!

    
    <?php if ( is_single( array( 52, 89 ) ) ) {
    
    	bbp_get_template_part( 'some-template' );
    }
    else {
    
    	bbp_get_template_part( 'some-other-template' );
    }
    ?>
    

    Very simple..

    #141535
    Shmoo
    Participant

    What’s the PHP code to get this result.

    [bbp-single-forum id=$forum_id] – Display a single forums topics. eg. [bbp-single-forum id=32]

    I would like to include it inside a page template.

    Something I really HATE about bbPress is that it’s very easy to group a bunch of forums inside another forum ( Category ) and list all those forums together at a page template by just the Parent $forum_id of all those forums and you’re done.
    Just like this:

    
    <?php if ( bbp_has_forums( array( 'post_parent' => 104 ) ) ) : ?>
    

    Easy right, but that bbp_has_form functions doesn’t have something like this:

    
    <?php if ( bbp_has_forums( array( 'forum_id' => 75 ) ) ) : ?>
    

    Only show forum_id 75 out of the entire loop, or this:

    
    <?php if ( bbp_has_forums( array( 'forum_id' => 75,88,93 ) ) ) : ?>
    

    That doesn’t look like rocket science to me and it would give us so much more customization options.

    Look at this screenshot I made.
    At the top the block of 4 with the big headings, Mac … + iOS … are forum categories with a bunch a forums inside them. I gave them all their own page templates with each its own ‘post_parent’ Loop.

    
    <?php bbp_get_template_part( 'cat-forums/mac-hardware' ); ?>
    

    At the bottom the green row of none Apple products related are just forums ( single’s ) with no parent stuff.
    It’s ridicules difficult to group them together and list them in a list or row and customize them.
    You have to do something like this:

    
    <?php bbp_forum_permalink( 98 ); ?>
    <?php bbp_forum_title( 98 ); ?>
    <?php bbp_forum_topic_count( 98 ); ?>
    <?php bbp_forum_post_count( 98 ); ?>
    

    That’s all needed to get the same result as at the top for just a single forum_id.

    Beside all that frustration it’s even more difficult to give each single forum ( the page where you show a list of topics ) it’s own template.
    You can’t customize the forums differently. Let’s say I want to give al forums at the top the Apple products relegated stuff it’s own page template and all none Apple related stuff another page template it’s simply not possible.

    There should be an easy way to just add a forum_id or name after the page-template.php like WordPress does.
    Maybe for starters a conditional tag inside the content-single-forum.php template that says, if forum_id’s 75,98,114 go to template X and if forum_id’s 73,120,88 go to template Z else ( if none of those ID’s ) go to template B.

    This has been frustrated me for 2 years now and it’s really a game-breaker in customization of bbPress.

    🙁

    #141534
    Will Brownsberger
    Participant

    My office team is complaining that they can’t save topics in draft.

    I thought it must be a bug, but tracked it down to very deliberate code in topics.js.

    jQuery( document ).ready( function() {
      jQuery( '#misc-publishing-actions' ).find( '.misc-pub-section' ).first().remove();
      jQuery( '#save-action' ).remove();
    } );

    I can’t find any reference to problems in the forums — is this just a policy choice or screen simplification? Or is there a reason why I should not just comment out that code?

    I’ve tested the topics listings and statistics with the code commented out and saving drafts and all appears to perform correctly.

    Some guidance from developers would be much appreciated.

    NOTE: I posted this on January 17, 2014 but it took a publication date 18 months earlier. This is a repost on January 18, 2014.

    #141528
    Anonymous User 5853594
    Inactive

    You’ll have to create a page do display your forums and some forums to fill them. You can find the settings in the admin area under Forums, Topics, and Replies. Settings for the forums can be found under Settings > Forums.

    You could also take al look at the instructions in the Codex to see if you’re missing something.

    #141517
    Anonymous User 5853594
    Inactive

    No, they cannot. Only Moderators and Keymasters can.
    You can find which types of users can do what in the codex, it has an article about user roles and capabilities.

    If you like to change what users can do, you would have to look for a plugin with controls what users can and cannot do.

    Anonymous User 5853594
    Inactive

    It can be done in a roundabout manner by using a shortcode. You insert a topic with the [bbp-single-topic id=$topic_id] tag and voila, you’ve got a post which displays/links a topic.

    #141508
    Anonymous User 5853594
    Inactive

    Not natively, although there are ways to display members of your site/forum.

    BuddyPress is a bit of overkill for just displaying a members list, but if you’ve got an active forum, you might like the addition of its many options (extended profiles, private messaging, user groups come to mind).
    There are probably more plugins who could do it though, you’d have to search the plugin directory for them.

    There are themes (like Twenty Fourteen) which have templates to show members on a page, you could also try that. But you’d have to find a suitable theme or extract the code you need from the theme and add it to your current one (preferably by making a child theme).

    #141507
    avgmatt
    Participant

    I am having the hardest time getting visual buttons on my forum. I will try this. Where are you adding this code?

    #141502
    jules22
    Participant

    I would like to put my search for the forums in my footer.
    <div class=”bbp-search-form”></div>, essentially move this to the footer. I need to echo out this form with php in the footer.

    I tried… echo do_shortcode(‘[bbp-search]‘) and [bbp-search-form]… those 2 shortcodes did not work. However other bbpress shortcodes did work with do_shortcode. Any other options. Or what is the php function that is called to output the search input box ? Thanks Jillian

    #141485
    jernatety1
    Participant

    I’ve been looking all over for the shortcode is there anything to list the members on the forum?

    Thank you

    #141484
    jules22
    Participant

    I would like to put my search for the forums in my footer.
    <div class=”bbp-search-form”></div>, essentially move this to the footer. I need to echo out this form with php in the footer.

    I tried… echo do_shortcode(‘[bbp-search]‘) and [bbp-search-form]… those 2 shortcodes did not work. However other bbpress shortcodes did work with do_shortcode. Any other options. Or what is the php function that is called to output the search input box ? Thanks Jillian.

Viewing 25 results - 12,851 through 12,875 (of 32,503 total)
Skip to toolbar