Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'codes'

Viewing 25 results - 301 through 325 (of 1,687 total)
  • Author
    Search Results
  • #188828

    In reply to: Feature requests

    Jacob N. Breetvelt
    Participant

    Thank you, this works great!

    One thing left: i can not find the filter to filter forum posts/replies, so i could do:

    function my_process_shortcodes($content) {
      return do_shortcodes($content);
    }
    add_filter( '...??...', 'my_process_shortcodes' );
    
    #188799

    Topic: Feature requests

    in forum Installation
    Jacob N. Breetvelt
    Participant

    To make it possible for other plugins to add buttons to the editors toolbar, please make it possible to run the wp_editor() for posts/replies with the switches ‘tinymce’ => true and ‘teeny’ => false.

    Also, make it please possible to get the posts/replies passing the ‘the_content’ or at least the ‘do_shortcode’ filter. This would enable other plugins to enter their shortcodes into the posts/replies and get them rendered in the final display of the posts/replies.

    For more information why i ask this, please read this ducumentation page of the plugin wp-photo-album-plus.

    #188526
    Gewitty
    Participant

    I’m running WP 4.9.1 with the Sport theme and BBPress 2.5.14

    Everything works OK, but I have one user who has persistent problems posting. Every time he attempts to post a message, he gets an error saying, ‘ERROR your topic cannot be created at this time”.

    This does not happen with any other users and the problem persists even after I deleted his account and created a new one with a different ID and password.

    This would seem to point to some external cause, originating on his PC, but I can’t figure out what. I did suspect that he was possibly drafting his posts in MS Word and then copy/pasting them into his posts, which could have included MS control codes, a problem I’ve encountered before. However, after getting him to enter text directly in a new post, the same error message appeared.

    This one has me stumped. If anyone has seen anything like it before, or has any ideas about what the cause is, I would be very grateful to hear.

    #188502
    u_Oi
    Participant

    Hi @louisgeorges

    In fact you can do it 😎

    1.- Copy the follow code and paste it in functions.php file (If you dont know about functions please read about it before do this):

    //Restrict Topic and Replies Content For No-Registered Users
    function pj_hla_logged_in_topics($have_posts){
    if (!is_user_logged_in()){
    $have_posts = null;
    }
    return $have_posts;
    }
    add_filter('bbp_has_replies', 'pj_hla_logged_in_topics');

    With the above code your visitors (no registered users) will see only the topic title. The code locks topic content and all replies.

    2.- After pasted the code, try open a topic so you will see a bbpress notice about “you dont have access to… etc something like that”. You need to find the file where is that notice, to edit it with anything you want, for example a link to the sign up page (Sorry, I dont remember the file name).

    To show topics titles in your post or other pages you have 4 options:

    1.- Add each URL in your blog post with the same topic title and link it to the topic (hard work but good if you like linkbuilding)

    2.- Default bbpress shortcode: [bbp-single-topic id=$topic_id] – Display a single topic. eg. [bbp-single-topic id=4096] ( https://codex.bbpress.org/features/shortcodes/#topics )

    3.- @robin-w plugin: http://www.rewweb.co.uk/bbpress-additional-shortcodes/

    4.- Hire a developer to create a shortcode to show last topics or whatever about topics.

    Hope this can help you!

    #188347
    Robin W
    Moderator

    brilliant – thanks so much for posting the solution, and yes it looks like if you partner with a page and have multiple shortcodes then you may need to choose what the forum root should show.

    Robin W
    Moderator

    these sortcodes are theme(or other plugin) related, not bbpress.

    what theme are you using?

    #188057
    docaj
    Participant

    Solved! Found an earlier post about a similar problem. I manually edited spam-prevention.php under Mojo Marketplace Plugin to remove all blocked words including breast. Then problem is gone. Strangely, I had uninstalled Mojo Marketplace long time ago and it does not even show up on my Dashboard. Apparently its codes are still there and working.

    wpweaver
    Participant

    I don’t think there is a plugin or existing feature that does this.

    I’m really surprised that this isn’t a common question, as it is a real huge issue that allows spammers a backdoor to register as a user to your site. Very bad. This code will redirect all login and password attempts to a static page on your site which can use the regular bbp login, register, and pass shortcodes.

    You can use this custom code:

    <?php
    // intercept the Register and Lost your password? links from the standard WP login screen
    
    define( 'REGISTRATION_URL', 'https://example.com/register');
    
    	add_filter('register_url','custom_redirect_login_register');
    	add_filter('lostpassword_url','custom_redirect_login_register');
    
    	function custom_redirect_login_register($reg_url) {
    		return home_url( REGISTRATION_URL );
    	}
    
    	/**
    	 * Redirects visitors to <code>wp-login.php?action=register</code> to
    	 * <code>site.com/registration-page-name</code>
    	 */
    
    	add_action( 'login_form_register', 'custom_catch_register' );
    	function custom_catch_register()
    	{
    		wp_redirect( home_url( REGISTRATION_URL ) );
    		exit();
    	}
    
    	/*
    	 * intercept bbforum.me/wp-login.php?action=lostpassword and
    	 *           bbforum.me/wp-login.php?action=retrievepassword
    	 *
    	 */
    
    	add_action( 'login_form_lostpassword', 'custom_filter_option' );
    	add_action( 'login_form_retrievepassword', 'custom_filter_option' );
    	/**
    	 * Simple wrapper around a call to add_filter to make sure we only
    	 * filter an option on the login page.
    	 */
    	function custom_filter_option()
    	{
    		wp_redirect( home_url( REGISTRATION_URL ) );
    		exit();
    	}
    ?>

    There are articles on how do add custom code to your bbPress installation.

    Note that this is an option provided with my plugin “Weaver for bbPress” which is a fully turn-key solution to creating a bbPress site. I have not created a stand alone version of this option yet.

    #187347
    Robin W
    Moderator

    As far as I can see your theme author has rewritten some (maybe all) of the theme templates, renaming all the bbpress css codes, to harmonise in with the theme, which effectively neuters my plugin.

    It would take considerable effort to change all that to make the two work.

    I think that is as far as I can help.

    #187120
    heppusiel
    Participant

    I just try latest version of BBPress, and this problem exist. Is there any fix coming? Codes above didn’t work for me.

    #187110
    Bharat Karavadra
    Participant

    Hello,

    I have had to add a space after the https:// to avoid the screen appearing

    If you look at Peter Recks’ posts here:
    https:// http://www.karavadra.net/forums/topic/header-image-formatting/

    There are quotes with text ‘Reconsidering Study, Qualifications & Experience’ with a link to here:
    1) https:// http://www.karavadra.net/reconsidering-study-qualifications-experience/

    However, Peter has only put in a link in his post which is not to the link 1 above but to here:
    2) https:// romancecalling.xyz/?page_id=35

    When I look at the link in admin it appears correctly as link 2

    Why is the link being changed from the 2nd to the 1st on the user side and the title of the page being added?

    And more importantly how do I get it to appear as it as posted, namely link 2.

    Note: no a hrefs or any other shortcodes for links are being used — only the URLs 1 and 2.

    Thank you,

    Bharat

    #186928
    Robin W
    Moderator

    ok, so you create a page and use shortcodes to achieve this

    Shortcodes

    eg

    [bbp-topic-index]
    [bbp-forum-index]

    #186927
    Robin W
    Moderator

    ok, so you create a page and use shortcodes to achieve this

    Shortcodes

    eg

    [bbp-topic-index]
    [bbp-forum-index]

    #186715
    sovvyg
    Participant

    fdarn, i am using shortcodes to embed the forums but it doesn’t show on the core pages either. I have tried removing all of the forum shortcodes from the site and this doesn’t seem to make any difference.

    #186684
    fdarn
    Participant

    Sovvyg, Are you maybe using a short code to embed the forum on a different page? I am having the same issue when I use shortcodes.

    #186670
    fdarn
    Participant

    Hello,
    I am using bbPress 2.5.13
    I need to use a shortcode to put my forum on a page in wordpress. The shortcode options in bbp style pack will display the topic index but they will not display the Create a New Topic form or Link, like the regular Forum page does. See screenshots for examples.

    Regular

    shortcode

    #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?

Viewing 25 results - 301 through 325 (of 1,687 total)
Skip to toolbar