Author Topic: "new" module - Banner advertising  (Read 6805 times)

Offline Ruud

  • Posts: 3647
  • Gender: Male
  • Do not use PM for help! Please use the forum!
    • Dev4Me - Professional WebsiteBaker Development
"new" module - Banner advertising
« on: July 21, 2014, 02:20:07 PM »
This module was actually created about 5 years ago for a special project.
I offered the module as a commercial solution for some time, but now it is time to give it to the community.

* Admintool for management.
* A snippet to display one or more ads in your template
* Unlimited banners and banner groups
* Display counters and limits
* Click counters and limits
* Start and Ending dates
* Statistics etc..

Have a look and download the module at http://www.dev4me.nl/modules-snippets/opensource/wbanner/





instantflorian

  • Guest
Re: "new" module - Banner advertising
« Reply #1 on: August 19, 2014, 10:00:07 AM »
Hi Ruud,

thank you for this very useful module.
The mktime() command causes some warnings in PHP strict mode (I don't understand why). I put a @ in front of it where it is used (modfy_banner.php, add_banner.php, index.php). That solved the problem for me.

BTW, the module also works with WB 2.8.3 SP2.

BR
-f.

Offline Ruud

  • Posts: 3647
  • Gender: Male
  • Do not use PM for help! Please use the forum!
    • Dev4Me - Professional WebsiteBaker Development
Re: "new" module - Banner advertising
« Reply #2 on: August 19, 2014, 10:51:35 AM »
The mktime() command causes some warnings in PHP strict mode (I don't understand why).

The function used in these places should be time() instead of mktime().
Since PHP5.1 this will give a strict notice. I actually seldom enable strict warnings  :-(

I updated the fixed module to v0.1.9

instantflorian

  • Guest
Re: "new" module - Banner advertising
« Reply #3 on: August 19, 2014, 10:56:00 AM »
Great. Thank you for the quick update.
Why don't you add the module to the official WB addon repository too?

Offline N1kko

  • Posts: 137
  • Gender: Male
Re: "new" module - Banner advertising
« Reply #4 on: August 19, 2014, 11:09:26 AM »
A great module thanks for the share Ruud.
My Tools: MacBook Pro Retina, Coda2, Sketch 3... Couldn't live without them

Offline Graport

  • Posts: 33
  • Gender: Male
  • because IT happens
Re: "new" module - Banner advertising
« Reply #5 on: November 29, 2014, 04:26:49 PM »
Great module, it worked fine when I ad it to the template but it dosn´t when I try to use it with code2 as a new section. Is there a chance to create a droplet or a sample how can I use it in a standard page?

Thanks in adance - Andreas
Ich habe Dinge in meinem Leben getan, auf die ich nicht Stolz bin - auf manche schon!

Offline Ruud

  • Posts: 3647
  • Gender: Male
  • Do not use PM for help! Please use the forum!
    • Dev4Me - Professional WebsiteBaker Development
Re: "new" module - Banner advertising
« Reply #6 on: November 29, 2014, 11:21:51 PM »
You do not tell what does happen in a code2 section..

In a code (code2) section it should work fine with just
Code: (untested) [Select]
showbanner('group');
In a droplet you need to remember that droplets use the returned value instead of the direct output of the snippet.
You will need to capture the output in a variable using ob_ funtions.
Code: (untested dropletcode) [Select]
<?php // <?php only used for formatting in the forum
ob_start(); 
showbanner('group');
$data=ob_get_contents(); 
ob_end_clean();
return 
$data;

Offline Graport

  • Posts: 33
  • Gender: Male
  • because IT happens
Re: "new" module - Banner advertising
« Reply #7 on: November 30, 2014, 11:03:27 PM »
Thanks for your fast reply, the reason why it wasn´t showed is that the when i copied " <?php showbanner('group') ?>" from the description at he Admin Tool it was changed in code2 to showbanner('group') without ; at the end.  I dont know why.

Now i changed it with ; and it´s fine.

The droplet is also working.

many thanks again - Andreas



Ich habe Dinge in meinem Leben getan, auf die ich nicht Stolz bin - auf manche schon!

Offline Graport

  • Posts: 33
  • Gender: Male
  • because IT happens
Re: "new" module - Banner advertising
« Reply #8 on: November 30, 2014, 11:37:02 PM »
Last question about wBanner

I use section picker to ad wbanner at diferent pages but how can i format it in the code2 section to center the image?

the banner was showed left aligned in my template.

thanks - Andreas
Ich habe Dinge in meinem Leben getan, auf die ich nicht Stolz bin - auf manche schon!

Offline Ruud

  • Posts: 3647
  • Gender: Male
  • Do not use PM for help! Please use the forum!
    • Dev4Me - Professional WebsiteBaker Development
Re: "new" module - Banner advertising
« Reply #9 on: November 30, 2014, 11:46:43 PM »
Just put a div with a class around it?
Code: (untested) [Select]
<?php // <?php only used for formatting in the forum
echo '<div class="mycenterclass">';
showbanner('group');
echo 
'</div>';

After this, style .mycenterclass to format/center your banner.
Code: (untested) [Select]
.mycenterclass {
    text-align: center;
}

Offline Graport

  • Posts: 33
  • Gender: Male
  • because IT happens
Re: "new" module - Banner advertising
« Reply #10 on: December 02, 2014, 11:54:39 PM »
Hi Ruud, thanks for your fast reply, thats it, now it worked.

I send you a little donation via paypal   - Andreas

« Last Edit: December 03, 2014, 12:00:51 AM by Graport »
Ich habe Dinge in meinem Leben getan, auf die ich nicht Stolz bin - auf manche schon!

Offline Roych

  • Betatester
  • **
  • Posts: 573
  • Gender: Male
Re: "new" module - Banner advertising
« Reply #11 on: January 15, 2015, 01:44:28 PM »
Hello, great module ;)

Is there a way to show swf flash banners in this module? I added a swf file type under upload, so I can now upload swf files, but they don't show up. It only show icon of a missing image.

I modyfied this for uploading swf's.
Code: [Select]
// Make sure the image is a jpg or png file
if(!($fileext == "jpg" || $fileext == "jpeg" || $fileext == "png" || $fileext == "gif" || $fileext == "swf" )) {
$admin->print_error($MESSAGE['GENERIC']['FILE_TYPES'].' JPG / JPEG / PNG / SWF / GIF', ADMIN_URL .'/admintools/tool.php?tool=wbanner');
}

Is there a way to make it work?

Thank you very much.

R.

Offline Ruud

  • Posts: 3647
  • Gender: Male
  • Do not use PM for help! Please use the forum!
    • Dev4Me - Professional WebsiteBaker Development
Re: "new" module - Banner advertising
« Reply #12 on: January 15, 2015, 01:59:51 PM »
No, you cannot replace an image url with a fash url.

It will be inserted in a <img src="...." /> tag. That will not play flash movies.
Even when you would recode the snippet to understand about flash, clicking a flash movie will be handled by the flash movie itself, so the module will not be able to handle the clicks and would be useless anyway.

Offline Roych

  • Betatester
  • **
  • Posts: 573
  • Gender: Male
Re: "new" module - Banner advertising
« Reply #13 on: January 15, 2015, 02:13:35 PM »
Oh, ok then I'll leave it as it was.

Is there maybe any alternative for swf files for WB?


thank you very much.

R.

Offline Ruud

  • Posts: 3647
  • Gender: Male
  • Do not use PM for help! Please use the forum!
    • Dev4Me - Professional WebsiteBaker Development
Re: "new" module - Banner advertising
« Reply #14 on: January 15, 2015, 02:19:48 PM »
I think the latest ckeditor has a standard option to insert flash in a wysiwyg section.
http://addon.WebsiteBaker.org/pages/en/browse-add-ons.php?id=08A769F

Offline Roych

  • Betatester
  • **
  • Posts: 573
  • Gender: Male
Re: "new" module - Banner advertising
« Reply #15 on: January 15, 2015, 02:59:06 PM »
nice,

thank you,

helped me a lot ;)

R

Offline Roych

  • Betatester
  • **
  • Posts: 573
  • Gender: Male
Re: "new" module - Banner advertising
« Reply #16 on: May 15, 2015, 06:03:01 PM »
Hi, I need some help finding the right file to change..

I'd like to give title of the banner some class with tooltip when hover over them (class="tooltip-ontop") but cant find the right file where to do this. Help pls :P

Thank you

R.

Offline Ruud

  • Posts: 3647
  • Gender: Male
  • Do not use PM for help! Please use the forum!
    • Dev4Me - Professional WebsiteBaker Development
Re: "new" module - Banner advertising
« Reply #17 on: May 15, 2015, 10:30:53 PM »
The banner is created in the snippet (subdirectory snippet).
In the file inlude.php on line 53 the link/image is generated.

Offline Roych

  • Betatester
  • **
  • Posts: 573
  • Gender: Male
Re: "new" module - Banner advertising
« Reply #18 on: May 16, 2015, 11:22:40 AM »
The banner is created in the snippet (subdirectory snippet).
In the file inlude.php on line 53 the link/image is generated.

Thank you very much, was looking for this everywhere and couldn't find it. It works perfect ;)

Thank you

R.

Offline Ruud

  • Posts: 3647
  • Gender: Male
  • Do not use PM for help! Please use the forum!
    • Dev4Me - Professional WebsiteBaker Development
Re: "new" module - Banner advertising
« Reply #19 on: December 07, 2016, 01:50:59 PM »
The snippet part of this module must be installed seperate in WB283 SP7.

The snippet as it is included in the admintool installation will not install correctly so I made a installable version for it.
You can find it on https://dev4me.com/modules-snippets/opensource/wbanner/

Offline hillschmidt

  • Posts: 352
Re: "new" module - Banner advertising
« Reply #20 on: December 12, 2016, 11:05:56 AM »
Hi Ruud, it seems that the SSL certificat has a problem - FF and also IE do not open the site any longer but refuse (in German):
Quote
Fehler: Gesicherte Verbindung fehlgeschlagen

Die Verbindung zu dev4me.com wurde unterbrochen, während die Seite geladen wurde.

    Die Website kann nicht angezeigt werden, da die Authentizität der erhaltenen Daten nicht verifiziert werden konnte.
    Kontaktieren Sie bitte den Inhaber der Website, um ihn über dieses Problem zu informieren.

rsp.
Quote
This page can’t be displayed

Turn on TLS 1.0, TLS 1.1, and TLS 1.2 in Advanced settings and try connecting to https://dev4me.com  again. If this error persists, it is possible that this site uses an unsupported protocol or cipher suite such as RC4 (link for the details), which is not considered secure. Please contact your site administrator.

(and TLS etc. have been set as written in IE's message)

Offline dbs

  • Betatester
  • **
  • Posts: 7658
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Re: "new" module - Banner advertising
« Reply #21 on: December 12, 2016, 11:13:46 AM »
Hi, can't confirm. No problems with https://dev4me.com/ in IE, FF, Chrome.

 

postern-length