Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'codes'

Viewing 25 results - 201 through 225 (of 1,693 total)
  • Author
    Search Results
  • cryptoking
    Participant

    I am a newbie on BBPress and just installed it and I’m in the process of setting it up. The problem is that the body columns are not aligning with the topic headings.

    I did some testing and this is the default layout which is not aligning.

    Forum: Imagination Room

    However if I create a new Page and insert the shortcode the alignment is perfect, so I’m not sure what’s happening, but I don’t want to create several dozen pages and insert shortcodes, so I’d like to figure out why it’s not aligning.

    test

    I’ve tried messing with some of the css but I couldn’t figure it out. Any help would be greatly appreciated.

    megatill
    Participant

    Hi – I have a WordPress site that has been operational for 5 years.
    I wanted to add a Discussion Forum using bbPress, and I have been successful in installing the bbPress plug-in.
    Using the bbPress Shortcode Codex, I wanted to create a requirement for people to log into my new Discussion Forum using
    [bbp-register] – Display the register screen.
    [bbp-lost-pass] – Display the lost password screen.

    However, when I test these two options, it appears that these two options actually create a new WordPress account – with no connection to my existing WordPress site at all. When I test the Register facility, a new page opens with the WordPress create account box (create username and password).

    What is wrong with the Shortcode usage, please?

    WordPress 5.4.1 running Enterprise theme.

    Who and What I Find – About this site


    bbPress Version 2.6.5

    Robin W
    Moderator

    ok, I’m not seeing this issue – can you as a test deactivate bbpress do shortcodes and then retest

    JohnRDOrazio
    Participant

    Just “bbPress Do Short Codes”.

    amirzwp
    Participant

    sure, yoast SEO (Also Premium version) is enabled.

    I tried both of the codes you sent me, both doesn’t have an effect on the Meta Title.

    The snippet with the following code is still activated on the website:

    add_filter( 'wpseo_metatitle', 'rew_meta_title' );
    function rew_meta_title( $title ) {
    global $post ;
           if ($post->post_type == 'reply' ) {
    	 $title = 'this is a reply' ;
        }
     return $title;
    }

    So you can check, if there happend something. I deleted the other snippet because it also didn’t had an effect on the website. But when it has an effect, it’s not so good because the website is live.

    Thanks for your time.

    g28f99
    Participant

    Hi, Robin. I think the above goal to apply the customization only in some specified forums should be practical. For example, I do NOT want the above customization to take effects in two forums with forum id 124 and 126. Or, alternatively, I do NOT want the customization to take effects in forums with menu_order < 10.But I could not find any previous posts with codes to set the effective range among forums.
    How do you think about it? I have no idea how to integrate the following selection information into the above customization code. Could you please make a demonstration?

    
    $current_forum_id = get_forum_id();
    if $current_forum_id !==124 AND $current_forum_id !==126 
    
    #211220

    In reply to: Adding roles

    zirow
    Participant

    I’ve added this reply like 3times and everytime i edit it it disappeared and when i try to re-paste it and submit i cant cuz i get a warning for duplication 😛

    I’m pretty sure theirs a better way of doing it but that’s how I did since its the only way I could figure it out

    Open Capabilities.php

    Under “function bbp_get_caps_for_role”
    Add this case along with the other cases

    case bbp_get_tutor_role() :
    $caps = array(

    // Primary caps
    ‘spectate’ => true,
    ‘participate’ => true,

    // Forum caps
    ‘read_private_forums’ => true,

    // Topic caps
    ‘publish_topics’ => true,
    ‘edit_topics’ => true,

    // Reply caps
    ‘publish_replies’ => true,
    ‘edit_replies’ => true,

    // Topic tag caps
    ‘assign_topic_tags’ => true,
    );

    Under:

    function bbp_get_participant_role() {

    // Filter & return
    return apply_filters( ‘bbp_get_participant_role’, ‘bbp_participant’ );
    }

    Add:

    function bbp_get_tutor_role() {

    // Filter & return
    return apply_filters( ‘bbp_get_tutor_role’, ‘bbp_tutor’ );
    }

    Save and close Capabilities.php and open bbpress.php in the plugin directory not the one inside the theme.

    Search for:
    public function roles_init() {

    You will see this code:

    $keymaster = bbp_get_keymaster_role();
    $moderator = bbp_get_moderator_role();
    $participant = bbp_get_participant_role();
    $spectator = bbp_get_spectator_role();
    $blocked = bbp_get_blocked_role();

    // Build the roles into one useful array
    $this->roles[ $keymaster ] = new WP_Role( ‘Keymaster’, bbp_get_caps_for_role( $keymaster ) );

    $this->roles[ $moderator ] = new WP_Role( ‘Moderator’, bbp_get_caps_for_role( $moderator ) );
    $this->roles[ $participant ] = new WP_Role( ‘Participant’, bbp_get_caps_for_role( $participant ) );
    $this->roles[ $spectator ] = new WP_Role( ‘Spectator’, bbp_get_caps_for_role( $spectator ) );
    $this->roles[ $blocked ] = new WP_Role( ‘Blocked’, bbp_get_caps_for_role( $blocked ) );
    }

    So you just want to add these two codes in their:

    $tutor = bbp_get_tutor_role();

    $this->roles[ $tutor ] = new WP_Role( ‘tutor’, bbp_get_caps_for_role( $tutor ) );

    If u want to rename an existing role u added or bbpress default roles u can add this into your functions.php

    Add:

    function ntwb_bbpress_custom_role_names() {

    return array(

    // Keymaster

    bbp_get_keymaster_role() => array(

    ‘name’ => ‘Administrator’,

    ‘capabilities’ => bbp_get_caps_for_role( bbp_get_keymaster_role() )

    ),

    // Moderator

    bbp_get_moderator_role() => array(

    ‘name’ => ‘Moderator’,

    ‘capabilities’ => bbp_get_caps_for_role( bbp_get_moderator_role() )

    ),

    // Participant

    bbp_get_participant_role() => array(

    ‘name’ => ‘Member’,

    ‘capabilities’ => bbp_get_caps_for_role( bbp_get_participant_role() )

    ),

    bbp_get_tutor_role() => array(

    ‘name’ => ‘Member2’,

    ‘capabilities’ => bbp_get_caps_for_role( bbp_get_tutor_role() )

    ),

    // Spectator

    bbp_get_spectator_role() => array(

    ‘name’ => ‘Spectator’,

    ‘capabilities’ => bbp_get_caps_for_role( bbp_get_spectator_role() )

    ),

    // Blocked

    bbp_get_blocked_role() => array(

    ‘name’ => ‘Blocked’,

    ‘capabilities’ => bbp_get_caps_for_role( bbp_get_blocked_role() )

    )

    );

    }

    #211127
    theicebooky
    Participant

    It did it guys with two codes :))

    #211115
    rashidkalwar
    Participant

    Shortcodes
    Codex Home → bbPress Features → Shortcodes
    Since Version 2.0 bbPress support so called Shortcodes. They have been introduced for creating macros to be used in the layout of your forum content on WordPress pages. To use any of the shortcodes simply insert the desired shortcode into any WordPress page.

    To get the required numerical ID for $forum_id, $topic_id, $reply_id and $tag_id you will need to visit your /wp-admin/ section and either by editing the post or by hovering your mouse over the applicable forum/topic/reply/tag post type you will see a numeric ID for that post eg. /wp-admin/post.php?post=47

    Forums
    [bbp-forum-index] – This will display your entire forum index.
    [bbp-forum-form] – Display the ‘New Forum’ form.
    [bbp-single-forum id=$forum_id] – Display a single forums topics. eg. [bbp-single-forum id=32]

    Topics
    [bbp-topic-index] – Display the most recent 15 topics across all your forums with pagination.
    [bbp-topic-form] – Display the ‘New Topic’ form where you can choose from a drop down menu the forum that this topic is to be associated with.
    [bbp-topic-form forum_id=$forum_id] – Display the ‘New Topic Form’ for a specific forum ID.
    [bbp-single-topic id=$topic_id] – Display a single topic. eg. [bbp-single-topic id=4096]

    Replies
    [bbp-reply-form] – Display the ‘New Reply’ form.
    [bbp-single-reply id=$reply_id] – Display a single reply eg. [bbp-single-reply id=32768]

    Topic Tags
    [bbp-topic-tags] – Display a tag cloud of all topic tags.
    [bbp-single-tag id=$tag_id] – Display a list of all topics associated with a specific tag. eg. [bbp-single-tag id=64]

    Views
    [bbp-single-view] – Single view – Display topics associated with a specific view. Current included ‘views’ with bbPress are “popular” [bbp-single-view id=’popular’] and “No Replies” [bbp-single-view id=’no-replies’]

    Search
    [bbp-search] – Display the search input form.
    [bbp-search-form] – Display the search form template.

    Account
    [bbp-login] – Display the login screen.
    [bbp-register] – Display the register screen.
    [bbp-lost-pass] – Display the lost password screen.

    #211020
    batteman
    Participant

    Good evening (in France, it’s 1:31 am ^^)

    Did you find an answer to these problem ? I’ve the same issue too with this “code” :

    
    /* Ajouts de rôles-clone à bbPress*/
    function add_revendeur_role( $bbp_roles ) 
    {
    $bbp_roles['bbp_revendeur'] = array(
    'name' => 'Revendeur',
    'capabilities' => bbp_get_caps_for_role( bbp_get_participant_role() )
    );
    return $bbp_roles;
    }
    add_filter( 'bbp_get_dynamic_roles', 'add_revendeur_role', 1 );

    I tried a few “codes” found on this forum without success.

    Thank you.

    David13_13
    Participant

    Hey!

    I’ve been trying several codes but I can’t get what I want.

    I just simply need a rss URL that shows recent topics in all forums but not their replies. Is that possible?

    Thanks

    Solitary_bee
    Participant

    Yes I get that, and I see my settings are configured to automatically now give this status to new additions, and supposedly the ability to post, but ‘half’ of those that already have the status cannot.

    It’s a real shame that there are no codes written into the error messages.

    I guess my two questions are (in the context of my above post)

    1. When did all my historically inactive users get all their statuses changed to participants, it could only be with a recent BBpress plugin update?
    2. Is there another encoded condition that has to be satisfied aside from “if user = Participant then validate post or reply?”.

    I know an invalid or heavy file may stop posting, but I have increased the values of the attachments so this is out. Failed posters have however not always been uploading anything more than their text.

    Anyway I should stop speculating and see when the successful and failed posters were entered into the system.

    Robin W
    Moderator

    ok, I’d do this

    go back to

    When I do a static page and add the bbCode shortcode [bbp-forum-index] it works fine and as expected.

    and use developer told to scrape the code from the presented page.

    then you should be able to construct the page without using shortcodes

    too much work for me to really help further for free – sorry

    joerga
    Participant

    Unfortunately this doesn’t work. The function gets then confused with the open and closing tags of the shortcod and echos some of them so the overall layout is broken.

    Any other ideas how to fix this or achieve on another way?

    Here you can see the problem: https://prime-surfing.de/prime-surfing-forum/forum/prime-surfing/

    Edit: I added a second section below this one with this code:

    echo do_shortcode('[tdc_zone type="tdc_content"][vc_row full_width="stretch_row_1400 td-stretch-content"][vc_column][vc_row_inner][vc_column_inner width="1/3"][td_block_list_menu menu_id="14949"][/vc_column_inner][vc_column_inner width="2/3"][vc_column_text]bbPress FORUM SHOULD BE HERE![/vc_column_text][/vc_column_inner][/vc_row_inner][/vc_column][/vc_row][/tdc_zone]');

    This works fine so this tells me that the do_shortcode function interprets all the shortcodes right but something in the injsection of bbPress is not working along with the way I am trying to solve this.

    Robin W
    Moderator

    as a quick guess, I suspect you are trying multiple shortcodes

    so

    
    <?php echo do_shortcode('[tdc_zone type="tdc_content"][vc_row full_width="stretch_row_1400 td-stretch-content"][vc_column][vc_row_inner][vc_column_inner width="1/3"][td_block_list_menu menu_id="14949"][/vc_column_inner][vc_column_inner width="2/3"][vc_column_text]

    might need to be

    <?php echo do_shortcode('[tdc_zone type="tdc_content"]') ;
    <?php echo do_shortcode('[vc_row full_width="stretch_row_1400 td-stretch-content"]') ;
    etc.
    joerga
    Participant

    Hey everyone,

    I am currently setting up a new bbPress Forum and I made a custom template page which works fine but I can’t figure out why the forum injects in the wrong place (or if it works like this at all).

    I have the tagdiv Newspaper Theme installed and I usually layout my pages with the tagdiv composer.
    For the custom page template I took the code from the page.php from the tagdiv Composer directory adjusted it for my needs and then saved it to plugin-bbpress.php inside the Template root directory.

    I also created a page with tagdiv Composer with a layout with three columns, bbPress is supposed to be in the middle one. When I do a static page and add the bbCode shortcode [bbp-forum-index] it works fine and as expected. I have three colums with different content to the left and right and the bbPress forum in the middle.

    What I tried now is to use the same shortcodes from the tagdiv composer to create a custom template for the whole bbPress forum (in. So my code in the plugin-bbpress.php file looks like this:


    if (have_posts()) { ?>
    <?php while ( have_posts() ) : the_post(); ?>

    <div class="td-main-content-wrap td-main-page-wrap td-container-wrap">
    <div class="<?php if (!td_util::tdc_is_installed()) { echo 'td-container '; } ?>tdc-content-wrap">
    <?php echo do_shortcode('[tdc_zone type="tdc_content"][vc_row full_width="stretch_row_1400 td-stretch-content"][vc_column][vc_row_inner][vc_column_inner width="1/3"][td_block_list_menu menu_id="14949"][/vc_column_inner][vc_column_inner width="2/3"][vc_column_text]

    '.the_content().'

    [/vc_column_text][/vc_column_inner][/vc_row_inner][/vc_column][/vc_row][/tdc_zone]'); ?>
    </div>

    </div> <!-- /.td-main-content-wrap -->

    <?php endwhile; ?>
    <?php
    }

    On the frontend the shortcodes are renderd fine by the tagdiv Composer but bbPress injects over or before the columns and not in the middle one as I want it to (and where the the_content() function should place it).

    Any ideas how I can get this to work or any other ideas how to achieve this?

    Thanks!

    Newspaper Version 10.1
    bbPress Version 2.6.4

    Here’s the link to the static page: https://prime-surfing.de/profile-copy/
    And here’s one with the custom page template: https://prime-surfing.de/prime-surfing-forum/forum/prime-surfing/

    P.S.: Please don’t mind the mess with the other pages, still under consutruction.

    #209876
    Milan Petrovic
    Participant

    My GD bbPress Toolbox Pro plugin implements a shortcode for syntax highlighting in the forum topics and replies: https://support.dev4press.com/kb/article/bbcodes-source-code-scode/.

    Milan

    #209814
    Robin W
    Moderator
    #209779
    Robin W
    Moderator

    so what shortcodes has it got ?

    #209777
    Robin W
    Moderator

    is this an actual WordPress page with shortcodes in it?

    oibc
    Participant

    @jack_tyler

    @wpweaver

    I have the same and other problem.
    would you pls help me?

    I am wondering if is there any existing feature on the BBPress to have a login, register, forgot password, email confirmation only in front-end? I know that there are [bbp-login], [bbp-register], and [bbp-lost-pass] short-codes that you can place in the page so that it will display on the front-end but the issue is when user enters an incorrect password or account, it will redirect to admin login. What I wanted is to stay always in the front-end. Or do you have any suggestion what plugin I can use that and compatible?

    I like plugin “Weaver for bbPress” .
    but some problems happens after I installed the plugin “Weaver for bbPress” .
    May I ask?
    1.It is OK that a new user(registered) logged in from frontend,and hide the wp-admin. But after logout ,”Sorry, you don’t have permission to view this profile.”shown on http://mysite.com/forums/users/oi/subscriptions/?loggedout=true
    2. It is OK that admin logged in from frontend. But after logout ,”Sorry, you don’t have permission to view this profile.”shown on http://mysite.com /forums/users/oi/subscriptions/?loggedout=true .
    3. when user enters an incorrect password or account, it will redirect to admin login.

    What I wanted is to stay always in the front-end. Or do you have any suggestion what plugin I can use that and compatible?

    winchester234
    Participant

    Hi,

    My issue is that when I add the forum root at the forum settings, the page displays the following error in the header and the footer of the page:

    Notice: Undefined property: WP_Post_Type::$post_type in /home1/smilingsun/public_html/vanlifemagazine.co/wp-content/plugins/td-composer/includes/shortcodes/vc_row.php on line 415

    The page is at:

    Vanlife Community Forum

    The theme I’m currently using is Newspaper by TagDiv.

    Many thanks,
    Francesco

    #209401

    In reply to: Split up my Tags page

    webcreations907
    Participant

    No problem, glad that worked out for you.

    I was trying to update the code in the above to remove the inline styles and !important, but guess I can’t edit replies on here.

    Will provide update code below, if you want to update it.

    CSS

    
    .airport-iata-info{
      padding-left:15px;
      color:rgba(0,0,0,0.6);
      font-weight:bolder;
      font-size:14px;
      margin-top:20px;
    }
    .airport-iata-filter-tag-wrap span.active,
    .airport-iata-filter-tag-wrap span:hover{
      background-color:#087cc1;
      color:#fff;
    }
    .airport-iata-filter-tag-wrap{
      border:1px solid rgba(0,0,0,0.1);;
      display:table;
      padding:0 10px 10px;
      border-radius:4px;
      margin-bottom:10px
    }
    .airport-iata-filter-tag-wrap span{
      cursor:pointer;
      background-color:#fff;
      box-shadow:0 2px 5px rgba(0,0,0,0.2);
      margin:10px;
      border-radius:4px;
      padding:10px 20px;
      display:inline-block;
    }
    
    

    functions.php file

    
    
    if(!function_exists('airport_iata_code_filter_buttons')){
    	function airport_iata_code_filter_buttons(){
    		if(!function_exists('is_page')) return;
    		if(is_page(4760)){
    			?>
    			<script>
    				(function($){
    	  
    				  var buttons= {};
    				  buttons['a-f'] = 'a b c d e f';
    				  buttons['g-l'] = 'g h i j k l';
    				  buttons['m-s'] = 'm n o p q r s';
    				  buttons['t-z'] = 't u v w x y z';
    				  
    				  var get_tag_class = function( tag ){
    				    var tag_class = false;
    				    $.each(buttons,function(index,el){
    				      if(el.indexOf(tag.toLowerCase()) > -1){
    				        tag_class = index;
    				        return false;
    				      }
    
    				    });
    				    
    				    return tag_class;
    				  }
    				 
    				  $('#bbp-topic-hot-tags .tag-cloud-link').each(function(){
    				   var tag_class = get_tag_class($(this).text().slice(0,1));
    				    if(tag_class !== false){
    				      $(this).addClass('airport-iata-filter-tag-cloud-'+tag_class).attr('data-airport-iata-tag',tag_class);
    				    }
    				  });
    				  
    				  $('#bbp-topic-hot-tags').prepend('<div class="airport-iata-filter-tag-wrap"><div class="airport-iata-info">Filter IATA Codes</div></div>');
    				  $('.airport-iata-filter-tag-wrap').append('<span class="airport-iata-filter-all active">All</span>');
    				$.each(buttons,function(index,el){
    					$('.airport-iata-filter-tag-wrap').append('<span data-airport-iata-filter-key="'+index+'" class="airport-iata-filter-tag-cloud-'+index+'">'+index.toUpperCase()+'</span>');
    				});
    				  
    				  $(document).on('click', '.airport-iata-filter-tag-wrap span', function(e){
    				    e.preventDefault();
    				    $('.airport-iata-filter-tag-wrap span').removeClass('active');
    				    $(this).addClass('active');
    				    if($(this).hasClass('airport-iata-filter-all')){
    				      $('#bbp-topic-hot-tags a.tag-cloud-link').show();
    				    }else{
    				      $('#bbp-topic-hot-tags a.tag-cloud-link').hide();
    				      $('#bbp-topic-hot-tags a.tag-cloud-link.airport-iata-filter-tag-cloud-'+$(this).attr('data-airport-iata-filter-key')).show();
    				    }
    				 });
    				  
    				})(jQuery);
    			</script>
    			<?php
    		}
    	}
    	add_action( 'wp_footer', 'airport_iata_code_filter_buttons', 100);
    }
    
    
    #209376

    In reply to: Split up my Tags page

    webcreations907
    Participant

    Hey there,

    I got that code for you so you can add it to your page and give it a try.

    Put the code below in your style.css file of your theme, you can change as needed. It only styles the filter buttons.

    
    .airport-iata-info{
      padding-left:15px;
      color:rgba(0,0,0,0.6);
      font-weight:bolder;
      font-size:14px;
      margin-top:20px;
    }
    .airport-iata-filter-tag-wrap span.active,
    .airport-iata-filter-tag-wrap span:hover{
      background-color:#087cc1;
      color:#fff;
    }
    .airport-iata-filter-tag-wrap{
      border:1px solid rgba(0,0,0,0.1);;
      display:table;
      padding:0 10px 10px;
      border-radius:4px;
    }
    .airport-iata-filter-tag-wrap span{
      background-color:#fff;
      box-shadow:0 2px 5px rgba(0,0,0,0.2);
      margin:10px;
      border-radius:4px;
      padding:10px 20px !important;
      display:inline-block;
      
    }
    
    

    This code below you’ll need to put in your functions.php file of your theme, best if you put in child theme so that you don’t have to replace when you update your theme in the future. The function below is only set to run on that page you have the listed tags on.

    
    if(!function_exists('airport_iata_code_filter_buttons')){
    	function airport_iata_code_filter_buttons(){
    		if(!function_exists('is_page')) return;
    		if(is_page(4760)){
    			?>
    			<script>
    				(function($){
    	  
    				  var buttons= {};
    				  buttons['a-f'] = 'a b c d e f';
    				  buttons['g-l'] = 'g h i j k l';
    				  buttons['m-s'] = 'm n o p q r s';
    				  buttons['t-z'] = 't u v w x y z';
    				  
    				  var get_tag_class = function( tag ){
    				    var tag_class = false;
    				    $.each(buttons,function(index,el){
    				      if(el.indexOf(tag.toLowerCase()) > -1){
    				        tag_class = index;
    				        return false;
    				      }
    
    				    });
    				    
    				    return tag_class;
    				  }
    				 
    				  $('#bbp-topic-hot-tags .tag-cloud-link').each(function(){
    				   var tag_class = get_tag_class($(this).text().slice(0,1));
    				    if(tag_class !== false){
    				      $(this).addClass('airport-iata-filter-tag-cloud-'+tag_class).attr('data-airport-iata-tag',tag_class);
    				    }
    				  });
    				  
    				  $('#bbp-topic-hot-tags').prepend('<div class="airport-iata-filter-tag-wrap" style="margin-bottom:20px;"><div class="airport-iata-info">Filter IATA Codes</div></div>');
    				  $('.airport-iata-filter-tag-wrap').append('<span style="cursor:pointer;padding:10px;" class="airport-iata-filter-all active">All</span>');
    				$.each(buttons,function(index,el){
    					$('.airport-iata-filter-tag-wrap').append('<span data-airport-iata-filter-key="'+index+'" style="cursor:pointer;padding:10px;" class="airport-iata-filter-tag-cloud-'+index+'">'+index.toUpperCase()+'</span>');
    				});
    				  
    				  $(document).on('click', '.airport-iata-filter-tag-wrap span', function(e){
    				    e.preventDefault();
    				    $('.airport-iata-filter-tag-wrap span').removeClass('active');
    				    $(this).addClass('active');
    				    if($(this).hasClass('airport-iata-filter-all')){
    				      $('#bbp-topic-hot-tags a.tag-cloud-link').show();
    				    }else{
    				      $('#bbp-topic-hot-tags a.tag-cloud-link').hide();
    				      $('#bbp-topic-hot-tags a.tag-cloud-link.airport-iata-filter-tag-cloud-'+$(this).attr('data-airport-iata-filter-key')).show();
    				    }
    				 });
    				  
    				})(jQuery);
    			</script>
    			<?php
    		}
    	}
    	add_action( 'wp_footer', 'airport_iata_code_filter_buttons', 100);
    }
    

    That’s it, should work. Let me know if you have any issues or questions on any of that.

    🙂

    #208023
    telium
    Participant

    My forums can be seen at:
    new.telium.io/haast/forums

    In case it matters, Im using the Avada theme. (But I can just insert the shortcodes for bbpress where required)

Viewing 25 results - 201 through 225 (of 1,693 total)
Skip to toolbar