Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 9,051 through 9,075 (of 32,505 total)
  • Author
    Search Results
  • #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 !

    #160512
    andrew55
    Participant

    Thanks – this is a great start. Although, my skill level just isn’t there yet with writing functions for WordPress. Here is the php snippet I have that will create the value I need to have displayed in profile area of topics and replies:

    <?php
    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
    }
    }
    ?>

    If anyone is willing to help, that would be great.

    #160494
    Jake Hall
    Participant

    Hi All,

    I am working on making bbPress work with my current theme, and, previously it was using page.php properties to draw the forum etc. I fixed that by adding a bbpress file to the theme root, however, I am not getting any posts whatsoever appear when looking in topics.

    Does bbPress use the normal the_content(); functions that wordpress use, or are their different functions I am simply missing here?

    The Codex is really bad and doesn’t seem to explain any of this, but I’d be super happy if someone could prove me wrong on that.

    Thanks,

    Jake

    Robkk
    Moderator

    you can tag anybody that is not in the topic manually.

    just type @username

    im talking about the little dropdown that suggests people to @mentino that is shown in this image that will show only people in the topic.

    here is the code any where i got it from

    Add the New BuddyPress Mentions Interface to bbPress Forum Replies

    BBC
    Participant

    Hi Rob

    I have an extra question
    If I read your post for the second time
    It looks if I can only tag people who are already in the threat
    Is that correct?
    Or can I (with your code) tag everyone who is one the forum?
    That is what I am looking for.

    Hope to hear from you.
    Thank Conrad

    #160483
    WutHirsch
    Participant

    Not completely.
    But the mythemeshop support helped me a lot.

    The correct code is:

    .bbpress .sidebar.c-4-12 {
      display: none;
    }
    .bbpress .article {
      width: 100%;
    }

    Also i was able to change the breadcrumb / the forum base title into another word.
    Simply add this code into: bbpress.php:

    
    // bbPress, change Forum title in bbpress 
     
    function isa_custom_forum_title() {
     
         return 'Enter your title';
    }
     
    add_filter('bbp_get_forum_archive_title', 'isa_custom_forum_title');
    #160482
    nirgalo
    Participant

    Hi, bbpress 2.5.6, when I use the [bbp-topic-tags] shortcode, it displays a certain number of tags, but not all the tags assigned to topics. Is this normal? Is the code limiting the output to some max count? Can this be changed? Thanks.

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