Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme »

Ad Rotator Code in Horbar1


  #1  
Old Mar 7, 2009, 03:45 AM
TikiBoy
 
2 posts · Mar 2009
I am trying to insert rotating ads into Horbar1 and I keep receiving "Parse Error Line 183" messages. I am using the Ad-minister plugin which works fine if I place the code on line 1 of bfa_header_config.php, but generates the parse errors if I insert it between <div class="horbar1"> and </div> as instructed.

The code I am trying to use is
Code:
<?php  do_action('ad-minister', array('position' => 'Top 
ad'));
?>
which is the minimum code suggested by the authors of the plugin.

Any suggestions are appreciated!
  #2  
Old Mar 7, 2009, 06:04 AM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
That's due to the single quotes before and after the code, they'd need to be closed. Additionaly you'd need to capture the output of that code first as it seems to print output right away, but bfa_header_config.php is collecting the different parts of the header first, so that you can arrange them on the theme options with the %bar1 etc. placeholders.

Change, i.e.
PHP Code:
 if (strpos($header_items,'%bar2')!==false) {
// Horizontal bar 2
$horizontal_bar2 '<div class="horbar2">&nbsp;</div>';
// END of Horizontal bar 2

to
PHP Code:
 if (strpos($header_items,'%bar2')!==false) {
// Horizontal bar 2
$horizontal_bar2 '<div class="horbar2">';
ob_start(); 
do_action('ad-minister', array('position' => 'Top ad')); 
$top_ad ob_get_contents(); ob_end_clean();
$horizontal_bar2 .= $top_ad '</div>';
// END of Horizontal bar 2

  #3  
Old Mar 7, 2009, 11:00 AM
TikiBoy
 
2 posts · Mar 2009
Thank you Flynn! Your solution did the trick.

Bookmarks



Similar Threads
Thread Thread Starter Forum Replies Last Post
Archive : code help BooNMiNG Atahualpa 3 Wordpress theme 4 May 31, 2009 11:49 AM
Help! Cannot remember where my Adbrite code goes Paleo Pat Atahualpa 3 Wordpress theme 7 Apr 5, 2009 06:45 PM
Easy way to test code? paulae Plugins & Atahualpa 0 Mar 26, 2009 08:43 AM
nextGen gallery with image rotator as header image shatchp Header configuration & styling 1 Feb 13, 2009 08:40 PM
Adding some code Steve_T Atahualpa 3 Wordpress theme 9 Feb 7, 2009 05:28 PM


All times are GMT -6. The time now is 04:54 PM.


Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.