Welcome, Guest. Please Login or Register.
October 02, 2024, 02:39:24 AM
Home Help Search Log in Register
News: SMF is the next generation in forum software, almost completely re-written from the ground up, make sure you don't fall for cheap imitations that suffer from feature bloat!

YaBB SE Community  |  English User Help  |  English Help  |  Changing the alignment of the main template (template.php) « previous next »
Pages: [1] Reply Ignore Print
Author Topic: Changing the alignment of the main template (template.php)  (Read 748 times)
Thomas
Full Member
***
Posts: 203


WWW
Changing the alignment of the main template (template.php)
« on: February 03, 2004, 02:48:59 PM »
Reply with quote

YaBB SE Version: 1.5.5
Server Platform: Unix, Linux, or BSD
Link to Forum: Changing the alignment of the main template (template.php)

Problem Description:
Hi

I try to align the standard template.php to left and set with=768, but this only messes up the forum. I guess it has to do with css, but I'm not sure..

This is the default template.php. Can anyone help me to set it to align left and with=768:

Quote<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html><head>
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
 <meta content="<yabb title>" name="description" />
 <meta content="PHP, MySQL, bulletin, board, free, open, source, yabb, yet, another, SE" name="keywords" />
 <meta content="mshtml 6.00.2600.0" name="generator" />
 <title><yabb title></title>
 <style type="text/css">
 a:link
 {
   color: #005177;
   background-color: transparent;
   text-decoration: none;
 }
 a:visited
 {
   color: #005177;
   background-color: transparent;
   text-decoration: none;
 }
 a:hover
 {
   color: #cc3333;
   background-color: transparent;
   text-decoration: none;
 }
 .nav
 {
   color: #000000;
   background-color: transparent;
   text-decoration: none;
 }
 .nav:link
 {
   color: #000000;
   background-color: transparent;
   text-decoration: none;
 }
 .nav:visited
 {
   color: #000000;
   background-color: transparent;
   text-decoration: none;
 }
 .nav:hover
 {
   font-weight: bold;
   color: #cc3333;
   background-color: transparent;
   text-decoration: underline;
 }
 body
 {
   font-size: 12px;
   font-family: verdana, arial, helvetica, serif;
 }
 table
 {
   empty-cells: show;
 }
 td
 {
   font-size: 12px;
   color: #000000;
   font-family: verdana, arial, helvetica, serif;
 }
 input
 {
   font-size: 9pt;
   color: #000000;
   font-family: verdana,arial, helvetica, serif;
   background-color: #afc6db;
 }
 textarea
 {
   font-size: 9pt;
   color: #000000;
   font-family: verdana,arial, helvetica, serif;
   background-color: #afc6db;
 }
 select
 {
   font-size: 7pt;
   color: #000000;
   font-family: verdana,arial, helvetica, serif;
   background-color: #afc6db;
 }
 .windowbg
 {
   font-size: 12px;
   color: #000000;
   font-family: verdana, arial, helvetica, serif;
   background-color: #afc6db;
 }
 .windowbg2
 {
   font-size: 12px;
   color: #000000;
   font-family: verdana, arial, helvetica, serif;
   background-color: #f8f8f8;
 }
 .windowbg3
 {
   font-size: 12px;
   color: #000000;
   font-family: verdana, arial, helvetica, serif;
   background-color: #6394bd;
 }
 hr
 {
   color: #6394bd;
   background-color: transparent;
 }
 .titlebg
 {
   color: #ffffff;
   background-color: #6e94b7;
 }
 .text1
 {
   font-weight: bold;
   font-size: 12px;
   color: #ffffff;
   font-style: normal;
   background-color: transparent;
 }
 .catbg
 {
   font-weight: bold;
   font-size: 13px;
   background-image: url(YaBBImages/catbg.jpg);
   color: #000000;
 }
 .bordercolor
 {
   font-size: 12px;
   font-family: verdana, arial, helvetica, serif;
   background-color: #6394bd;
 }
 .quote
 {
   font-size: 10px;
   color: #000000;
   font-family: arial, verdana, helvetica, serif;
   background-color: #dee7ef;
 }
 .code
 {
   font-size: 10px;
   color: #000000;
   font-family: courier new, helvetica, times new roman, serif;
   background-color: #cccccc;
 }
 .help
 {
   cursor: help;
   background-color: transparent;
 }
 .meaction
 {
   color: red;
   background-color: transparent;
 }
 .editor
 {
   width : 100%;
 }
 </style>
