Hello,

I am looking for examples of Drupal4.7 sites with banner adverts
to understand how they are built in to the themes. Apparantly there
is a BANNER module for Drupal4.6 which doesn't work on 4.7

I have seen a couple of places where java scripts for external image links
have been placed in to blocks. But I am looking for placing plain image link
in a block or otherwise.

If anyone knows how to do it with 4.7 could you please comment.

Cheers
Shred

++++++++++++++++++++
A great deal for business
Http://affiliatesexcel.com

Comments

jameslittle’s picture

I've not used the easiest of ways, but it works for me.

I used phpadsnew as an open source ad server, then I put a bit of code into the template where I wanted the banner to go, and now I can rotate / change them quite easily using phpadsnew,

twohills’s picture

PHHPadsnew looks like one way to go!

On the other hand, wulff is still actively working on Banner (last activity was in April), so I'm hoping we'll see a 4.7 version soon????

wulff’s picture

Actually, the CVS version of banner.module works fine with 4.7.

At the moment I'm finsihing up a minor rewrite of the module, which implements banners as a new node type (which means it will be possible to have banner revisions, comments on banners, etc.).

I'm not sure whether the rewrite should be released for 4.7 or if I should wait for 4.8. Any opinions on this?

vigo-1’s picture

That sounds excellent, if you can get it out soon for 4.7 I'd very much appreciate it, I'd be happy to buy you a beer should we ever meet (my standard bribe these days it seems!). It would make Drupal a more rounded solution for community sites, which often depend on advertising revenues to survive or give banner ads as incentives to members.

valley-1’s picture

I have tried the CVS version and get the following error
on admin>>settings>>banner

PHP Fatal error: Call to undefined function: form_textfield() in /home/paratlan/paratlan-www/modules/banner.module on line 51

Could you please let me know what needs to be edited ?

Cheers
Shred
+++++++++++++++++++++++++++++++++++

A great deal for business.
http://affiliatesexcel.com

valley-1’s picture

Hello
I have installed the banner module CVS and managed to upload a banner
in the admin and set up a block with the php command line
return banner_display();

However I now get only return banner_display();
in the block instead of the image.
Please see http://paratlane.net Left menu top.

Ihave TinyMCE editor installed which also appear in the
Block configuration page (Don't know how to get rid of it)

I did enter the command through html popup of the
editor and chosen php for the input format.

As the commandline appear in the block allocated location, I guess the editor
is not an issue. Or is it ?

Any help to get this working will be appreciated much.

Cheers
Shred

A great deal for business.
http://affiliatesexcel.com

soupp’s picture

Sorry for a stupid (maybe) comment: but did you made a php block? and did you put banner slot # in the phpsnippet like this:

<?php
return banner_display(1); 
?>

Drupal Top Sites | Drupal Sites Directory

valley-1’s picture

Hello Soupp,

Nothing stupid about your comment. I keep asking stupid things myself.

In this my hunch was right, it was the TinyMCE editor which was
buffering the php code with html tags.

I eventually found the setting to toggle the rich text to disable the
editor and corrected the code to the php call.
return banner_display();

was just right as I had made only ONE group of Banners.

return banner_display(1); will actually show the
second grup of banners.
Everything is working now at http://paratlane.net except
I haven't found a way to position the banner in the centre.

Many thanks for the help.

Cheers
Shred
+++++++++++++++++
A great deal for business
http://affiliatesexcel.com

soupp’s picture

To allign banner you may use something like:

<div align="center">
<?php
return banner_display(1); 
?>
</div>

Drupal Top Sites | Drupal Sites Directory

valley-1’s picture

Hello Soupp

Adding html center tag before the php command doesn't work
as the banner doesn't show using this way. It looks the
php line has to be the first and only one in the block.

Positioning Left seems to be the default for all node entries
whether text or image .

Is there another way ?

Shred
+++++++++++++

A great deal for business.
http://affiliatesexcel.com

soupp’s picture

Hi. This is quite odd. This snippet (with divs around php) works fine for me on 4.6 and 4.7.

Other approach is tomake a cusom block style in (your theme's) style.css to align its content to th center.

Drupal Top Sites | Drupal Sites Directory