Can someone help me get this coding right

Hello

This is the final thing I need to sort out so that I can launch my website.

In templates>base>scripts>BxBaseMenu.php I searched for the following

------------------------------------------------------------------
$this->sCode .= ($sSubItems=='') ? '<div class="subMenuContainerEmpty"></div>' : <<<EOF
<div class="subMenuContainer">
<table cellspacing="0" cellpadding="0"><tr>
{$sSubItems}
</tr></table>
</div>
EOF;
------------------------------------------------------------------

and edited it to this

------------------------------------------------------------------
$this->sCode .= ($sSubItems=='') ? '<div class="subMenuContainerEmpty"></div> <div id="leaderBoardnon"><img src="http://www.domainname.com/images/banner.jpg" width="728" height="90" /></div>' : <<<EOF
<div class="subMenuContainer">
<table cellspacing="0" cellpadding="0"><tr>
{$sSubItems}
</tr></table>
<div id="leaderBoard"><img src="http://www.domainname.com/images/banner.jpg" width="728" height="90" /></div>
</div>
EOF;
------------------------------------------------------------------

All I have done is added images (banners) and it works fine.

I then replaced the second image with a tag that calls a banner via googles DFP ad server, this worked fine. But when I replaced the first and second images with a tag Dolphin shows an error and does not work at all. The code is below.

------------------------------------------------------------------
$this->sCode .= ($sSubItems=='') ? '<div class="subMenuContainerEmpty"></div> <div id="leaderBoardnon"><!-- domainname.com_top_leaderboard_723x90 -->
<script type='text/javascript'>
GA_googleFillSlot("domainname.com_top_leaderboard_723x90");
</script></div></div>' : <<<EOF
<div class="subMenuContainer">
<table cellspacing="0" cellpadding="0"><tr>
{$sSubItems}
</tr></table>
<div id="leaderBoard"><!-- DomainName.com_top_leaderboard_723x90 -->
<script type='text/javascript'>
GA_googleFillSlot("domainname.com_top_leaderboard_723x90");
</script></div>
</div>
EOF;
------------------------------------------------------------------

Could someone please tell me how I can modify the above so that the tag will show a banner in both locations? It would be very much appreciated.

Regards

Stoosh

Quote · 19 Feb 2011

My guess is this line. Appears twice in your code.

<script type='text/javascript'>

The single quotes in that line are messing with it.

Change them to double quotes.

https://www.deanbassett.com
Quote · 19 Feb 2011

The error that I am getting is shown below

"Parse error: syntax error, unexpected T_STRING in /home/sitename/public_html/templates/base/scripts/BxBaseMenu.php on line 453"

 

The code that give that error is shown below

----------------------------------------------------------------------------------------------------------

$this->sCode .= ($sSubItems=='') ? '<div class="subMenuContainerEmpty"></div> <div id="leaderBoardnon"><!-- domainname.com_top_leaderboard_723x90_no_submenu -->
<script type='text/javascript'>
GA_googleFillSlot("domainname.com_top_leaderboard_723x90_no_submenu");
</script></div>' : <<<EOF
<div class="subMenuContainer">
<table cellspacing="0" cellpadding="0"><tr>
{$sSubItems}
</tr></table>
<div id="leaderBoard"><!-- domainname.com_top_leaderboard_723x90 -->
<script type='text/javascript'>
GA_googleFillSlot("domainname.com_top_leaderboard_723x90");
</script></div>
</div>
EOF;
}

----------------------------------------------------------------------------------------------------------

Line 453 is where it says <script type='text/javascript'>

 

I don't know what I am doing wrong?

How should I change the code in order to get it to work?

 

Thanks

Stoosh

Quote · 21 Feb 2011
Line 453 is where it says <script type='text/javascript'>

 

I don't know what I am doing wrong?

How should I change the code in order to get it to work?

 

Thanks

Stoosh

You've got to be kidding me.  See if you can figure out what's wrong, if all Deano did was tell you.

My opinions expressed on this site, in no way represent those of Boonex or Boonex employees.
Quote · 21 Feb 2011

Worked it out Smile... You guys are great Laughing, from the heart.

Quote · 21 Feb 2011
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.