The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Change forum listing depth depending on the style
Anyone knows a simple (or not that simple) way to do this?
What I want to achieve is: Depending on the style reduce the depth in forum listing in order to improve the usability for the users using certain devices to access the forums. The solution might be as easy as find the hook and use something like the text below to set the var. If anyone have already done this any clue would be apreciated $counter_aux=preg_match ( '/devicename\.domainname\.com/' , $_SERVER['HTTP_HOST']); if($counter_aux<>0){ $nasty_var = 1; # Depth.... } Thx |
#2
|
||||
|
||||
PHP Code:
|
#3
|
|||
|
|||
Thanks for the info.
Finally I came up with a solution to the problem after lurking a little in the settings table of the database (easier than expected ^^ because it have a non caotic structure). Here i leave the code just in case anyone need it. Code:
$counter_aux=preg_match ( '/device\.domain\.com/' , $_SERVER['HTTP_HOST']); if($counter_aux<>0){ $vbulletin->options['forumhomedepth'] = 2; $vbulletin->options['forumdisplaydepth'] = 2; $vbulletin->options['subforumdepth'] = 0; } |
#4
|
||||
|
||||
Why don't you just use a compare, instead of a costly PCRE function?
PHP Code:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|