Prevent all or certain members from starting topics or just replying in certain forums while allowing posting in others. Moderators and administrators can always post. Note that this does not hide forums, just prevents posting.
bbPress Plugin Browser »
Read-Only Forums (0.0.5)
Download
Version: 0.0.5
Last Updated: 2008-4-18
Requires bbPress Version: 0.9 or higher
Compatible up to: 0.9
Average Rating





Your Rating
Author: _ck_
-
I realize without an admin menu (for now) the configuration might be tricky for people with absolutely no plugin editing experience so just ask if you can't figure it out.
Posted: 3 years ago # -
where do i specify that i want forum id 5 to be read only?
Posted: 3 years ago # -
nevermind...got it working.
Posted: 3 years ago # -
while this definitely works a treat, one thing I will point out is the headings of "REply" and " New Topic" do still appear, with no text below to indicate to the user the reason they can't make a post is because of a lack of permissions.
what should be displayed here is some kind of an error message letting the user know why they aren't seeing a form for posting a topic or a reply.
Posted: 3 years ago # -
Yeah I saw those messages even when posting was shutoff and I didn't have time to investigate but I think they are one of those crazy things still hard coded into bbPress.
Update: there might be a way to work around this since the text displayed can be overridden in the
topic.phpandforum.phptemplates where<?php post_form(); ?>runs. I can probably put a custom replacement for post_form which will pass an empty title or the message that you want displayed that the forum is closed to posts. It will require a minor template edit but will be automated from there.Check back in 24 hours after I have some more time to develop it.
Posted: 3 years ago # -
Version 0.0.5 adds the ability to give a custom message when posting has been restricted in a topic or forum. This does require two template edits:
* in
topic.phptemplate replace the<?php post_form(); ?>with<?php if (function_exists('read_only_post_form')) {read_only_post_form();} else {post_form();} ?>* in
forum.phptemplate replace the<?php post_form(); ?>with<?php if (function_exists('read_only_post_form')) {read_only_post_form();} else {post_form();} ?>* if ALL your forums are going to be Read-Only, replace in
topic.phpforum.phpfront-page.phptag-single.php<?php post_form(); ?>with<?php if (function_exists('read_only_post_form')) {if (bb_current_user_can('moderate')) {read_only_post_form();}} else {post_form();} ?>Posted: 3 years ago # -
hey guys, if you need a control panel, i can do the design, its kinda hard to setup this thing without knowing php....
Posted: 3 years ago # -
$read_only_forums['deny_forums_start_topic']=array(9,15,22);
if my forum id is 5 i have to add it? like (5,9,15,22); ?
Posted: 3 years ago # -
yes if you want to deny people starting topics in forum #5
$read_only_forums['deny_forums_start_topic']=array(5);Admin menu is on my long list of things "to do"
Given how few donations there have been, I wouldn't hold your breath.Posted: 3 years ago # -
but if members cant post, what about keymasters? they can?
Posted: 3 years ago # -
if you have this line (it's the default) then yes
$read_only_forums['allow_roles_always']=array('moderator','administrator','keymaster'); // these types of users can always start/replyPosted: 3 years ago # -
_ck_ :
So I am having a little problem with the syntaxt of the plugin:
$read_only_forums['allow_members_start_topic']= array(1=>array(1,2,3,4,5,6,7), 2=>array(9,10,11)); // allow override for this member=>forumsSo specifically:
1=>array(1,2,3,4,5,6,7), 2=>array(9,10,11)If I were to have, for example 200 users, then I would have to number the 200 users?
1=>array(1,2,3,4,5,6,7, etc, etc)I am probably wrong, but I am no developer...
Posted: 3 years ago # -
You'd only need to list 200 users if all of them were allowed to start topics in a read-only forum. But that would be a crazy design.
What exactly are you trying to accomplish? Typically you'd only allow a handful of special members to post in a limited section.
You can also specify by role which might be easier.
Each group is first the member number, then second is the forum numbers
member id ->
1=>array(1,2,3,4,5,6,7)<- forum idsBut don't go making 200 of those until you explain to me further what you are trying to do, there is probably a much easier way.
Posted: 3 years ago # -
Man your on top of it _ck_!
I totally miss understood! I thought all the other ones that don't have a read-only had to be put up too... man am I absent minded.
Thank you for all your hard work _ck_
Posted: 3 years ago # -
This works great - except I have one question that perhaps was answered earlier although I'm still a little confused. I want to block members from starting topics (which works fine, except it still shows the Add New Topic link and Reply in the forum. If I make this change:
* in topic.php template replace the <?php post_form(); ?> with <?php if (function_exists('read_only_post_form')) {read_only_post_form();} else {post_form();} ?>
will that fix the problem? I still want members to be able to reply to topics. I didn't want to add both codes to remove that option from the forum.
Thanks!
Posted: 3 years ago # -
Just figured it out and now it works. I changed template-functions so now Add New Topic gives an error message - I wasn't sure how else to create a custom error message when users clicked on the Add New topic button. So, now when an admin posts a topic the error is at the top of the form, there are only 2 admins and they won't care...it was all I could figure out.
Posted: 3 years ago # -
i want to make a specific member role not to replay on a specific forum. How to handle it ?
Posted: 2 years ago # -
Posted: 2 years ago #
-
Where do I find the forum ID#? Is it the same as the position number? If so, it's not working and the syntax is:
$read_only_forums['deny_forums_start_topic']=array(2);
Please help. Thanks!
Posted: 2 years ago #
Add a Comment »
You must log in to post.