Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 4,151 through 4,175 (of 32,522 total)
  • Author
    Search Results
  • #195246
    jd-fb
    Participant

    Thanks for the reply… but I think looking at the theme files only confused me more. (Sorry!)

    I’ve taken a look at templates/loop-replies.php that’s built-into the plugin, which (if I understand correctly) is what is used when a user is viewing a topic’s page (in other words http://domain.com/forum/topic/awesomness/). I’m kind of confused as to how it works – near the bottom of this template, it calls another template using bbp_get_template_part( 'loop', 'single-reply' ); – and it does this whether it’s the topic’s content or a reply to the topic.

    So, I’m uncertain if I need to modify the WP_Query (or where), or if I should modify the template.

    #195232
    jd-fb
    Participant

    I just noticed that this website, bbpress.org, does something similar to what I’m looking for. (Except, I’d remove the avatar and date.)

    So, how does that work? I noticed that this site’s theme is called BB’s Parent, but that doesn’t seem to be available to the public (so I can’t check its code 🙁 )

    #195217
    vickybbpress
    Participant

    Hello Support,
    I am not able to see the reply form for my WP users(as subscriber) who are logged in on website.
    I have checked the code of “form-reply.php” and it is saying in starting that <?php if ( bbp_current_user_can_access_create_reply_form() ) : ?>

    My issue is even I have assign all of my user who’s role “subscriber” to “keymaster” as well, but when I go to my website front end and try to login as user it works but when I go to list of topics it says “You must be logged in to reply to this topic.”

    Please help

    #195216
    Ashaani
    Participant

    I’ve been having a similar issue (WordPress 4.9.8, bbpress 2.5.14, no Buddypress). Forum users with the Participant role were able to view the existence of private forums but not any of the actual topics inside them. I tried creating a new role with read_private_topics enabled as well and assigning it to them, but to no avail. The only thing that seemed to fix it is what @kingstringy mentioned above:

    The only thing that repairs the issue is switching each forum to public, saving the forum, then returning the forum to private status and saving again. Bulk edit doesn’t work — only updating each forum individually.

    After having done that, users with the standard Participant role are able to see private forums again, with no other customization or plugins needed.

    I wonder if there is a bug with the Bulk Actions dropdown in the Forums admin page? That’s what I used to set them to Private originally. Maybe it failed to update something that it needed to, whereas setting the visibility to Private on each forum individually succeeded.

    jd-fb
    Participant

    I noticed that there is no space before the word “days” in your line here
    if ( $last_active < strtotime( '-' . $this->old_topic_age_setting() . 'days' ) ) :

    This means that it’ll result in “-1days”, and every example I’ve seen for strtotime() has a space before the word “days”, so ‘-1 days’.

    I haven’t used strtotime() a lot so I’m not totally sure, but that one space could make a difference.

    #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!

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