Uutiset:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu
Advertisement:

Template parse error (resolved)

Aloittaja Doug, maaliskuu 08, 2005, 03:46:06 IP

« edellinen - seuraava »

Doug

Can someone tell me why this isn't working?

Its on the simplicity template by bloc:

</head>
<body>';
// simple theme

   echo '

<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse"

bordercolor="#111111" width="100%">
 <tr>
   <td width="100" colspan="2"

background="http://ashlynmotorsonline.com/picts/background-menu.gif">&nbsp;</td>
 </tr>
 <tr>
   <td width="100" colspan="2" background="http://ashlynmotorsonline.com/picts/indexcars3.jpg"

height="80">&nbsp;</td>
 </tr>
 <tr>
   <td width="100%" colspan="2"

background="http://ashlynmotorsonline.com/picts/background-menu.gif"></td>
 </tr>
 <tr>
   <td width="15%" valign="top"

background="http://ashlynmotorsonline.com/picts/background-main.gif">
   <img border="0" src="http://ashlynmotorsonline.com/picts/corner.gif" width="227"

height="40"></td>
   <td width="85%" background="http://ashlynmotorsonline.com/picts/shadow1.gif"></td>
 </tr>
 <tr>
   <td width="15%"

background="http://ashlynmotorsonline.com/picts/background-main.gif">&nbsp;
   
   
   <td width="85%" valign="top">
   
   <p align="center"><table align="center" width="', isset($settings['forum_width']) ?

$settings['forum_width'] : '95%' ,'" cellspacing="0" cellpadding="10" border="0"><tr><td

valign="top" colspan="3">
              <table width="100%" cellspacing="0" cellpadding="0" border="0" ><tr><td

width="15%">&nbsp;</td><td width="85%">
              <div style="position: relative; left: -20px;text-transform: capitalize; font-family: georgia,

sans-serif; font-size: 40px;letter-spacing: -1px">',$context['forum_name'] , '</div>
              <div style="position: relative; top: -4px;text-transform: capitalize; font-family: arial,

sans-serif; font-size: 18px;letter-spacing:-1px; "><b><span

class="greyheader">Simple</span><span style="color: #b0b0b0;">Machines</span><span

class="greyheader">Forum</span></b></div></td></tr></table>';
     echo '<table width="100%" cellspacing="0" cellpadding="0" border="0" ><tr><td rowspan="2"

align="right" class="smalltexttop" valign="middle" >&nbsp;';
     echo $context['current_time'];
     echo '</td><td width="70%" align="center" class="searchbox" valign="middle">';
                              echo '<form action="', $scripturl, '?action=search2" method="post"

style="margin: 5px;">
                                               <input type="text" name="search" value="" style="width: 190px;"

/>
                                               <input type="submit" name="submit" value="', $txt[182], '"

style="margin-top: 5px;width: 8ex;" />
                                               <input type="hidden" name="advanced" value="0" />';
       // If we're on a certain board, limit it to this board ;).
       if (!empty($context['current_board']))
               echo '
                                               <input type="hidden" name="brd[', $context['current_board'], ']"

value="', $context['current_board'], '" />';

    echo '</form></td></tr><tr><td valign="middle" align="center" class="pmbox">';
     if ($context['user']['is_logged']){
         echo $txt['hello_member'], ' <b>', $context['user']['name'], '</b>';
         if ($context['allow_pm'])
         echo ' ', $txt[152], ' <a href="', $scripturl, '?action=pm">', $context['user']['messages'], ' ',

$context['user']['messages'] != 1 ? $txt[153] : $txt[471], '</a>', $txt['newmessages4'], ' ',

$context['user']['unread_messages'], ' ', $context['user']['unread_messages'] == 1 ?

$txt['newmessages0'] : $txt['newmessages1'];
         echo '.<br />';

     }
     else
         echo $txt['welcome_guest'];

     echo '</td></tr></table>
     <table width="100%" cellspacing="5" cellpadding="5" border="0" >
     <tr><td colspan="3" class="smalltext2" style="padding: 5px 40px 5px 40px;">&laquo; ';
     theme_linktree();
     echo ' &raquo;</td></tr>
     <tr>';

}

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


     echo'</td><td id="rightbar" width="23%" valign="top" style="padding-left: 15px; padding-right:

15px;">';
     template_menu();
     echo '</span>';

     if ($context['user']['is_logged']){

      echo '<br /><br /><span style="font-size: 18px;letter-spacing:-1px;color:

#b0b0b0;"><b>'.$txt['SIMPLE_Tools3'].'</b></span><span style="font-family: arial, sans-serif;

font-size: 18px;letter-spacing:-1px; color: #000000;"><b>'.$txt['SIMPLE_Tools'].'</span></b><br

/><hr />';
      echo ' <span class="smalltext">
      <a href="', $scripturl, '?action=markasread;sa=all">' ,$txt[452], '</a><br />

      <a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a><br />
                        <a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'],

'</a><br />
                         ';

      }

   if(!isset($settings['color_change_off']) || (isset($settings['color_change_off']) &&

$settings['color_change_off']==0))
     echo '
     <form action="', $scripturl, '" style="margin: 0px; margin-top: 10px;" method="post"><select

name="options[theme_color]" onchange="this.form.submit();">
       <option selected="selected" value="', $options['theme_color'],

'">'.$txt['SIMPLE_Tools20'].'</option>
       <option value="blue">Blue/White</option>
       <option value="red">Brown/White</option>
       <option value="green">Green/White</option>
       <option value="grey">Grey</option>
       <option value="black">Black</option>
       </select><noscript><br /><input type="submit" value="'.$txt['SIMPLE_Tools21'].'"

