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,970
  • Latest: bynw
Stats
  • Total Posts: 196,046
  • Total Topics: 21,335
  • Online today: 374
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 188
  • Total: 188

Argh

Started by Nick, July 12, 2005, 08:13:48 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Nick

And the last bit...
             <a href="#" onclick="shrinkHeaderLeftbar(!current_leftbar); return
false;"><img id="upshrinkLeftbar" src="', $settings['images_url'], '/',
empty($options['collapse_leftbar']) ? 'upshrink.gif' : 'upshrink2.gif', '"
alt="*" title="', $txt['upshrink_description'], '" style="margin: 2px 0;"
border="0" /></a><img id="upshrinkTempLeftbar" src="', $settings['images_url'],
'/blank.gif" alt="" style="margin-right: 0ex;" />
             <a href="#" onclick="shrinkHeaderRightbar(!current_rightbar);
return false;"><img id="upshrinkRightbar" src="', $settings['images_url'], '/',
empty($options['collapse_rightbar']) ? 'upshrink.gif' : 'upshrink2.gif', '"
alt="*" title="', $txt['upshrink_description'], '" style="margin: 2px 0;"
border="0" /></a><img id="upshrinkTempRightbar" src="', $settings['images_url'],
'/blank.gif" alt="" style="margin-right: 0ex;" />';

// Show the menu here, according to the menu sub template.
template_menu();

echo '
</div>';

     // The main content should go here.  A table is used because IE 6 just
can't handle a div.
        echo '<div id="bodyarea" style="padding: 10px 8px 0px 8px;">
        <table width="100%" cellpadding="0" cellspacing="0" border="0"><tr>';

// TinyPortal integrated bars
          if($context['TPortal']['leftbar'] && $context['tportal_on'])
          {
              echo '<td width="' ,$context['TPortal']['leftbar_width'], '"
style="padding: ' , isset($context['TPortal']['padding']) ?
$context['TPortal']['padding'] : '4' , 'px; background-color: #D4D4D4;
padding-top: 4px;" valign="top">
                 <div id="leftbarHeader"', empty($options['collapse_leftbar']) ?
'' : ' style="display: none;"', ' style="padding-top: 5px; width: '
,$context['TPortal']['leftbar_width'], 'px;">';
                 TPortal_leftbar();
              echo '</div></td>';
           }

        echo '<td width="100%" align="left" valign="top" style="padding-top:
10px; padding-bottom: 10px;" id="bodyarea">';
        if($context['TPortal']['centerbar'])
                     echo '<div>' , TPortal_centerbar() , '</div>';
}

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

   echo '</td>';

         // TinyPortal integrated bars
          if($context['TPortal']['rightbar']){
              echo '<td style="padding: ' ,
isset($context['TPortal']['padding']) ? $context['TPortal']['padding'] : '4' ,
'px; background-color: #D4D4D4; padding-top: 4px;" valign="top" align="right">
                 <div id="rightbarHeader"', empty($options['collapse_rightbar'])
? '' : ' style="display: none;"', ' style="width: '
,$context['TPortal']['rightbar_width'], 'px; text-align: left; padding-top:
5px;">';
              TPortal_rightbar();
              echo '</div></td>';
          }

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


// Show the "Powered by" and "Valid" logos, as well as the copyright.
Remember, the copyright must be somewhere!
echo '

<div id="footerarea" style="text-align: center; padding-bottom: 1ex;',
$context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? '
width: 100%;' : '', '">
<script language="JavaScript" type="text/javascript"><!--
function smfFooterHighlight(element, value)
{
element.src = smf_images_url + "/" + (value ? "h_" : "") + element.id +
".gif";
}
// --></script>
<table cellspacing="0" cellpadding="3" border="0" align="center" width="100%">
<tr>
                           <td valign="middle" align="center"
style="white-space: nowrap;" class="smalltext">
                                        ', theme_copyright(), ' <br />',
tportal_version() , '
                                </td>
</tr>
</table>';

// Show the load time?
if ($context['show_load_time'])
echo '
<span class="smalltext">', $txt['smf301'], $context['load_time'],
$txt['smf302'], $context['load_queries'], $txt['smf302b'], '</span>';

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>';
}

// TinyPortal
         echo '</div>';
     if($context['TPortal']['fixed_width']!=0)
             echo '</td></tr></table>';
// end

echo '
</body>
</html>';
}

