Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 9,676 through 9,700 (of 32,519 total)
  • Author
    Search Results
  • #157222
    Grantiusmaximus III
    Participant

    hey guys, im a complete noob to this whole CSS and webdesign stuff and need some help

    I am trying to increase the size of the font in the forum titles, (the info, topic, replies and freshness)

    i used this piece of css code but it isn’t working

    #bbpress-forums ul.bbp-lead-topic,
    #bbpress-forums ul.bbp-topics,
    #bbpress-forums ul.bbp-forums,
    #bbpress-forums ul.bbp-replies,
    #bbpress-forums ul.bbp-search-results
    {
    font-size: 13px;
    }

    (the theme i am using gives me a built in css sheet to pop any snippets that i may require in there and updates it live without going into the back end)

    here is the link to my forum.

    http://kamikazenoodle.co.uk/forums/

    #157212
    eVersatile
    Participant

    Hello,
    I have been trying to change the tab ‘forum’ in groups. Not the slug, the name of it. I’d like “Forums” to read “Chapters”.
    Here is the script I currently have on there.

    function mb_profile_menu_tabs(){
    global $bp;
    $bp->bp_nav['activity']['name'] = 'Updates';
    $bp->bp_nav['groups']['name'] = 'Books';
    $bp->bp_nav['buddyblog']['name'] = 'Library';
    $bp->bp_options_nav['profile']['change-avatar']['name'] = 'Change Profile Picture';
    $bp->bp_options_nav['buddyblog']['my-posts']['name'] = 'Library';
    unset($bp->bp_nav['forums']);
    unset($bp->bp_nav['groups']);
    unset($bp->bp_nav['forums']);
    bp_core_remove_subnav_item( 'buddyblog', 'edit' );
    }
    add_action('bp_setup_nav', 'mb_profile_menu_tabs', 201);
    function change_profile_submenu_tabs(){
    global $bp;
    $bp->bp_options_nav['groups']['my-groups']['name'] = 'Authored & Edited Books';
    $bp->bp_options_nav['groups']['invites']['name'] = 'Invites to be Editor';
    }
    add_action('bp_setup_nav', 'change_profile_submenu_tabs', 999);
    function jm_move_group_activity_tab() {
      global $bp;
      if (isset($bp->groups->current_group->slug) && $bp->groups->current_group->slug == $bp->current_item) {
        $bp->bp_options_nav[$bp->groups->current_group->slug]['forum']['name'] = 'not working';
        $bp->bp_options_nav[$bp->groups->current_group->slug]['home']['name'] = 'Updates';
        $bp->bp_options_nav[$bp->groups->current_group->slug]['members']['name'] = 'Editors';
        $bp->bp_options_nav[$bp->groups->current_group->slug]['admin']['name'] = 'Details';
        $bp->bp_options_nav[$bp->groups->current_group->slug]['send-invites']['name'] = 'Invite Editors';
      }
    }
    add_action('bp_setup_nav', 'jm_move_group_activity_tab', 999);
    add_action( 'bp_setup_nav', 'remove_group_unwanted_subnav_tab',500 );
     function remove_group_unwanted_subnav_tab() {
    
    bp_core_remove_subnav_item( bp_get_current_group_slug(), 'admin' );
    }

    I have tried it on a clean install as well and nothing seems to work. $bp->bp_options_nav[$bp->groups->current_group->slug]['forum']['name'] = 'not working'; Should be the line which changes the name of “Forums” tab but nothing is happening. Is there any other function specifically for this tab?

    laddi
    Participant

    Hello to all the bbPress Scientists out there.

    I am almost mad about to show bbPress User Role on BuddyPress Profile Page. And I am currently using this code, but it is not perfect and correct.

    
    function show_user_role () 
    		{
    		global $bp;
    		$reply_id = bbp_get_reply_id( $reply_id );
    		$abc_role = bbp_get_user_display_role( bbp_get_reply_author_id( $reply_id ) );
    		echo '<span class="profile-role ' . $abc_role . '"><i class="fa fa-star"></i> <em>';
    		echo $abc_role;
    		echo '</em></span>';
    	}
    add_action( 'bp_before_member_header_meta', 'show_user_role' );
    

    The demo output can be seen on http://www.punjabi.cc/ website by visiting any members profile.

    First problem with this code is, it does not show correct name for dynamic roles when user is not logged in.

    Second problem, the users who are blocked also tagged ‘Member’ not ‘Blocked’.

    Please either correct it or provide me a another perfect piece of code, I will be highly thankful.

    Regards,
    Laddi

    #157200
    cbalke
    Participant

    How do I go about getting into and editing the coding for the “img” button?

    Currently the code that is applied is (img src=”xxxxxxxx” alt=”ffs” /) with the ( ) being < > and the xxx’s being the images URL.

    I want to change the coding to (url=xxxxx)(img)xxxxx(/img)(/url) with the parentheses replaced with square brackets and xxxxx with the photo’s url.

    By doing so, the images can be clicked which would open a lightbox

    Thanks in advance for the help.
    Wordpress 4.1
    bbPress 2.5.4-5380

    #157194

    In reply to: bbPress Moderation

    cyclesha
    Participant

    Well, Robin, I just heard back from my host provider and all possible checks were done and an error code:

    Code:
    brk(0x5419000) = 0x5419000
    — SIGSEGV (Segmentation fault) @ 0 (0) —

    is what was found and they said it’s back to you.

    Now what?

    Bob.

    #157188
    Robin W
    Moderator

    This is a theme issue.

    You need to get bbpress to use the right theme template if possible.

    Suggest you look at

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

    and/or check with the theme author

    #157172
    eVersatile
    Participant

    Hello. I have been trying to rename the navigation menu “forum” within groups.
    Currently, I have this code implemented

    function jm_move_group_activity_tab() {
      global $bp;
      if (isset($bp->groups->current_group->slug) && $bp->groups->current_group->slug == $bp->current_item) {
        $bp->bp_options_nav[$bp->groups->current_group->slug]['forum']['name'] = 'new name';
        $bp->bp_options_nav[$bp->groups->current_group->slug]['home']['name'] = 'new name';
        $bp->bp_options_nav[$bp->groups->current_group->slug]['members']['name'] = 'new name';
        $bp->bp_options_nav[$bp->groups->current_group->slug]['admin']['name'] = 'new name';
        $bp->bp_options_nav[$bp->groups->current_group->slug]['send-invites']['name'] = 'new name';
      }
    }
    add_action('bp_init', 'jm_move_group_activity_tab');
    

    Everything works except for ‘forum’

    #157161
    UgoDimma
    Participant

    Yes I have the code, but the file to edit and where exactly to paste the code.

    #157160
    Robin W
    Moderator

    Do you know what the code is that you would add at that location?

    #157155

    In reply to: BBpress width

    Robin W
    Moderator

    ok, gentle response !!

    your forum is sitting within a class of .entry-content which is set to max-width: 474px;

    so you need to add

    .entry-content {
      max-width: 100% !important;
    }
    

    to your theme style.css at the end

    Strictly speaking you should add this to a child theme

    Functions files and child themes – explained !

    but if you add it to your main theme, juts keep a note of it, as you will need to re-add it should your theme be updated

    Come back if anything not clear, and I’ll help further !

    #157146
    UgoDimma
    Participant

    I want to add ShareThis sharing button at the top and bottom of every posts, but I dont know which file to edit and where exactly to add the code. Please someone guide me through. Am using bbpress 2.5.4 wordpress 4.1

    you can have a look at this screenshot to understand what I really need,
    http://s1382.photobucket.com/albums/ah248agbams/?action=view&current=sharethis_zps1df4998b.png

    #157136

    In reply to: BreadCrumb

    Robin W
    Moderator

    ok, I’m planning to write some code for another purpose that will be using this function in the next few days, when I do I’ll take a look

    #157135

    Hi there,

    I’m looking for an option to hold new topics by non-admin users in moderation for approval before they are visible. I’ve tried looking at this plugin: https://wordpress.org/plugins/bbpressmoderation/ but it deals with topics and replies together- you have to moderate both or not moderate both. I’m not interested in moderating replies, just topic starters.
    Could anybody by any chance suggest a different plugin, a code snippet to use etc. to work around this issue?
    (I’m running the latest versions on WordPress, BuddyPress and bbPress).
    Thank you very much!

    #157132
    mvaneijgen
    Participant

    I had to create several new users but I could not just copied and paste the code again so I modified the code a bit

    
    //code to add expert role 
    
    function add_expert_role( $bbp_roles )
    {
    	/* Add a role called expert */
    	$bbp_roles['bbp_expert'] = array(
    		'name' => 'expert',
    		'capabilities' => custom_capabilities_expert( 'bbp_expert' )
    		);
    	return $bbp_roles;
    }
     
    add_filter( 'bbp_get_dynamic_roles', 'add_expert_role', 1 );
    
    function expert_role_caps_filter( $caps, $role )
    {
    	/* Only filter for roles we are interested in! */
    	if( $role == 'bbp_expert' )
    		$caps = custom_capabilities_expert( $role );
     
    	return $caps;
    }
     
    add_filter( 'bbp_get_caps_for_role', 'expert_role_caps_filter', 10, 2 );
    
    function custom_capabilities_expert( $role )
    {
    	switch ( $role )
    	{
    		 
    		/* Capabilities for 'expert' role */
    		case 'bbp_expert':
    			return 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'   => true,
    				'read_hidden_forums'    => false,
     
    				// Topic caps
    				'publish_topics'        => true,
    				'edit_topics'           => true,
    				'edit_others_topics'    => false,
    				'delete_topics'         => false,
    				'delete_others_topics'  => false,
    				'read_private_topics'   => true,
     
    				// Reply caps
    				'publish_replies'       => true,
    				'edit_replies'          => true,
    				'edit_others_replies'   => false,
    				'delete_replies'        => false,
    				'delete_others_replies' => false,
    				'read_private_replies'  => true,
     
    				// Topic tag caps
    				'manage_topic_tags'     => false,
    				'edit_topic_tags'       => false,
    				'delete_topic_tags'     => false,
    				'assign_topic_tags'     => true,
    			);
    			break;
     
    		default :
    			return $role;
    	}
    }

    This creates the role Expert. I put this in my functions.php of my child-theme

    #157131
    Stagger Lee
    Participant

    I do it with this snippet. For WordPress and bbPress together. Local links are opened normally, only extern are target blank. Dont forget to change your domain line.

    // Make URL Clickable In WordPress, bbPress (plus target=”_blank”)
    add_filter( 'the_content', 'make_clickable');
    
    function autoblank($text) {
    $myurl = 'http://your-domain.com';
    $external = str_replace('href=', 'target="_blank" href=', $text);
    $external = str_replace('target="_blank" href="'.$myurl, 'href="'.$myurl, $external);
    $external = str_replace('target="_blank" href="#', 'href="#', $external);
    $external = str_replace('target = "_blank">', '>', $external);
    return $external;
    }
    add_filter('the_content', 'autoblank');
    add_filter('bbp_get_topic_content', 'autoblank',255);
    add_filter('bbp_get_reply_content', 'autoblank',255);

    Remove nofollow if you need to !

    function mtn_weekly_fix_rel_follow( $content ) {
        // Find rel="nofollow", replace with empty space.
        $content = preg_replace( '/rel="nofollow"/', ' ', $content);
        return $content;
    }
    add_filter( 'the_content', 'mtn_weekly_fix_rel_follow', 20 );
    add_filter('bbp_get_topic_content', 'mtn_weekly_fix_rel_follow',255);
    add_filter('bbp_get_reply_content', 'mtn_weekly_fix_rel_follow',255);
    
    Robin W
    Moderator

    wherever it says (think it’s more than once)

    'type' => 'both', 'size' => 14 ) );
    

    change to

    'type' => 'name', 'size' => 14 ) );
    
    Novadrake1111
    Participant

    I am using a wordpress skin that integrates BBPress very nicely. One thing I am looking to do, however is make the bbpress forums have a hierarchy like any other software out there currently. I am not that amazing at coding and would appreciate if someone could explain in an easy to understand way. If it’s something that I would have to code completely over, i’d be willing to pay someone to help me code that.

    Thank You

    #157099

    In reply to: Delete Prive

    Robin W
    Moderator

    add the following to your functions file

    add_filter('private_title_format', 'pg_remove_private_title');
    
    function pg_remove_private_title($title) {
    		return '%s';
    	}
    

    Functions files and child themes – explained !

    van24
    Participant

    That worked perfectly! And the code you mentioned earlier in the thread is perfect. Thanks for your help 🙂

    Robin W
    Moderator

    You’ll need to register it for it to go live, try the following in your functions file

    add_action( 'widgets_init', function(){
         register_widget( 'BBP_Topics_Widget2');
    });
    
    Robin W
    Moderator

    I copied the entire Recent Topics widget code into my functions.php

    You need to copy and rename it.

    Then you use this new named widget, not the old one, so need to cal the new name in your sidebar.

    van24
    Participant

    Hi Robin

    I’m trying to get the same functionality that SeeingBlue is looking for. I copied the entire Recent Topics widget code into my functions.php, and I added your code in the correct place, but the widget is still behaving exactly the same.. Any idea what else I need to do?

    Thanks
    Van

    #157068
    Robin W
    Moderator
    #157058

    In reply to: Username display issue

    Robkk
    Moderator

    it could be just making the font-size smaller.

    copy this CSS anywhere you can put custom CSS

    #bbpress-forums div.bbp-forum-author a.bbp-author-name, 
    #bbpress-forums div.bbp-topic-author a.bbp-author-name, 
    #bbpress-forums div.bbp-reply-author a.bbp-author-name {
    font-size:12px;
    }
    #157054
    Robkk
    Moderator

    @discdemo

    remove Dougs code and see if just using this will fix it. it does the same thing.

    https://wordpress.org/plugins/bbpress-enable-tinymce-visual-tab/

    also see if deactivating wp-edit will fix the problem , i tried it awhile ago with the visual editor code and it was kind of buggy.

Viewing 25 results - 9,676 through 9,700 (of 32,519 total)
Skip to toolbar