/></noscript></form>
       (' , $txt['SIMPLE_Tools25'], ')<br />';

     if ($context['user']['is_logged']){
      // Is the forum in maintenance mode?
       if ($context['in_maintenance'] && $context['user']['is_admin'])
                        echo '
                                                        <b>', $txt[616], '</b><br />';

                // Are there any members waiting for approval?
                if (!empty($context['unapproved_members']))
                        echo '
                                                        ', $context['unapproved_members'] == 1 ?

$txt['approve_thereis'] : $txt['approve_thereare'], ' <a href="', $scripturl, '?action=regcenter">',

$context['unapproved_members'] == 1 ? $txt['approve_member'] : $context['unapproved_members']

. ' ' . $txt['approve_members'], '</a> ', $txt['approve_members_waiting'], '<br />';

        }
        echo ' </span>';
        // Show a random news item? (or you could pick one from news_lines...)
        if (!empty($settings['enable_news']))
                echo '<br /><span style="font-size: 18px;letter-spacing:-1px;color:

#b0b0b0;"><b>'.$txt['SIMPLE_Tools5'].'</b></span><span style="font-family: arial, sans-serif;

font-size: 18px;letter-spacing:-1px; color: #000000;"><b>'.$txt['SIMPLE_Tools27'].'</span></b><br

/><hr /><span class="smalltext">', $context['random_news_line'], '</span><br />';

        // The "key stats" box.
        echo '<br /><span style="font-size: 18px;letter-spacing:-1px;color:

#b0b0b0;"><b>'.$txt['SIMPLE_Tools3'].'</b></span><span style="font-family: arial, sans-serif;

font-size: 18px;letter-spacing:-1px; color: #000000;"><b>'.$txt['SIMPLE_Tools4'].'</span></b><br

/><hr />
                  <span class="smalltext"><b>'. $modSettings['totalMessages']. '</b> ', $txt[95], ' <br

/> <b>', $modSettings['totalTopics'], '</b> ', $txt[64], '  <br /><b>', $modSettings['memberCount'],

'</b> ', $txt[19], '<br />
                                                        ', $txt[656], ': <b> <a href="', $scripturl, '?action=profile;u=',

$modSettings['latestMember'], '">', $modSettings['latestRealName'], '</a></b><br /></span>';


     echo '</td></tr></table>';


       // Show the "Powered by" and "Valid" logos, as well as the copyright.  Remember, the

copyright must be somewhere!
       echo ' <br />

               <table cellspacing="0" cellpadding="3" border="0" align="center" width="100%">
                       <tr>
                               <td valign="middle" align="center" class="smalltext" style="white-space:

nowrap;border-top: solid 1px #d0d0d0;">
                                       ', theme_copyright(), '<br /> <b>Simplicity</b> design by <a

href="http://www.bloczone.net" target="_blank">Bloc</a>';
       // Show the load time?
       if ($context['show_load_time'])
               echo '
               <br /><span class="smalltext">', $txt['smf301'], $context['load_time'], $txt['smf302'],

$context['load_queries'], $txt['smf302b'], '</span>';
     echo '
                               </td>
                       </tr>
               </table>';


       echo '
               </div>';

       // This is an interesting bug in Internet Explorer AND Safari.  Rather annoying, it makes

overflows just not tall enough.
       if ($context['browser']['is_ie'] && !$context['browser']['is_ie4'] || $context['browser']['is_mac_ie']

|| $context['browser']['is_safari'])
       {
               // The purpose of this code is to fix the height of overflow: auto div blocks, because IE

can't figure it out for itself.
               echo '
               <script language="JavaScript" type="text/javascript"><!--';

               // Unfortunately, Safari does not have a "getComputedStyle" implementation yet, so we

have to just do it to code...
               if ($context['browser']['is_safari'])
                       echo '
                       window.addEventListener("load", smf_codeFix, false);

                       function smf_codeFix()
                       {
                               var codeFix = document.getElementsByTagName ?

document.getElementsByTagName("div") : document.all.tags("div");

                               for (var i = 0; i < codeFix.length; i++)
                               {
                                       if (codeFix[i].className == "code" && codeFix[i].offsetHeight < 20)
                                               codeFix[i].style.height = (codeFix[i].offsetHeight + 20) + "px";
                               }
                       }';
               else
               {
                       echo '
                       var window_oldOnload = window.onload;
                       window.onload = smf_codeFix;

                       function smf_codeFix()
                       {
                               var codeFix = document.getElementsByTagName ?

document.getElementsByTagName("div") : document.all.tags("div");

                               for (var i = 0; i < codeFix.length; i++)
                               {
                                       if (codeFix[i].currentStyle.overflow == "auto" &&

(codeFix[i].currentStyle.height == "" || codeFix[i].currentStyle.height == "auto") &&

(codeFix[i].scrollWidth > codeFix[i].clientWidth || codeFix[i].clientWidth == 0))
                                               codeFix[i].style.height = (codeFix[i].offsetHeight + 36) + "px";
                               }

                               if (window_oldOnload)
                                       window_oldOnload();
                       }';
               }

               echo '
               // --></script>';
       }
</td>
 </tr>
</table>


   
       echo '
       </body>
</html>';
YAP Portal

Oldiesmann

You're missing an echo statement here...

                echo '
               // --></script>';
       }
</td>
</tr>
</table>


Should be
                echo '
               // --></script>';
       }
echo '
</td>
</tr>
</table>';
Michael Eshom
Christian Metal Fans

Doug

Yer a genius..........Thank you so kindly

you can look at the template now at

http://ashlynmotorsonline.com/forum


Doug
YAP Portal

Oldiesmann

Michael Eshom
Christian Metal Fans

Advertisement: