![]() |
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:
|
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.
|
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:
|
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. |
PHP Code:
|
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]"> |
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 |
All times are GMT. The time now is 03:41 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|