Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 11,026 through 11,050 (of 32,506 total)
  • Author
    Search Results
  • #150193

    In reply to: Menu link to Profile

    Mathijs Lemmers
    Participant

    It’s been a long time but I have a problem with the last provided code. It should would perfect, were it not that my username contains a space. And the code doesn’t change a space to a dash.

    Could the code above be modified to achieve this?

    Thanks so much in advance!

    #150184
    Robkk
    Moderator
    #bbpress-forums fieldset.bbp-form textarea {
    margin: 0 0 8px;
    border: 1px solid #222;
    }

    try this css code

    #150177

    In reply to: Full Width Forum Help

    aussiestar14
    Participant

    hey,
    unfortunetly the plugin didn’t do the trick…

    so here is the actual bbpress.php:

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

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

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

    <div class=”bbpress-wrap”>

    <div id=”bbpress-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 ?>

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

    <?php do_atomic( ‘close_main’ ); // oxygen_close_main ?>

    </div><!– #main –>

    <?php do_atomic( ‘after_main’ ); // oxygen_after_main ?>

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

    <?php do_atomic( ‘before_footer’ ); // oxygen_before_footer ?>

    <div id=”footer”>

    <?php do_atomic( ‘open_footer’ ); // oxygen_open_footer ?>

    <div id=”footer-content” class=”footer-content”>

    <?php echo apply_atomic_shortcode( ‘footer_content’, hybrid_get_setting( ‘footer_insert’ ) ); ?>

    </div>

    <?php get_template_part( ‘menu’, ‘subsidiary’ ); // Loads the menu-subsidiary.php template. ?>

    <?php do_atomic( ‘footer’ ); // oxygen_footer ?>

    <?php do_atomic( ‘close_footer’ ); // oxygen_close_footer ?>

    </div><!– #footer –>

    <?php do_atomic( ‘after_footer’ ); // oxygen_after_footer ?>

    </div><!– .wrap –>

    </div><!– #container –>

    <?php do_atomic( ‘close_body’ ); // oxygen_close_body ?>

    <?php wp_footer(); // wp_footer ?>

    </body>
    </html>

    Robin W
    Moderator

    One I’ve been playing with

    bbp additional shortcodes

    Robkk
    Moderator

    how to show 5 recent topics on homepage like bbpress.org??

    is it just the recent topics widget, or and edited version of the bbpress index shortcode??

    #150172
    ttmt
    Participant

    Hi all

    I’m using the default bbPress to which I have added custom css – nothing crazy just some colour changes etc.

    Everything seems to working fine apart for the user settings page.

    The avatar shows with the navigation underneath.

    The information about post started shows and I can edit the user details.

    ‘Your Posts Started’ doesn’t show any posts.

    If I checked the page source it shows the code but it’s offset to the right of the window and just shows it as empty boxes.

    #150171
    Robkk
    Moderator

    copy content-single-forum.php into your child theme then add

    <?php if ( bbp_allow_search() ) : ?>
    
    		<div class="bbp-search-form">
    
    			<?php bbp_get_template_part( 'form', 'search' ); ?>
    
    		</div>
    
    	<?php endif; ?>

    above

    <?php bbp_breadcrumb(); ?>

    #150160
    palmdoc
    Participant

    Anyone using the Google Doc Embedder?
    https://wordpress.org/plugins/google-document-embedder/

    I use it to embed PDFs in forum posts and it works fine.
    It’s just that I and users often forget the format of the shortcode so I wonder if it is possible to have a button in the editor to aid one in creating the shortcode?
    [gview file='URL']
    Is it difficult to do so?

    Thanks

    #150158

    In reply to: Full Width Forum Help

    Vikram Singh Rana
    Participant

    Hey I had the same problem and wanted my forum to have a full width looks. I visited your threat and used the code about but it didn’t worked for me. I have tweaked it and it is working for me now. I had the same problem of topics disappearing.

    Please use this code, it should work perfectly fine.

    <?php
    
    /**
     * bbPress - Forum Archive
     *
     * @package bbPress
     * @subpackage Theme
     */
    
    get_header(); ?>
    
    	<?php do_action( 'bbp_before_main_content' ); ?>
    
    	<?php do_action( 'bbp_template_notices' ); ?>
    
    	<div id="bbpress-forums">
    
    	<?php bbp_breadcrumb(); ?>
    
    	<?php bbp_forum_subscription_link(); ?>
    
    	<?php do_action( 'bbp_template_before_single_forum' ); ?>
    
    	<?php if ( post_password_required() ) : ?>
    
    		<?php bbp_get_template_part( 'form', 'protected' ); ?>
    
    	<?php else : ?>
    
    		<?php bbp_single_forum_description(); ?>
    
    		<?php if ( bbp_has_forums() ) : ?>
    
    			<?php bbp_get_template_part( 'loop', 'forums' ); ?>
    
    		<?php endif; ?>
    
    		<?php if ( !bbp_is_forum_category() && bbp_has_topics() ) : ?>
    
    			<?php bbp_get_template_part( 'pagination', 'topics'    ); ?>
    
    			<?php bbp_get_template_part( 'loop',       'topics'    ); ?>
    
    			<?php bbp_get_template_part( 'pagination', 'topics'    ); ?>
    
    			<?php bbp_get_template_part( 'form',       'topic'     ); ?>
    
    		<?php elseif ( !bbp_is_forum_category() ) : ?>
    
    			<?php bbp_get_template_part( 'feedback',   'no-topics' ); ?>
    
    			<?php bbp_get_template_part( 'form',       'topic'     ); ?>
    
    		<?php endif; ?>
    
    	<?php endif; ?>
    
    	<?php do_action( 'bbp_template_after_single_forum' ); ?>
    
    </div>
    
    	</div><!-- #forum-front -->
    
    	<?php do_action( 'bbp_after_main_content' ); ?>
    
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>
    #150153

    In reply to: Random Topic Link

    Stephen Edgar
    Keymaster

    Ha! Yes, I was messing about with that yesterday thinking it would solve the issue here but it does not 😉 If you add the bbPress views widget to a sidebar you will see all those views in the gist you linked above, you can also add the shortcode [bbp-single-view id="single-random-topic"] to a page it it will display the ‘topic’ list template with a single random topic.

    So it can do all that ^^^, but it will not work as a ‘button’ so you can’t have a button with ‘Click this for a random topic’ 🙁

    Something like this should work though:

    https://gist.github.com/ntwb/ca87b9b75a42215b2889

    
    function ntwb_bbpress_random_single_topic() {
        if ( bbp_has_topics( array( 'orderby' => 'rand', 'posts_per_page' => 1 ) ) ) {
     
            while ( bbp_topics() ) : bbp_the_topic();
     
                ?>
                <a class="bbp-topic-permalink" href="<?php bbp_topic_permalink(); ?>"><?php bbp_topic_title(); ?></a>
                <?php
     
            endwhile;
        }
    }
    // Hook into action
    add_action('bbp_template_before_lead_topic','ntwb_bbpress_random_single_topic');
    // Add it as a shortcode [ntwb-bbpress-random-single-topic]
    add_shortcode('ntwb-bbpress-random-single-topic', 'ntwb_bbpress_random_single_topic');
    

    I’m hooking it into just before the ‘lead topic’ (bbp_template_before_lead_topic) in the example above but you could hook that anywhere you would like.

    I also add it as a shortcode [ntwb-bbpress-random-single-topic] for use that way.

    Make any changes you want to the HTML, I am just doing it as a HTML a anchor link with the permalink bbp_topic_permalink() and the link title as the topic title bbp_topic_title(). Change all that HTML code to a button, remove <?php bbp_topic_title(); ?> and replace with Random Topic or whatever takes your fancy.

    #150152

    In reply to: Importing VB4 Database

    Stephen Edgar
    Keymaster

    bbPress includes two vBulletin importers, one is vBulletin3 for vBulettin 3.x and the other vBulletin is for the 4.x versions.

    Did you try the both or only the 3.x version?

    #150151

    In reply to: Last post first

    Stephen Edgar
    Keymaster

    Typically if you want to reverse the order of replies then also adding bbPress “Show lead topic” is handy:

    bbp_show_lead_topic

    #150147
    Stephen Edgar
    Keymaster

    @farsite281 Thanks for this though you should submit your translations in the GlotPress project you linked above:

    https://translate.wordpress.org/projects/bbpress/2.5.x/ca/default
    https://translate.wordpress.org/projects/bbpress/dev/ca/default

    Catalan Language

    • /dev 43% translated, 466 strings translated, 602 Strings untranslated and 401 strings waiting approval
    • /2.5 44% translated, 467 strings translated, 572 Strings untranslated and 160 strings waiting approval

    The best resources to help get you started are:

    The main transators handbook: https://make.wordpress.org/polyglots/handbook/

    The WordPress translator community blog: https://make.wordpress.org/polyglots/

    bbPress translations reference: https://codex.bbpress.org/bbpress-in-your-language/

    WordPress Catalan project site: https://ca.wordpress.org/

    The reason I state that it is best to provide (and update) the bbPress (including WordPress, BuddyPress and Akismet) translations at https://translate.wordpress.org/projects is because each of these projects can have the translations updated as part of WordPress’ “Automatic Updates”, just like you see updates for your plugins and themes, if any of these projects are 100% translated you will be offered to update all of your translations from the WordPress dashboard updates page.

    #150146
    Enric
    Participant

    Hello,

    I’m trying to modify aspect of bbPress installed in my wordpress. I’ve read diferents posts but I can’t find the solution.

    Layout and functionality – Examples you can use

    I need to change aspect buttons in bbPress because of font color and layout are similar and you can’t distinguish them.

    http://i.imgur.com/71FmGz2.jpg

    Could anyone help me or give me a clue to resolve this issue?

    I use Rush theme and wordpress 3.9.1

    Inici

    Thank you

    #150137
    Robkk
    Moderator

    which one would you suggest?

    i have no idea , i have no opinions on any of them since i havent tried any of them.
    You can try each one on a local site if you want and make your decision off that.

    But what i can say is that this rating plugin https://wordpress.org/plugins/rating-widget/

    is on https://codex.bbpress.org/feature-plugins-tracking/

    and it also has some integration with bbpress.

    Basically I want it to show up in only a few of my subforms next to the bb codes on top ^^^

    I have no idea how your going to show the ratings on a few subforums , your probably going to need help on that too, (i have no idea how to help you on this)

    #150135
    cybarmitzvah
    Participant

    which one would you suggest?

    Basically I want it to show up in only a few of my subforms next to the bb codes on top ^^^

    Robin W
    Moderator

    yes that’ll do it, put the ‘or’ in and it should be fine eg

    <?php 
    $displayed_user = bbp_get_reply_author_id() ;
    $role = bbp_get_user_role( $displayed_user);
    if ( bbp_is_user_keymaster($displayed_user)  || $role == 'bbp_moderator'  ) {
    
     echo " <div class=\"reply-author-role\">";
    	
    	echo bbp_reply_author_link( array( 'show_role' => true, 'type' => 'role' ) );
    	
    	echo "</div>";
    	
             }
            else {
    
    }
    ?>
    
    

    The || is an ‘or’ argument, so the if line says ‘if user is keymaster or (||) moderator’ then…

    The else is not really needed, as I presume you’ll do nothing, as you only want it to display if…

    Come back and let us known that it worked.

    Robkk
    Moderator

    ok @robin-w i got it where it just shows for keymaster but how do i add moderator

    heres what i have

    <?php 
    $displayed_user = bbp_get_reply_author_id() ;
    if ( bbp_is_user_keymaster($displayed_user)  ) {
    
     echo " <div class=\"reply-author-role\">";
    	
    	echo bbp_reply_author_link( array( 'show_role' => true, 'type' => 'role' ) );
    	
    	echo "</div>";
    	
             }
            else {
    
    }
    ?>
    Robkk
    Moderator

    @robin-w

    ok this works great when i tryed it on a default theme.

    but on my custom bbpress theme , i seperated each item in the bbp_get_reply_author_link code and wrapped them in a class so i could better position each item.

    so im using

    <div class=bbp-reply-author-av><?php bbp_reply_author_link( array( 'show_role' => false, 'type' => 'avatar' ) ); ?></div>

    <div class=bbp-reply-author-name><?php bbp_reply_author_link( array( 'show_role' => false, 'type' => 'name' ) ); ?></div>

    <div class=reply-author-role><?php bbp_reply_author_link( array( 'show_role' => true, 'type' => 'role' ) ); ?></div>

    now i have 3 avatars, 3 author links, 3 author roles displaying on 1 reply now.

    how should the code be if i dont want to mess with the args and i just want to display this..

    <div class=reply-author-role><?php bbp_reply_author_link( array( 'show_role' => true, 'type' => 'role' ) ); ?></div>

    if the display user in the reply is only a keymaster and a moderator.

    something kind of like this but where it actually works for my bbpress custom theme.

    <?php 
    $displayed_user = bbp_get_reply_author_id() ;
    $role = bbp_get_user_role( $displayed_user);
    if ( bbp_is_user_keymaster($displayed_user) ||$role == 'bbp_moderator');
    
     echo " <div class=\"reply-author-role\">";
    	
    	echo bbp_reply_author_link( array( 'show_role' => true, 'type' => 'role' ) );
    	
    	echo "</div>";
    	
            else {
    
    }
    ?>
    
    Robin W
    Moderator

    wasn’t setting who the user was ! Try

    function role_show () {
    $displayed_user = bbp_get_reply_author_id() ;
    $role = bbp_get_user_role( $displayed_user);
    if ( bbp_is_user_keymaster($displayed_user) ||$role == 'bbp_moderator')  $args['show_role'] = true ;
    else $args['show_role'] = false ;
    return $args ;
    }
    add_filter ('bbp_before_get_reply_author_link_parse_args', 'role_show' ) ;
    
    #150121

    In reply to: Last post first

    Robkk
    Moderator

    found this code, add this to your function.php in your child theme

    function custom_bbp_has_replies() {
      $args['order'] = 'DESC'; // 'ASC' (Ascending, Default), 'DESC' (Descending)
      
      return $args;
    }
     
    add_filter('bbp_before_has_replies_parse_args', 'custom_bbp_has_replies' );
    Robkk
    Moderator

    @robin-w the code doesnt work for me

    Robin W
    Moderator

    untested but the following bar typos should work – add to your functions file

    function role_show () {
    $role = bbp_get_user_role( $user_id );
    if ( bbp_is_user_keymaster() ||$role == 'bbp_moderator')  $args['show_role'] = true ;
    else $args['show_role'] = false ;
    return $args ;
    }
    
    add_filter ('bbp_before_get_reply_author_link_parse_args', 'role_show' ) ;
    
    #150115

    In reply to: Full Width Forum Help

    Robin W
    Moderator

    ok, after the line

    <?php do_atomic( ‘after_main’ ); // oxygen_after_main ?>
    

    add

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

    i want to only display user role on keymaster and moderators users.

    I dont want every participant to have the role shown , only the keymaster and moderators are important enough to me to show their role next to their avatar.

    How would i do that??

    im just using this code to display the users role

    <div class=reply-author-role><?php bbp_reply_author_link( array( 'show_role' => true, 'type' => 'role' ) ); ?></div>

Viewing 25 results - 11,026 through 11,050 (of 32,506 total)
Skip to toolbar