Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 2,051 through 2,075 (of 32,466 total)
  • Author
    Search Results
  • #217170

    In reply to: User Statistics

    Chuckie
    Participant

    Yes, I have the code. And originally it was available and after I made my first concern about it exposing usernames when it shouldn’t somebody decided (somehow) to lock it online in the plugin repository.

    This is my current plugin (with my corrected code discussed above):

    https://www.dropbox.com/s/vjovpjnk22gxcct/bbpress-improved-statistics-users-online.zip?dl=0

    #217169
    Robin W
    Moderator

    find
    wp-content/plugins/bbpress/templates/default/bbpress/content-single-forum.php

    transfer this to your pc and edit

    find line 45

    <?php bbp_get_template_part( 'form', 'topic' ); ?>

    and delete this line and save

    create a directory on your theme called ‘bbpress’
    ie wp-content/themes/%your-theme-name%/bbpress

    where %your-theme-name% is the name of your theme

    Then transfer the file you saved above and put in in the directory called bbpress that you created above, so you end up with
    wp-content/themes/%your-theme-name%/bbpress/content-single-forum.php

    bbPress will now use this template instead of the original

    #217165

    In reply to: User Statistics

    Chuckie
    Participant

    I think he is on about the statistics one where you showed me the needed code changes and said someone clone the plugin.

    Robin W
    Moderator

    there probably is but beyond free code.

    #217118
    maskis
    Participant

    Thank you for your answer!

    You were right, most of my problems were due to not having sidebar on the homepage. This is now fixed!

    I encountered now more frustrating problem. When I use the shortcode above on my homepage, the forum is displayed in default template. In the actual Forum-pages the template is alternate forum template 1 (I´m using bbPress Style Pack plugin). I would like the homepage view to be alternative forum template 1 too.

    In Style Pack plugin “Not Working?” section reads as follows:

    “It’s not working !!
    It may be as simple as closing and restarting your browser, so try this first !!

    If that doesn’t work…

    Background
    Style pack works with many/most sites, but it can fail due to a myriad of reasons, including (but no means limited to) site permissions, php versions, other plugins and most often site themes where the theme author has altered bbpress files.

    This is no-ones fault – whilst I can control how bbpress performs, there are many thousands of plugins and themes, all of which may be trying to amend the same stuff as I am, and many host poviders who will have differing but equally valid permission and code versions.

    Problem finding
    1. “caching” software that speeds up the download of your site, but may not recognise and immediately make changes from my plugin

    Do you know if you are using caching software? If so then try refreshing, purging or deactivating to see if this fixes.

    If you still have the issue, we need to work out which parts are working and which not

    We need to look at 2 areas – files and css

    2. Files
    If your theme author has changed bbpress files in his theme, this will be for valid reason, which may relate to either style or functionality

    No bbpress files have been changed in the theme

    3. CSS
    If css had loaded then the text below will have a green background, if it has not loaded this will be a red background

    This sentance should have a green background

    If the background is red, then try amending the “css location” tab above

    check the activate box and set the location to
    wp-content/uploads/
    and save these changes
    and then come back and re-check this area.”

    I´m not using any cache plugin at least to my knowledge. I´ve also tried to unactivate all of the other plugins than bbPress, Style Pack and BuddyPress. This makes no difference.

    Can´t find any settings that would force the homepage view on the theme to be any different than on any other sections of my site.

    Any clues, what could I do to fix the problem?

    #217117
    Robin W
    Moderator

    if I had to guess, I’d probably guess that you are using [bbp-forum-index] on a gutenberg block page, and that you have either not used the shortocde block, or have code blocks in the page.

    The bits in your pasteboard are before bbpress fires

    #217110
    Robin W
    Moderator

    I suspect that your homepage just needs to have the correct sidebar applied to it, so yes you would use the shortcode as you suggest, but in dashboard>pages>homepage you will need to allocate a sidebar

    #217094
    quix8
    Participant

    Thanks for this post, But I think for

    6. Load the style sheet after bbpress

    The correct way is this:

    /**
     * load custom bbpress css after bbp default css
     */
    wp_enqueue_style( 'custom-bbpress', get_stylesheet_directory_uri() . '/css/custom-bbpress.css',array('bbp-default'),'1.1','all');
    #217084
    maskis
    Participant

    Hi!

    And thank´s for great plugin!

    I have tried to change my forum page to be my site´s homepage using shortcode [bbp-topic-index]. I can make my forum index come up in a box in my homepage, but it is missing all the extra´s in the forum pages (ie. latest posts, latest topics, etc.). Is there a way to really set a forum page to be homepage of my site?

    I have the newest versions of WP and bbPress, and I´m running on newest version of Customizr theme.

    My homepage is http://www.maltaasta.fi (a Finnish homebrewing site) and I would like the visitors to get straight to my forum in http://www.maltaasta.fi/keskustelupalsta

    #217078
    Robin W
    Moderator

    ok, doing that using url’s is well beyond free help or indeed my knowledge of wordpress/bbpress.

    The code can be amended to pass a $_REQUEST of say ‘loginname’

    you can then create a page in wordpress, and use a shortcode to hook to php code that would look up the login name and display data related to that user, but then you have to have an area to create that data and store it in the database, or let the user create – so you would need creation/edit/delete pages and code.

    It is all quite doable but well beyond free help

    #217075
    Robin W
    Moderator

    sorry I am confused …I can give you code to go to any url, but unless you create some content for that url, it will 404.

    what are you expecting it to do when you click that link ?

    #217073
    Robin W
    Moderator
    add_action( 'bbp_template_after_user_details_menu_items', 'rew_add_item' ); 
    
    function rew_add_item () {
    	?>
    	<ul>
    		<li class="pictures">
    			<span class="pictures-link">
    				<?php
    				$username =  bbp_get_user_nicename(bbp_get_displayed_user_id());
    				echo '<a href="http://localhost/projects/wpdev2/forums/users/'.$username.'/my-stories/">Click to show picture</a>' ;
    				?>	
    			</span>
    			</li>
    	</ul>
    <?php	
    }
    #217069
    Robin W
    Moderator

    sorry, I don’t fully understand – the code will take you to any url you want.

    do you mean user specific?

    or if you got it working in buddypress what code did you use there?

    or maybe describe what you want to achieve?

    #217067
    Robin W
    Moderator
    add_action( 'bbp_template_after_user_details_menu_items', 'rew_add_item' ); 
    
    function rew_add_item () {
    	?>
    	<ul>
    		<li class="pictures">
    			<span class="pictures-link">
    					<a href="https://prnt.sc/wcemvm">Click to show picture</a>
    				</span>
    			</li>
    	</ul>
    <?php	
    }
    #217064
    Robin W
    Moderator

    ok, so you could use the hook in the standard template to add the item in a plugin

    <?php do_action( 'bbp_template_after_user_details_menu_items' ); ?>

    #217056
    sbask
    Participant

    Wordpress code, no jetpack

    multi65
    Participant

    Hello Robin

    Thank you for the code.
    I added it to my child theme’s function file and the link is now displayed in my forums page.

    However, whenever I click the link it doesn’t seem to work. Meaning, it doesn’t lead to anywhere. Is there something else I need to do other than that to get the link to work?

    -M

    Robin W
    Moderator

    Put this in your child theme’s function file –

    ie wp-content/themes/%your-theme-name%/functions.php

    where %your-theme-name% is the name of your theme

    or use

    Code Snippets

    add_action ( 'bbp_template_before_single_forum', 'rew_create_new_topic' ) ;
    
    function rew_create_new_topic () {
    	$text='Create New Topic' ;
    	if ( bbp_current_user_can_access_create_topic_form() && !bbp_is_forum_category() ) {
    	$href = '#new-post'  ;
    	echo '<div class="rew-new-topic">  <a href ="'.$href.'">'.$text.'</a></div>' ;
    	}
    }

    but you’ll have to work out how to style it yourself I’m afraid !!

    multi65
    Participant

    Hello,

    Using the [bbp-topic-form] shortcode, users will have to choose from a dropdown list in order to post a topic. Of course, this can cause some issues as users can often post in the wrong forums without knowing it.

    How can bbpresss forum functionality be configured so that users can press a ‘create a new topic’ button, press enter, and that topic is automatically posted in the forum where the ‘create a new topic’ button was situated?

    Thank you

    #217035
    Robin W
    Moderator

    You are right to be wary of ‘old’ plugins, and not just install without thinking about it, but this one just hooks to stable bbpress code elements.

    #217011

    In reply to: bbpress log in process

    Robin W
    Moderator

    you should note that under the code above, if in

    dashboard>users>edit user

    you set the forum role to ‘no role for these forums’ it will simply add them back as participant when they next log in

    #217007

    In reply to: bbpress log in process

    Robin W
    Moderator

    you are right ! Looks like it change on 2.6.

    It now does it on register

    so to change back to how it used to work

    in

    dashboard>settings>forums untick Automatically give registered visitors…etc

    Then put this in your child theme’s function file –

    ie wp-content/themes/%your-theme-name%/functions.php

    where %your-theme-name% is the name of your theme

    or use

    Code Snippets

    add_action('wp_login', 'rew_add_role');
    
    function 'rew_add_role' () {
    	$user_id = $user->ID ; 
    	$role = bbp_get_user_role( $user_id );
    	if (empty($role)) {
    		bbp_set_user_role( $user_id, 'bbp_participant' );
    	}
    }

    This code is untested, but should work, if not come back

    #217001
    sbask
    Participant

    https://domain/forums/view/my-subscribed-topics/
    and https://domain/forums/users/user/subscriptions/

    should show them same information correct? Or should there be a difference? I’m looking at the codec and can’t figure out why “my-subscribed-topics” should have a difference with the topics section under subscriptions

    #216982
    Robin W
    Moderator

    put this in your themes custom css

    a.bbpressloginurl, 
    a.bbpressregisterurl,
    a.bbpresslostpasswordurl
    {
    font-size : 16px ;
    font-weight: bold;
    
    }
    #216934
    khubaib927
    Participant

    yes, i do have that shortcode on my page

Viewing 25 results - 2,051 through 2,075 (of 32,466 total)
Skip to toolbar