Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 6,351 through 6,375 (of 32,519 total)
  • Author
    Search Results
  • #175247
    Robkk
    Moderator

    This plugin might work for terms and conditions.

    This is an example of adding inputs for contacts in their profile.

    https://codex.bbpress.org/layout-and-functionality-examples-you-can-use/#9-adding-social-media-contacts-to-bbpress-profile

    #175243
    Robkk
    Moderator

    I do see them, they seem oddly big though.

    This CSS is causing that issue. This class is used throughout bbPress for its avatars.

    a.bbp-author-avatar {
      background-size: cover;
      padding: 35px;
      display: block;
      max-width: 100px;
    }
    #175242
    Robkk
    Moderator
    #175241
    u_Oi
    Participant

    @Robkk thanks, actually It works!

    But I realized that if a topic is marked as closed without replies, the code you posted replaced the CLOSED label.

    Is there a way to avoid label no-reply replace the closed label?

    I mean, how i can make closed label the priority?

    Regards,

    #175236
    Robkk
    Moderator

    @arutam to make the function work, counting the replies is exactly what you need to do.

    Try this amd see if it works.

    function rkk_empty_topics() {
        $topic_reply_count =  bbp_get_topic_reply_count();
        if ( $topic_reply_count == 0 )
            echo '<span class="empty">[No Replies]</span>';
    }
    add_action( 'bbp_theme_before_topic_title', 'rkk_empty_topics' );
    #175234
    Robkk
    Moderator

    This is a common theme related issue, where avatars are displayed in block instead of inline or inline-block. Add this CSS anywhere you can add your custom CSS like a child themes style.css file or a seperate custom css plugin.

    #bbpress-forums p.bbp-topic-meta img.avatar, 
    #bbpress-forums ul.bbp-reply-revision-log img.avatar, 
    #bbpress-forums ul.bbp-topic-revision-log img.avatar, 
    #bbpress-forums div.bbp-template-notice img.avatar, 
    #bbpress-forums .widget_display_topics img.avatar, 
    #bbpress-forums .widget_display_replies img.avatar {
      float: none;
      margin-bottom: 0;
      vertical-align: middle;
      border: 1px solid #ddd;
      display: inline-block;
    }
    #175224
    Robkk
    Moderator

    Also, even after the plug in is deleted the roles (Keymaster and Participant) still appear in the user list under the “Role” column, but I thought they were only associated with bbpress. Is that correct?

    This is a known bug, there is some code in the codex here to use to remove the user roles whenever you are resetting your user roles. Removing the roles and reinstalling bbPress might fix this issue, if it does not, you can use this plugin to switch to another Admin temporarily and then edit your user and switch its forum role. Make sure to edit the user by clicking the edit link by the users avatar. I think there is still an issue bulk changing a users forum role from the users list.

    https://wordpress.org/plugins/user-switching/

    Make sure that your default role for users are Participant in Settings > Forums. Also make sure that the default blog role for your users is Subscriber in Settings > General.

    If this developer only did a short job and is done, I recommend not keeping their account as Admin/Keymaster. If they are hired for a project that is not finished or is like say doing maintenance for your site for awhile, okay keep them, but you know just be cautious since this happened to your site.

    Just to be sure, make sure to check out this link for more help.
    https://codex.wordpress.org/FAQ_My_site_was_hacked

    #175222
    andrew55
    Participant

    Got it! This seems to work:

    <?php
    $reply_user_id = bbp_get_reply_author_id();
    global $wp_roles;
    $reply_user = new WP_User( $reply_user_id );
    $roles = $reply_user->roles;
    $role = array_shift($roles);
    if  ($role == 'graduate' ){
    echo "<a href='http://www.mysite.com/page2/'>Graduate</a>";
    }
    ?>
    #175218
    andrew55
    Participant

    This also seems like it should work to me:

    <?php
    $user = new WP_User( bbp_get_reply_author_id() );
    if  ($role == 'Graduate' ){
    echo "<a href='http://www.mysite.com/page2/'>Graduate Link</a>";
    }
    ?>

    But it’s still not showing link in replies for uses who have “graduate” role. Any suggestions?

    #175215
    andrew55
    Participant

    This is the best I’ve come up with so far, but it’s not working yet. Seems like this should work properly. It’s still getting printing the link in profile area in the replies:

    <?php
    $reply_user_id = bbp_get_reply_author_id();
    global $wp_roles;
    $reply_user = new WP_User( $reply_user_id );
    $roles = $reply_user->roles;
    $role = array_shift($roles);
    if ($user_role == 'graduate') {
    echo "<a href='http://www.mysite.com/page2/'>Graduate Link</a>";
    }
    ?>

    Thanks for any suggestions on how to get it right.

    #175212
    kavehmovahedi
    Participant

    Hi,
    I have the latest version of wordpress running (4.5.2) and latest version of bbPress.
    Everything was working just fine before i moved my host from windows to Linux server.
    Now i can see the forums and topics in each forum. but when i open a topic the content and replies are not shown in the pages, only the reply form shows up.
    I can see the replies in the admin panel but clicking view from back end opens the front end reply to … without the reply content.

    I have already tried these :
    1) disabling all other plugins
    2) switching to wordpress default themes
    3) creating a new page with bbPress shortcode
    4) copying the php code provided in other forums
    5) removing and re-installing bbPress

    it’s driving me crazy ! i have tried all 2 links on google’s 2 first pages for search results of “bbPress content not showing up”, “bbPress topic content not showing”, “bbPress replies not shown”,…

    Best Regards,
    Kaveh

    #175209
    Robkk
    Moderator

    Yeah this makes sense since you are only editing the page you created with the forum index shortcode, the forum index shortcode only displays the forum index not embed bbPress entirely.

    I say just create a bbPress.php file and add the content you want to the template.

    https://codex.bbpress.org/themes/theme-compatibility/getting-started-in-modifying-the-main-bbpress-template/

    #175207
    Robkk
    Moderator

    Did you check and see if this is possibly created by a function you might have used/created that is causing an error for that piece of bbPress, check to see if it is a custom bbPress theme related, or check to see if it is cache related.

    https://codex.bbpress.org/getting-started/troubleshooting/

    #175204
    Robkk
    Moderator

    Where exactly in the forums do you want to display this.

    In the default description area this might be a little too much for the default layout in bbPress. I say hire a designer and make the forum page title for each forum display nice and gold like how it is displayed, use the same font you chose to style the forum titles in bbPress (maybe in topic titles too for consistency), and keep the description similar to how you have it and just style it in bbPress using CSS. You might have to have heavily style and customize the bbPress templates to achieve a good looking layout like this. Place any bbPress templates in your child theme or custom made theme so they can easily be customized.

    https://codex.bbpress.org/themes/theme-compatibility/

    #175202
    kachan64
    Participant

    There is a code I implemented a while ago on my site by doing something like this

    <?php 
    		$displayed_user = bbp_get_reply_author_id() ;
    		$role = bbp_get_user_role( $displayed_user);
    		if ( bbp_is_user_keymaster($displayed_user) ||$role == 'bbp_keymaster') : ?>
    		<div class="bbp-author-role">Administrator</div>
    <?php endif; ?>

    Where is says $role == ‘bbp_keymaster’ you can change that. If I get your question correctly.

    Robkk
    Moderator

    There is something in the codex about a bbPress forums page, but specifically it is for the forum index only not bbPress forums entirely. So it will not embed bbPress in an iframe like other forum solutions that host the forum content on their own servers.

    Look into creating a bbpress.php file for your site so that all your bbPress pages will use the same template, which is what you are looking for, for this to work.

    https://codex.bbpress.org/themes/theme-compatibility/getting-started-in-modifying-the-main-bbpress-template/

    #175195
    giobby
    Participant

    Just realised I didn’t post the right error.
    Here it is…

    Error Code: 1054. Unknown column ‘profile_fields_data.pf_phpbb_website’ in ‘field list’.

    That column doesn’t exist in my profile_fields_data table.
    Also, I was not getting that error with the previous version of the converter so i am wondering if the converter expects a specific/recent phpBB version to convert from

    andrew55
    Participant

    I have a custom wp role that I have displaying under each user author link in all replies. There are different custom roles depending on the user. I was able to use it by implementing this snippet (inserted on loop-single-reply.php):

    <?php
    $user = new WP_User( bbp_get_reply_author_id() );
    echo $user->roles[0];
    ?>

    My question is how to get some text (with link) to show if a user has a specific custom role. For example, is user has “Graduate” role, I need a link with text to show under the role, in all the replies for all users.

    I’m not coder by any means, but I realize it will probably take a php “if” statement. Any suggestions on how I might accomplish this? Thanks for any help.

    #175186
    giobby
    Participant

    After further investigation, It looks to be something related to the character – see error below.

    Error Code: 1115. Unknown character set: ‘“utf8mb4”’

    Not sure why it’s trying to make this conversion :-\

    #175181
    kachan64
    Participant

    I’m trying to add a forum description. I used
    <?php bbp_forum_content(); ?>

    in loop-single-forum and didn’t work! Any other way I can do this? I have not modified any theme fifle, I simply copied loop-forums & loop-single-forums into my bbpress folder in my them folder

    #175166
    akira010203
    Participant

    I found out where is the problem.

    It is due to the language translation file, If I put the default language back in english there is no problems.

    To the french users if you get this issue try :

    #bbpress-forums .administrateur .bbp-author-role {
      background-color: blue;

    It will wrk but when it comes to the french translation of moderator : modérateur it will be harder due to the special character on it.

    You will have to rename it before being able to change color.

    #175155
    alzaran
    Participant

    I’ve found a function that enables autocomplete on any element of my choice. I’m reproducing it below:

    function buddydev_enable_mention_autosuggestions_on_compose( $load, $mentions_enabled ) {
    	if ( ! $mentions_enabled ) {
    		return $load; //activity mention is  not enabled, so no need to bother
    	}
    	//modify this condition to suit yours
    	if( is_user_logged_in() ) {
    		$load = true;
    	}
     
    	return $load;
    }
    add_filter( 'bp_activity_maybe_load_mentions_scripts', 'buddydev_enable_mention_autosuggestions_on_compose', 10, 2 );

    However, this only works with a textarea or input, I believe. TinyMCE, on the other hand, is an iframe with HTML elements generated on the fly. As such, when I try to initialize the function using the below:

    if ( jQuery( '#bbp_reply_content_ifr').get( 0 ) ) {
    		console.log('success');
    		jQuery('#bbp_reply_content_ifr').bp_mentions( bp.mentions.users );
    	}

    Nothing happens. What am I doing wrong? Buddypress supports the @mentions on TinyMCE instances (see here: https://buddypress.trac.wordpress.org/ticket/6972) and bbpress supports it in the plaintext editor. How can I enable it for the TinyMCE editor?

    #175146
    JijOnline
    Participant

    this does work like this: <?php bbp_topic_excerpt(); ?>

    #175143
    akira010203
    Participant

    Hello,

    I got an issue while trying to put a background color under the role name on my forum.

    I added this to my function file :

    function rk_show_role_classes($classes) {
        $replyid = bbp_get_reply_author_id();
        $bbp_get_role = bbp_get_user_display_role($replyid);
        $bbp_display_role = strtolower($bbp_get_role);
    	  
      
    	$classes[] = $bbp_display_role;
    	return $classes;
    }
    add_filter( 'bbp_get_topic_class','rk_show_role_classes' );
    add_filter( 'bbp_get_reply_class','rk_show_role_classes' );

    and this into my css file :

    #bbpress-forums .participant .bbp-author-role {
      background-color: blue;
    #bbpress-forums .keymaster .bbp-author-role {
      background-color: red;
    #bbpress-forums .moderator .bbp-author-role {
      background-color: green;

    But it only works with the participant role. Maybe I’m not using the correct keymaster and moderator role name. Is someone already did that and can help me to sold it out ?

    Thanks!

    Robin W
    Moderator

    ok, that opened up a whole new area, and I think I’ve worked out what is happening !

    When a new topic/reply is created, bbpress sends a email

    to : noreply@vpinball.com
    bcc : all the subscribers of that topic

    Bbpress changed how this works in a recent version. It used to send an email per user, but many mail servers saw say 200 emails going at once as spam, and blocked them.

    So now bbpress sends to an address and blind copies all the users, so that in most cases a single email is sent. This still creates a risk, as some mail servers block multiple bcc’s over a certain number, but is probably better for most sites.

    Now the problem with this is that some mailservers will return invalid email addresses, and as your noreply email doesn’t exist, you get a failed.

    so you could

    1. create the noreply email address on your system, so that a mailbox gets them, and every so often just clear it out.
    2. change that noreply email address to a valid email – I can give you code to make it anything you want, but as with 1 above a mailbox will get them so it will fill up.
    3. change the code to send emails individually – the old code is somewhere.

    Let me know your thoughts

Viewing 25 results - 6,351 through 6,375 (of 32,519 total)
Skip to toolbar