Knowledge Base Navigation
Articles: 51 Categories: 8
KB Article: Blocks in theme Footer
Article: | Blocks in theme Footer |
Submitted By: | Telli |
Date Added: | 10-23-2006 6:37:42 |
Hits: | 8,374 |
Add blocks in your theme footer.
Open the theme.php for the theme you wish to add the block into find the function themefooter after the global line you want to add the block or blocks in this example the global names may not be what you have in your theme now so just use this as referance if $db or $prefix isnt present in the global names then you will have to add it.. function themefooter() { global $index, $user, $banners, $cookie, $prefix, $db, $total_time, $start_time, $admin, $nukeurl, $foot1, $foot2, $foot3; <!--Start Block Addon By Telli--> $maxshow = 30; // Number of downloads to display in the block. $a = 1; $result = $db->sql_query("select lid, title, hits from ".$prefix."_downloads_downloads order by date DESC limit 0,$maxshow"); while(list($lid, $title, $hits) = $db->sql_fetchrow($result)) { $title2 = ereg_replace("_", " ", "<b>$title</b>"); $show .= "$a: <a href=\"modules.php?name=Downloads&d_op=viewdownloaddetails&lid=$lid&title=$title\"> $title2</a><br><b>$hits</b> times<br>"; $showdownloads = " <a name= \"scrollingCodedownloads\"></a><marquee behavior=\"scroll\" direction=\"up\" height=\"114\" scrollamount=\"2\" scrolldelay=\"90\" onmouseover='this.stop()' onmouseout='this.start()'><table width=\"100%\"><tr><td>$show</td></tr></table></marquee>"; $a++; } <!-- End Block Addon--> Then of course below is the rest of your function themefooter. Now to use them in your theme you will have to add a "Call" for them in the footer of the theme and also if the footer is solid meaning it doesnt contain any tables or td cells your going to have to do some editing your going to want to create a table with 3 cells left right and center. Center you can use for your footer message and gen time or whatever you choose. then in the other cells where you decide you will add this to "Call" the block function from your theme.php.. $showdownloads |
Current rating: 8.93 by 173 users
Please take one second and rate this article... |
Not a Chance | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Absolutely |
Please register or sign-in to post comments.