Welcome to Geeklog, Anonymous Thursday, March 28 2024 @ 05:32 pm EDT

Geeklog Forums

footer floating to the top


Status: offline

xucaen

Forum User
Junior
Registered: 01/08/06
Posts: 24
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:
 Quote

Status: offline

xucaen

Forum User
Junior
Registered: 01/08/06
Posts: 24
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"Wink; ?>", 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
 Quote

Status: offline

xucaen

Forum User
Junior
Registered: 01/08/06
Posts: 24
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
 Quote

Status: offline

jmucchiello

Forum User
Full Member
Registered: 08/29/05
Posts: 985
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
 Quote

Status: offline

xucaen

Forum User
Junior
Registered: 01/08/06
Posts: 24
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
 Quote

Status: offline

jmucchiello

Forum User
Full Member
Registered: 08/29/05
Posts: 985
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.
 Quote

Status: offline

xucaen

Forum User
Junior
Registered: 01/08/06
Posts: 24
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.

 Quote

Status: offline

jmucchiello

Forum User
Full Member
Registered: 08/29/05
Posts: 985
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.
 Quote

ironmax

Anonymous
Quote by: xucaen

I

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
 Quote

Status: offline

xucaen

Forum User
Junior
Registered: 01/08/06
Posts: 24
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.
 Quote

Status: offline

xucaen

Forum User
Junior
Registered: 01/08/06
Posts: 24
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
 Quote

Status: offline

jmucchiello

Forum User
Full Member
Registered: 08/29/05
Posts: 985
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.
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
In 1.4.1, there's only support for a <themename>_siteFooter function, e.g. professional_siteFooter.

bye, Dirk
 Quote

Status: offline

xucaen

Forum User
Junior
Registered: 01/08/06
Posts: 24
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;
}
 
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by: xucaen

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?


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 Confused

bye, Dirk
 Quote

All times are EDT. The time is now 05:32 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content