News:

Version 3.5 has been released. Visit https://custom.simplemachines.org/mods/index.php?mod=255 to get the most up to date version.

Main Menu
Coinbase

Have moved tower-tight ads - now footer dissapears

Started by g-c, July 14, 2007, 06:07:45 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

g-c

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:
<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?

<?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

g-c

As i writing here i checked a bit further.... its because of the function template_main_below()
{

and because normaly this fuction is closed after </body></html> with a }
in my version it uses the } just above the // 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 //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 //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
<?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:
Quotesyntax error, unexpected $end

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

Regards, Christian

g-c

unbeliveable, i figured it out.....
I had wrongly commented a "}" direct under <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

bigguy

Glad you got it. It could help alot of ppl, thanks for your contribution. :)