Posted on: 03/11/08 04:05pm
By: xucaen
Hi, I was hoping someone could help me. For some reason the footer is floating up to the top. I don't see how this could be happening since the formatting is defined using tables. Could some maybe take a look and see if they recognize the problem? I am using linux firefox 2.0.0.6
http://www.geekytechguy.net/geeklog/forum/index.php
Any help is appreciated.
Jim :banghead:
Re: footer floating to the top
Posted on: 03/11/08 06:03pm
By: xucaen
I found in footer.thtml, that if I remove the table which contains the footer, that at least does remove the footer from the top. I've decided to just build my own common footer to use on all pages of the web site. I want to put this line in footer.thtml:
Text Formatted Code
<?php include_once("/home/geekytec/lib/php/footer.inc"); ?>
but when I displaye the page, nothing shows up. And in the souece view, I see the text "<?php include_once("/home/geekytec/lib/php/footer.inc"
; ?>", so obviously my php is not getting interpreted as php. How do I insert my own footer? If not in footer.thtml, then where would it be?
Any help is appreciated. Thanks!
Jim
Re: footer floating to the top
Posted on: 03/11/08 07:28pm
By: xucaen
Ok, I found this thread:
http://www.geeklog.net/forum/viewtopic.php?forum=3&showtopic=65323&highlight=footer.thtml
where Dirk states that php is not allowed in footer.thtml. not sure if that has changed but my attempts toplace php into the footer.thtml resulted in none ofmy php code executing. It looks like I will have to re-write a bit of geeklog in order to get my custom footer to be displayed.
Jim
Re: footer floating to the top
Posted on: 03/11/08 10:48pm
By: jmucchiello
You don't have to rewrite anything. Just create a CUSTOM_siteFooter function in your lib-custom if you want to change how the footer executes.
However, if you don't need code for your footer, footer.thtml is common to all pages already. So just put everything in your "common footer" directly into layout/themename/footer.thtml
Re: footer floating to the top
Posted on: 03/12/08 03:16pm
By: xucaen
Hi, thanks for the information. But it looks like I will have to re-write the function COM_siteFooter in lib-common.php in order to insert the output to my custom function.
Thanks,
Jim
Re: footer floating to the top
Posted on: 03/12/08 03:32pm
By: jmucchiello
Did you read what I said? COM_siteFooter already calls a function called CUSTOM_siteFooter (if it exists). So you just make a function with that name in lib-custom.php. The whole idea behind lib-custom.php is that you don't modify any core Geeklog files putting all your custom code into lib-custom.php.
Re: footer floating to the top
Posted on: 03/12/08 05:16pm
By: xucaen
I created the function CUSTOM_siteFooter, and I expected it to be called. But it didn't get called. That was my fault - during my testing I commented out the section on footer.thtml that displays the footer. I put that back the way it was, and now the CUSTOM_siteFooter does indeed get called.
But there are still some problems with the way my pages are being loaded.
1) for some reason, the geeklog footer floats to the top of the page in linux firefox 2.0.0.6. I have not tested this with any other browser so I don't know if it is browser-specific. And because geekklog is being formatted with tables, I can't seem to understand how the footer table could be floating to the top.
2) my custom footer does not display at all on the forum and media gallery plugin pages
3) on the geeklog index page, the custom footer also floats to the top of the page.
Re: footer floating to the top
Posted on: 03/12/08 05:23pm
By: jmucchiello
Maybe you need to introduce your changes slowly, one at a time, so you can figure out what is causing the behavoir. Go back to the standard COM_siteFooter and footer.thtml and then introduce a minimal CUSTOM_siteFooter. Then add more parts to it until you find out which one is causing the footer to float.
Re: footer floating to the top
Posted on: 03/12/08 05:31pm
By: Anonymous (ironmax)
Quote by: xucaenI
1) for some reason, the geeklog footer floats to the top of the page in linux firefox 2.0.0.6. I have not tested this with any other browser so I don't know if it is browser-specific. And because geeklog is being formatted with tables, I can't seem to understand how the footer table could be floating to the top.
2) my custom footer does not display at all on the forum and media gallery plugin pages
3) on the geeklog index page, the custom footer also floats to the top of the page.
Just curious... Have you by any chance, tried to use an original copy of the professional/footer.thtml file from the archive? If that works as intended, then there is something else within your coding thats messing it up. I know I've run into that problem in converting some of the older themes over and have had to use the latest footer file to start with when making changes.
Michael
Re: footer floating to the top
Posted on: 03/12/08 06:27pm
By: xucaen
Believe it or not, the changes I had made to header.thtml was causing the footer to float to the top. When I compared mine with the original, one difference stood out:
my edited header.thtml
Text Formatted Code
<table width="100%" align="left">
<tr>
{left_blocks}
<td class="story-container" width="100%" style="vertical-align:top;">
Original header.thtml:
Text Formatted Code
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>
{left_blocks}
<td class="story-container" width="100%" style="vertical-align:top;">
It seems that for some reason, I changed the table surrounding the left-blocks to "align-left". I must have cut and pasted that from somewhere while I was editing.
Sure enough if I take the html that is working and add align="left" to the second table, the footer floats to the top.
I am still working on the other problem of getting a custom footer. using the CUSTOM_siteFooter function, I see both the geeklog footer and my footer from the geeklog index page. But when I go to the forum/index.php or mediagallery/index.php, only the geeklog footer is displayed.
Where does CUSTOM_siteFooter get called from? I searched in lib-common but didn't find any references to it.
Re: footer floating to the top
Posted on: 03/12/08 07:12pm
By: xucaen
Sorry, I made a mistake in myt last post. The only way I can get my CUSTOM_siteFooter function to get called was to edit the index.php file and add it to the end:
Text Formatted Code
$display .= COM_siteFooter (true); // The true value enables right hand blocks.
// Output page
$display .= CUSTOM_siteFooter();
echo $display;
It sounds likeI should not have to do this, so maybe I'm missing something else? How should CUSTOM_siteFooter() be called?
Jim
Re: footer floating to the top
Posted on: 03/12/08 08:23pm
By: jmucchiello
I'm sorry I must have dreamed these functions. I thought they were added along with the plugin library update. But I guess they weren't.
Re: footer floating to the top
Posted on: 03/13/08 02:58am
By: Dirk
In 1.4.1, there's only support for a <themename>_siteFooter function, e.g. professional_siteFooter.
bye, Dirk
Re: footer floating to the top
Posted on: 03/14/08 03:22pm
By: xucaen
I made two attempts to create a function called professional_siteFooter. Both "versions" are below.
The first one does not display a footer at all. The second one displays the footer above the header. Obviously something is wrong here. But what?
Text Formatted Code
/*
2008-03-12
method that displays a custom footer
*/
function professional_siteFooter()
{
$contents=file_get_contents("/home/geekytec/lib/php/footer.inc");
return $contents;
}
Text Formatted Code
/*
2008-03-12
method that displays a custom footer
*/
function professional_siteFooter()
{
$contents=file_get_contents("/home/geekytec/lib/php/footer.inc");
echo $contents;
}
Re: footer floating to the top
Posted on: 03/14/08 04:56pm
By: Dirk
Quote by: xucaenThe first one does not display a footer at all. The second one displays the footer above the header. Obviously something is wrong here. But what?
The first version is correct: Use return (not echo). Geeklog will buffer the result from that function and do the echo (together with the rest of the site) itself later.
Not sure why it's not working for you, though
bye, Dirk