// Show a linktree.  This is that thing that shows "My Community | General
Category | General Discussion"..
function theme_linktree()
{
global $context, $settings, $options;

// Folder style or inline?  Inline has a smaller font.
echo '<span class="nav"', $settings['linktree_inline'] ? ' style="font-size:
smaller;"' : '', '>';

// Each tree item has a URL and name.  Some may have extra_before and
extra_after.
foreach ($context['linktree'] as $link_num => $tree)
{
// Show the | | |-[] Folders.
if (!$settings['linktree_inline'])
{
if ($link_num > 0)
echo str_repeat('<img src="' . $settings['images_url'] .
'/icons/linktree_main.gif" alt="| " border="0" />', $link_num - 1), '<img src="'
. $settings['images_url'] . '/icons/linktree_side.gif" alt="|-" border="0" />';
echo '<img src="' . $settings['images_url'] . '/icons/folder_open.gif"
alt="+" border="0" />&nbsp; ';
}

// Show something before the link?
if (isset($tree['extra_before']))
echo $tree['extra_before'];

// Show the link, including a URL if it should have one.
echo '<b>', $settings['linktree_link'] && isset($tree['url']) ? '<a href="' .
$tree['url'] . '" class="nav">' . $tree['name'] . '</a>' : $tree['name'],
'</b>';

// Show something after the link...?
if (isset($tree['extra_after']))
echo $tree['extra_after'];

// Don't show a separator for the last one.
if ($link_num != count($context['linktree']) - 1)
echo $settings['linktree_inline'] ? ' &nbsp;|&nbsp; ' : '<br />';
}

echo '</span>';
}

