Module: Banner Manager
Posted by Maurice Makaay
|
Re: Module: Banner Manager August 09, 2009 01:52PM |
Registered: 17 years ago Posts: 754 |
|
Re: Module: Banner Manager January 26, 2010 12:15PM |
Registered: 20 years ago Posts: 27 |
|
Re: Module: Banner Manager March 17, 2010 08:05AM |
Registered: 20 years ago Posts: 216 |
|
Re: Module: Banner Manager March 17, 2010 05:33PM |
Admin Registered: 21 years ago Posts: 8,532 |
You can put HTML and PHP code in the banner code. If you want to dynamically link to different banner material, based on the active template, then you should format your URLs by including things like $PHORUM['http_path'] and $PHORUM['template'] in there. It should be doable that way.
If you want to simply store your files in a template dir, but without the need of dynamically using files from different templates, then you could of course opt for static URLs (either relative or absolute) in the banner HTML code.
If you want to make use of Phorum's template variables, then banner manager is not for you. You could then change your strategy and implement the banner code directly in the templates, where you can make of the available template variables for formatting URLs to your template dir.
Maurice Makaay
Phorum Development Team
my blog
linkedin profile
secret sauce
If you want to simply store your files in a template dir, but without the need of dynamically using files from different templates, then you could of course opt for static URLs (either relative or absolute) in the banner HTML code.
If you want to make use of Phorum's template variables, then banner manager is not for you. You could then change your strategy and implement the banner code directly in the templates, where you can make of the available template variables for formatting URLs to your template dir.
Maurice Makaay
Phorum Development Team
my blog
linkedin profile
secret sauce
|
Re: Module: Banner Manager March 20, 2010 03:58AM |
Registered: 20 years ago Posts: 216 |
|
Re: Module: Banner Manager March 20, 2010 04:30AM |
Admin Registered: 21 years ago Posts: 8,532 |
You might be able to use template variables (their PHP counterpart):
Maurice Makaay
Phorum Development Team
my blog
linkedin profile
secret sauce
<?php print $GLOBALS['PHORUM']['URL']['TEMPLATE'] ?>/banners/example.jpg
Maurice Makaay
Phorum Development Team
my blog
linkedin profile
secret sauce
|
Re: Module: Banner Manager March 20, 2010 05:22AM |
Registered: 20 years ago Posts: 216 |
Ok so on the banner editing my full sentence is:
<img src="<?php print $GLOBALS['PHORUM']['URL']['TEMPLATE'] ?>/banners/test.gif">
But it gives me the following url:
instead of:
I am surely doing something wrong somewhere... :-)
<img src="<?php print $GLOBALS['PHORUM']['URL']['TEMPLATE'] ?>/banners/test.gif">
But it gives me the following url:
[www.dubaimania.net]
instead of:
[www.dubaimania.net]
I am surely doing something wrong somewhere... :-)
|
Re: Module: Banner Manager March 20, 2010 05:35AM |
Admin Registered: 21 years ago Posts: 8,532 |
No, it must be me. I'm missing a member in there. That's what you get for not testing. Try this (also untested ;-)
Maurice Makaay
Phorum Development Team
my blog
linkedin profile
secret sauce
$GLOBALS['PHORUM']['DATA']['URL']['TEMPLATE']
Maurice Makaay
Phorum Development Team
my blog
linkedin profile
secret sauce
|
Re: Module: Banner Manager March 20, 2010 05:44AM |
Registered: 20 years ago Posts: 216 |
So if the following is the end code:
then it doesn't work.
Still releases the following URL: [www.dubaimania.net]
<img src="<?php print $GLOBALS['PHORUM']['DATA']['URL']['TEMPLATE'] ?>/banners/test.gif">
then it doesn't work.
Still releases the following URL: [www.dubaimania.net]
|
Re: Module: Banner Manager March 20, 2010 09:04AM |
Admin Registered: 21 years ago Posts: 8,532 |
It works for me. Beware that this won't work when doing previews within the banner manager, since at that point, no template data has been setup. The URL variable will be empty and the URL will be simply "/banners/test.gif".
Maurice Makaay
Phorum Development Team
my blog
linkedin profile
secret sauce
Maurice Makaay
Phorum Development Team
my blog
linkedin profile
secret sauce
Sorry, only registered users may post in this forum.

