I'm not going to call this a bug report quite yet, as I believe it's probably something to do with me. Basically, if I put the code in for the banner, it causes the rest of the HTML (anything past the banner) not to load..

The code I'm using is : return banner_display(5);

Now if I remove the "return" it doesn't cut off the page, but it doesn't work at all.

I've tried uploading other images, I've read the readme over and over..I'm just not sure what i'm doing wrong.

I've had the banner working on another site without a prob, that's the weird thing.

The site is tweakgeek.com...you can see where the banner "should be" but right now it's not enabled.

Comments

jeremy’s picture

Is the banner area on your site a Drupal block? Or is it part of the theme? If it's a block, then the return is correct. But if instead it's part of the theme as it appears, then you need to include the banner within the rest of the output. How that is done depends on your theme. If using an xtemplate engine, look at the provided xtemplate.patch. On other themes it might be as simple as doing "$output .= banner_display(5);" in the correct place.

nickn’s picture

It's a modified version of box_gray using phptemplate. That output command didn't work (although it didn't cause the page to break either..)

jeremy’s picture

What file/function are you modifying to try and get the banner displayed?

nickn’s picture

I was only modifying the actual call to the banner in the page.tpl.php, assuming that the rest should be pretty standard?

Anonymous’s picture

Glancing at that file, it looks like you'll want to use the following line:

<?php print banner_display(5); ?>

-Jeremy
(Drupal.org won't let me login at the moment...)

nickn’s picture

Unfortunately I tried that and it was a nogo..I also posted in the forums, but nobody responded. Interestingly enough if I remove the (5) from the command above, it prints the actual statement (in text) but if I don't remove it, it doesn't do anything.

jeremy’s picture

Sorry, I was hoping to get you a sample patch this week, but didn't have time. I'm now off on vacation, not returning for nearly 3 weeks. All you need to do is to find the proper way to edit your theme, and it involves echoing the output of banner_display(). Perhaps you can ask for assistance on the support forums for the proper way to modify your theme. Good luck.

grohk’s picture

nickn, are you sure that <?php print banner_display(your banner number here); ?> does not work for you? I run phptemplate as well and was having a similar issue, but this has fixed it.

kbahey’s picture

My problem was that when using return banner_display(); in a node, anything after that call was truncated. When using print instead of return, everything works fine.

I did not try this with a numeric argument, just the banner_display() function call.

jeremy’s picture

nickn, are you still having this problem?

jeremy’s picture

No further feedback. I'm assuming the problem is fixed.

Anonymous’s picture

drupal999’s picture

Version: » 4.6.x-1.x-dev

using 4.6.2 with phptemplate and the box_grey theme. I had the same problem until I changed:

<?php return banner_display(5); ?> to <?php print banner_display(5); ?>