![]() |
Simplest banner/quotes/links rotator !! How to do it for vB4??
Hi,
I want to use this basic banner rotator on one of my test vB4 installations. http://www.vbulletin.com/forum/showt...-Random-Banner I had been using it with no problems in vB3 but now that vB4 syntax has changed, it doesn't work anymore. On vb3 I had used $random_banner[$random_number] as above and it worked great, but this variable doesn't get parsed through vb4 plugins anymore. I appreciate if you can help me what is the correct use of this example in vB4 environment. Thank you. |
All variables must now be preregistered for use in a template. Cellarius wrote a really good article that you may be interested in - [vB4] Rendering templates and registering variables - a short guide
|
Thank you very much Lynne,
I had to add a little bit more and actually change the plugin code to a simpler version. Inside the plugin I had to create a third variable $new_banners and only pre-registered that variable within template and ran it through parse_templates hook To make it work, I just dropped this code {vb:raw new_banners} on the template and now it works just as before under vB3.x. I appreciate your help and borbole for helping me through this. I hope other users find this little experience useful in their sites. |
its not working on vb4.2 version
|
All times are GMT. The time now is 09:39 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:
|