UBB.Dev
Posted By: oceanwest Turn off Footer for some pages... - 07/22/2004 9:01 PM
I would like to turn off the footer on the page that appears just
after you submit a post. I think it is addpost?

The thank you message about your message being posted is lost by the fact
it is dwarfed by the footers, plus this page only stays on the screen for only
a second or so. I think it would leave quicker if it didn't have to load my advertising
stuff. Plus I don't think this page generates much hits for ads anyway since
it is there and gone too quick.
Posted By: J.C. Re: Turn off Footer for some pages... - 07/22/2004 9:41 PM
CSS trick..

<style type="text/css">
.footer {
display: none;
}
</style>

Place the above in the template you do not want the footer to show. Then edit ubbt_footer.tmpl as follows

<span class="footer">
$tbopen
<tr>
<td class="darktable">
<table border="0" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td align="left">
$contactlink
{$template['privacy_statement']}
</td>
<td align="right">
<a href="{$config['homeurl']}">{$config['urltitle']}</a>
</td>
</tr>
</table>
</td>
</tr>
$tbclose
</span>

Viola, it's gonzo.. I remove the menubar on my site this way. Remember NOT to blank out the copyright, that is not permitted.
Posted By: oceanwest Re: Turn off Footer for some pages... - 07/22/2004 10:30 PM
That makes sense but....

This is the addpost.php sending the confirmation.

Code
<br /><br />// ------------------------------------<br />// Now we give them a confirmation page<br />if ($Approved == "no") {<br />	if (!$debug) {<br />		include ("$thispath/templates/$tempstyle/addpost_moderated.tmpl");<br />	}<br />}<br />else {<br /><br />	if (!$what) {<br />		$what = $user['U_Display'];<br />		if (!$what) { $what = $theme['postlist']; }<br />		$what = "show$what";<br />	}<br />	if (!$debug) {<br />		include ("$thispath/templates/$tempstyle/addpost_confirm.tmpl");<br />	}<br />}<br /><br />$html -> send_footer();<br /><br /><br /><br /><br />?><br /><br />


there is no addpost.tmpl just the confirmation.
and that doesn't have any "footer stuff.
Posted By: J.C. Re: Turn off Footer for some pages... - 07/22/2004 11:03 PM
Try adding it to either template mentioned in that code snipet.
Posted By: oceanwest Re: Turn off Footer for some pages... - 07/23/2004 8:30 AM
The code is in the script not the template. will it work in the script? Let me try it.
Posted By: oceanwest Re: Turn off Footer for some pages... - 07/23/2004 8:49 AM
nope it doesn't work in the script
Posted By: JoshPet Re: Turn off Footer for some pages... - 07/23/2004 8:57 AM
Are you wanting to kill the whole footer (will make HTML invalid) or just the footer insert you have (like your ads)?

If so - here's how.

In the ubbt_footer.tmpl file.

Find this:


include("{$config['path']}/includes/$file");


Change to this:

if (!$config['nofooter']) {
include("{$config['path']}/includes/$file");
}



Then on any page you don't want the footer file included - ABOVE the send_footer function - add this:

$config['nofooter'] = 1;


Basically the "if" statment we did says if there's no value for $config['nofooter'] then we print the footer. So by defining a value, only on pages we don't want the footer inserted, we can "switch" it off.
Posted By: oceanwest Re: Turn off Footer for some pages... - 07/23/2004 11:06 AM
Wow that worked. thanks for the explanation, that makes sense.
Posted By: JoshPet Re: Turn off Footer for some pages... - 07/23/2004 7:24 PM
Posted By: J.C. Re: Turn off Footer for some pages... - 07/23/2004 8:26 PM
For the record I meant...


// ------------------------------------
// Now we give them a confirmation page
if ($Approved == "no") {
if (!$debug) {
include ("$thispath/templates/$tempstyle/addpost_moderated.tmpl");
}
}
else {

if (!$what) {
$what = $user['U_Display'];
if (!$what) { $what = $theme['postlist']; }
$what = "show$what";
}
if (!$debug) {
include ("$thispath/templates/$tempstyle/addpost_confirm.tmpl");
}
}

$html -> send_footer();
Posted By: oceanwest Re: Turn off Footer for some pages... - 07/24/2004 2:22 AM
Oh I think i see, (Small flame begins to flicker above my head) thanks JC
© UBB.Developers