Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 6,576 through 6,600 (of 32,519 total)
  • Author
    Search Results
  • #173853
    gdelle
    Participant

    Im trying to create a sub forum list style.

    Ive tried the bbstyle plugin and the various codes I found searching here.

    Only one to work at all was this. But its not what I want. The theme is Kleo with bbpress/buddypress.

    .bbp-forum-info a.bbp-forum-link {
    display: block;
    }

    Robkk
    Moderator

    @valery-kondakoff

    Use this CSS to remove the box shadow for links in bbPress.

    #bbpress-forums a {
      box-shadow: none;
    }
    #173846
    madflute
    Participant

    Hi, I am new to WP so appreciate your patience.

    I need to have BBP subscribers notified of new forum/topic and/or replies but not sure how to make it work. I’d had thought the fact each Forum has “Subscribe” option made me think it would notify by email out of the box.

    SMTP is working. In fact, bbPress Notify (No-Spam) works, but it sends out to hardcoded recipients, not subscribers who chose to subscribe specific Forum.

    Added issue here is I have 2 private groups. So the notification really has to be subscribers choice per Forum.

    WP4.4.2
    BBP 2.5.8
    So far I have
    AsynCRONous bbPress Subscriptions 2.1
    bbP Manage Subscriptions 1.2.0
    bbP private groups 3.1.9
    bbP Toolkit 1.0.6
    bbPress Notify (No-Spam) 1.10
    Better Notifications for WordPress 1.3.9.5
    topic subscribe 1.0

    I understand the bbPress Notify has paid plugins to respect the private group and user opt-out, but this is a non-profit organization and everything is coming out of my pocket.

    Hope someone could point me to a right direction. Here is the URL
    http://jazztokyo.org/forums/
    but you won’t see all the forums in the private groups.

    Thank you in advance.

    P.S., yes it is reproducible with TwentySixteen.

    -Hiro

    #173845
    berkelmudez
    Participant

    @tharsheblows I don’t know if it matters but just letting you know that your code fixed this for me! thanks!

    #173842
    Wendell
    Participant

    Hey Stephen,

    I really appreciate your help! 🙂

    Probably the most noticeable issue after the import are the attachments. They are basically a number with opening and closing ATTACH bbcodes. For example:
    [ATTACH=full]872[/ATTACH]
    In xenForo, this links to attachments/photo-jpg.872

    Then there are the quotes to other posts. These simply just come in as text and the post IDs don’t match those in bbpress. In xenForo, the quoted posts link back to the post that was quoted. For example, here is an imported post with a quote:
    http://surveyorconnect.com/portal/index.php/forums/topic/july-2015-photo-submittal/#post-1647874
    and here is the original post in xenForo:
    http://surveyorconnect.com/threads/july-2015-photo-submittal.323039/#post-331560

    I’ve also noticed that soft deleted posts (only viewable by mods and admins) in xenForo are coming in as public posts.

    I realize I may be asking for too much, but I figure it doesn’t hurt to ask. 😉 I do understand though if it’s just not possible. I’ll keep looking around for other bbcodes as well.

    Thanks!

    Valery Kondakoff
    Participant

    Pascal, thank you for helping me!

    By misaligned I was meant that the avatars are not on the same line as the user name. Your code solves this issue:

    img.avatar.avatar-14.photo {
     margin-bottom: 0px !important;
    display:inline;
    }

    There is a side-effect though: the avatar gets underlined if you use ‘display:inline;’. If there is a way to remove the underline? ‘text-decoration: none’ does not seems to work.

    Here is a link to the test forum with your code applied: http://rugby-forum.ru/wp3/forums/forum/test-forum/

    Thank you!

    Pascal Casier
    Moderator

    And
    display:inline;
    will show on 1 line… all depends what you want.

    Pascal Casier
    Moderator

    What do you mean with ‘misaligned’ ? Where do you want them ?

    This will already get it away from the text:

    img.avatar.avatar-14.photo {
      margin-bottom: 0px !important;
    }

    PS. Next time please include the link to you site because for CSS we always need to see the site itself.

    Pascal Casier
    Moderator

    Hi, welcome back.
    If your subsite is on the same server, towards the same MySQL or MariaDB… then for the performance it will probably not help a lot.
    Why not trying to go to the root of the issue and try to reduce the 10s loading to at least 8s so that the extra 2s from bbPress are not adding extra ?

    Please note that WordPress requirements/recommendations are on https://wordpress.org/about/requirements/

    Some things to check first:
    – Have you run all the repair tools of bbpress after import to be sure your structure is optimized ?
    – Have you deactivated any not-needed plugin ? Is your theme ready for bbPress ?
    – Are you using any cache mechanism to improve speed where possible ?
    – Did you try to run performance tools like the P3 plugin performance profiler to narrow down the possible slow parts ?
    – What score do you get on gtmetrix.com ? Or what did the pingdom tools indicate ?
    – Is it for all people in the world the same ? Check with sucuri performance.
    – Some further reading: https://codex.bbpress.org/getting-started/improving-performance/

    If it would come to database queries, also check these plugins:
    https://wordpress.org/plugins/query-monitor/
    https://wordpress.org/plugins/query-monitor-bbpress-buddypress-conditionals/

    Then of course there are a list of performance improvements that can be done on caching, offloading, … with plugins like W3 Total cache, batcache, WP Super Cache or other. Also check autoptimize and using cloudflare.

    Also note that in the upcoming bbPress v2.6 (hopefully before the end of this year), a lot of focus went on possible performance issues.
    Hope it helps,
    Pascal.

    #173824
    Stephen Edgar
    Keymaster

    Awesome 🙂

    If you look at the phpBB and SMF importers they have near the end of the file a bunch of regular expressions for converting custom BBCode into native HTML for WordPress.

    Get me a list of what you want copied from the SMF/phpBB importers to Xenforo and I’ll add them.

    If you need more, or tweaks to them happy to help out here also.

    #173821
    Wendell
    Participant

    Tried the import again and saw some results I hadn’t seen before. The last several lines of the conversion said something about converting anonymous posts. That’s the first time it’s ever done that and it seems to have worked great. 🙂

    Now I just have to find a way to convert all of the xenForo bbcode into something that will work in bbpress (such as image attachments).

    Thanks for the help!

    #173801
    Pascal Casier
    Moderator

    Can you just paste the code snippet ? To comment on that.
    Thanks, Pascal.

    #173797
    Pascal Casier
    Moderator

    Hi,
    Check the source code of my bbP Manage Subscriptions. It might give you the correct things you need.
    Pascal.

    #173794
    Kineta
    Participant

    This seems like it should be easy, but I’m really having trouble finding documentation.

    I’ve got as far as getting the forum subscription ids (bbp_get_user_subscribed_forum_ids( $user_id)) but am struggling to get an outputted list of forum titles & links. That’s all I want – putting it into a shortcode to add to a widget.

    tech55541
    Participant

    Thanks @robkk, that code in functions.php did the trick.

    tech55541
    Participant

    Hello,
    Actually after further testing, my code above for some reason hid the Forums, Topics, and Replies menu from people who had access to view them. Here is an updated piece of code that does not have this problem.

    /*Customize the BBPress roles to allow Participants to trash topics
    add_filter( 'bbp_get_caps_for_role', 'ST_add_role_caps_filter', 10, 2 );
    
    function ST_add_role_caps_filter( $caps, $role ){
        // Only filter for roles we are interested in!
        if( $role == 'bbp_participant' ) {
    
    	$new_caps = array(
                    // Primary caps
                    'spectate'              => true,
                    'participate'           => true,
                    'moderate'              => false,
                    'throttle'              => false,
                    'view_trash'            => false,
    
                    // Forum caps
                    'publish_forums'        => false,
                    'edit_forums'           => false,
                    'edit_others_forums'    => false,
                    'delete_forums'         => false,
                    'delete_others_forums'  => false,
                    'read_private_forums'   => false,
                    'read_hidden_forums'    => false,
    
                    // Topic caps
                    'publish_topics'        => true,
                    'edit_topics'           => true,
                    'edit_others_topics'    => false,
                    'delete_topics'         => true,
                    'delete_others_topics'  => false,
                    'read_private_topics'   => false,
    
                    // Reply caps
                    'publish_replies'       => true,
                    'edit_replies'          => true,
                    'edit_others_replies'   => false,
                    'delete_replies'        => true,
                    'delete_others_replies' => false,
                    'read_private_replies'  => false,
    
                    // Topic tag caps
                    'manage_topic_tags'     => false,
                    'edit_topic_tags'       => false,
                    'delete_topic_tags'     => false,
                    'assign_topic_tags'     => true,
                );	
    
    	}
    
        return $new_caps;
    }
    /*Fixes an issue that only allows mods to trash topics.
    bbpress.trac.wordpress.org/changeset/5852
    bbpress.trac.wordpress.org/ticket/2685*/
    
    add_filter( 'bbp_map_reply_meta_caps', 'ST_tweak_trash_meta_caps', 11, 4 );
    add_filter( 'bbp_map_topic_meta_caps', 'ST_tweak_trash_meta_caps', 11, 4 );
    
    // tweak for replies
    function ST_tweak_trash_meta_caps( $caps, $cap, $user_id, $args ){
    
    	// apply only to delete_reply and delete_topic
    	if ( $cap == "delete_reply" || $cap == "delete_topic" ){
    		// Get the post
    		$_post = get_post( $args[0] );
    		if ( !empty( $_post ) ) {
    
    			// Get caps for post type object
    			$post_type = get_post_type_object( $_post->post_type );
    			$caps      = array();
    
    			// Add 'do_not_allow' cap if user is spam or deleted
    			if ( bbp_is_user_inactive( $user_id ) ) {
    				$caps[] = 'do_not_allow';
    
    			// Moderators can always edit forum content
    			} elseif ( user_can( $user_id, 'moderate' ) ) {
    				$caps[] = 'moderate';
    
    			// User is author so allow edit if not in admin
                } elseif ( ! is_admin() && ( (int) $user_id === (int) $_post->post_author ) ) {
                    $caps[] = $post_type->cap->delete_posts;
    
    			// Unknown so map to delete_others_posts
    			} else {
    				$caps[] = $post_type->cap->delete_others_posts;
    			}
    		}
    
    	}
    	// return the capabilities
    	return $caps;
    }

    NOTE: Had to remove links.

    Thanks.

    Robin W
    Moderator

    the s of the https in

    //$do_not_reply  = '<noreply@' . ltrim( get_home_url(), '^(http|https)://' ) . '>';
    	$do_not_reply  = '<noreply@sitename.com>';
    
    #173764
    tech55541
    Participant

    Hello,
    Is there any code I can use to make sure that any post with 3 or more links must be approved by a moderator or keymaster?

    Thanks.

    #173763

    In reply to: Hide User Role

    tech55541
    Participant

    Hello,
    Please try this CSS code.

    .bbp-author-role {
    display: none;
    }

    Thanks.

    #173762
    redblacked
    Participant

    1. how to seo setting in per post in bbpress’s forum?

    2. how to insert adsense code in per post in bbpress’s forum?

    #173754
    jtsimmons
    Participant

    Hello, first I’d just like to say that I’ve thoroughly searched this issue, on Google and here on the forum, and have found no conclusive answers to this.

    Right now I’m noticing tons of p and br tags in bbPress HTML, and I’m confused as to whether this is stemming from wpautop or is actually part of bbPress template files itself.. to test I’ve literally deactivated wpautop itself (and checked site-wide on other pages to verify it was indeed off) and the tags still remain on bbPress pages.

    This is making it extremely hard to custom style bbPress while navigating these tags, as they break the layout in needless ways.

    Here’s some examples..

    p and br tags

    Thanks for reading,

    #173733
    johnmontfx
    Participant

    Following up with research complete….New Relic is really awesome for this type of stuff.

    It does come down for the most part to the quantity of the forums/sub-forums. Most of the time spent was in the template calls for each sub-forum. However, it also appears a bit of the additional time is due to the Groups plugin which makes the SQL query a bit more complex.

    So I’ve decided to set my home page to be a view of recent topics (which, frankly, is a bit better anyway because it shows more activity of interest) and the performance is going to be much better for members.

    However, one hitch here is that I’d like to have a “forum home-like” page available for view for those that want it. With an additional requirement that it is under the /forums/ URL ‘subdirectory’ (due to various robot rules, etc). In other words, something like /forums/all or /forums/views/all . I can’t use the bbpress shortcode for a page because I can’t put the page under the /forums/ subdirectory. I looked into using views, but that doesn’t seem to work either.

    I’m probably missing something obvious (and I’ve done considerable googling), but it’s not seeming to be as easy as it sounds. Probably should start another thread…

    Thanks again for the insights…

    #173728
    semperaye
    Participant

    Yes! But not that code! 🙂

    Here is what worked:

    `@media screen and (min-width: 980px) {
    /* This is the width of the forum content area */
    .bbpress #content {
    max-width: 95%;
    }
    /* This is the width of the forum list */
    .bbpress #primary {
    width: 66.6666%;
    /* border: 1px solid red; */
    }
    /* This is the width of the forum list */
    .bbpress #secondary {
    width: 33.3333%;
    /* border: 1px solid blue; */
    }
    /* Center the contents of the sidebar */
    .bbpress #secondary aside {
    margin: 0 auto;
    display: table;
    }
    }

    #173724
    uschesch
    Participant

    Thank you!!

    I removed the customized code from the template.php file in the wp-content/plugins/bbpress/includes/common folder – copied the template.php file into my theme’s bbpress folder, and then readded the custom code to the file.

    I now see the subscribe link. It does appear at the bottom of the page though instead of in the breadcrumbs.

    Really appreciate your help!

    Thank you.

    #173719
    Pascal Casier
    Moderator

    Argh !
    Please never change directly the bbPress files. At the next update you will loose your work.

    If you want to change files, you can refer to the codex (like on this page: https://codex.bbpress.org/themes/theme-compatibility/getting-started-in-modifying-the-main-bbpress-template/)

    But if you want to keep it easy, check out my bbP-Toolkit plugin where you can customize your breadcrumbs or if this is the only customization you want to do, check out https://codex.bbpress.org/layout-and-functionality-examples-you-can-use/#4-turning-off-or-changing-breadcrumbs

    Pascal.

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