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
Comment #1
jeremy commentedIs 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.
Comment #2
nickn commentedIt'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..)
Comment #3
jeremy commentedWhat file/function are you modifying to try and get the banner displayed?
Comment #4
nickn commentedI was only modifying the actual call to the banner in the page.tpl.php, assuming that the rest should be pretty standard?
Comment #5
(not verified) commentedGlancing at that file, it looks like you'll want to use the following line:
-Jeremy
(Drupal.org won't let me login at the moment...)
Comment #6
nickn commentedUnfortunately 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.
Comment #7
jeremy commentedSorry, 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.
Comment #8
grohk commentednickn, 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.
Comment #9
kbahey commentedMy 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.
Comment #10
jeremy commentednickn, are you still having this problem?
Comment #11
jeremy commentedNo further feedback. I'm assuming the problem is fixed.
Comment #12
(not verified) commentedComment #13
drupal999 commentedusing 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); ?>