The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Hide ads for specified some users
Hi, I've put the ads on my forum but it made the page loading is more slower for serveral users, I want to hide these ads code for that users. Can anyone help me find the PHP code to do it?
|
#2
|
|||
|
|||
That's pretty weird that the load slowly only for some users? What kind of ads?
You could wrap your ads call with a conditional, for example, Code:
<if condition="$bbuserinfo['userid'] != 667"> Your ads code </if> |
#3
|
|||
|
|||
Because my hosting located in Vietnam and that user is in USA.
Above code will only show the ads for userid=667 but everyone cant see the ads, is this true? |
#4
|
||||
|
||||
It will do the opposite. It will show ads to everyone except user ID 667.
|
#5
|
|||
|
|||
If I want to add more user to except, how can I do with this code?
|
#6
|
||||
|
||||
Code:
<if condition="!in_array($bbuserinfo['userid'], array(667, X, Y, Z, 1000))"> |
#7
|
|||
|
|||
Thanks Dismounted. Have a nice day
|
#8
|
|||
|
|||
Example:
PHP Code:
3 users between 1 and 5 (such as id=2, 3, 4) still see the ads? |
#9
|
|||
|
|||
That is correct,
You will have to put every userid number into the array for it to reflect the display properties. Another alteration for this is to have it go by usergroup instead of userid and simply add the usergroup to this instead of having to manually edit the code every time you want to add/remove someone from the option. |
#10
|
||||
|
||||
Quote:
Yes |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|