Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'bbpress'

Viewing 25 results - 28,251 through 28,275 (of 64,535 total)
  • Author
    Search Results
  • #122664
    AllenPayne
    Participant

    @rsanchez1 Thanks a lot. Your post made me even more confused at first because i’m new to WordPress and PHP but after reading it a couple of more times and actually implementing what you said it made sense and i managed to get it to work.

    I used this code (please look at it and let me know if there are any errors):

    ————————————————————-

    function remove_bbpress_forum_freshness_date( $anchor, $forum_id) {

    $forum_id = bbp_get_forum_id( $forum_id );
    $active_id = bbp_get_forum_last_active_id( $forum_id );

    if ( empty( $active_id ) ) {
    $active_id = bbp_get_forum_last_reply_id( $forum_id );
    }
    if ( empty( $active_id ) ) {
    $active_id = bbp_get_forum_last_topic_id( $forum_id );
    }

    if (bbp_is_topic( $active_id ) ) {
    $link_url = bbp_get_forum_last_topic_permalink( $forum_id );
    } elseif ( bbp_is_reply( $active_id ) ) {
    $link_url = bbp_get_forum_last_reply_url( $forum_id );
    }

    return "View Post";

    }

    add_filter('bbp_get_forum_freshness_link', 'remove_bbpress_forum_freshness_date', 10, 2);

    ——————————————————–

    function remove_bbpress_topic_freshness_date( $anchor, $topic_id) {

    $link_url = bbp_get_topic_last_reply_url( $topic_id );

    $time_since = bbp_get_topic_last_active_time( $topic_id );
    if ( empty( $time_since ) ) {
    return 'No Replies';
    } else {
    return "View Post";
    }

    }

    add_filter('bbp_get_topic_freshness_link', 'remove_bbpress_topic_freshness_date', 10, 2);

    ———————————————————-

    I have one more question. I gave this more thought and i think it would be better if i replace “View Post” with the post’s title on the forums page(not topics).

    To do this is have to change the first function above.

    Any ideas how should i change the code to return the post’s title instead of View Post?

    Thank you for your help. It’s very much appreciated.

    #122663
    risen32
    Participant

    I setup bbpress with a shortcode to display the forums on a page, you can see it here: http://www.clonescriptnews.com/forums/

    When you are on that page everything seems to be fine, however if you click on this:

    http://www.clonescriptnews.com/forum/forums/general/introductions/

    and look at the breadcrumbs, when you try to go back to “forums” by clicking on the breadcrumb Forum link, it’s linked to just “forum” and then it tries to open the forum inside what looks to be a post.

    you can view that here (if you click on the breadcrumb forum link, you’ll see this) http://www.clonescriptnews.com/forum/

    It seems that no matter what I do in the forum settings area with the forums base and forum slug that keeps happening.

    #122651
    rsanchez1
    Participant

    The filter passes the anchor tag HTML and the forum_id to your callback. To do this, you’ll have to change your filter, like so:


    function remove_bbpress_forum_freshness_date( $anchor, $forum_id) {
    }

    add_filter('bbp_get_forum_freshness_link', 'remove_bbpress_forum_freshness_date', 10, 2);

    So you can see that your filter callback would be passed the anchor and the forum id.

    In the bbPress code, it basically just gets the link for the forum, gets the title for the forum, gets the last active time for the forum, and constructs an anchor tag from all this information.

    In your filter callback, you can do like is done in the bbPress code:


    $forum_id = bbp_get_forum_id( $forum_id );
    $active_id = bbp_get_forum_last_active_id( $forum_id );

    if ( empty( $active_id ) ) {
    $active_id = bbp_get_forum_last_reply_id( $forum_id );
    }
    if ( empty( $active_id ) ) {
    $active_id = bbp_get_forum_last_topic_id( $forum_id );
    }

    if (bbp_is_topic( $active_id ) ) {
    $link_url = bbp_get_forum_last_topic_permalink( $forum_id );
    } elseif ( bbp_is_reply( $active_id ) ) {
    $link_url = bbp_get_forum_last_reply_url( $forum_id );
    }

    As you can see, this code gets the ID of the last active item in the forum, be it topic or reply. It checks to see if the last active item was a topic or reply, and gets the appropriate url using the appropriate function.

    With the url, you can then construct an anchor tag, and the link would say “View Post” (or “View Topic” if you want to get specific). Then you would return that from the filter callback.

    For topics, it’s much easier since the last active will only be replies. The way you set up the filter and callback will be the same, just replacing forum with topic. To get the url, for View Post, do this:

    $link_url = bbp_get_topic_last_reply_url( $topic_id );

    In the code, it checks this to see if there have been any replies:

    $time_since = bbp_get_topic_last_active_time( $topic_id );
    if ( empty( $time_since ) ) {
    // there are no replies, you can return "No Replies"
    } else {
    // make anchor tag linking to "View Post"
    }

    I hope this clears things up a bit for you to try it yourself.

    #122645
    Lynq
    Participant

    Just joined, the community feature in G+ looks nice.

    #122643
    Dougal Campbell
    Participant

    I had an old stand-alone version of bbPress running at one time. I’d like to bring it back up, and obviously upgrade to the newest version. I do not want to have forum users added as users in my main blog. Is my only option to install a second copy of WordPress to power bbPress?

     

    #122642
    atburi
    Participant

    John, and people like Justin – thanks for all your hard work.

    #122641

    In reply to: Lightbox for bbPress?

    Lynq
    Participant

    You should be able to install a standard lightbox or thickbox and then look for images that reside inside the forum containers and then call the lightbox on them using jQuery. Shouldn’t be too difficult.

    Have you implemented a lightbox yourself before without a plugin?

    #122639
    on3advertising
    Participant

    I’m so close using Jeff’s solution!

    I added a checker to the customer ID in the initial if statement since it was passing through regardless of what I entered.
    && mysql_num_rows($result) == 1

    So the complete code ended up looking like this:
    function restrictForum(){
    $db_name = 'dbname';
    $con = mysql_connect("url","usr","password");
    mysql_select_db("$db_name")or die("cannot select DB");
    $cust_id = mysql_real_escape_string($_GET['cid']);
    $sql = "SELECT * FROM customer_data WHERE customer_number = $cust_id";
    $result= mysql_query($sql);
    if ( isset( $_GET['cid'] ) && !empty( $_GET['cid'] ) && mysql_num_rows($result) == 1) {
    // cid (customer ID) is present, show the bbPress login form
    echo 'Please enter your username and password to complete the login process ';
    echo do_shortcode('bbp-login');

    } elseif ( $_GET['error'] == true ) {

    // cid entered was not valid
    echo 'The customer ID you entered is not valid.';

    } else {
    echo ('
    Enter Your Customer #
    (form name="cust-form" id="cust-form" method="get")
    (input name="cid" id="cid" type="text" maxlength="6" /)
    (input type="submit" value="Validate"'/)
    (/form));
    // cid is absent so show the form to validate it
    // do your custom form here that asks for the customer ID. Then if the customer ID
    // is correct/valid reload this page like /login?cid=123456 which will show
    // the bbPress login form.
    }
    }
    add_shortcode('forum-login-restrict','restrictForum');

    It’s weird though, whenever I enter an invalid customer ID, I get the MySQL error saying “mysql_num_rows() expects parameter 1 to be resource, boolean”.

    It’s also annoying that the bbpress shortcode I’m embedding is now showing up as text, literally “bbp-login” rather than the actual form using:
    echo do_shortcode('bbp-login');

    #122634
    nickandrea19
    Participant

    Hi there,

    I will be redeveloping a site that was written in the Dinosaur age of web development. It is written in Perl, and my task is to port the existing forum into bbPress. I’m looking for thoughts on how to do this.

    Thank you!

    Andreas
    Participant

    To demonstrate the dilemma – groups are all here, including group forums:

    youthpolicy.org/community/forums/

    But then you go to any group and their forum, and it says ‘This group does not currently have any forums.’ We are on bbPress 2.2-bleeding, as suggested in the codex here.

    Weird.

    Bowe
    Participant

    Details

    Install: WP 3.5  (Multisite) + BBPress 2.2 Bleeding and BuddyPress 1.6.2
    Guide used: http://codex.buddypress.org/buddypress-site-administration/migrating-from-old-forums-to-bbpress-2/

    Procedure: We’ve ran the importer to import from BBPress 1 to BBPress 2. The migration wizard went fine and all the forums/topics and replies have been set. We’ve followed the guide and made sure BBPress 2 is set to be used as the BP Group Forums. For some reason this does not happen. We tried using the various Repair Forums tools, but they do not have effect.

    So right now we have working BBPress 2 Forums that do not integrate with the existing groups. Any suggestions on how to “remap” BBPress 2 forums to BP Groups?

    Thanks in advance!

    #122626

    In reply to: bbPress 2.2.3 Released

    0kee
    Participant

    Hi, since updating everything is working fine except the reply box for the forum isn’t re-sizing. I think it’s the wp-bbp_reply_content-editor-container. Sorry, new to this.
    I’m using wordpress 3.5 and bbpress 2.2.3 with the standard bbPress (twenty ten) theme. Anybody any ideas?
    http://userdrivendesign.org/?topic=music-assistive-technology

    Thanks
    Karl

    #122625
    anallabres
    Participant

    Sorry but I am completly lost with all it’s said.

    My question is: Is there any way to add new roles in bbpress?

    I want some of my users to be identified by their knowledge so the mebers know who is responding and the accuracy of the info provided (ie. Mentor, Advisor, …).

    From the first message in this post

    bbPress comes with filters to allow you to modify the roles, and it’s still possible to add or subtract specific forum capabilities to a user if you needed to, and without all the fuss and danger of bbPress interfering with existing user roles and capabilities.

    I understand it is possible to add new roles but can not find how to do it!

    I am using BBpress 2.2.2 and WordPress 3.4.2

    Thanks!!

    #122624
    McFly83
    Participant

    After upgrading to 2.2.x all users got access to private forums, even those without any assigned (forum) role. How can I fix that? I’m totaly stuck.

    See also here: https://bbpress.org/forums/topic/2-2-permissions-and-404-problems/#post-121248

    #122623
    Destillator
    Participant

    Ok, some more information: I’ve updated WP and BBpress. Reverting BBpress back to version 2.1.2 brings back the forums but removes the BBpress custom post types in the admin-menu.

    Removing the folder “bbp-theme-compat” from version 2.1.2 results in the same view as that of 2.2.3: the page shows but without the forum.

    The template used is a child-template of Twenty-Ten, so there’s nothing too exotic about that. Any suggestions? I’ve found https://bbpress.org/forums/topic/bbpress-2-0-theme-compatibility/ but the described folder-structure is not present in BBpress version 2.2.3.

    #122621
    Milan Petrovic
    Participant

    OK, thanks!

    #122620
    Destillator
    Participant

    Same here, nothing shows after an update to WP 3.5

    #122617
    dFactory
    Participant

    Hi,
    Is there a way to filter buttons in Fancy editr (for eg. full screen writing) used by bbPress on the frontend – in topics and replies?
    I was trying to filter it ‘bbp_get_the_content’ but I didn’t figure it out.

    Alexander
    Participant

    Here we go, works: http://pastebin.com/mVsftBrH (copied from default widget)

    Alexander
    Participant

    I guess it would be something like this (still not working though – incorrect loop?)

    Code example: http://pastebin.com/FnX6cfRK

    #122610
    Darren1981
    Participant

    Hey all,

    Since there is no support for “Categories” so to speak.. what i would like to do is create a custom main forum page and insert the forums manually… Now i know this can be done with shortcodes in posts and pages like as follows:

    [bbp-single-forum id=32]

    But what i am wondering is how would one go about inserting single forums into the BBpress .php template files.. for example the template content-archive-forum.php has the following php code which displays all forums:

    I would like to edit this file and insert forums manually.. is there a php version / code like the shortcodes to insert single forums ?

    Regards, Darren

    #122609
    Anonymous User
    Inactive

    Hi John,

    in my situation is the correct version not the problem.
    The original forum is on version 1.1 since months. And updated to 1.2 yesterday.
    It’s an old forum (since 2002) – migrated to bbPress 0.9 and then 1.0 -> 1.1.
    Since May 2011 the forum was deactivated – after some problems with an user. 🙁

    Hmmm… I think the problem may lie in the fact that the forum has a lot of anonymous posters. In 0.9 there was an plugin for anonymous posters with meta data. But in version >0.9 these posts were all anonoymous posts without an user.

    I’ll test the convertion on a blank installation of WordPress 3.5 today (without any other plugins). And the i’ll report again.

    By the way. JJJ – carry on with your great work on bbPress. 🙂

    #122608

    For those of you who are on Google+ and would like to keep up with the latest bbPress news and development, I’ve created a Google+ Community just for that 🙂

    https://plus.google.com/communities/103699169860561679711

    #122607

    In reply to: bbPress 2.2.3 Released

    kraigg
    Participant

    That’s so strange, but I think I found what the problem was.

    For some reason, after updating bbPress and BuddyPress, all groups had reverted back to having no forums. For this reason when I clicked into a group forum page, such as http://www.mywebsite.com/groups/my-group/forum, it returned a 404 error because there was no forum associated with that group.

    I went into PHPMyAdmin and opened up the “bp_groups” table, inside the “enable_forum” field I had to change them all from 0 to 1. I could’ve also gone to Groups > Admin > Enable Forum tick. I’m just not sure why the groups all reverted back to having no forums though. Luckily all the posts are still there and intact.

    #122604

    Topic: Lightbox for bbPress?

    in forum Plugins
    EJMorges
    Participant

    Hi,
    I would like to add a lightbox feature to the bbPress message board. Is there a pluggin that works with the current version 2.2.3.  or is there a way that I can make the lightbox pluggin that I have for WordPress work within bbPress somehow?

    GDtools is a great pluggin that has a built in lightbox feature but it ads the images separate from the actual post and this isn’t the best technique for creating articles within bbPress.

    Thanks,

    EJ

Viewing 25 results - 28,251 through 28,275 (of 64,535 total)
Skip to toolbar