TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,966
  • Latest: safir45
Stats
  • Total Posts: 195,991
  • Total Topics: 21,323
  • Online today: 633
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 411
  • Total: 411

[Tip - Code] Adding a static footer block to Tiny Portal - SMF 1.1 RC1 + TP 0.7

Started by Rasyr, January 13, 2006, 11:00:03 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Rasyr

Are you wanting to make it a static footer at the bottom of each and every page?

If so, that is relatively simple.

Open index.template.php and find:


function template_main_below()
{
global $context, $settings, $options, $scripturl, $txt;

   echo '</td>';

         // TinyPortal integrated bars



Change it to something like the following:


function template_main_below()
{
global $context, $settings, $options, $scripturl, $txt;

   echo '<table width="100%"cellspacing="0" cellpadding="5" align="center" class="tborder"><tr><td class="windowbg">This is a static footer.</td></tr></table>';

   echo '</td>';

         // TinyPortal integrated bars



Where I have it saying "This is a static footer" is where you would place the banner code. Also, the table cell does not center the content at the moment, so you might want to change that.

If you were wanting something more dynamic, such as creating a block using Edit Blocks withing TPAdmin, then that would be more problematical as TP currently isn't set up to allow for that (Bottom Blocks), though it has been discussed...

The image below shows a screenshot of what the code I gave you looks like in use. Notice that it shows up below the links to additional pages on those pages which have such links (on those without such links, is shows up directly beneath the last element in the center).

[attachment deleted by admin]

JDMhustle

Thanks for the code and explaining, i wanted this for a while now ;)
I tried to get the banner aligned but without success, i put a align="center" wrapper in the code but i think it's not at it's right place.
<img border="0" align="center" src="http://members.home.nl/inekeleferink/banner1.jpg" width="640" height="85">

My test forum: http://rpm.teamvtec.nl/index.php?action=forum

Any ideas?

Rasyr

Quote from: JDMhustle on January 15, 2006, 06:10:34 PM
Any ideas?

Yup...

Change:


   echo '<table width="100%"cellspacing="0" cellpadding="5" align="center" class="tborder"><tr><td class="windowbg">This is a static footer.</td></tr></table>';


to


   echo '<table width="100%"cellspacing="0" cellpadding="5" align="center" class="tborder"><tr><td class="windowbg" align="center">This is a static footer.</td></tr></table>';


You will notice that I added align="center" to the TD tag...

JDMhustle

That did the trick..., thanks ;) what does that TD tag do anyway? everything that is being posted into the frame is centered?
Now for my next question, how do i get the catbg.jpg border on top of the static footer box? ???

Grtzz

Rasyr

TABLE is the tag that sets the following as part of the table. However, to better format the information in the table, it needs to be divided into rows and columns.

TR is the tag for a table row. Everything between the  TR tags are on a single row.

TD stands for TABLE DATA and it is what represents a specific column within the row. Each row of a table must have the same number of TD tags (unless you have table cells that span more than one cell, but that is more advanced than what we are doing here).

The most basic table must have at least one of each of the above tags, though it can and often does have multiple rows (TR tags) and cells (TD tags).

Each of the tags can also have what is known as "attributes". The align="center" is an attribute. Used in the TABLE tag, it centers the table on the page. Used in the TD tag, it centers the content of the cell within the cell.

Does that make sense?

Xarcell

Sweet...

I think Bloc is gonna add the feature of puuting blocks in the center below posts/articles in v8. Not sure though. Then you could just banners in there.

From that point, I don't think it'll be long until someone builds a banner module for TP.

This website is proudly hosted on Crocweb Cloud Website Hosting.