</head><body text="#000000" link="#0033ff" bgcolor="#f5f5f5">
<table class="bordercolor" cellspacing="0" cellpadding="0" width="90%" align="center" bgcolor="#6394bd" border="0">
 <tr>
   <td>
     <table class="bordercolor" cellspacing="1" cellpadding="0" width="100%"  align="center" bgcolor="#6394bd" border="0">
       <tr>
         <td>
           <table cellspacing="0" cellpadding="0" width="100%" align="center" border="0" class="windowbg2">
             <tr>
               <td valign="middle" align="left" bgcolor="#ffffff"><img alt="logo" src="YaBBImages/selogo.gif" /></td>
               <td valign="middle" bgcolor="#ffffff"><font size="2"><yabb uname><yabb im><br /><yabb time></font></td>
             </tr>
           </table>
         </td>
       </tr><tr valign="middle" align="center" bgcolor="#b7bbda">
         <td bgcolor="#afc6db" class="windowbg2"><font size="1"><yabb menu></font></td>
       </tr>
       <tr>
         <td width="100%" bgcolor="#ffffff" height="24" class="windowbg2"> <yabb news></td>
       </tr>
     </table>
   </td>
 </tr>
</table>
<br />
<table class="bordercolor" cellspacing="0" cellpadding="0" width="90%" align="center" bgcolor="#6394bd" border="0">
 <tr>
   <td>
     <table class="bordercolor" cellspacing="1" cellpadding="0" width="100%" align="center" bgcolor="#6394bd" border="0">
       <tr>
         <td>
           <table cellspacing="0" cellpadding="10" width="100%" align="center" bgcolor="#ffffff" border="0">
             <tr>
               <td valign="top" width="100%">
                 <yabb main>
               </td>
             </tr>
           </table>
         </td>
       </tr>
     </table>
   </td>
 </tr>
</table>
<table cellspacing="0" cellpadding="0" width="90%" align="center" border="0">
 <tr>
   <td nowrap="nowrap" align="right"><yabb VBStyleLogin></td>
 </tr>
</table>
<br>

<table class="bordercolor" cellspacing="0" cellpadding="0" width="90%" align="center" bgcolor="#6394bd" border="0">
 <tr>
   <td>
     <table class="bordercolor" cellspacing="1" cellpadding="0" width="100%" align="center" bgcolor="#6394bd" border="0">
       <tr>
         <td>
           <table cellspacing="0" cellpadding="3" width="100%" bgcolor="#ffffff" border="0">
             <tr>
               <td valign="middle" align="right" width="25%" bgcolor="#ffffff">
                 <a href="http://www.mysql.com/"><img height="31" alt="Powered by MySQL" src="YaBBImages/mysql.gif" width="88" border="0" /></a>
                 <a href="http://www.php.net/"><img height="31" alt="Powered by PHP" src="YaBBImages/php.gif" width="88" border="0" /></a>
               </td>
               <td valign="middle" align="center" width="50%" bgcolor="#ffffff"><yabb copyright></td>
               <td valign="middle" align="left" width="25%" bgcolor="#ffffff">
                 <a href="http://validator.w3.org/check/referer"><img height="31" alt="Valid XHTML 1.0!" src="YaBBImages/valid-xhtml10.gif" width="88" border="0" /></a>
                 <a href="http://jigsaw.w3.org/css-validator/check/referer"><img height="31" alt="Valid CSS!" src="YaBBImages/vcss.gif" width="88" border="0" /></a>
               </td>
             </tr>
           </table>
         </td>
       </tr>
     </table>
   </td>
 </tr>
</table>
</body>
</html>
/Thomas

Logged
Peter Duggan
Llama Chameleon
Global Moderator
YaBB God
*****
Posts: 1793


You come and go...

WWW
Re:Changing the alignment of the main template (template.php)
« Reply #1 on: February 03, 2004, 05:14:51 PM »
Reply with quote

While there's more than one way to do this, I'd suggest adding <div class="page"> after <body text="#000000" link="#0033ff" bgcolor="#f5f5f5">, adding </div> before </body> and sticking this in your CSS:

.page
{
   position: absolute;
   width: 768px;
   left: 0;
}
« Last Edit: February 03, 2004, 05:17:29 PM by Peter Duggan » Logged

Thomas
Full Member
***
Posts: 203


WWW
Re:Changing the alignment of the main template (template.php)
« Reply #2 on: February 03, 2004, 07:16:49 PM »
Reply with quote

Thanks - that did the trick :)

/Thomas
Logged
Thomas
Full Member
***
Posts: 203


WWW
Re:Changing the alignment of the main template (template.php)
« Reply #3 on: February 05, 2004, 02:03:35 AM »
Reply with quote

Hi again

When doing this the page created in xx seconds disappeared.

How can I get it out again?

/Thomas
Logged
[Unknown]
Global Moderator
YaBB God
*****
Posts: 7830


ICQ - 179721867unknownbrackets@hotmail.com WWW
Re:Changing the alignment of the main template (template.php)
« Reply #4 on: February 05, 2004, 06:54:59 AM »
Reply with quote

Make sure the </body> tag is still in there.

-[Unknown]
Logged
Thomas
Full Member
***
Posts: 203


