Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'bbpress'

Viewing 25 results - 39,926 through 39,950 (of 64,515 total)
  • Author
    Search Results
  • #36897

    Topic: Thread Title

    in forum Troubleshooting
    hbalagh
    Member

    have the latest bbpress and wanted to know how to limit the display of the thread titles so it will be something like this

    this is a test of a thread title an…

    #94808
    Ryan Gannon
    Member
    #94807
    Gautam Gupta
    Participant

    Doesn’t bbp_get_user_topics_started( $bp->displayed_user->id ); work?

    #94806
    Ryan Gannon
    Member

    I have it working with bbp_has_topics(array(‘author’ => $bp->displayed_user->id)) that’s not the problem. The problem is I can’t get it to work with bbp_get_user_topics_started() because it doesn’t seem to return the query.

    #94805
    Gautam Gupta
    Participant

    Are you sure it’s id and not ID? (in BuddyPress, because I think it should be ID)

    #94804
    Ryan Gannon
    Member

    The BuddyPress profile, that’s why I’m using $bp->displayed_user->id not $bbp->displayed_user->ID

    #94803
    Gautam Gupta
    Participant

    bbp_get_displayed_user_id() echoes the value of $bbp->displayed_user->ID, so if you’re using the variable, you can use the function.

    Which page are you on then?

    #94802
    Ryan Gannon
    Member

    That would only work is I were on the BBPress profile for the user.

    #94801
    Gautam Gupta
    Participant

    You may want to use bbp_get_displayed_user_id() function.

    #94800
    Ryan Gannon
    Member

    Yes and yes.

    #94799
    Rich Pedley
    Member

    is that id correct, and has that id (/user) created any topics?

    #94798
    Ryan Gannon
    Member

    I passed it $bp->displayed_user->id

    #94797
    Rich Pedley
    Member

    depending on when that function is used you may need to pass it the $user_id

    #94796
    Ryan Gannon
    Member

    Oh, ok. I’ll give it a go.

    Update: My only problem now is that bbp_get_user_topics_started() doesn’t seem to return a query at all.

    #94795
    Gautam Gupta
    Participant

    @Ryan Gannon

    You *can* use bbp_has_topics(). Use the same args that you use in WP_Query->query().

    #94794
    Ryan Gannon
    Member

    I was hoping there’d be a way of using bbp_has_topics() like in loop-bbp_topics.php.

    #94793
    Willabee
    Member

    Use wordpress function query_posts().

    Then give it the parameters of author_name and post_type.

    @ Gautam/JJJ

    Any major updates planned soon? Want to launch a site with this plugin end of the month, so would like it if I can build in the latest and greatest. Keep it up. ^^

    #94792
    Ryan Gannon
    Member

    How can I generate a list of topics created by a given user?

    trof
    Member

    Hey guys,

    sorry is it is a stupid question, I’m new with bbPress…

    I was wondering, is it possible to create a bbPress plugin besed on Rich Object code constructor ( Demo: http://xbb2.com ) , and if “yes” – shall it be on HTML or BBCode generation ?

    Thanks

    AT

    #71446
    gonzp
    Member

    Hi Michael,

    Looking at your website http://scopedin.com/bbpress/ it seems you managed to resolve all the issues above.

    Can you post the codes you finally used?

    I am having exactly the same issue.

    Thanks

    #98659
    samcore
    Member

    Hey ,

    The plugin works as intended for topic views. However, I’ve got trouble with forum view counts.

    I’ve copied the ‘forums_views_append’ function to the php file (renamed to ‘forums_views_appendaa’ because of some name conflict) of the plugin, and I’ve added add_filter(‘get_forums’,’forums_views_appendaa’);

    I’ve called ‘var_dump(get_object_vars($forum));’ instead of ‘echo $forum->views’ inside the views cell in forum.php, giving me output

    array(9) {

    [“forum_id”]=> string(1) “2”

    [“forum_name”]=> string(6) “Ostalo”

    [“forum_slug”]=> string(6) “ostalo”

    [“forum_desc”]=> string(37) “Sve što ne spada u ostale kategorije”

    [“forum_parent”]=> string(1) “0”

    [“forum_order”]=> string(1) “8”

    [“topics”]=> string(1) “0”

    [“posts”]=> string(1) “0”

    [“forum_is_category”]=> string(1) “1”

    }

    Clearly no ‘views’ field has been defined in the filter function.

    That function is being called properly, as it echoes if I insert an echo command. I’ve found that the $forums_views variable is empty after the SQL call, which indeed creates no ‘views’ field in $forum. However, I’m lost on what to do next. Hopefully you can help me out.

    Here’s the filter function:

    function forums_views_appendaa($forums) {

    global $bbdb; $sum_meta_value=”SUM(meta_value)”;

    $forums_views = $bbdb->get_results(” SELECT $sum_meta_value,forum_id FROM $bbdb->topicmeta LEFT JOIN $bbdb->topics ON $bbdb->topicmeta.topic_id = $bbdb->topics.topic_id WHERE $bbdb->topicmeta.meta_key=’views’ GROUP BY $bbdb->topics.forum_id”);

    print_r ($forums_views);

    foreach ($forums_views as $forum_views) {

    $forums[$forum_views->forum_id]->views=$forum_views->$sum_meta_value;

    }

    echo ‘filter executed’;

    return $forums;

    }

    #103759
    samcore
    Member

    Hey ,

    The plugin works as intended for topic views. However, I’ve got trouble with forum view counts.

    I’ve copied the ‘forums_views_append’ function to the php file (renamed to ‘forums_views_appendaa’ because of some name conflict) of the plugin, and I’ve added add_filter(‘get_forums’,’forums_views_appendaa’);

    I’ve called ‘var_dump(get_object_vars($forum));’ instead of ‘echo $forum->views’ inside the views cell in forum.php, giving me output

    array(9) {

    [“forum_id”]=> string(1) “2”

    [“forum_name”]=> string(6) “Ostalo”

    [“forum_slug”]=> string(6) “ostalo”

    [“forum_desc”]=> string(37) “Sve što ne spada u ostale kategorije”

    [“forum_parent”]=> string(1) “0”

    [“forum_order”]=> string(1) “8”

    [“topics”]=> string(1) “0”

    [“posts”]=> string(1) “0”

    [“forum_is_category”]=> string(1) “1”

    }

    Clearly no ‘views’ field has been defined in the filter function.

    That function is being called properly, as it echoes if I insert an echo command. I’ve found that the $forums_views variable is empty after the SQL call, which indeed creates no ‘views’ field in $forum. However, I’m lost on what to do next. Hopefully you can help me out.

    Here’s the filter function:

    function forums_views_appendaa($forums) {

    global $bbdb; $sum_meta_value=”SUM(meta_value)”;

    $forums_views = $bbdb->get_results(” SELECT $sum_meta_value,forum_id FROM $bbdb->topicmeta LEFT JOIN $bbdb->topics ON $bbdb->topicmeta.topic_id = $bbdb->topics.topic_id WHERE $bbdb->topicmeta.meta_key=’views’ GROUP BY $bbdb->topics.forum_id”);

    print_r ($forums_views);

    foreach ($forums_views as $forum_views) {

    $forums[$forum_views->forum_id]->views=$forum_views->$sum_meta_value;

    }

    echo ‘filter executed’;

    return $forums;

    }

    #36777
    FrankR
    Member

    I have a big main section on my website and I would like for the entire bbPress program to reside there and look and act like it does as a freestanding, or as best it can.

    I can easily do this with WordPress but this is much different. For thing, it seems that there can only be one stylesheet, so I have to copy bbPress’s stylesheet and paste it into mine and name it style.css. then rename the divs with the same names.

    This is what I want it to be:

    <My website>

    <my header></close my header>

    <my navigation></close my navigation>

    <my mainsection or column is 900px wide>

    <<< Here will go the entire bbPress program >>>

    </close my mainsection or column>

    </close My website>

    Here’s how I have the header.php:

    <<<<—- Start of header.php —->>>>

    <?php

    $_head_profile_attr = ”;

    if ( bb_is_profile() ) {

    global $self;

    if ( !$self ) {

    $_head_profile_attr = ‘ profile=”http://www.w3.org/2006/03/hcard”&#8216;;

    }

    }

    ?>

    <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.1//EN” “http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd”&gt;

    <html xmlns=”http://www.w3.org/1999/xhtml”&lt;?php bb_language_attributes( ‘1.1’ ); ?>>

    <head<?php echo $_head_profile_attr; ?>>

    <meta http-equiv=”X-UA-Compatible” content=”IE=8″ />

    <meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />

    <title><?php bb_title() ?></title>

    <link rel=’stylesheet’ href=’style.css’ type=’text/css’ charset=’utf-8′ />

    <link rel=”stylesheet” href=”<?php bb_stylesheet_uri(); ?>” type=”text/css” />

    <?php if ( ‘rtl’ == bb_get_option( ‘text_direction’ ) ) : ?>

    <link rel=”stylesheet” href=”<?php bb_stylesheet_uri( ‘rtl’ ); ?>” type=”text/css” />

    <?php endif; ?>

    <?php bb_feed_head(); ?>

    <?php bb_head(); ?>

    </head>

    <body>

    <!–Begin top of My Website–>

    <div id=’al_wrapper’>

    <div id=’al_sub_wrapper’>

    <div id=’al_head’>

    <h1>Title</h1>

    <h4>Tag Line</h4>

    </div>

    <div id=’pagetitle’>

    <div id=’bread’>You are here: Home » This Page</div>

    </div>

    <div id=’al_both’>

    <div id=’my_right’>

    <div id=’inside_my_right’>

    <h2 class=’myright’>This Page</h2>

    <!–End top of My Website–>

    <body id=”<?php bb_location(); ?>”>

    <div id=”wrapper”>

    <div id=”header” role=”banner”>

    <h1>“><?php bb_option(‘name’); ?></h1>

    <?php if ( bb_get_option(‘description’) ) : ?><p class=”description”><?php bb_option(‘description’); ?></p><?php endif; ?>

    <?php if ( !in_array( bb_get_location(), array( ‘login-page’, ‘register-page’ ) ) ) login_form(); ?>

    <div class=”search”><?php search_form(); ?></div>

    </div>

    <div id=”main”>

    <?php if ( bb_is_profile() ) profile_menu(); ?>

    <<<<—- End of header.php —->>>>

    <<<<—- Start of footer.php —->>>>

    </div>

    </div>

    <div id=”footer” role=”contentinfo”>

    </body>

    </div>

    <?php do_action(‘bb_foot’); ?>

    <!–Beging of My Website footer–>

    </div>

    </div>

    </div><!–end both–>

    <div class=’spacer_20′></div>

    <div id=’al_footer’>

    Content copyright 2010. Mywebsite.com – All rights reserved.

    Home  · 

    Privacy Policy  · 

    Terms of Use  · 

    Contact Me

    </div>

    </div><!–end al_subwrapper–>

    </div><!–end al_wrapper–>

    <!–End My Website footer–>

    </body>

    </html>

    <<<<—- End of footer.php —->>>>

    Using this, the look of my website is OK but the bbPress is all jumbled up and not right. Any help would be appreciated.

    #98636

    Show us an example, may be they are not in the allowed tags list or something

    #103736

    Show us an example, may be they are not in the allowed tags list or something

Viewing 25 results - 39,926 through 39,950 (of 64,515 total)
Skip to toolbar