Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 4,226 through 4,250 (of 32,481 total)
  • Author
    Search Results
  • #193853
    quigley05
    Participant

    I am having issues placing a current user’s ‘Replies Created’ and ‘Subscribed Forums’ within their unique templates. See below.

    ‘Replies Created’ (login testuser / test1234)
    https://obeii.com/discussions-replies-created/
    Code seems to just want to display all replies instead of the specific users. How can this be corrected to be filtered to that specific user?

    <?php global $current_user; get_currentuserinfo(); $uid = bbp_get_current_user_id(); ?>
    <?php if ( bbp_get_user_replies_created( $uid ) ) : ?>
        <?php bbp_get_template_part( 'pagination', 'replies' ); ?>
        <?php bbp_get_template_part( 'loop', 'replies' ); ?>
        <?php bbp_get_template_part( 'pagination', 'replies' ); ?>
    <?php else : ?>
        <p><?php _e( 'You have not replied to any topics.', 'bbpress' ); ?></p>
    <?php endif; ?>	

    ‘Subscribed Forums’ (login testuser / test1234)
    https://obeii.com/discussions-subscriptions/
    It works fine for ‘Subscribed Topics’ below the item, however ‘Subscribed Forums’ comes up empty with no results. Any clue on why that is?

    <h2>Subscribed Forums</h2>				
    <?php global $current_user; get_currentuserinfo(); $uid = bbp_get_current_user_id(); ?>
    <?php if ( bbp_get_user_forum_subscriptions( $uid ) ) : ?>
        <?php bbp_get_template_part( 'pagination', 'forums' ); ?>
        <?php bbp_get_template_part( 'loop', 'forums' ); ?>
        <?php bbp_get_template_part( 'pagination', 'forums' ); ?>
    <?php else : ?>
        <p><?php _e( 'You are not currently subscribed to any forums.', 'bbpress' ); ?></p>
    <?php endif; ?>
    #193841
    Colin Poole
    Participant

    Hey all,

    So I have a WordPress page called Register which uses the shortcode [bbp-register] to call up the registration form. I have linked the page below. The problem right now is that the “register” button isn’t doing anything. It does not appear to be clickable so when I enter an e-mail and password you can’t go any further. Not sure what would happen to prevent the button from working, hoping someone can notice if I’m missing anything.

    Register

    Wordpress Version: 4.9.7
    BBPress Version: 2.5.14

    Thanks in advance for any advice!

    #193836
    go-systems
    Participant

    Hi,

    I’m trying to find out if its possible to have shortcode on a page that pulls keyword related posts from bbpress?

    I’m wanting related posted from forums on a page.

    Is this possible?

    #193831
    jisas666
    Participant

    Hello and installed BBpress, and everything is ok. But when I use the Statistics shortcode. I get a column, annoying. Could someone tell me, what php file I can modify. To show me the data horizontally. And not vertical? … It would only be to change that code and for me it would be great.

    My website is: https://www.libreriaurano.com/blog/

    Robin W
    Moderator

    I tried enabling the “Alternate Forum template 1” in bbp style plugin.. but didn’t work.

    That is possibly because your theme is overriding my templates.

    Have you been to

    dashboard>settings>bbp style pack>Topic/Not Working?

    TheBeliever
    Participant

    Hello,

    How do I make sections in main Index forum page? I want to divide forums in multiple sections as mentioned below. I tried enabling the “Alternate Forum template 1” in bbp style plugin.. but didn’t work.

    Example forum – https://mk3focusrs.club/forum/

    I know we must insert a shortcode by creating different page for each forum section… but ain’t understanding how to… can someone help?

    TheBeliever
    Participant

    Thanks for the reply… I enabled the visual editor by adding some code and it worked 🙂

    The bbp style pack plugin looks good.. will try installing it. Thank you 🙂

    #193794
    Robin W
    Moderator

    this will depend on what code the ‘paid forum’ platform has written.

    Most forum platforms have importers, so check what is possible.

    By the way this question is a bit like asking a Ford garage how to buy a Chrysler 🙂

    #193783

    In reply to: detail of Style.css ?

    Robin W
    Moderator

    easiest solution is this plugin, which lets you set all that

    bbp style pack

    or

    bbPress Styling Crib

    #193777
    Robin W
    Moderator

    Shortcodes

    and to customise and style bbpress try

    bbp style pack

    #193776
    Yin Jin
    Participant

    i want to show forums on my own theme but i don’t know how. does bbpress provide shortcodes?

    quigley05
    Participant

    Hi Robin, Oddly enough the Subscribed forums is the only chunk that has issues with this setup. It ignores the current user with the below code. See result at https://obeii.com/discussions-subscriptions/

    	<?php do_action( 'bbp_template_before_user_subscriptions' ); ?>
    
    	<?php if ( bbp_is_subscriptions_active() ) : ?>
    
    		<?php if ( bbp_is_user_home() || current_user_can( 'edit_users' ) ) : ?>
    
    			<div id="bbp-user-subscriptions" class="bbp-user-subscriptions">
    				<h2 class="entry-title"><?php _e( 'Subscribed Forums', 'bbpress' ); ?></h2>
    				<div class="bbp-user-section">
    					
    <?php $user_id = get_current_user_id() ; ?>
    
    					<?php if ( bbp_get_user_forum_subscriptions($user_id) ) : ?>
    
    						<?php bbp_get_template_part( 'loop', 'forums' ); ?>
    
    					<?php else : ?>
    
    						<p><?php bbp_is_user_home() ? _e( 'You are not currently subscribed to any forums.', 'bbpress' ) : _e( 'This user is not currently subscribed to any forums.', 'bbpress' ); ?></p>
    
    					<?php endif; ?>
    
    				</div>
    
    		<?php endif; ?>
    
    	<?php endif; ?>
    
    	<?php do_action( 'bbp_template_after_user_subscriptions' ); ?>
    Robin W
    Moderator

    untested, but try

    <?php do_action( 'bbp_template_before_user_topics_created' ); ?>
    
    	<div id="bbp-user-topics-started" class="bbp-user-topics-started">
    		<div class="bbp-user-section">
    
    <?php $user_id = get_current_user_id() ; ?>
    
    			<?php if ( bbp_get_user_topics_started($user_id ) ) : ?>
    
    				<?php bbp_get_template_part( 'pagination', 'topics' ); ?>
    
    				<?php bbp_get_template_part( 'loop',       'topics' ); ?>
    
    				<?php bbp_get_template_part( 'pagination', 'topics' ); ?>
    
    			<?php else : ?>
    
    				<p><?php bbp_is_user_home() ? _e( 'You have not started any topics.', 'bbpress' ) : _e( 'This user has not started any topics.', 'bbpress' ); ?></p>
    
    			<?php endif; ?>
    
    		</div>
    	</div><!-- #bbp-user-topics-started -->
    
    <?php do_action( 'bbp_template_after_user_topics_created' ); ?>

    This sets the user up as current user

    quigley05
    Participant

    I’m customizing my buddypress/bbpress user pages to be taken out of their traditional framework and placing that data on indvidual pages. However, when I do this the code has issues recognizing the current user and automatically ignores the logged in user. Does anyone know how to resolve this issue?

    URL: http://obeii.com/discussions-topics-started/

    CODE: (topics started)

    <?php do_action( 'bbp_template_before_user_topics_created' ); ?>
    
    	<div id="bbp-user-topics-started" class="bbp-user-topics-started">
    		<div class="bbp-user-section">
    
    			<?php if ( bbp_get_user_topics_started() ) : ?>
    
    				<?php bbp_get_template_part( 'pagination', 'topics' ); ?>
    
    				<?php bbp_get_template_part( 'loop',       'topics' ); ?>
    
    				<?php bbp_get_template_part( 'pagination', 'topics' ); ?>
    
    			<?php else : ?>
    
    				<p><?php bbp_is_user_home() ? _e( 'You have not started any topics.', 'bbpress' ) : _e( 'This user has not started any topics.', 'bbpress' ); ?></p>
    
    			<?php endif; ?>
    
    		</div>
    	</div><!-- #bbp-user-topics-started -->
    
    <?php do_action( 'bbp_template_after_user_topics_created' ); ?>
    #193727

    In reply to: Change user color

    Robin W
    Moderator

    that code alters the names, but doesn’t help me in the ‘status legend’ – how is that legend created ?

    #193726

    In reply to: Change user color

    sopliar
    Participant

    Hello @robin-w, this is the code

    add_filter( 'bbp_get_dynamic_roles', 'ntwb_bbpress_custom_role_names' );
    function ntwb_bbpress_custom_role_names() {
    	return array(
    		// Keymaster
    		bbp_get_keymaster_role() => array(
    			'name'         => 'Amministratore',
    			'capabilities' => bbp_get_caps_for_role( bbp_get_keymaster_role() )
    		),
    		// Moderator
    		bbp_get_moderator_role() => array(
    			'name'         => 'Moderatore',
    			'capabilities' => bbp_get_caps_for_role( bbp_get_moderator_role() )
    		),
    		// Participant
    		bbp_get_participant_role() => array(
    			'name'         => 'Utente',
    			'capabilities' => bbp_get_caps_for_role( bbp_get_participant_role() )
    		),
    		// Spectator
    		bbp_get_spectator_role() => array(
    			'name'         => 'Visitatore',
    			'capabilities' => bbp_get_caps_for_role( bbp_get_spectator_role() )
    		),
    		// Blocked
    		bbp_get_blocked_role() => array(
    			'name'         => 'Bannato',
    			'capabilities' => bbp_get_caps_for_role( bbp_get_blocked_role() )
    		)
    	);
    }
    
    #193719

    In reply to: Change user color

    Robin W
    Moderator

    you will need to post the code you put in your functions file that does the status legend

    #193717

    In reply to: Change user color

    Robin W
    Moderator

    it is not good practise to amend bbpress (or any plugin) files.

    The code should go in the custom css area of your there if it has one, or via a plugin such as https://en-gb.wordpress.org/plugins/simple-custom-css/

    for the threads are, the simplest would be to use my style pack plugin

    bbp style pack

    and change the roles in

    dashboard>settings>bbp style pack>forum roles

    for your specific area, we would need the code you added in your functions file, but that should be able to then use the plugin settings above

    #193716

    Topic: Change user color

    in forum Themes
    sopliar
    Participant

    Hello BBPRESS community,

    I really want to change color of my usergroups in my forum made by bbpress.
    I have the standard role (keymaster, moderator, blocked ecc) but with names modified by editing the file functions.php in my theme folder.

    Now I would like to change the color in the status bar and in the topic/threads, example Administrator in the red, moderators in blue ecc.
    I tried a insert this code in bbpress/templates/default/css/bbpress.css:

    .bbp-author-role-keymaster {
    background:blue;
    color:white;
    padding:0 5px;
    }

    but it does not change anything, why?
    I want to change color here

    View post on imgur.com


    and in threads/topic discussion.
    How I do?
    Thank you very much.

    #193701

    In reply to: PM button in posts

    alriknijdam
    Participant

    Got an error when the user no longer exists.
    Edited your code, this one doesn’t give an error and hides the PM link:

    function ntwb_bbp_bp_pm() {
    	if(function_exists('bp_send_private_message_link') && is_user_logged_in() ) {
    		global $bp;
    		if ($bp->loggedin_user->id !== bbp_get_reply_author_id()){
    			$user = get_userdata( bbp_get_reply_author_id()  );
    			
    			if ( !empty( $user->user_nicename ) ) {
    				$user_nicename = $user->user_nicename;
    				$compose = bp_loggedin_user_domain() . bp_get_messages_slug() . '/compose/?r=' . $user_nicename;
    				
    				?>
    				<div class="forum-pm"><a href="<?php echo $compose ?>" title="Private Message">Private Message</a></div>
    				<?php
    			}
    		}
    	}
    }
    add_action( 'bbp_theme_after_reply_author_details', 'ntwb_bbp_bp_pm' );

    Thank you very much for your code shpitzyl.

    Josh
    Participant

    Hey, this is a bit of a unique situation, so I’m not sure how much you’ll be able to help. We had a bbPress forum which we closed in 2015. The “topics” we migrated to a custom post type so that we could keep them published, but without the forum framework.

    Recently, we’ve decided to re-open the forums on a new site. I exported the Forums, the Topics (which I switched back to the “topic” custom post type), and the Replies. We’re having two issues:

    1) The topics are not longer associated with their respective forums. Same for the replies with their topics. I know we can manually re-associate them, but there are hundreds of topics and replies. I’ve tried the Repair tool under the Tools menu, but it didn’t fix anything. Are there any other options?

    2) Additionally, the replies are not appearing in admin at all. I can see that there are 300+ published replies but where the list should be, I instead get this fatal error:

    Fatal error</b>: Allowed memory size of 33554432 bytes exhausted (tried to allocate 4096 bytes) in <b>xxxxxx\wp-includes\class-wp-hook.php</b> on line <b>279</b>

    Any help on either of these would be much appreciated. Thanks!

    #193649

    In reply to: Subscibe link location

    Robin W
    Moderator
    #193629
    u_Oi
    Participant

    Hi @pauldlb

    Try this… Paste the follow code into function.php (Appearance – Editor – Functions.php)

    /* Remove SideBar From bbPress Profiles and Topics*/
    function disable_all_widgets( $sidebars_widgets ) {
    if ( function_exists('is_bbpress') ) {
    if (is_bbpress()) {
    $sidebars_widgets = array(false);
    remove_all_actions('bp_register_widgets');
    unregister_sidebar( 'bp_core_widgets' );
    }
    }
    return $sidebars_widgets;
    }
    add_filter('sidebars_widgets', 'disable_all_widgets', 1, 1);
    #193605
    Stephen Edgar
    Keymaster

    Checkout the phpBB converter, it’s one of the best example implementations.

    Use _bbp_old_topic_id to grab your old topic id:
    https://bbpress.trac.wordpress.org/browser/trunk/src/includes/admin/converters/phpBB.php#L183

    p.s. The above phpBB converter uses bbPress 2.6 alpha which has many new refinements for the importer over bbPress 2.5, I’d suggest you use bbPress 2.6 alpha for any imports due to those improvements, it can be found here https://bbpress.org/download (bbPress.org and wordpress.org both use bbPress 2.6)

    #193604
    shagee
    Participant

    I get the error message “Oh bother! No topics were found here!”. I have installed bbpress and working on a divi theme. My shortcode for forum works but not my topics or index short code and I get this error. https://motionspecificrelease.ca/msr-community/

Viewing 25 results - 4,226 through 4,250 (of 32,481 total)
Skip to toolbar