RolfP
Offline
Posts: 18
|
 |
« 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
Offline
Posts: 3579
|
 |
« 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: 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
Offline
Posts: 314
|
 |
« 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
Offline
Posts: 18
|
 |
« 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
Offline
Posts: 18
|
 |
« Reply #4 on: January 08, 2008, 10:08:34 AM » |
|
Hi, I simply forgot a "{" in line 22 so eather modify 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
Offline
Posts: 21
that's gonna leave a mark
|
 |
« 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: 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
Online
Posts: 491
|
 |
« 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: $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
Offline
Posts: 18
|
 |
« 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
|
|
|
|
Dreams
Offline
Posts: 16
|
 |
« Reply #8 on: September 03, 2008, 02:59:04 AM » |
|
Ok guys, I have tried this and been trying to get it to work, I am just not sure why its not showing.  I read how to make blocks and such.. if someone is available to help me, I would GREATLY appreciate it.. Thanks
|
|
|
|
|
Logged
|
|
|
|
marathoner
Online
Posts: 491
|
 |
« Reply #9 on: September 03, 2008, 04:14:01 AM » |
|
You didn't give us much info. Did you: - Enable section blocks in the admin settings? - Define the blocks in your template's info.php? - Modify your template's index.php to define where the blocks will be displayed?
|
|
|
|
|
Logged
|
|
|
|
Dreams
Offline
Posts: 16
|
 |
« Reply #10 on: September 03, 2008, 05:31:33 AM » |
|
yes, yes and yes..  nothing was showing.. Im about to try another template and see what I can do there tomorrow.. need to sleep and have fresh eyes as well. I read the directions for creating a block first then how to do this.. not sure if I am supposed to see the front end banners.zip in the drop down when creating a page or not, but that doesnt show. anyway, I will be back in the morning..  thanks Dreams
|
|
|
|
|
Logged
|
|
|
|
RolfP
Offline
Posts: 18
|
 |
« Reply #11 on: September 03, 2008, 06:33:12 PM » |
|
Hello,
I tried to add some documentation in README in the needed modul banneradm. Did you enable blocks and add a statement like $block[20] = Banner to info.php.
If the banners still do not show up, let me know.
RolfP
|
|
|
|
|
Logged
|
|
|
|
Dreams
Offline
Posts: 16
|
 |
« Reply #12 on: September 04, 2008, 08:25:45 PM » |
|
OK, I tried to do this today .. I read that page in the zip and seems confusing .. (very) to me..
I added $block =[20] to my info.php
now, when I try to go on, the instructions get a bit confusing. When I tried to follow what to put in my index.php it seems different then the instructions in the zip. I follow those (assuming "template" means index.php) and when I add what Im told, my site then loads to a white page. Nothing else.
As of right now, I have this:
$block =[20]; in my info.php ?php show_banner() ? in my index.php
now, my blocks are enabled. I made a hidden page called Banner with the WYSIWYG and set the block to Banner.. I added an image and it DOES show..
Now, every time I want to put a new banner in I have to make a new page? Is that right?
|
|
|
|
|
Logged
|
|
|
|
RolfP
Offline
Posts: 18
|
 |
« Reply #13 on: September 05, 2008, 09:13:01 AM » |
|
please try $block[20] = Banner not $block=[20] in the file info.php on your Websitebaker Home directory. This is the configuration file for Websitebaker.
RolfP
|
|
|
|
|
Logged
|
|
|
|
erpe
Offline
Posts: 1730
|
 |
« Reply #14 on: September 19, 2008, 10:29:14 AM » |
|
Hi @all
has anybody has got this modul working as it should with wb 2.7? Please post a link here so I can see how it works.
Thanks in advance.
erpe
|
|
|
|
|
Logged
|
|
|
|
|
|
erpe
Offline
Posts: 1730
|
 |
