The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
I wanted to make it so members can create 1 Social Group only - not multiple..
I have found a way to set it up so only certain groups can create social groups...but found no way to limit the amount they can create... Is there a Mod for this? I didn't see one... |
#2
|
|||
|
|||
![]()
I tossed up a script for you, copy the source and paste in texteditor like notepad, and save it as something.xml. Upload it as a product.
How it works : When on the groups.php page, it does a check on the query string to see if it is do=create, if it is, it counts the amount of groups the user viewing the page has created. If the amount is greater than 0, it returns and error message, if not it permits a user to create a group. I tossed this up quickly, I believe it's bug free but let me know ![]() Do not reupload, repost or distribute without my permission, please. Code:
<?xml version="1.0" encoding="ISO-8859-1"?> <product productid="bellardialimsocgroups" active="1"> <title>LimitSocialGroups</title> <description>Limit the amount of social groups to 1</description> <version>0.1</version> <url /> <versioncheckurl /> <dependencies> </dependencies> <codes> </codes> <templates> </templates> <plugins> <plugin active="1" executionorder="5"> <title>Limit Social Groups</title> <hookname>group_complete</hookname> <phpcode><![CDATA[if ($_GET['do'] == 'create') { if($db->num_rows($db->query_read("select * from `".TABLE_PREFIX."socialgroup` where `creatoruserid` = ".$vbulletin->userinfo['userid'].";")) > 0) { eval(standard_error(fetch_error('toomany'))); } }]]></phpcode> </plugin> </plugins> <phrases> <phrasetype name="Error Messages" fieldname="error"> <phrase name="toomany" date="1231193285" username="elliian" version="0.1"><![CDATA[You are only permitted to create one social group. Please delete your old one before creating another.]]></phrase> </phrasetype> </phrases> <options> </options> <helptopics> </helptopics> <cronentries> </cronentries> <faqentries> </faqentries> </product> |
#3
|
|||
|
|||
![]()
Wow! You're a live saver!! Thank you!! (they need the thank you hack here IMO)
|
#4
|
|||
|
|||
![]()
Is it possible to do a similar thing where a user can only be a member of one social group at a time?
|
#5
|
|||
|
|||
![]() Quote:
Take note, it will not kick users from groups who are already in more than one, but it will prevent them from joining more. They will have to leave all groups before joining a new one. Copy code and include in xml file, upload as a product. As before Do not upload, post or distribute without my consent Code:
<?xml version="1.0" encoding="ISO-8859-1"?> <product productid="bellardialimgroups" active="1"> <title>Limit Members of Social Groups</title> <description>Limit each user to 1 social group</description> <version>0.1</version> <url /> <versioncheckurl /> <dependencies> </dependencies> <codes> </codes> <templates> </templates> <plugins> <plugin active="1" executionorder="5"> <title>LimitMembers</title> <hookname>group_complete</hookname> <phpcode><![CDATA[if ($_GET['do'] == 'join') { if($db->num_rows($db->query_read("select * from `".TABLE_PREFIX."socialgroupmember` where `userid` = ".$vbulletin->userinfo['userid'].";")) > 0) { eval(standard_error(fetch_error('join1'))); } }]]></phpcode> </plugin> </plugins> <phrases> <phrasetype name="Error Messages" fieldname="error"> <phrase name="join1" date="1231200636" username="elliian" version="0.1"><![CDATA[Oops! You may only be a member of one social group at a time. Please leave your current group before joining another!]]></phrase> </phrasetype> </phrases> <options> </options> <helptopics> </helptopics> <cronentries> </cronentries> <faqentries> </faqentries> </product> |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|