Search

bbPress Showcase » bbPress Chat

Member Access To Topics

RSS

  1. alberto
    User has not uploaded an avatar

    junior member
    Joined: Jan '11
    Posts: 7

    offline

    Hello everyone! I'm just starting out with bbpress.

    I want to build a forum that will only show the topics to guest and then if they are a member, they can click on each one to read more.

    Is there a plugin that will do this?

    If not, is there a file that need to be changed?

    Thanks!

    Posted 1 year ago #
  2. _ck_
    _ck_

    senior admin
    Joined: Jul '06
    Posts: 908

    offline

    This question is probably best for bbpress.org
    - I am pretty sure it's been asked and answered before.

    This is a demo of the bbPress Signatures plugin!
    If you use my plugins, please considering donating to help continue their development.
    Posted 1 year ago #
  3. alberto
    User has not uploaded an avatar

    junior member
    Joined: Jan '11
    Posts: 7

    offline

    I did a search before posting and it mostly involves making it private, visibility or restrictions. Maybe I'm searching using the wrong words. Is there a term for what I'm looking for? Thanks.

    Posted 1 year ago #
  4. _ck_
    _ck_

    senior admin
    Joined: Jul '06
    Posts: 908

    offline

    Basically the easiest way to do this is to edit the the topic.php template and check to see if the user is logged in before the loop that shows all the posts.

    if they are not logged in, hop over the loop and output a message they must log in.

    This could also be done somewhat by a plugin.
    This is just a quick and dirty example that might not work as is:

    <?php
    /*
    Plugin Name: Only logged in can read topics
    */
    
    add_action('bb_head','logged_in_topics');
    function logged_in_topics() {
    if (!is_topic()) {return;}
    if (!bb_is_user_logged_in()) {
     echo "Sorry, you must register or login to read topics.";
     exit;
    }
    }
    Posted 1 year ago #
  5. alberto
    User has not uploaded an avatar

    junior member
    Joined: Jan '11
    Posts: 7

    offline

    I removed the extra g as it looked odd and it works!!!

    Thank you for your help.

    Posted 1 year ago #

RSS feed for this topic

Post a reply to “Member Access To Topics”

You must log in to post.

keep _ck_ coding >> donate $5 <<     Theme Switcher:
38 users online from in the past 30 minutes. 16 bots 22 guests
3,735 views today 8,638 yesterday 16,043 peak. Most at once 47 today 60 yesterday 131 peak. Visited today: qamilon, pandoracam, lvgalliera
2,288 posts in 394 topics over 66 months by 430 of 2,165 members. Latest: qwe12345100, Janvelden, watchessaleus