// Show the menu up top.  Something like [home] [help] [profile] [logout]...
function template_menu()
{
global $context, $settings, $options, $scripturl, $txt;

     // Show the [home] and [help] buttons.
       echo '
                     <a href="', $scripturl, '">',
($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' .
$context['user']['language'] . '/home.gif" alt="' . $txt[103] . '"
style="margin: 2px 0;" border="0" />' : $txt[103]), '</a>',
$context['menu_separator'];
       echo '        <a href="', $scripturl, '?action=forum">',
($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' .
$context['user']['language'] . '/forum.gif" alt="Forum Index" style="margin: 2px
0;" border="0" />' : 'Forum Index'), '</a>', $context['menu_separator'];
       echo '        <a href="', $scripturl, '?action=help" target="_blank">',
($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' .
$context['user']['language'] . '/help.gif" alt="' . $txt[119] . '"
style="margin: 2px 0;" border="0" />' : $txt[119]), '</a>',
$context['menu_separator'];

// How about the [search] button?
if ($context['allow_search'])
echo '
<a href="', $scripturl, '?action=search">', ($settings['use_image_buttons']
? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] .
'/search.gif" alt="' . $txt[182] . '" style="margin: 2px 0;" border="0" />' :
$txt[182]), '</a>', $context['menu_separator'];
// How about the [downloads] button?
echo '
<a href="', $scripturl, '?action=downloads">',
($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' .
$context['user']['language'] . '/downloads.gif" alt="Downloads" style="margin:
2px 0;" border="0" />' : 'Downloads'), '</a>', $context['menu_separator'];

      // Is the user allowed to administrate at all? ([admin])
        if ($context['allow_admin']){
                echo '
                                <a href="', $scripturl, '?action=admin">',
($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' .
$context['user']['language'] . '/admin.gif" alt="' . $txt[2] . '" style="margin:
2px 0;" border="0" />' : $txt[2]), '</a>', $context['menu_separator'];
                echo '
                                <a href="', $scripturl, '?action=tpadmin">',
($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' .
$context['user']['language'] . '/tpadmin.gif" alt="Tiny Portal Admin"
style="margin: 2px 0;" border="0" />' : 'TPadmin'), '</a>',
$context['menu_separator'];

        }

// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo '
<a href="', $scripturl, '?action=profile">', ($settings['use_image_buttons']
? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] .
'/profile.gif" alt="' . $txt[79] . '" style="margin: 2px 0;" border="0" />' :
$txt[467]), '</a>', $context['menu_separator'];

// The [calendar]!
if ($context['allow_calendar'])
echo '
<a href="', $scripturl, '?action=calendar">',
($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' .
$context['user']['language'] . '/calendar.gif" alt="' . $txt['calendar24'] . '"
style="margin: 2px 0;" border="0" />' : $txt['calendar24']), '</a>',
$context['menu_separator'];

// If the user is a guest, show [login] and [register] buttons.
if ($context['user']['is_guest'])
{
echo '
<a href="', $scripturl, '?action=login">', ($settings['use_image_buttons'] ?
'<img src="' . $settings['images_url'] . '/' . $context['user']['language'] .
'/login.gif" alt="' . $txt[34] . '" style="margin: 2px 0;" border="0" />' :
$txt[34]), '</a>', $context['menu_separator'], '
<a href="', $scripturl, '?action=register">',
($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' .
$context['user']['language'] . '/register.gif" alt="' . $txt[97] . '"
style="margin: 2px 0;" border="0" />' : $txt[97]), '</a>';
}
// Otherwise, they might want to [logout]...
else
echo '
<a href="', $scripturl, '?action=logout;sesc=', $context['session_id'],
'">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] .
'/' . $context['user']['language'] . '/logout.gif" alt="' . $txt[108] . '"
style="margin: 2px 0;" border="0" />' : $txt[108]), '</a>';
}

?>

Bjørn

No, I have it..just haven't been able to look at it. Made a monster effort last night to update all themes to 1.1beta3. (..) Finished now, so I will look at it ASAP.

Bjørn

ok, first it seems the formatting is all wrong..so I am getting rid of all the comments with ',s in it first.

What do you use to edit them?

warstoke

lil bit of advice *NEVER EDIT PHP w/ NOTEPAD*
it can seriously fubar it
i use macromedia dreamweaver on my laptop and frontpage on the desktop
i used to use some program i think was called TextEdit or somehing like that when i was learning a little assembly (wishes i hadnt given up on that lol) 
similar problem there notepads line returns can be coded slightly differently from a ansi standard text file
and note pad dosnt always read end of line code as a return char

Kindred

little more advice...

DO not use FrontPage or DreamWeaver to edit php files!

FrontPage inserts all sorts of micorsquish specific codes, etc...
DreamWeaver can seriously muck with your files...
(I just spent 10 hours undoing the muck that Dreamweaver did to someone else's site, when they thought they would be "helpful" and edit the SMF templates)

I use UltraEdit....   v11.x nicely parses php
I've also seen TextEdit and ConText used by people over on SMF.

Bjørn

Context is good...I prefer PHP Expert Editor, cost around $30-40 USD, but well worth it. Fast, simple and take in javascript, php, html etc. Mark everything in color, so if something is wrong, you can just see where the coloring start going wrong. Also have a internal PHP code check.

Plus it can use any font, not just that dreadful Courier, which make me scroll like h*** on long lines.:) 


Ciinien

#16
Whatever the problem turns out to be, I have the identical issue with my test site;, same text being displayed and everything.

My new ISP finally recovered from the storm that devastated Florida and was able to get my domain up... Hooah! This is the link for the live, public site, and this is the TinyPortal test site. I'm just getting started on the live site, so there's not much there yet.

After I uploaded the files, I did the obligatory repair_paths.php and repair_settings.php to make sure all the urls were changed. Went into the database (tportal shares my smf db) and corrected all those paths. Looked things over once more, all seemed fine, so I fired the site up... bzzzzzt: thank you for playing! I am getting the same error that Nick is getting. I've looked through files all morning, compared with the mod files, everything I can think of with no luck.

Anyway, hope someone can help us fix it so we don't have to start again. It won't be a big deal cause there's not much there, but I had still began the customization and would hate to lose it if it can be saved.

p.s. I use Zend Studio for editing. Takes a little getting used to and it's pretty pricey, but one hell of an editor... ;)

Cheers!
Ci

Nokonium

I find Dreamweaver is OK and doesn't mess things up as long as you don't let it update links. Dreamweaver also has a very good search facility, able to search folders as well as files.

I'm trying out PHP Designer 2005, haven't really got to grips with it and it's search facility is pants.

Bjørn

Tried PHP Designer 2005 , but went right back to my current. :)

Dreamweaver is nice..but it feels "over the top" for me. But its great to do site layout on it of course. It just hides so much from you( if not looking at the code all the time) , that I find it difficult to dive in and find errors with it.

Nick

#19
I don't edit these files at all, unless they really need it. When editing, I use a different program than Dreamweaver etc., and it works wonderfully...

So does anyone maybe kinda know how to fix this?
I didn't edit this file at all just so you all know.

This website is proudly hosted on Crocweb Cloud Website Hosting.