WWW
Re:Changing the alignment of the main template (template.php)
« Reply #5 on: February 05, 2004, 09:28:27 AM »
Reply with quote

Quote from: [Unknown] on February 05, 2004, 06:54:59 AM
Make sure the </body> tag is still in there.

-[Unknown]
Do you mean that the </div> should come after the </body>


/Thomas
Logged
[Unknown]
Global Moderator
YaBB God
*****
Posts: 7830


ICQ - 179721867unknownbrackets@hotmail.com WWW
Re:Changing the alignment of the main template (template.php)
« Reply #6 on: February 05, 2004, 09:31:55 AM »
Reply with quote

No... just that the </body> tag should still be in the template.php file somwhere.

-[Unknown]
Logged
Thomas
Full Member
***
Posts: 203


WWW
Re:Changing the alignment of the main template (template.php)
« Reply #7 on: February 05, 2004, 10:39:40 AM »
Reply with quote

I have done that, but then the bottomtext "the page created in xx seconds" disappeared

Why could this be?

/Thomas
Logged
Thomas
Full Member
***
Posts: 203


WWW
Re:Changing the alignment of the main template (template.php)
« Reply #8 on: February 07, 2004, 01:46:50 AM »
Reply with quote

I would really like to have "the page created in xx seconds" back again. Anyone who can help?

/Thomas
Logged
Shadow's Pawn
Support Team
YaBB God
*****
Posts: 597


ich soll nicht toten

ICQ - 8039201shadowpawn@hotmail.com WWW
Re:Changing the alignment of the main template (template.php)
« Reply #9 on: February 07, 2004, 02:16:50 AM »
Reply with quote

Make sure it is enabled in "Installed Mod's and Settings"
Logged

apologize \A*pol"o*gize\, v. i. - To lay the foundation for a future offense.
Peter Duggan
Llama Chameleon
Global Moderator
YaBB God
*****
Posts: 1793


You come and go...

WWW
Re:Changing the alignment of the main template (template.php)
« Reply #10 on: February 07, 2004, 02:29:23 AM »
Reply with quote

Having just replicated the problem, I can point you towards the function footer() from Subs.php:

      if ($modSettings['timeLoadPageEnable'] == 1 && stristr($curline, '</body>'))
      {
         $time_end = getmicrotime();
         $time = round($time_end - $time_start, 3);
         $curline = preg_replace('/<\/body>/i', '<div align="center"><font size="1">' . $txt['yse301'] . $time . $txt['yse302'] . '</font></div></body>', $curline);
      }


But I'm afraid I'm simply too tired to tell you what to do with it right now! :-\
« Last Edit: February 07, 2004, 02:30:52 AM by Peter Duggan » Logged

[Unknown]
Global Moderator
YaBB God
*****
Posts: 7830


ICQ - 179721867unknownbrackets@hotmail.com WWW
Re:Changing the alignment of the main template (template.php)
« Reply #11 on: February 07, 2004, 06:53:36 AM »
Reply with quote

Basically, this should only happen if you made a typo in the </body> thing.

-[Unknown]
Logged
Peter Duggan
Llama Chameleon
Global Moderator
YaBB God
*****
Posts: 1793


You come and go...

WWW
Re:Changing the alignment of the main template (template.php)
« Reply #12 on: February 07, 2004, 12:47:20 PM »
Reply with quote

Quote from: [Unknown] on February 07, 2004, 06:53:36 AM
Basically, this should only happen if you made a typo in the </body> thing.

But I haven't!

So here's the essential code from the otherwise default template I tested:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html><head>

Content removed for clarity.

</head><body text="#000000" link="#0033ff" bgcolor="#f5f5f5">
<div class="page">

Content removed for clarity.

</div>
</body>
</html>


To which I must add two further observations:

1. Containing the body content in the div is screwing up the bottom margin, whether or not 'Display time taken to create each page' is checked.
2. Something in that function footer() is transposing the positions of the </body> and </html> tags so the </body> tag comes last when the containing div is there.

So the YaBB SE template system has something to answer for here, because we're told to treat it as HTML with a few special <yabb> tags, but sometimes things just don't behave the way we expect them to! And, while the SMF template system should hopefully see these problems relegated to the past, it'd still be nice to get to the bottom (no pun intended) of this one...
Logged

Thomas
Full Member
***
Posts: 203


WWW
Re:Changing the alignment of the main template (template.php)
« Reply #13 on: February 17, 2004, 01:59:21 PM »
Reply with quote

Unknown: Do you have further comments to this?

/Thomas
Logged
Pages: [1] Reply Ignore Print 
YaBB SE Community  |  English User Help  |  English Help  |  Changing the alignment of the main template (template.php) « previous - next »
 


Powered by MySQL Powered by PHP YaBB SE Community | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
SMF 2.1.4 © 2023, Simple Machines
Valid XHTML 1.0! Valid CSS

Page created in 0.129 seconds with 21 queries.