Firefox PHP

Module: Banner Manager

Posted by Maurice Makaay 
All files from this thread

File Name File Size   Posted by Date  
banner_manager-1.0.4.tar.gz 8.2 KB open | download Maurice Makaay 06/22/2009 Read message
banner_manager-1.0.4.zip 11.8 KB open | download Maurice Makaay 06/22/2009 Read message
Module: Banner Manager
August 20, 2007 09:27PM
This module makes it possible to display arbitrairy blocks of HTML/PHP code in Phorum pages. Multiple blocks can be defined and you can configure what block to show on what page. The system was designed for adding banners to Phorum, but with some fantasty other things are possible too (e.g. adding a customized page header per forum).

Changelog:
----------

2009-06-11 v1.0.4

    - Made the module compatible with the CSRF protection in Phorum 5.2.11.

2008-07-31 v1.0.3

    - Added date ranges for banners.
      Mod proposal provided by Phorum.org user: sheik

2008-01-13 v1.0.2

    - Fixed a problem with including the settings panels.

2006-03-29 v1.0.1

    - Restructured the settings panel code over multiple files for more
      code clarity and for fixing some strange problems with the program
      flow in the settings pages.

2006-03-28 v1.0.0

    - Initial revision


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce



Edited 3 time(s). Last edit at 06/11/2009 07:41PM by Maurice Makaay.
Attachments:
open | download - banner_manager-1.0.4.tar.gz (8.2 KB)
open | download - banner_manager-1.0.4.zip (11.8 KB)
FTW
Re: Module: Banner Manager
February 02, 2008 11:49PM
Hi Maurice,

I installed the mod, but when trying to manage settings the following errors occur:

Quote

Warning: include(./settings_banners.php) [function.include]: failed to open stream: No such file or directory in /var/www/web128/html/forum/mods/banner_manager/settings.php on line 74

Warning: include(./settings_banners.php) [function.include]: failed to open stream: No such file or directory in /var/www/web128/html/forum/mods/banner_manager/settings.php on line 74

Warning: include() [function.include]: Failed opening './settings_banners.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/web128/html/forum/mods/banner_manager/settings.php on line 74

Any suggestions?
Re: Module: Banner Manager
February 03, 2008 02:13AM
Yes, my suggestion is to try out version 1.0.2.
Apparently I forgot to upload that one *red face*.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Module: Banner Manager
April 30, 2008 08:16PM
Maurice,

This is a great little module.

Has anyone asked you yet about the ability to show multiple banners on a page, and have them be different?

We have a site where we'd like to show 2 banners in 2 places, but not have them be identical.

Currently, the MOD_BANNER_MANAGER is generated once and then shown, so 2 inclusions reference the same banner.

I tried a few things quickly:
- calling phorum_mod_banner_manager_common() explicitly from the template between inclusions
- trying to explicitly make a hook (ie, "reset_banner"), hook in the common function ,and trigger the hook between inclusions.

Neither of these got it done, and I'm not well-versed on the internals yet, so the question is ... if one wanted to do this, what's the smartest way to change the module?

I thought about maybe adding another setting with a banner count - then generate MOD_BANNER_MANAGER, MOD_BANNER_MANAGER2, etc.. If the banner count was empty, it would work as is.

How would _you_ go about this?

------------------------
Sean Phelan
Sites By Sequoia - Web Marketing ... The Experts at Building Your Success Online
Re: Module: Banner Manager
April 30, 2008 09:28PM
I came up with this, and it works:

<div class="banner right">{MOD_BANNER_MANAGER}</div>
<div class="banner left">
<?php
phorum_mod_banner_manager_common();
print $GLOBALS["PHORUM"]["DATA"]["MOD_BANNER_MANAGER"];
?>
</div>

The second banner will be picked again at random.

Now, the second banner could be the same as the first, since there's no memory from one display to the next.

To prevent repeats on the page, add this line to phorum_mod_banner_manager_common() as the very last line of code:

unset($GLOBALS["PHORUM"]["mod_banner_manager"]["banners"][$banner_id]); #sepfix

This removes the banner from the list after it has been pulled once.

------------------------
Sean Phelan
Sites By Sequoia - Web Marketing ... The Experts at Building Your Success Online



Edited 1 time(s). Last edit at 05/06/2008 01:44AM by sphelan.
Re: Module: Banner Manager
May 10, 2008 06:06PM
Love the module, one little typo though. In the settings page, in the help window for the "Do not display the banner code automatically" it correctly says to use {MOD_BANNER_MANAGER}. However, in the README it incorrectly says to use {BANNER_MANAGER}.

Thanks for the work on this module.


Joe Curia (aka Azumandias)
Modules: l0Admin Mass Email00000000l000000Automatic Time Zones000ll.l00000Enhanced Custom Profiles0.00Google Calendar0000l.l000000Post Previews
000000000Admin Security Suite000000000000Check Modules for Upgrades0000External Authentication000000Group Auto-Email00000.00000Private Message Alerts
000000000Attachment Download Counter0000Custom Attachment Icons000ll.ll00Favorite Forums000000.00000Highlighted Search Terms0000Self-Delete Posts Option
000000000Attachment Watermarks0l00000000Custom Language Database00l.l.0Forum Lockdown00000.00000Ignore Forums0000000000000Threaded Tree View
000000000Automatic Message Pruning00.llll.00Easy Color Scheme Manager0l.l00Forum Subscriptions0000lll000Moderated User Group
Templates:lGeneric Integration000000000 0000Simple Rounded000000 00000000Tabbed Emerald
Re: Module: Banner Manager
May 10, 2008 07:06PM
Thanks. I'll upload a new 1.0.2 with the fix right away.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Module: Banner Manager
May 11, 2008 02:29AM
Hi all,

I was wondering if I could see an example of this module in action, from a particular website?

rambro
Re: Module: Banner Manager
May 11, 2008 03:00AM
There's not much to see. It's basically a big chunk of code to put arbitrary chunks of HTML in the header or footer of the Phorum pages. What it looks like depends on the HTML that you add. Could be banners from some banner system, but any HTML code would work.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Module: Banner Manager
June 20, 2008 07:04PM
This rocks my world. Thank you so very much for this handy module!
Sorry, only registered users may post in this forum.

Click here to login