Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Not Solved Hide link?
#1
Not Solved
This user has been denied support. This user has been denied support.
Hey!

How do I hide links for guests and members with X posts? They will need to have 5 posts in order to see the link.
<snip - image too large>
#2
Not Solved
http://mods.mybb.com/view/hide-links-to-guests-for-14

For hiding to members with less than 5 posts, you'll need to set up group promotion. And modify the plugin file a bit.

First of all change the compatibility, change:
"compatibility" => "14*"
to
"compatibility" => "16*"

And then to add extra groups, search:
if($mybb->user['usergroup'] == "1")
to
if(in_array($mybb->user['usergroup'],array(1,5,7,X)))
This also includes: Awaiting activation and the Banned usergroup. You'll need to replace the X with the ID of the usergroup with -5 posts.
#3
Not Solved
This user has been denied support. This user has been denied support.
I didn't understand the part where I'm supposed to add: if(in_array($mybb->user['usergroup'],array(1,5,7,X)))
<snip - image too large>
#4
Not Solved
You need to search for this line:
if($mybb->user['usergroup'] == "1") 
and replace it with (if you also want to include registered users)
if(in_array($mybb->user['usergroup'],array(1,2,5,7)))
#5
Not Solved
This user has been denied support. This user has been denied support.
(06-15-2011, 07:10 PM)Aries-Belgium Wrote: You need to search for this line:
if($mybb->user['usergroup'] == "1") 
and replace it with (if you also want to include registered users)
if(in_array($mybb->user['usergroup'],array(1,2,5,7)))

Where do I search for that?
<snip - image too large>
#6
Not Solved
^ in the plugin's php file which you copy to your plugin's directory on the server
#7
Not Solved
(06-15-2011, 08:34 PM)mukilol Wrote:
(06-15-2011, 07:10 PM)Aries-Belgium Wrote: You need to search for this line:
if($mybb->user['usergroup'] == "1") 
and replace it with (if you also want to include registered users)
if(in_array($mybb->user['usergroup'],array(1,2,5,7)))

Where do I search for that?

In the same file you made the compatibility changes.
#8
Not Solved
This user has been denied support. This user has been denied support.
Small problem...

I replaced the code and the usergroups are getting the message but how do I place the 5 post requirement? The current usergroups can't see the link even if they have and don't have more thank 5 posts.

How do I place the requirement?
Found a plugin, everything is ok now.
<snip - image too large>
#9
Not Solved
You don't need a plugin for that. Just use Group Promotion. Look at the link I posted above.


Forum Jump:


Users browsing this thread: 1 Guest(s)