Welcome, Guest. Please login or register.
August 20, 2008, 05:16:12 PM

Login with username, password and session length
Search:     Advanced search
Website Baker 2.7.0 (stable) released!
For more information look here.
The announcement board can be found here.
60556 Posts in 9791 Topics by 5824 Members
Latest Member: blubb
* Home Help Search Login Register
+  Website Baker Community Forum
|-+  English
| |-+  Modules
| | |-+  Banner Modul
Pages: [1] Go Down Print
Author Topic: Banner Modul  (Read 2083 times)
RolfP
Pending Apprentice Baker
**
Offline Offline

Posts: 12


« on: January 07, 2008, 08:12:20 AM »

I tried to find a modul that displays some banners on some - not all - pages, and I was not able to find one.
So I created a frontend snippet (banner) and an admin tool (banneradm).
The modules are attached and could be installed and deleted using the backend.

The banners can be created using a block not shown in the frontend.
The relation between pages and banners is done in the backend.

There is a short documentation in banneradm.

Please provide any information, suggestions and feedback.
Logged
doc
Leaders Team
A Baker's Baker
*****
Offline Offline

Posts: 2277

Never mind!!!


« Reply #1 on: January 07, 2008, 08:38:18 AM »

Hello,

nice module thanks for your contribution. I get a lot of error messages and warnings on my test environment (undefined variables/constants and stuff like this). You should consider to enable all PHP error messages and notices during development by adding the following line to the php.ini:
Code:
error_reporting  =  E_ALL

Would be nice if the two module could be merged into one single module. Rest seems to be ok for me.

Regards Christian
« Last Edit: January 08, 2008, 10:14:00 AM by doc » Logged
Vincent
Semi-Master Baker
*****
Offline Offline

Posts: 202


« Reply #2 on: January 07, 2008, 08:39:44 AM »

Hi Rolf,

looks very good.
Istallation is flawless on my testing server, and although I didn't test it thouroughly, it looks like a modul/snippet that may prove handy. As far as I understand its main puropse is to administer banners easily, since all other things (like creating a block on each page) has to be done manually anyway (would there be a way of avoiding this?).
The only 'awkward' thing is that the administration of the banners is in the advanced settings, whereas sometimes you don't want to give all administrators these advanced  rights, but I guess you couldn't solve that any other way, could you?

Regards, and thanks for your contribution,

Vincent
Logged
RolfP
Pending Apprentice Baker
**
Offline Offline

Posts: 12


« Reply #3 on: January 07, 2008, 01:45:30 PM »

Hi Vincet,

that's true, I was able to change the admin behavior, but not without changing the framework code and that - of course - I wanted to avoid.

Hello Christian,

I will try to get rid of the variable errors.
Thanks for the hint - I had to turn that of and forgot about it .....

Rolf
Logged
RolfP
Pending Apprentice Baker
**
Offline Offline

Posts: 12


« Reply #4 on: January 08, 2008, 10:08:34 AM »

Hi,

I simply forgot a "{" in line 22 so eather modify
Code:
if (isset ($results_array['banner_id']))    {
and add an additional } at the end
or upload the attached banner.zip and replace the modul.

Regards Rolf
Logged
jollylama
Pending Apprentice Baker
**
Offline Offline

Posts: 15


that's gonna leave a mark


WWW Email
« Reply #5 on: June 29, 2008, 06:34:40 PM »

Hi, This mod is a great idea and I could really use it. However I can't seem to make it work and I can't seem to figure out how to implement it. (i'm a moron, please forgive me)

I've installed the banneradmn.zip and used the banner.zip as a snippet in my template..? can't figure out how to add a banner. I see the Banner Admin and when I select modify banner i get this message:

Quote
Please verify, that in info.php of the template a block with title "Banner" is defined.

I know i'm missing something.

What's the step by step way to use this.?

thanks again!
Logged
marathoner
Master Baker
*****
Offline Offline

Posts: 383


« Reply #6 on: June 29, 2008, 07:27:35 PM »

I've never used this Module, however, the error message is pretty clear...you need to define a content block in your template info.php called Banner. You'll probably also want to define another content block for everything else if you aren't currently using content blocks. The syntax would be something like:
Code:
$block[1]   = 'Main';
$block[2]   = 'Banner';

You'll also need to modify your template index.php to define where the Banner content block is to be displayed versus the Main content block.

Please read the WB documentation as it relates to content blocks.
Logged
RolfP
Pending Apprentice Baker
**
Offline Offline

Posts: 12


« Reply #7 on: July 25, 2008, 01:11:29 PM »

Due to the fact the location of the pages has changed in 2.7 I upgraded the page tool_mod_banner.php.

See attached file
Logged
Pages: [1] Go Up Print 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.5 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!