The Arcive of vBulletin Modifications Site. |
|
|
#1
|
|||
|
|||
|
Hello!
I've built this recursive function and put it in the hook showthread_start: PHP Code:
Can you please help? Thanks. |
|
#2
|
||||
|
||||
|
If you put a function in postbit_display_start, it gets called everytime the postbit is called on the showthread page - so 15, 20 times (whatever your default is) - which is why you get told the function already exists.
|
|
#3
|
|||
|
|||
|
You're right! Thanks!
So can you please tell me in which hook i should implement this function, in order to be able to use the variable "$show_ads_in_this_forum" in both SHOWTHREAD and in POSTBIT_LEGACY templates? |
|
#4
|
||||
|
||||
|
postbit_legacy (or postbit) is called in the showthread template. So, I would think you would be fine just calling this in the showthread hook. Is it not working in there? You may need to change it from $forum[forumid] and $forum[parentid] to $foruminfo[whatever]. Or, you may need to use $thread instead of $forum. Play around with it a bit. (Sorry, that's the way I code, I just play around with it until it works.)
|
|
#5
|
|||
|
|||
|
You could make use of vB's functions, let it do the hard work for you
![]() PHP Code:
|
|
#6
|
||||
|
||||
|
Why so complicated?
PHP Code:
|
|
#7
|
|||
|
|||
|
Andreas, wouldn't that fail if 341 was on the top or bottom of the list?
(ie. only a comma in the end or beginning) Never mind, i should learn to read things good.
|
|
#8
|
|||
|
|||
|
Thanks Andreas!
You helped me a lot
|
|
#9
|
||||
|
||||
|
Quote:
|
|
#10
|
|||
|
|||
|
Yes saw that after i posted, hence my last line (which you did not quote
)
|
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|