Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 9,051 through 9,075 (of 32,511 total)
  • Author
    Search Results
  • #160624
    Jake Hall
    Participant

    yes there is its called form-user-login.php

    using the bbp-login shortcode works as one would expect, editing the user-login form works also, as one would expect. However:

    When the user is logged in, it constantly displays a “you are already logged in message”. The reason I want to edit the bbp login widget is because that handles whether or not the user is logged in flawlessly, it just looks plain awful.

    So, if I can easily edit the form that is included within the widget, that would be much better

    #160614
    mglasser
    Participant

    Our phpbb3 forum was migrated to a brand new WordPress installation with bbPress installed (not BuddyPress). It was done by a consultant, so I am not sure how much of the code was custom vs a phpbb3 migration tool.

    We got the private topics to show to Participants by using the plugin “Capability Manager Enhanced” and allowing the read_private_topics and read_private_replies. This now allows Participants to read the private topics, but also allows them to see Hidden forums. They cannot see the content/topics of the forums, but they can see the hidden forum titles.

    The remapping to default was done with the repair tool. It had no impact, except to require me to go back and reset the handful of users that were not set to Participants.

    The big question that seems unresolved in many threads is whether Participants are supposed to see Private topics/replies, or if that is a misprint in the documentation? Why would we have to use the Capability Manager Enhanced plugin to do what the docs say should happen by default.

    #160604
    jayd94
    Participant

    [bbp-single-forum id=460] im using this momentally, but i`ve tried more codes that did the same.
    The link works good as i rewrote the forum root to the wp page`s slug-http://rohamjelvenyek.com/foforum/kategoriak/altalanos/regi-penzek-foruma-az-okortol-napjainkig/

    #160603
    Robin W
    Moderator

    can you give us a shortcode you are using and a link to the resultant page?

    pazzaglia
    Participant

    Unfortunately, with the upgrade to WordPress 4.x these little snippets no longer work – I read elsewhere that bbpress search had some updates which likely render these snippers useless. : (

    If anyone has the updated code, I would really appreciate it!!

    Ciao,

    L

    #160593
    leeleepompom
    Participant

    Where and how do I insert that? I used the short code [bbp-register] How can I add the Captcha?

    #160592
    jayd94
    Participant

    Hello!
    My problem is :
    I set my forum root matching with the wp page slug i created for main forum page, named it: ´foforum`.

    It works, the root is now the wp page, but it breaks all the bbp shortcodes that i am using on the page, it seems to display forum index instead of each single forum displayed, so everywhere there is [bbp-single-forum id=xxx], it shows all the forums-as ifd it was the forum index shortcode.
    Thanks,
    Daniel

    #160585
    jayd94
    Participant

    hey!
    It wokrs for me also, root is good, but it somehow breaks my shortcodes, instead of displaying single forum, all my single forum shortcode shows forum index shortcode.

    #160577
    pazzaglia
    Participant

    I tried three plug-ins from the WordPress repository and all of them send Text e-mails for bbpress notifications.

    – bbPress Notify
    – bbPress Notifications
    – bbPress Custom Reply Notifications*

    I also tried Satollo’s bbpress plug-in, Satollo x bbPress, which DOES send HTML e-mails and is available only on his website (not in the repository) but it’s a little buggy. Sometimes it works, sometimes it doesn’t but every time someone submits a comment they get a page with php warnings and errors-eeek!

    I’m only a PHP tweaker, not writer, and cannot make out the spaghetti code of the three robust plug-ins to find where and how to add the information that the notification should go out in HTML.

    Any suggestions or ideas?

    Thanks!

    L

    #160573
    Robin W
    Moderator

    The first basketball is given by a div class of ‘page-title’
    The second basketball is given by a div class of ‘entry-title’

    so you could try

    #bbpress-forums .entry-title {
    display : none !important ;
    }

    in your child theme css

    Functions files and child themes – explained !

    #160567
    novicechess
    Participant

    Matter resolved.

    “If you wish that the Homepage Blog and the Post will have the Center Effect then the code will be:

    .home.blog #content, .single #content{width: 100%}

    this code will only affect the Homepage and the Blog Posts.”

    #160565
    novicechess
    Participant

    Follow-up question:

    After aligning my forum, I found that my posts were all shifted left. I attempted to shift them right by referencing the title (h1) and content of posts (p). After changing the values of their width and margin-left, they look fine (minus the date/comment buttons, which I haven’t figured out how to reference yet), but now my forums are affected by the “p” width change, which makes them overflow.

    Is there a way to only reference blog posts while keeping the format for the forums in tact?

    Here is the code I used to manually center my post content/title.

    h1.entry-title {
    	width: 500px;
    	margin-left: 250px;
    }
    
    p {
    	width: 500px;
    	margin-left: 250px;
    }

    Here is what my blog posts look like: null

    Here is what my forum looks like with the overflow: null

    All help/feedback appreciated!

    #160561
    Robkk
    Moderator

    This should help.

    Enable Visual Editor

    #160560
    Robkk
    Moderator

    you can add the bbpress post type to the default wordpress search.

    copy this into your child theme functions.php or a functionality plugin

    /**
     * Include bbPress 'topic' custom post type in WordPress' search results
     */
    function ntwb_bbp_topic_cpt_search( $topic_search ) {
    	$topic_search['exclude_from_search'] = false;
    	return $topic_search;
    }
    add_filter( 'bbp_register_topic_post_type', 'ntwb_bbp_topic_cpt_search' );
    
    /**
     * Include bbPress 'reply' custom post type in WordPress' search results
     */
    function ntwb_bbp_reply_cpt_search( $reply_search ) {
    	$reply_search['exclude_from_search'] = false;
    	return $reply_search;
    }
    add_filter( 'bbp_register_reply_post_type', 'ntwb_bbp_reply_cpt_search' );
    
    function ntwb_bbp_forum_cpt_search( $forum_search ) {
    $forum_search['exclude_from_search'] = false;
    return $forum_search;
    }
    add_filter( 'bbp_register_forum_post_type', 'ntwb_bbp_forum_cpt_search' );
    #160556
    ajsonnick1
    Participant

    THANKS! will look into the plugin.

    HMM.. Using the Listify wordpress theme.
    I can’t find anything in the code. I was able to remove the first page title if I want, but I want to leave that.
    The big grey box I wanted to remove.

    Thanks!

    #160546
    Jake Hall
    Participant

    OK, removing the following from my functions file;

    function SearchFilter($query) {
    	if ($query->is_search) {
    	$query->set('post_type', 'post');
    	}
    		return $query;
    	}
    
    add_filter('pre_get_posts','SearchFilter');

    Seemed to fix the problem. No idea why that broke things, but I can finally start working on my forum!

    Jake Hall
    Participant

    Hi all,

    I have slowly developed my own theme for bbPress + WordPress, and it has been a sharp learning curve trying to get my head around the code for WordPress. Anyway, I am having an issue where I can drill down into a topic, however, no posts are ever displayed. The only thing that is displayed on screen is the “Add new Reply” GUI.

    I am essentially wondering, why is this happening, and how can I fix it? I have tried to replicate the same problem on the default wordpress themes and they work fine, so – what have I managed to do with my theme that has broken everything?

    Any help would be appreciated,

    #160542
    andrew55
    Participant

    Got it – This seems to work for showing the first role:

    <?php
    $user = new WP_User( bbp_get_reply_author_id() );
    echo $user->roles[0];
    ?>
    #160537
    novicechess
    Participant

    I’ve found the solution, and it turned out I needed a “container” edit. The code I ended up using was as follows

    #container {
    width: 690px;
    padding: 30px 30px 0;
    }

    #content {
    float: left;
    width: 455px;
    }

    .singlecol #content {
    float: none;
    width: 550px;
    }

    #160534

    Hi Robin,

    “having it exist as /mysite.com/forum”

    would be the perfect solution for me, since my standalone bbpress is already at /mysite.com/forum/, and my wordpress blog is at /mysite.com/blog/ (they are both in production).

    Would your solution work in my case?

    Where exactly should I add the shortcode [bbp-forum-index]?

    Thank you very much!

    Robin W
    Moderator

    great, putting it in the template is equally fine, BUT make sure you put that template into a child theme, else plugin and theme updates will destroy it.

    Functions files and child themes – explained !

    #160524
    andrew55
    Participant

    I’m very happy to have found this – very useful.

    Question – any suggestions on how to adjust the code to where subscribers can also view the role of other users.

    Thanks for any help.

    #160522
    23creative
    Participant

    Hey Guys,

    i have just completed this functionlaity for my site. i wanted to use a jquery chosen as opposed to a text input so in my themes functions.php file i added the following:

    function restrict_topic_tags( $terms, $topic_id, $reply_id ) {
       $terms = bbp_get_topic_tag_names( $topic_id );
       foreach ($_POST['bbp_topic_tags'] as $topicTags){
          $terms .= ', '.esc_attr( strip_tags( $topicTags ) );
       }
       return $terms;
    }
    add_filter( 'bbp_new_reply_pre_set_terms', 'restrict_topic_tags' );
    
    function displayTagElements($selectedTags){
        $html = array();
        $tags = get_categories( array('hide_empty'=> 0,'taxonomy' => 'topic-tag'));
        $selectedTags = explode(', ', $selectedTags);
        //die(var_dump($selectedTags));
        $html[] = '<select class="chzn-select" multiple="multiple" name="bbp_topic_tags[]" id="bbp_topic_tags">';
            foreach($tags as $tag){
                $selected = '';
                if (in_array($tag->name, $selectedTags)) {
                   $selected = 'selected="selected"';
                }
                $html[] = '<option '.$selected.' value="'.$tag->slug.'">'.$tag->name.'</option>';
            }
        $html[] = '</select>';
        return implode('',$html);
    }

    then in my bbpress custom theme files (form-reply.php, any others that had the reply form. I’m sure there is more than one i haven’t fully checked yet) i added the following code at line 75

    <p>
        <label for="bbp_topic_tags"><?php _e( 'Tags:', 'bbpress' ); ?></label><br />
        <?php echo displayTagElements(bbp_get_form_topic_tags()); ?>
    </p>
    #160520
    andrew55
    Participant

    Wow – thanks for taking the time to create this. Much appreciated. I’m a realist, not so much of a purist!

    Unfortunately, I am getting this error in the profile area of all topics and replies:

    Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'andrew55_insert_field ' not found or invalid function name in /home/mysite/wp-includes/plugin.php on line 496

    I tried function with both “bbp buddypress profile information” and “bbp profile information” installed.

    Another idea – instead of pestering for help with advanced php functions, what about just throwing the snippet I have in a template file in my child theme?

    I’ve been looking, but I can’t find the correct template file that controls the “user profile area” for the topics and replies when viewing a single topic. Any suggestions on where I might find this file so I can give it a try? It seems like it would be loop-single-topic.php, but that is for the view for all the topics together.

    I’m still new to bbPress and am finding it tricky to learn my way around the files – but I’m getting there!

    Thanks for any suggestions.

    #160516
    Robin W
    Moderator

    ok assuming it works it just needs wrapping into a function, and then adding to the action so :

    <?php
    Function andrew55_insert_field () {
    require_once '/home/site/public_html/amember/library/Am/Lite.php';
    if (Am_Lite::getInstance()->haveSubscriptions(2))
    {
    ?>
    <p>custom text 1</p>
    <?php
    }
    else {
    if (Am_Lite::getInstance()->isLoggedIn())
    {
    ?>
    <p>custom text 2</p>
    <?php
    }
    else {
    ?>
    <p>custom text 3</p>
    <?php
    }
    }
    }
    

    which could be shortened to

    Function andrew55_insert_field () {
    require_once '/home/site/public_html/amember/library/Am/Lite.php';
    if (Am_Lite::getInstance()->haveSubscriptions(2)) echo '<p>custom text 1</p>' ;
    elseif (Am_Lite::getInstance()->isLoggedIn() ) echo '<p>custom text 2</p>' ;
    else echo '<p>custom text 3</p>' ;
    }
    
    add_action (‘bbp_theme_after_reply_author_details’, ‘andrew55_insert_field ’) ;

    that might upset the purists who seem to love have php statements all over their code, but makes it more readable – apologies if you’re in the purist camp 🙂

    You need to put this code into your functions file, so that it is automatically called when the action is executed

    Functions files and child themes – explained !

Viewing 25 results - 9,051 through 9,075 (of 32,511 total)
Skip to toolbar