The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Limiting Maximum Friends
My vbulletin forum is going to be integrated along with a web game that has graphics intensive friends options. Because of this I need to be able to lower the maximum allowed friends a user can have. However, I can't seem to find any way to set this through the admin control panel, nor can I find any variables in the php code which control this.
I know in version 3.6.7 you could search for the "> 1000" bit of code and adjust the limit through that. However 3.7.1, what I'm working with now, doesn't seem to have that anymore. Does anyone know if there's even a limit on the number of friends a user can have in 3.7.1? And if there is, how would one go about adjusting it? |
#2
|
|||
|
|||
Well, seeing as no one's responded, I'm going to assume no one knew a quick way to go about creating a friends cap. I ended up creating one, though it's not pretty and requires editing the profile.php file.
To start with, anywhere at the top of profile.php where the global variables are being declared, add one of your own to use as your maximum cap. Obviously set it to whatever you want your cap to be. PHP Code:
$_REQUEST['do'] == 'addlist' Near the top, just before PHP Code:
PHP Code:
Then a little further down, just inside of this if statement PHP Code:
PHP Code:
$_POST['do'] == 'doaddlist' This code is almost identical to the previous section, and so are the pieces we're going to add. At the beginning, just after this referrer check PHP Code:
PHP Code:
Then inside the 'friend' part of the case statement PHP Code:
PHP Code:
$_POST['do'] == 'updatelist' This one is a bit different than the previous two and requires more edits. Pretty much right at the 'profile_updatelist_start' hook, add the query again: PHP Code:
Then, after the last AND of this if statement, but before the closing parenthesis PHP Code:
PHP Code:
Now, right before this if statement PHP Code:
PHP Code:
Lastly, find the line PHP Code:
PHP Code:
That seems to be catching all paths to friend adding and filtering it appropriately. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|