Coinbase

Author Topic: Have moved tower-tight ads - now footer dissapears  (Read 2358 times)

0 Members and 1 Guest are viewing this topic.

Offline g-c

  • Jr. Member
  • **
  • Posts: 33
Have moved tower-tight ads - now footer dissapears
« on: July 14, 2007, 05:07:45 am »
Hi, i have moved(cut) the part with the tower-right ads to a custom position inside a div, but something i have done wrong...
Now the footer-area wont display anymore.... im using the default-theme in 1.1.3.

This is my new div, just for interesst:
Code: [Select]
<div id="sky_right" align="left" style="text-align:left;"><?php
   
//Tower Right Ads by SMFads 2.3. cut from original position and pasted modified here... undo when uninstalling SMFads2.3
$ads show_towerrightAds();
if(!empty($ads))
echo $ads['type']==$ads['content'] : eval($ads['content']) ; 
        unset(
$ads);
?>

   </div>

and this is the part just above the footer, were all original ad-code was... im not a php-pro so i think maybe i cut a "{" or a "," too much?

Code: [Select]
<?php // Show the menu here, according to the menu sub template.
template_menu();
//Below the menu ads
if (function_exists("show_indexAds") && function_exists("show_towerleftAds") && function_exists("show_towerrightAds"))
{
$ads show_indexAds();
if(!empty($ads))
if($ads['type']==0)
echo $ads['content'];
else
eval($ads['content']);
unset($ads);

//Tower left Ads
$ads show_towerleftAds();
if(!empty($ads))
echo '<table><tr><td valign="top">'$ads['type']==$ads['content'] : eval($ads['content']) ,'</td><td width="100%" valign="top">';

unset($ads);

}

  
// The main content should go here.
echo '
<div id="bodyarea" style="padding: 1ex 0px 2ex 0px;">'
;
//}

function template_main_below()
{
global $context$settings$options$scripturl$txt;

echo '
</div>'
;


//Close table for towerright ads

//Close table for towerleft ads
$ads show_towerleftAds();
if(!empty($ads))
echo '</td></tr></table>';
unset($ads);

//Show ads on the bottom of the page
$ads show_bottomAds();
if(!empty($ads))
if($ads['type']==0)
echo $ads['content'];
else
eval($ads['content']);
unset($ads);
}

// Show the "Powered by" and "Valid" logos, as well as the copyright. Remember, the copyright must be somewhere!
echo '

<div id="footerarea" style="text-align: center; padding-bottom: 1ex;'
$context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' width: 100%;' '''">
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
function smfFooterHighlight(element, value)
{
element.src = smf_images_url + "/" + (value ? "h_" : "") + element.id + ".gif";?>

I hope you can help me, im trying it since hours...

Regards, Christian

Offline g-c

  • Jr. Member
  • **
  • Posts: 33
Re: Have moved tower-tight ads - now footer dissapears
« Reply #1 on: July 14, 2007, 05:35:07 am »
As i writing here i checked a bit further.... its because of the
Code: [Select]
function template_main_below()
{
and because normaly this fuction is closed after
Code: [Select]
</body></html> with a
Code: [Select]
}in my version it uses the
Code: [Select]
} just above the
Code: [Select]
// Show the "Powered by" and "Valid" logos, as well as the copyright. Remember, the copyright must be somewhere!
echo '
which is coming from the end of
Code: [Select]
//Show ads on the bottom of the page
$ads = show_bottomAds();
if(!empty($ads))
if($ads['type']==0)
echo $ads['content'];
else
eval($ads['content']);
unset($ads);
}

So i had wrongly removed the part with
Code: [Select]
//Close table for towerright ads
if (function_exists("show_towerrightAds") && function_exists("show_towerleftAds") && function_exists("show_bottomAds"))
{
but if i re-ad it to its original position and the function is closed properly, so the whole part looks like this
Code: [Select]
<?php  // Show the menu here, according to the menu sub template.
template_menu();
//Below the menu ads
if (function_exists("show_indexAds") && function_exists("show_towerleftAds") && function_exists("show_towerrightAds"))
{
$ads show_indexAds();
if(!empty($ads))
if($ads['type']==0)
echo $ads['content'];
else
eval($ads['content']);
unset($ads);

//Tower left Ads
$ads show_towerleftAds();
if(!empty($ads))
echo '<table><tr><td valign="top">'$ads['type']==$ads['content'] : eval($ads['content']) ,'</td><td width="100%" valign="top">';

unset($ads);

}

  
// The main content should go here.
echo '
<div id="bodyarea" style="padding: 1ex 0px 2ex 0px;">'
;
//}

function template_main_below()
{
global $context$settings$options$scripturl$txt;

echo '
</div>'
;


//Close table for towerright ads
 
if (function_exists("show_towerrightAds") && function_exists("show_towerleftAds") && function_exists("show_bottomAds"))
{
//Close table for towerleft ads
$ads show_towerleftAds();
if(!empty($ads))
echo '</td></tr></table>';
unset($ads);

//Show ads on the bottom of the page
$ads show_bottomAds();
if(!empty($ads))
if($ads['type']==0)
echo $ads['content'];
else
eval($ads['content']);
unset($ads);
}

// Show the "Powered by" and "Valid" logos, as well as the copyright. Remember, the copyright must be somewhere!
echo ' ?>



I get a Template Parse Error! with the message:
Quote
syntax error, unexpected $end

hmmm.... i hope bigguy or someone else can help me?

Regards, Christian
« Last Edit: July 14, 2007, 05:42:01 am by g-c »

Offline g-c

  • Jr. Member
  • **
  • Posts: 33
Re: Have moved tower-tight ads - now footer dissapears
« Reply #2 on: July 14, 2007, 05:54:00 am »
unbeliveable, i figured it out.....
I had wrongly commented a "}" direct under
Code: [Select]
<div id="bodyarea" style="padding: 1ex 0px 2ex 0px;">';because i thought it was a part of the cut ad-part....

Now it works...
Maybe this could help someone...

Regards, Christian

Offline bigguy

  • Support
  • Elite Member
  • *
  • Posts: 1518
    • SMF Helper
Re: Have moved tower-tight ads - now footer dissapears
« Reply #3 on: July 18, 2007, 07:12:17 pm »
Glad you got it. It could help alot of ppl, thanks for your contribution. :)

SMF Ads Support Forum

Re: Have moved tower-tight ads - now footer dissapears
« Reply #3 on: July 18, 2007, 07:12:17 pm »
.

 

.