Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 4,151 through 4,175 (of 32,517 total)
  • Author
    Search Results
  • #195208
    Robin W
    Moderator

    ok, I’ve taken a further look.

    so I create a new topic, put in a title, then in the content I click the img button and get a prompt for URL which I enter, and then a prompt comes up for description which I enter, and then I press ok.

    The content then shows

    <img src="http://xxx.co.uk/wp-content/uploads/2018/03/aunt.bmp" alt="this is the image" />

    I click submit and the image appears in the topic

    can you describe what is different for you ?

    jimmy369
    Participant

    I hope that it is appropriate to ask this question here. (WordPress 4.9.8, bbPress 2.5.14, Theme:TwentyTen)
    I hope that one of my forums can automatically close the topics after 30 minutes.
    I read this discussion (https://bbpress.org/forums/topic/auto-close-topic-after-some-time-days/) and tried to modify it myself, but I failed.
    Later I found a plugin called BBP Close Old Topics (https://wordpress.org/plugins/bbp-close-old-topics/).
    I tried to modify it myself, but in the end it can only be automatically close the topics after one day.
    I guess… is this the problem with these code?

    // Get timestamp of last activity of the topic.
    		$last_active = strtotime( get_post_field( 'post_date', bbp_get_topic_last_active_id( $topic_id ) ) );
    
    		// Compare last active timestamp with defined time period.
    		if ( $last_active < strtotime( '-' . $this->old_topic_age_setting() . 'days' ) ) :

    Is there something missing here that the command can only catch D (day) and not catch i (minute)?

    I’m at my wits’ end with this issue……Thank you so much.

    #195196
    jd-fb
    Participant

    I was wondering if there were a way to not have a topic’s content appear in its own box at the top of the reply list. Ditto for the forum content (in other words, the HTML that output using bbp_topic_content() and bbp_forum_content() respectively).

    The built-in bbPress styling shows the topic and forum content in a box that has the same (or very simiar) styling as replies. In my case, I’d like to remove the box so that the content appears as though it’s the lead-in text of a page (with H2s, H3s and so forth) with the replies + reply form below.

    Can someone point me in the right direction?

    Idea / potential solution 1)
    I found that I can do this:

    add_action ('bbp_template_before_single_topic', 'show_text');
    function show_text() {
    	ob_start();	
    	echo '<div class="my_class">';
    	add_action ('bbp_get_topic_content', 'do_shortcode'); // added b/c the content may have shortcodes
    	bbp_topic_content();
    	echo '</div>';   
    	$output = ob_get_clean();   
    	echo $output;
    }

    But this results in the topic content appearing in both the “top” of the page (as I’d prefer) and in its box listed with the replies (which I’d like to remove).

    Idea / potential solution 2)
    I’m guessing there’s something I can do with a template. If so, can someone direct me to how my plug-in can override bbPress’s template? I haven’t done a lot of template work.

    Troubleshooting
    – All themes have this “extra box” issue.
    – Using WP 4.9.8
    – Using bbPress 2.5.14-6684
    – I’m working on a local site, so I can’t provide a link

    Milega
    Participant

    Dear Buddypress community,

    I’m facing hard time to simply add space between topic tabs using the bbp-topic-index shortcode.

    I only found this post with a reply on this problem here : https://bbpress.org/forums/topic/space-between-posts/

    However, the solution given seems either outdated either wrong because there is no such things as topic.php in my bbpress or theme directory.

    I cannot find the template (.php) used to render the topics index table and I tried adding margin through CSS but none worked.

    I see the topics list is designed as table using tr and td but don’t know how to customize it.

    Any help would be appreciated,

    Sincerely,

    #195138
    darunia77
    Participant

    Hello,

    I just installed bbpress on my site (greenteacoffeedate.com) and noticed that it hides notifications from another plugin in user’s profile. It does not hide standard BP notifications like, someone sent you a message or commented on your activity post (in BP, not BB). The plugin in question is this one and it’s no longer supported so I can’t reach out to the plugin designer. So members can’t see who viewed their profile in notifications.

    Buddypress Who clicked at my Profile?

    I looked at the code in my Chrome inspector and this is what happens. Please see linked image:
    Screenshot

    So I can see that the description is turned off ( the one on top) but where do I turn it back on (like in the bottom yellow rectangle). I tried to play with display tag in css but it doesn’t seem to do it. Any thoughts?

    #195105
    trialanderror87
    Participant

    It worked! Thanx! But what i did was different because i dont know how to access the custom css of my style pack plugin…so what i did was dashboard >appearance >customize >additional css then I pasted your code and it worked like a magic! thank you very much!

    #195104
    Robin W
    Moderator

    I can’t see that code has been loaded

    1. is that code still in your site?
    2. whereabouts have you put it ? ie in which file or part of wordpress

    #195102
    Robin W
    Moderator

    try

    #sidebar .bbp-login-form label {
    	width: 100px !important;
    }
    #195100
    Robin W
    Moderator

    try

    
    #sidebar .bbp-login-form label {
    	width: 100px;
    }
    
    #195095
    Robin W
    Moderator

    your theme is overwriting

    put this in the custom css tab of my style pack plugin

    a.bbp-forum-link {
    display : block !important ;
    }
    #195091
    Robin W
    Moderator

    titles are theme related, so you would need to modify the theme template being used by bbpress.

    see

    Step by step guide to setting up a bbPress forum – Part 1

    part 8, and create a bbpress.php file from the template your theme is using to display bbpress. This plugin will show you what templates are being used

    Show Current Template

    #195090
    Robin W
    Moderator

    this is theme related – and beyond my free help to fix, but try and work through this resource, in particular item 8

    Step by step guide to setting up a bbPress forum – Part 1

    #195076
    gokberktalu
    Participant

    Is there a simple way to make the forum index page full width? I’ve searched the support forum and copied various CSS codes but nothing worked so far..

    #195069
    Robin W
    Moderator

    I don’t know of anything that does this – it could be coded, but that would be bespoke work and beyond free help

    #195063
    Phạm Hồng Sơn
    Participant

    Hi guys,

    May I know why is language code missing bbPress search page URL? I have a multi language website using Polylang and everything works except for the bbPress function. It only returns the English data instead of the Chinese data.

    Anyone know the solution to fix this?

    Thank
    Cristiano

    #195060
    eigodeasobo
    Participant

    By adding 'author' => bp_displayed_user_id(), to this code, my purpose can be achieved.
    https://www.daggerhart.com/bbpress-recent-replies-shortcode/

    But I would like to output with the same structure as BuddyPress activity.

    #195016
    talha5998
    Participant

    you should check out the theme soam code than try to install the plugin it will work

    #194992
    yehiasalam
    Participant

    actually i can conform that, once the user logged in from the web the first time, the participant role was assigned. Still not surw why bbp_set_user_role( $user_id, 'bbp_participant' ); didnt work out, maybe the timing issue as you mentioned. Thanks a lot for taking the time to test out the code and helping me out.

    Robin W
    Moderator

    sorry missed that part

    if the code above works then

    bbp_reply_author_link( array( ‘sep’ => ‘<br />’, ‘show_role’ => false ) );
    $reply_author_id = get_post_field( ‘post_author’, bbp_get_reply_id() );
    $user = new WP_User( $reply_author_id );
     	if ( !empty( $user->roles ) && is_array( $user->roles ) )
    {
    foreach ( $user->roles as $role )
    {
    if ($role=='student') $output = 'client' ;
    if ($role=='elephant') $output = 'tiger' ;
    echo “<div class=’role_custom_bhush’>”.ucfirst($output).”</div>”;
    break;
    }
    } 

    just alter and add as many of these lines as you need

    if ($role=='elephant') $output = 'tiger' ;

    #194983
    Robin W
    Moderator

    I’ve just done some testing

    this code :

    function test_set_user () {
    $user_id = 1223 ;
    bbp_set_user_role( $user_id, 'bbp_participant' );
    }
    
    add_action ('init' , 'test_set_user' ) ;

    changes user 1223 on site load, so the code is fine.

    I think it is a timing issue – ie when you are doing this. It may well be that even if this fires, a ‘create user’ firing after will overwrite this – eg this may set for pending, but then be overwritten by the final user creation.

    Of course if it is always going to be participant, then bbpress allocates the user to the default role (as set in settings>forums>default role) if no bbpress role is set on first login, so you could just set up the user, and bbpress will take care of giving them a role when they first log in!

    #194980
    Robin W
    Moderator
    #194979
    nitinjain490
    Participant

    @MarcGuay Please guide in which php file, we should put the code ?

    #194975
    Robin W
    Moderator

    I’d suggest that the issue is that the bp_core_signup_user is not returning a valid $user_id

    you could prove that by writing a console output to see what is being supplied, eg

    // create the user from the bp_core method, to make sure it passes the activation mode first
    						$user_id = bp_core_signup_user(
    							$post->username,
    							$post->password,
    							$post->email,
    							[]
    						);
    echo "<script>console.log('" . $user_id . "');</script>" ;
    
    						bbp_set_user_role( $user_id, "bbp_participant" );

    and then looking in the console in your browser tools

    maybe better to ask the question in ten buddypress support as to why the correct user_id is not being returned

    #194973
    yehiasalam
    Participant

    Hello,

    I have a wordpress installation with both bbpress and BuddyPress installed. I’m trying to create a user from code and automatically setting the forum role to participant. I tried using the bp_core_signup_user but it has not effect. This is the part of the code where im creating the user:

    						// create the user from the bp_core method, to make sure it passes the activation mode first
    						$user_id = bp_core_signup_user(
    							$post->username,
    							$post->password,
    							$post->email,
    							[]
    						);
    						bbp_set_user_role( $user_id, "bbp_participant" );

    Attached is the user profile after creation from code:

    reedy
    Participant

    That code was very helpful, @codingmachine — one question, though. Is there any way to change the name of the roles that are output to the forum? I don’t want to change the name of the role in WordPress, I just want to change the output.

    So, for example, if the user role is “Student”, I want it to output “Client”. Is this possible by editing the code you shared?

Viewing 25 results - 4,151 through 4,175 (of 32,517 total)
Skip to toolbar