The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
Hi,
I have been playing around the following three files forumdisplay.php /includes/functions_forumlist.php forum.php I tried to find how many sections in each category I was able to find out how to display the overall numbers of sections in each category and the problem it that despite the permissions as it shows like there is 16 sections this forum yet it for that user it should be 4 sections as I have hidden all the rest What I have done is made a global variable at the top of forumdisplay.php file PHP Code:
PHP Code:
PHP Code:
yet I want to wrap the loop with if statements like following PHP Code:
PHP Code:
apart from the loop statement instead this PHP Code:
PHP Code:
to apply the each section permission on each counter Looking forward to the awsome helpers Many thanks in advance ![]() |
#2
|
|||
|
|||
![]()
any help?
waiting.... |
#3
|
|||
|
|||
![]()
Maybe something like:
Code:
foreach ($foruminfo['childlist'] AS $fid) { $forumperms = fetch_permissions($fid); if ($forumperms & $vbulletin->bf_ugp_forumpermissions['canview']) { $numberinforums++; } } |
#4
|
|||
|
|||
![]()
Hi,
I just found another way which don't know seems to me much easier but wondering if it makes load or its not proffissional than yours here is what I have found PHP Code:
as this sizeof($subforumsasda) will be more than enough to get the value the advantage of I thought that it does the permission calculation for you automatically Many thanks KH for your help I would appreciate your point of view and suggestion on which code I should use yours or mine? Thank you again --------------- Added [DATE]1365180367[/DATE] at [TIME]1365180367[/TIME] --------------- More simple code I have found just to help someone might need it just added this PHP Code:
--------------- Added [DATE]1365181457[/DATE] at [TIME]1365181457[/TIME] --------------- Here is another explaination as I designed a style changed the way to display the forums as boxes filled next each other once there is no space it does down using css inline box I had problem when there is for example 4 sub forums then 3 will fill up and then one will come down in this way the style will look no nice so I found that in each space I add adsense advert to make more money also make the style look fine I had a problem when there is 5 forums I need google adsense advert with small size when there is 4 forums I need with big size as two boxes will be empty in 4 3 boxes like following BOX BOX BOX AND ONE BOX THEN ADVERT NEXT TO IT WITH BIG SIZE BOX AD VE R T AND OTHER CASE BOX BOX BOX BOX BOX ADS SMALL ADVERT HERE TO SOLVE THIS PROBLEM I HAVE DONE THE FOLLOWING PHP Code:
if it false display big advert and so on I hope this could someone else looking for the solution remember the code should be added in includes/functions_forumlist.php where you can find the following PHP Code:
forumhome_forumbit_level1_nopost forumhome_forumbit_level2_nopost using the variable with this way <vb:if condition="{vb:raw nberoffosinside} == true"> big advert <vb:else /> small advert </vb:if> Good luck everyone thanks for your help --------------- Added [DATE]1365182584[/DATE] at [TIME]1365182584[/TIME] --------------- More concisely to do what I have done here is the instruction go to includes folder in your forum root then functions_forumlist.php search for PHP Code:
PHP Code:
search for following PHP Code:
PHP Code:
forumhome_forumbit_level1_nopost forumhome_forumbit_level2_nopost using this code you can display the big and small adverts accodingly PHP Code:
open forumdisplay.php file in your main forum root search for PHP Code:
PHP Code:
search for PHP Code:
PHP Code:
now go to forumdisplay template using this if statement PHP Code:
hope it got cleared now more Good luck everyone again please KH point if there is something I have done incorrectly Many thanks |
![]() |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|