Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'codes'

Viewing 25 results - 326 through 350 (of 1,695 total)
  • Author
    Search Results
  • #186434
    rotlichtluzern
    Participant

    Hi

    after the last update, i got an error on line 1800 in functions.php when opening the forum page. according to forum entry here i downloaded and installed beta3. it worked again.

    but now bbpress widgets as well as the shortcodes like this:
    [bbp_recent_topics max_shown=”5″]
    they, spit out all topics instead of only 5…

    what to do? install beta2? here is the link (NSFW!):

    Home

    i leave the error in there for a moment, so you can see it.

    thanks!!

    #186360
    Robin W
    Moderator

    ok, you have two choices

    either use the default wordpress lost password and register

    http://mysite.com/wp-login.php?action=lostpassword
    http://mysite.com/wp-login.php?action=register

    obviously changing the ‘mysite.com’ to your sites name

    or create pages within your site and use the bbpress shortcodes
    and then reference the page url

    eg create a page called ‘password’ and have it’s permalink as say ‘password’ and put
    [bbp-login] as the page content (you can precede this with any text you like, or have text after) eg

    Lost you password?- enter your email and we'll send a new one straight to you
    [bbp-login]

    Then in the widget you would put

    http://mysite.com/password/
    

    you can do the same with [bbp-register] to display the register screen.

    Jakobuz
    Participant

    edit: when a put all the codes for the custom capabilities in a plugin (so I remove it from the functions.php), I am finally able to change the custom capabilties (by changing them in this plugin).
    Probably it’s because a plugin is loaded before the theme is loaded

    #186214

    In reply to: My bbpress login

    peet91
    Participant

    Hi, do you try bbpress shortcodes ?

    Here – https://codex.bbpress.org/features/shortcodes/

    #186137
    willad
    Participant

    Hello, I have also been trying to get a new topic button working for some time. In case it is of help to anyone, this is what seems to work for me.

    I created a wordpress page template “forum.php” and added the following code – it adds a ‘New Question’ button to the forum page but not if it’s the parent forum:

    <?php
    get_header(); 
    
    while ( have_posts() ) : the_post();
    if((($post_type = get_post_type()) == 'forum') ) //make sure we are on a forum
    {
      if(bbp_get_forum_id() != 0) //don't add the button to the parent forum
      {
        ?>
        <a href="<?php echo esc_url( add_query_arg( 'c', bbp_get_forum_id( ), site_url( '/new-topic/' ) ) )?>">New Question</a>
        <?php
      }
    }
    the_content();
    endwhile; // End of the loop.    
    ?>
    <?php get_footer();

    Now when I click the New Question link it opens the page new-topic and the forum I was on when I pressed the button is the forum the new question will be placed in.

    new-topic is a page I created in wordpress, and I gave it a template page-new-topic.php

    It contains the following code:

    <?php
    get_header(); 
    $my_c = get_query_var( 'c' );
    $forum_add_topic='[bbp-topic-form forum_id='.$my_c.']';
    echo do_shortcode($forum_add_topic);
    ?>
    <?php get_footer();

    The line

    <a href="<?php echo esc_url( add_query_arg( 'c', bbp_get_forum_id( ), site_url( '/new-topic/' ) ) )?>">New Question</a>

    in forum.php adds a variable c (which contains the current forum id() -bbp_get_forum_id( ) ) to the url when New Question is clicked.

    In page-new-topic.php this variable c is added to the shortcode [bbp-topic-form forum_id=XXX]

    do_shortcode then runs the shortcode which creates the form.

    I also had to add the following to functions.php to tie the two pages together:

    function add_custom_query_var( $vars ){
      $vars[] = "c";
      return $vars;
    }
    add_filter( 'query_vars', 'add_custom_query_var' );

    You could add this as a plugin if you wish.

    The idea for the shortcode came from this post: post

    How to pass variables through wordpress urls came from this post:

    post-2

    I am new to WordPress and PHP so there may be better ways of doing this but, as I said, this seems to work.

    sapstudent
    Participant

    Hi Team,

    Here is my situation. I have bbpress installed in my site(sapstudent.com/community). I am displaying it under ‘Community’ page using following two short codes.
    [bbp-forum-index]
    [bbp-topic-index]

    Here SAP HANA, SAP Data Services & SAP BO Business Intelligence are categories, everything else are forums.

    Now when I click on lets say ‘SAP HANA'(https://www.sapstudent.com/community/forum/sap-hana), it only displays forums under this category, however I would like to have recent topics below forums section as I have in ‘Community’ page.

    The other issue I have is, if I use both [bbp-forum-index], [bbp-topic-index] shortcodes on my main forum page, I am getting two search boxes(one above forum list and other one above topics list). To avoid this, I have disabled ‘Allow forum wide search’.Ideally how can I disable seachbox for [bbp-topic-index] shortcode, so that I will have only one search box on my main page which is above forum list.

    Jakobuz
    Participant

    this solved the issue for me:
    I blocked out all codes from the custom roles except for this one:

    function add_role_caps_filter( $caps, $role )
    {
        /* Only filter for roles we are interested in! */
        if( $role == 'bbp_professional' )
            $caps = custom_capabilities( $role );
     
        if( $role == 'bbp_member' )
            $caps = custom_capabilities( $role );
     
        return $caps;
    }
    add_filter( 'bbp_get_caps_for_role', 'add_role_caps_filter', 10, 2 );

    and than I was able to assign capabilities to the new roles via the members plugin of Justin Tadlock.

    I’m still wondering why this works for me … but mayby it works for you too … I hope

    bobibrown0
    Participant

    Hi everyone,

    I think the title is clear. Is it possible (with some coding) to display a specific forum category as the index of the forum?

    I tried using shortcodes in content-archive-forum, I wasn’t expecting much, and… I didn’t get much results.

    Any clue?

    #185310
    ncrocketry
    Participant

    I’ve tried to create pages with shortcodes, but the result is the same.

    #185282
    PinkishHue
    Participant

    @scottm-ldg Install the ‘bbp additional shortcodes’ plugin, that allows you to specify a different number of topics in the shortcode:

    bbp additional shortcodes

    Hope that helps.

    #185281

    In reply to: Link to latest post

    PinkishHue
    Participant

    You could install the ‘bbp additional shortcodes’ plugin, then use that to display just one topic

    bbp additional shortcodes

    Then use ‘do shortcode’ if you want to place this in a template file, like:

    // Use shortcodes in form like Landing Page Template.
    <?php echo do_shortcode( '[bbp-display-topic-index show='1']' ); ?>

    I think that should work for you.

    #185252

    In reply to: Multiple Forum Indexes

    Robin W
    Moderator

    If I understand what you want correctly, just set each ‘page’/index as a category and then the appropriate forums as belonging to that category.

    Then set up a page for each and use a shortcodes to display the appropriate forums for that page

    eg
    [bbp-single-forum id=1]
    [bbp-single-forum id=2]
    [bbp-single-forum id=3]

    #185172
    PinkishHue
    Participant

    @casiepa Hi again, I don’t see an option to send you a private message but wanted to let you know I installed the plugin (thanks), but I’ve noticed it has altered the display of my subforums (removed the topic and voice counts, and made the font larger), even though I have not checked that option in the plugin settings.

    Here’s the info from the plugin if it’s any help.

    WP version 4.8
    Theme Make (child theme) 1.1.0
    PHP version 5.6.30
    bbPress version 2.5.12-6148
    site url (removed, on localhost XAMPP)
    Active Plugins Name and Version
    – p1 bbP Toolkit 1.0.10
    – p2 bbP shortcodes 2.8
    – p3 bbPress 2.5.12
    – p4 BuddyPress 2.8.2
    – p5 User Switching 1.0.9
    – p6 WordPress Social Login 2.3.3

    InTempest
    Participant

    Reference site http://imapiece.com/

    Ill start by saying im not a developer and can edit php and code, but I cant write it from scratch…. yet

    So ive been moving a guild site over from phpbb into wordpress and am still trying to figure out the best way to handle applicants, I made a post here if anyone had any ideas about that
    https://bbpress.org/?post_type=topic&p=181981

    So I was looking into how to maybe do a multisite with a single forum handling all the main communication among the community as a whole. I was looking through the forum here and everything that said it cant be done is very old. Is there a way to have shortcodes and custom user fields to work around that? Or maybe iframe?

    Here is my thought, ill use car clubs for example

    Root Forum

    1 category – Car Club –
    1-2 forum – public
    1-3 forum – recruitment needs

    2 category – members only
    2-2 forum – New Car Club Applicant
    2-3 forum – Car Club Events
    2-4 forum – ADMIN

    3 categories – (3) Honda – (4) Ford – (5) Mazda
    3-2 forum – news rss
    3-3 forum – brand specific news

    Ok, so lets say on the main site if someone goes there it pulls everything since its the root. But give the car club its own multisite along with any niche sub group. In the custom user groups have shortcodes associated with the different ranks to show them on their member page when they look at the info something like [bbp-single-forum id=$forum_id] and add more to the root of that ranks permission. That way you dont have to add them per user, but per rank per group.

    so in the shortcode for public users they would only have access to 1 and its contents
    people in the honda club who are just members would have access to 1, 2(excluding 2-4) and 3, once they get bumped up to admin rank in that group the shortcode to display 2-4 gets added since its connected to rank roles.

    In the same breath on the front end of the multisite pages you could just have them display the public forums associated with that niche pulling the data from the forum via [bbp-single-forum id=$id ].

    I had a ton of control like this through phpbb using theme styling and domain masking and am trying to find a way to make it work in wordpress but its been a learning curve. I know groups in buddypress have some of this function built in, but it doesn’t seem to be tweak-able between sites. I dont want a guest to see every group in the opt in part of registration off the bat. Would rather have them app on that groups page, members review then they get added and what they see is based on what rank they have in all the groups they are in.

    So am i trying to overthink this? Have I missed something that could solve this idea?

    Thoughts/Suggestions?

    #184905
    Robin W
    Moderator

    bbpress is not designed for backend use by ordinary users – the backend is really for administration, so participants don’t get this area.

    New topics are shown below the forum list, or by creating a page and using one of the shortcodes

    [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.

    or by adding a button, such as in the style pack plugin

    bbp style pack

    #184878
    UserCentrix
    Participant

    No response in nearly 5 days is leaving me rather concerned to use bbPress. Is this the ussual support response-time?

    Anyway, I figured out a workaround using a plugin called PHP Code Widget.

    The plugin I am using is: https://wordpress.org/plugins/php-code-widget/

    An example of one of the codes I am using is:

    
    <?php
    $forum_id = get_the_ID();
    $forum_add_topic='[bbp-single-topic id ="'.$forum_id.'"]';
    echo do_shortcode($forum_add_topic);
    ?>
    
    #184715
    UserCentrix
    Participant

    I am trying to integrate BBPress into a site created with Toolset – Layouts, Types and Views.

    The following BBPress shortcodes require an ID parameter:

    [bbp-single-forum id=$forum_id]
    [bbp-topic-form forum_id=$forum_id]
    [bbp-single-topic id=$topic_id]
    [bbp-single-reply id=$reply_id]

    Each of the IDs required above are aliases for the post_id, which Toolset privides a shortcode for. In order to get the templates to work for layouts applied to single Forums, Topics and Replies I need to include the current post ID. The simplest way I can imagine to do this would be as follows?

    [bbp-single-forum id='[wpv-post-id]’]
    [bbp-topic-form forum_id='[wpv-post-id]’]
    [bbp-single-topic id='[wpv-post-id]’]
    [bbp-single-reply id='[wpv-post-id]’]

    Unfortunately I get the following output at the front end?

    ‘]

    This makes clear to me that nested shortcodes are not supported in the BBPress. Is there a straightforward way of extending this functionality, perhaps through the functions.php file? This would create full compatibility with BBPress and Toolset. I couldn’t find any solutions to this shared on this support forum but it seems to me as something that may be a common problem and could have been tackled before.

    I hope you can assist.

    #184711
    lalitavalon
    Participant

    I am looking for a shortcode or code (so I can make my own shortcode) to add the latest x topics from a specific forum. Like the recent topic widgets does. But in this case I can’t use the widget – so I am looking for a code to get the output of that widget somewhere in the text. I hope that is possible. I looked at the shortcodes on the website, but none of them is useful in my case.
    It needs to say show x recent topics of forum with ID=… and then only give the titles with link

    felixwaters
    Participant

    You may try https://imgcave.com all image types are accepted. It generates numerous codes to easily link to images.

    #184057
    pre55
    Participant

    Hi,

    Just wanted to share a newly released plugin available called bbPress User Ranks and it allows you to create user ranks, star ranks, RPG ranks, user badges and month badges which display on forums and user profiles. It also has widgets and shortcodes.

    You can view all the features and screenshots here:

    http://pre55.com/downloads/bbpress-user-ranks/

    You see the free lite version here:

    https://wordpress.org/plugins/bbp-user-ranks-lite/

    The plugin was created as I had been using the brilliant bbp user ranks plugin created by Robin W and although this worked great for what I initially wanted I eventually needed something a little more custom.

    I have therefore built my plugin from scratch incorporating lots of great features I think will increase engagement for any bbPress forum.

    Let me know what you guys think, if you have any suggestions please let me know.

    #183888
    blengine
    Participant

    Another solution for those interested. This makes use of the “Shortcodes in Menus” plugin to easily place the bbpress “View Profile” and “Edit Profile” links in your WordPress nav menus. Instructions:

    1 – Install the free plugin “Shortcodes in Menus”
    2 – Place the following code in your theme’s functions.php file:

    function menu_profile_link() { 
    		$current_user = wp_get_current_user();
    		$profile_menu_item = '<li><a href="' . home_url('forums/users/') . $current_user->user_nicename . '">View Profile</a></li>';
    		return $profile_menu_item;
    }
    add_shortcode('bbp-profile', 'menu_profile_link');
    
    function menu_edit_profile_link() { 
    		$current_user = wp_get_current_user();
    		$profile_menu_item = '<li><a href="' . home_url('forums/users/') . $current_user->user_nicename . '/edit">Edit Profile</a></li>';
    		return $profile_menu_item;
    }
    add_shortcode('bbp-edit-profile', 'menu_edit_profile_link');

    3 – In WordPress go to your Menus and go to the new Shortcodes panel. Type in “View Profile” as the title and underneath that type in [bbp-profile] to place the profile link in your menu. Click “Add to Menu”. Repeat this process using the shortcode [bbp-edit-profile] to add the “Edit Profile” link.

    4 – I’d also recommend the free plug-in “Nav Menu Roles” to restrict your menu items to logged in or logged out users.

    Hope this is useful!

    #183678
    horsmanzach
    Participant

    Hello, I am running WordPress 4.7.4 and bbPress 2.5.12.

    My forum can be found on https://thehulkpress.com/forum . The page looks exactly how I want it to there, but when I click on the forum channel the page background changes to white. I’ve tried a variety of different css codes to change the rest of the pages to black, but can’t seem to find the correct block of code. Can someone suggest a way to change not only the first page, but the rest of the pages’ background to black? Thank you

    – Zach

    #183655
    Robin W
    Moderator

    if you are happy with code, download my style pack plugin

    bbp style pack

    if you look in includes/shortcodes

    you’ll find a shortcode for bsp_display_topic_index

    around line 40 you’ll find the output that you could modify and then style.

    #183650
    Chad R. Schulz
    Participant

    @yo35: It can be done. But, you’ll need to either mod the plugin or insert a custom function inside your child theme (while deactivating the plugin to avoid conflicts).

    the original plugin code is:

    function pw_bbp_shortcodes( $content, $reply_id ) {
    	
    	$reply_author = bbp_get_reply_author_id( $reply_id );
    
    	if( user_can( $reply_author, pw_bbp_parse_capability() ) )
    		return do_shortcode( $content );
    
    	return $content;
    }
    add_filter('bbp_get_reply_content', 'pw_bbp_shortcodes', 10, 2);
    add_filter('bbp_get_topic_content', 'pw_bbp_shortcodes', 10, 2);
    
    function pw_bbp_parse_capability() {
    	return apply_filters( 'pw_bbp_parse_shortcodes_cap', 'publish_forums' );
    }

    What needs to change is the section returning the do_shortcode( $content ) as follows:

    	if( user_can( $reply_author, pw_bbp_parse_capability() ) ) {
    		$content = shortcode_unautop( $content );
    		return do_shortcode( $content );
    	}

    This will remove the autop filter that adds <p></p> to the shortcode text.

    Good luck.

    #183642
    yo35
    Participant

    @Robin W: thanks for your answers. The “bbPress – Do Short Codes” plugin do the job.

    However, there is still a problem: bbPress seems to have a kind of postprocessing that adds several <p></p> tags within the post content, including the sections that result from shortcode processing. Is it possible to disable this behavior?

Viewing 25 results - 326 through 350 (of 1,695 total)
Skip to toolbar