« Reply #16 on: September 19, 2008, 01:39:51 PM » |
|
Thanks for information
rgds
erpe
|
|
|
|
|
Logged
|
|
|
|
jj
Offline
Posts: 6
|
 |
« Reply #17 on: November 16, 2008, 06:04:54 AM » |
|
Dear All,
Correct me if I am wrong
1. I have install banner.zip and banneradm.zip from admin. 2. I define $block[20] = 'Banner'; in Language File. 3. In template i add show_banner(); in pages and in $block[1]='Main' , $block[20] = 'Banner' in info pages.
Problem is I do not banner in admin section Modify the banners also null. ( please check attach )
Please help me..
Changes in files.
1. banneradm and banner install from admin. 2. In language File ( EN.php ) I change as
$block[20] = 'Banner'; // for Banner
3. Changes in info.php of your currently used template ( Round ).
// Added for Ads $block[1] = 'Main'; $block[20] = 'Banner';
4. changes in index.php in currently used template folder. <?php ob_start(); show_banner(20); $foo=ob_get_contents(); ob_end_clean(); if ($foo <> "") { ?> <DIV ID="withBanner"><?php print $foo; ?></DIV> <?php } else { ?> <DIV ID="withoutBanner">What you like</DIV> <?php } ?> <?php show_banner(); ?>
Please review and help me to have proceed to do changes in files with example.
Thanks in Advance.
|
|
|
|
|
Logged
|
|
|
|
RolfP
Offline
Posts: 18
|
 |
« Reply #18 on: November 22, 2008, 12:21:51 PM » |
|
Sorry for the late answer.
The admin backend is found in Settings -> Show Advanced Options -> and on the very buttom of the page Banner Admin
Herre you have to deside which banner shall be shown on which page.
RolfP
|
|
|
|
|
Logged
|
|
|
|
Olli
Offline
Posts: 222
|
 |
« Reply #19 on: December 05, 2008, 11:40:05 AM » |
|
i just made a very small addition to the banner module... define your amout of banners as usual. if you want random random banner loading open the include.inc inside banner.zip and search for this $resultsSecBan = $database->query("SELECT content FROM ".TABLE_PREFIX."mod_wysiwyg WHERE page_id = '".$resultsBan_array['page_id']."' AND section_id ='".$resultsBan_array['section_id']."'");
and replace it with $resultsSecBan = $database->query("SELECT content FROM ".TABLE_PREFIX."mod_wysiwyg WHERE page_id = '".$resultsBan_array['page_id']."' ORDER BY rand() LIMIT 1"); this works for all banners that have been assigned to one certain page. maybe this would be a nice feature to have random banner load inside the admin area on default or selectable on/off?
|
|
|
|
|
Logged
|
|
|
|
jj
Offline
Posts: 6
|
 |
« Reply #20 on: January 28, 2009, 07:12:03 PM » |
|
Hello All,
Can you please give me latest link for Banner module and procedure to install from admin.
|
|
|
|
|
Logged
|
|
|
|
erpe
Offline
Posts: 1730
|
 |
« Reply #21 on: January 28, 2009, 07:15:22 PM » |
|
Hi have a look at the AMASP Project. rgds erpe
|
|
|
|
|
Logged
|
|
|
|
|
|
RolfP
Offline
Posts: 18
|
 |
« Reply #23 on: January 31, 2009, 04:29:20 PM » |
|
After installing both (banner and banneradm) there is a section "Banner Admin" under Advanced Options
If not, please tell me the Website Baker version you are using.
Thanks
|
|
|
|
|
Logged
|
|
|
|
mikew
Offline
Posts: 8
|
 |
« Reply #24 on: February 15, 2009, 06:30:39 PM » |
|
Hi RolfP, I have installed the Banner Modul with WB v2.7 and it works great ! If we could define a -start- and a -end- date for the Banner Block, then we where happy.
Mike
|
|
|
|
|
Logged
|
|
|
|
|