Mind blowing SEO improving and Google rank increasing Signature Rotator SEO Tool.

Thread: 

add some settings to a plugin

Ads
banner
banner
banner
lion Offline referral

Posts: 122
Joined: May 2014
Reputation: 0

#1
Member
Hello
long ago in this topic :
Show profile only for my buddy list members
Dear Marcus made me a plugin
now I want to add setting for it

Could you help me ?
marcus_avrelius Offline referral

Posts: 2,424
Joined: May 2013
Reputation: 102

#2
Support Team
What would you include in that plugin?

Please next time post in the same thread.
lion Offline referral

Posts: 122
Joined: May 2014
Reputation: 0

#3
Member
Sorry, I think it would be an Off-topic

I'd like to add these settings :
users can have options to choose profile be shown to their buddy list or be shown to anyone
and also moderators can view users profile in any way
marcus_avrelius Offline referral

Posts: 2,424
Joined: May 2013
Reputation: 102

#4
Support Team
These usergroups will have access to the user profile regarding whether they are in the buddy list or not.

Replace this:
PHP Code:
if(!in_array($mybb->user['uid'], $buddylist)) 

With:
PHP Code:
if(!in_array($mybb->user['uid'], $buddylist) || !in_array($mybb->user['usergroup'], array('3','4','6'))) 

Current mybb buddy system doesn't allow you to do it with a plugin. using core edit is just way to complicated. Mybb 2.0 seems to have the solution. Before becoming buddies user will get a notification and has to approve it only then its profile will show in their buddy list.
lion Offline referral

Posts: 122
Joined: May 2014
Reputation: 0

#5
Member
Thanks, but there isn't any solution that users can choose ?
or
specially for admin that its profile only be shown to its buddy list
?
marcus_avrelius Offline referral

Posts: 2,424
Joined: May 2013
Reputation: 102

#6
Support Team
Please elaborate I am heaving a hard time understanding what you mean?

Try these plugins:

https://github.com/euantorano/MyAlerts

add-on to the plugin above

http://mods.mybb.com/view/custom-alerts-for-myalerts
lion Offline referral

Posts: 122
Joined: May 2014
Reputation: 0

#7
Member
excuse me for my bad explanation

Is there anyway to add some settings that users could choose their profile be shown to there buddy list or not

OR

Is there anyway that administrator's profile be shown only to its buddy list ? (just for administrator)
marcus_avrelius Offline referral

Posts: 2,424
Joined: May 2013
Reputation: 102

#8
Support Team
Quote:Is there anyway to add some settings that users could choose their profile be shown to there buddy list or not
This is really hard as I mentioned above.

Quote:Is there anyway that administrator's profile be shown only to its buddy list ? (just for administrator)

This should work:
PHP Code:
if(!in_array($mybb->user['uid'], $buddylist) && !in_array($mybb->user['usergroup'], array('3','4','6'))) 
lion Offline referral

Posts: 122
Joined: May 2014
Reputation: 0

#9
Member
Quote:This should work:
PHP Code:
PHP Code:
if(!in_array($mybb->user['uid'], $buddylist) && !in_array($mybb->user['usergroup'], array('3','4','6'))) 

Thanks, but with this code usergroup :3,4,6 are allowed to visit the profile, yes ?
but if administrator has a friend of guest usergroup , what should I do ?
marcus_avrelius Offline referral

Posts: 2,424
Joined: May 2013
Reputation: 102

#10
Support Team
The code will check: If User id is the buddy list and if it belongs to one of those groups. In other words if user is in the buddy list but it's not admin, moderator or super-moderator error will show.





User(s) browsing this thread: 1 Guest(s)