The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Looking for a conditional
Hi I'm looking for a conditional like "if his is the last forum" to use in the "forumhome_forumbit_level2_post". For example (of corse not working)
PHP Code:
|
#2
|
|||
|
|||
I don't think there's any variable that you can check. But you could create a plugin using hook forumbit_display and set $forum['islastshown'] or something like that. The hook is in function construct_forum_bit() in includes/functions_forumlist.php, and I don't see an easy way to figure out if a forum is the last one, but maybe you will figure something out.
|
#3
|
||||
|
||||
Ok thanks for your reply kh99 I was looking at "functions_forumlist.php" for some ideas and that's a initial code let me know what do you think
PHP Code:
lol if i was looking for a condition for the first forum, was simple just PHP Code:
|
#4
|
|||
|
|||
Well, if you look at that function you'll see that it's bascailly a loop like:
Code:
foreach ($vbulletin->iforumcache["$parentid"] AS $forumid) { Also, since this function is called recursively, you are talking about the last one only at the current level, but I guess I was assuming that would work for you. |
#5
|
||||
|
||||
PHP Code:
|
#6
|
|||
|
|||
Well, sort of echoing the 'islastshown' for posts, you could do something like:
Code:
$forum['islastshown'] = ($forum['forumid'] == $lastforumid); and then in the template: Code:
<vb:if condition="$forum[islastshown]"> |
#7
|
||||
|
||||
Oh that was so simple! I'll try it thank you kh99
--------------- Added [DATE]1325981944[/DATE] at [TIME]1325981944[/TIME] --------------- Everything worked thanks kh99 helpful as always |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|