Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 9,551 through 9,575 (of 32,505 total)
  • Author
    Search Results
  • #157954
    kendorama
    Participant

    Hi,

    The hyperlinks inside my forum content aren’t blue and are only blue when I hover over it. Is there code to change this?

    I think we changed the “bbpress-forums a” to black since we wanted the main forum listings links to be black and not blue, but we want to change the links WITHIN forum content to blue so it’s more obvious.

    Thanks

    #157945
    Savedin1080p
    Participant

    I recently had this plugin working properly. But now it is not working properly. I have no idea what I did wrong. I couldn’t figure out why my forums were saying page not found so I unchecked the buddypress group forum, and the forum slug option. And then it stopped working. Now unchecking them or checking them does nothing, and the post page where I paste the shortcode only shows up when I disable the plugin.
    My forums page where the forums should be showing up: http://www.minetraverse.com/forums/

    Rosa Parker
    Participant

    Where exactly should I put that code? I put it in functions.php with no result, so I guess I was wrong…

    Thanks for your reply, anyway.

    #157939

    Topic: Help with Custom View

    in forum Themes
    Deleyna
    Participant

    I *think* I’m going about this the right way — but I may not be, so any advice will be appreciated.

    I’ve moved a long-standing forum group onto bbpress. We’re loving it, but members have asked me to make it work more like our old program. I’ve seen a lot of chatter about view-unread elsewhere. I’m using the plugin https://wordpress.org/plugins/bbpress-unread-posts/ — that hasn’t been updated in forever, but works nicely and gives us what we are used to. It creates a meta-key for each topic, each user: bbpress_unread_posts_last_visit_$user-id with the associated value being the unix timestamp.

    Combined with the plugin to go to the first unread post, this works. I’ve also created buttons where the user can reset that meta-key to mark forums as read / unread.

    Now I want a custom view, “Unread View”, that will look for topics where
    _bbp_last_active_time > bbpress_unread_posts_last_visit_$user-id

    Since $user-id is dynamic, I’m thinking that I can’t just specify the view in the functions.php file and be happy.

    What I’ve done:
    added:
    —–
    // adding custom view for unread
    function my_custom_views_init() {
    $args = array ();
    bbp_register_view( ‘unread-view’, __( ‘Unread View’ ), array( $args ), false );
    }
    add_action( ‘bbp_register_views’, ‘my_custom_views_init’ );
    —–
    to my functions.php file.

    created
    unread-view.php based on loop-topics.php with the logic to test if
    _bbp_last_active_time > bbpress_unread_posts_last_visit_$user-id
    and only show the topic if it is… (I’m not sure if I have the logic right yet, or if this is even the right loop to put the test…)

    Added a page with the short code
    [bbp-single-view id="unread-view"]

    But there’s clearly a link missing. I need something to tell the system that I want to use my unread-view.php instead of loop-topics.php for “unread-view” ONLY.

    And I’m not sure how to do that. I’m clearly missing more than a little bit of the logic here. My programming skills are pretty basic, so any help you can give me would be appreciated.

    #157926
    Stagger Lee
    Participant
    remove_filter( 'bbp_get_reply_content', 'bbp_make_clickable', 4);
    remove_filter( 'bbp_get_topic_content', 'bbp_make_clickable', 4); 
    #157916
    Robin W
    Moderator

    yes, just create a wordpress page and put one of the following shortcodes in it

    [bbp-topic-form] – Display the ‘New Topic’ form where you can choose from a drop down menu the forum that this topic is to be associated with.
    [bbp-topic-form forum_id=$forum_id] – Display the ‘New Topic Form’ for a specific forum ID.

    #157914
    Robin W
    Moderator

    Not quite sure why, but the replies class is not showing

    Try adding

    .forums.bbp-replies {
      clear: both !important;
    }

    to your style.css

    Functions files and child themes – explained !

    that fixed it in my browser

    #157912
    andreippo
    Participant

    @korobochkin, thanks a lot for sharing this.

    Should I just paste you code on bbpress/includes/common/functions.php and change the attributes of it?

    What does selena_network refer to?

    Thanks a lot!

    #157908
    Robin W
    Moderator

    ok, it’s caused by your themes style sheet

    line 5600 says

    .no-touch .reply {
      visibility: hidden;
    }
    

    and this is hiding bbpress reply

    you could try adding

    #bbpress-forums .no-touch .reply {
      visibility: visible !important;
    }
    

    to your css file

    see

    Functions files and child themes – explained !

    Stagger Lee
    Participant

    Try to adapt this:

    add_filter( 'nav_menu_css_class', 'namespace_menu_classes', 10, 2 );
    function namespace_menu_classes( $classes , $item ){
        if ( in_array(get_post_type(), array('forum','topic','reply')) )
    	 {
            $classes = str_replace( 'current_page_parent', '', $classes );
            $classes = str_replace( 'menu-item-22902', 'current-page-parent', $classes );
        }
        return $classes;
    }
    Stagger Lee
    Participant

    You explained a bit confuse. You want parent-child menu highlightning ?
    I am afraid it is not possible that way. Your menu link is simple page with shortcode (page-id-502).

    #157895
    Stagger Lee
    Participant

    Try to play with this in functions.php:
    For some buttons you will need to borrow them from TinyMCE advanced plugin and put in core folder, they dont come in the core. (emoticons, and some else, called “plugins”)

    function bbp_enable_visual_editor( $buttons = array() ) {
    	
    	$buttons['tinymce'] = array( 
    	'toolbar1' =>'bold, italic, underline, strikethrough, blockquote, alignleft, aligncenter, alignright, alignjustify, justifyfull, bullist, numlist, outdent, indent, cut, copy, paste, undo, redo, link, unlink, table, fullscreen, image, media, cleanup, help, code, hr, removeformat, sub, sup, forecolor, forecolorpicker, backcolor, backcolorpicker, charmap, visualaid, anchor, newdocument, pastetext, separator, wp_adv,wptadv,media,image',
        'toolbar2' => 'pastetext, pasteword, selectall, formatselect, fontselect, fontsizeselect, styleselect, strikethrough, outdent, indent, pastetext, removeformat, charmap, wp_more, emoticons, forecolor, wp_help,media,image', // 2nd row, if needed
        'toolbar3' => 'pastetext,pasteword,selectall,paste_as_text,preprocess,paste,media,image', // 3rd row, if needed
        'toolbar4' => 'media,image', // 4th row, if needed 
    	'plugins'  => 'anchor, code, insertdatetime, nonbreaking, print, searchreplace, table, visualblocks, visualchars, emoticons, advlist,wordpress,wplink, paste,fullscreen',
    		   ); // 4th row, if needed 
        $buttons['quicktags'] = array ('buttons' => 'strong,em,link,block,del,ins,img,ul,ol,li,code,close');
        return $buttons;
    }
    add_filter( 'bbp_after_get_the_content_parse_args', 'bbp_enable_visual_editor' );
    add_filter('mce_buttons', 'bbp_enable_visual_editor');
    
    #157889

    In reply to: Add forum roles

    joop.stringer
    Participant

    Hey guys,

    Can you please explain me where to put the functions.php file ?
    If I put it in the child theme directory,my whole site goes blank …

    
    <?php
    /**
     * Functions .. additional to all the programs
     *
     * @package WordPress
     * @subpackage Twenty_Fourteen
     * @since Twenty Fourteen 1.0
     */
    
    function add_custom_role( $bbp_roles ) {
    
    	$bbp_roles['DDC Member'] = array(
    	'name' => 'DDC Member',
    	'capabilities' => bbp_get_caps_for_role( bbp_get_participant_role() ) // i just want them to have the same capabilities as participants );
    
    	$bbp_roles['Forumlid'] = array(
    	'name' => 'Forumlid',
    	'capabilities' => bbp_get_caps_for_role( bbp_get_participant_role() ) // i just want them to have the same capabilities as participants );
    
    	$bbp_roles['DDC Bestuur'] = array(
    	'name' => 'DDC Bestuur',
    	'capabilities' => bbp_get_caps_for_role( bbp_get_keymaster_role() ) // i just want them to have the same capabilities as participants ); 
    
    	return $bbp_roles;
    }
    
    add_filter( 'bbp_get_dynamic_roles', 'add_custom_role', 1 );
    
    ?>
    
    Rosa Parker
    Participant

    This is my website: http://ecoperate.com, WordPress version is 4.0.1 and bbPress version is 2.5.4.

    I have two forum groups running on my website (‘Opportunities’ and ‘Forum’); both of them highlight a different item in the menu when they’re active. Now, what I can’t manage to do is highlighting the respective menu items in the forum topics. At least not in a way they can tell the parent forums apart.

    This works perfectly:

    .single-topic .genesis-nav-menu .menu-item-71 > a

    With the exception that only ONE of the menu-items is highlighted for every single topic (71 refers to menu item ‘Opportunities’). What I want to achieve is differentiation, by somehow linking the single-topics to the right parent forum. How can I do this?

    Any help would be greatly appreciated! 🙂

    Thanks,

    Rosa

    #157875
    Robin W
    Moderator

    ok, at least we know you’ve got the right file !

    Try the following

    delete all the content from wp-content/themes/twentyeleven/bbpress/content-single-forum.php

    and then paste the following in

    
    <?php
    
    /**
     * Single Forum Content Part
     *
     * @package bbPress
     * @subpackage Theme
     */
    
    ?>
    
    <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 elseif ( !bbp_is_forum_category() ) : ?>
    
    			<?php bbp_get_template_part( 'feedback',   'no-topics' ); ?>
    
    		<?php endif; ?>
    
    	<?php endif; ?>
    
    	<?php do_action( 'bbp_template_after_single_forum' ); ?>
    
    </div>
    

    save and then try it.

    #157864
    Haris Zulfiqar
    Participant

    <div class="support-topics">[bbp-single-forum id=383269]</div>

    The above shortcode only works in http mode and not https mode. It stops the entire page content from rendering in SSL mode only.

    Nope, this is not an HTML or CSS issue.

    Any ideas?

    #157857
    Robin W
    Moderator

    see

    https://codex.wordpress.org/Class_Reference/WP_Query

    and look at the heading

    Order & Orderby Parameters

    my guess would be

    ‘orderby’ => array( ‘meta_value_num’ => ‘DESC’, ‘date’ => ‘desc’ ),

    `

    the date is the date of the post ie topic

    #157847
    Robin W
    Moderator

    ok, no problem, I can’t judge how technical people are 🙂

    You can do this in your main theme, but you would do better to create a child theme

    Don’t be intimidated, the following should explain

    Functions files and child themes – explained !

    when you get to

    What is FTP and how do I access it?

    To access your files, you’ll need an FTP client. Some host providers do with within their administration area, check with your host provider if in doubt

    I’m pretty sure form memory that hostgator has an area that does that called c-panel, but check with them if in doubt

    #157810
    Robin W
    Moderator

    and since bbp_reply_count is in the metadata, you’d need to refer to that

    see

    https://codex.wordpress.org/Class_Reference/WP_Query

    so something like

    add_action( 'bbp_init', 'view_twentyplus_posts_init' );
    
    function view_twentyplus_posts_init() 
    {
    		
    	$args  = array( 
    
    	 'meta_key'   => '_bbp_reply_count' ,
              'orderby'  => array( 'meta_value_num' => 'DESC', 'title' => 'ASC' ),
              'meta_query' => array(
    		         array(
    			'key'     => '_bbp_reply_count' ,
    			'value'   => '19',
    			'compare' => '>',
    		),
    
    	);
    
    );
    
    	
    	bbp_register_view( 'twentyplus_posts', __('Popular Posts', 'twentyplus'), $args, false );
    	
    }
    
    
    #157800
    a298e
    Participant

    I could solve this by adding following code to function.php.

    add_filter( ‘bbp_get_the_content’, ‘amend_new_topic’, 10, 3);

    Function amend_new_topic ($output, $args, $post_content) {
    if ($args[‘context’] == ‘topic’ && $post_content == ”) $output=str_replace(‘></textarea>’, ‘>question1 question2 question3</textarea>’,$output) ;
    return $output ;
    }

    Thanks,

    #157766
    Robin W
    Moderator

    your code says

    '_bbp_reply_count' => '19'

    shouldn’t that be

    '_bbp_reply_count' => '>19'

    #157764
    Twist360
    Participant

    Sadly not,

    add_action( 'bbp_init', 'view_twentyplus_posts_init' );
    
    function view_twentyplus_posts_init() 
    {
    	//$args = array( '_bbp_topic_reply_count' => '>20' );
    	
    	$args  = array( 
    	 '_bbp_reply_count' => '19'
    	);
    	
    	bbp_register_view( 'twentyplus_posts', __('Popular Posts', 'twentyplus'), $args, false );
    	
    }

    Shows me posts with no responses 🙁

    #157763

    Topic: Import Forums

    in forum Troubleshooting
    Springgg
    Participant

    Maybe I’m blind but …
    I’ve just installed bbPress plugin to my WP, with the idea to import Mingle forums but “Getting There” is not getting me anywhere as there is no Import Forums tab.
    The only tabs there are All Forums and New Forum
    My Dashboard Printscreen
    Am I in the wrong place or…?

    Help please! 🙁

    #157755

    In reply to: User role upgrade

    Robin W
    Moderator

    ok, getting there, but a solution brief would be good. ie a long description of exactly what you want.

    If it’s easy, I’ll drop some code

    If not, I might look at it as a project

    #157748
    Martyn Chamberlin
    Participant

    Hi Robin,

    Okay, I’m just now realizing that we have two problems going on here then.

    1. Problem #1 was a universal to bbPress problem, and your code above fixes that.

    2. Problem #2 is the fact that at http://thewritepractice.com/bw, the forum does not realize that you are the author of the topic you’re posting. There is no Edit button in the in-box area. Only when I enable “Edit others topics” for Participants via the bbPress Advanced Capabilities plugin do you then see the Edit link in the in-box area.

    Any ideas on how we can fix this problem, and what might be causing it?

Viewing 25 results - 9,551 through 9,575 (of 32,505 total)
Skip to toolbar