Hi, I'm using this plugin:
http://mods.mybb.com/view/max-post-views-guest
Guests can see maximum 3 posts in all my forum, after they have to login/register.
But I would like to know if I can exclude a forum from this plugin, where guests can see illlimitate posts, only in that forum (forum ID 146).
I think I have to add code in php file, but I don't know what, or add a code in <if> condition.
Thank you in advance
edit: mistake rectified
open the plugin file in a code editor (eg. notepad++) and find code like below (around line 78)
if($mybb->user['usergroup'] != "1" || !$mybb->settings['MaxPostViewsGuest'])
change it like below, save the file and use it
if($mybb->user['usergroup'] != "1" || !$mybb->settings['MaxPostViewsGuest'] || $fid == 146)
(2013-09-07, 12:27 PM).m. Wrote: [ -> ]open the plugin file in a code editor (eg. notepad++) and find code like below (around line 78)
if($mybb->user['usergroup'] != "1" || !$mybb->settings['MaxPostViewsGuest'])
change it like below, save the file and use it
if($mybb->user['usergroup'] != "1" || !$mybb->settings['MaxPostViewsGuest'] || $fid = 146)
Hi, thank you. I have tried this, but plugin doesn't work, if I'm a guest now I can see illimitate posts in all forum, not only in fid 146
^ oh, there is a
mistake. it should be like below code
if($mybb->user['usergroup'] != "1" || !$mybb->settings['MaxPostViewsGuest'] || $fid == 146)
Edit: also add
$fid to global variables
global $mybb , $fid;
if($mybb->user['usergroup'] != "1" || !$mybb->settings['MaxPostViewsGuest'] || $fid == 146)
return;
(2013-09-07, 01:11 PM).m. Wrote: [ -> ]^ oh, there is a mistake. it should be like below code
if($mybb->user['usergroup'] != "1" || !$mybb->settings['MaxPostViewsGuest'] || $fid == 146)
Edit: also add $fid to global variables
global $mybb , $fid;
if($mybb->user['usergroup'] != "1" || !$mybb->settings['MaxPostViewsGuest'] || $fid == 146)
return;
Thank you very much! This works perfectly
+1 rep, thank you