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,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,910
  • Total Topics: 21,307
  • Online today: 705
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 531
  • Total: 531

Install TP v0.8.6b on 1.1RC2 issue - editing Themes/default/index.template.php

Started by mediamon, July 14, 2006, 08:50:52 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

mediamon

Hello Bloc & all,

I'm preparing to install TP v0.8.6b on SMF 1.1 RC2 (using the default theme bundled with SMF and no mods whatsoever).

The TP_mod-instructions.txt (Jan 23, 2006) bundled with TP instucts me to edit five SMF files. I have edited four files without issues.

The Themes/default/index.template.php file distributed with SMF 1.1 RC2 version I donwloaded is dated Dec 31, 2005. Second line of file shows "// Version: 1.1 RC2; index".

However while editing /Themes/default/index.template.php
I have found many snippets of code not present in my SMF 1.1 RC2 version of the file, which the TP mod-instructions document indicates I should replace.

The code snippets I could not find are indicated below with "DID NOT FIND!!!!!"

And I found the first code snippet below to not be exactly the same, but close enough, that I could tell it was the snippet that should be edited.

So am I doing something wrong? Am I suppose to upload and overwrite the defualt SMF theme with a theme that needs downloaded from TP site?

I understand this is beta but the install instructions in the TP package are as spartan as they come, even for a beta, don't you think? ;-)

I found only one single line of instructions: "these changes need to be done on several files in your SMF installation:"

Nothing about what to do with the "mod" files in the TP distribution root, that is, if they all shouldto be uploaded to the server, for those who are installing fresh? And nothing about pointing browser to "tp_install.php" after uploading all files.

Yes a short but sweet install guide would go a long way. ;-)

Anyway hoping someone can help me with the index.template.php file edit issue.

Thanks for making TP available and look forward to v.0.9.

Thanks,
Woody


-------------------------------------------------------------------------------------------------------
Themes/default/index.template.php
-------------------------------------------------------------------------------------------------------


>>>> SHOULD BE SEARCH FOR >>>
<img src="', $settings['header_logo_url'], '" style="margin: 4px;" alt="', $context['forum_name'], '" />';

--------------
<search for>
<img src="', $settings['header_logo_url'], '" alt="', $context['forum_name'], '" border="0" />';
</search for>

<add after>
// TinyPortal
     if($context['TPortal']['showtop']==1)
     {
// TinyPortal end
</add after>

-----------------------------------

DID NOT FIND!!!!!

<search for>
<b>', $context['common_stats']['total_posts'], '</b> ', $txt[95], ' ', $txt['smf88'], ' <b>', $context['common_stats']['total_topics'], '</b> ', $txt[64], ' ', $txt[525], ' <span style="white-space: nowrap;"><b>', $context['common_stats']['total_members'], '</b> ', $txt[19], '</span><br />
', $txt[656], ': <b> ', $context['common_stats']['latest_member']['link'], '</b>
</div>
</div>';
</search for>

<add after>

// TinyPortal
       }
//  end
</add after>

---------------------------------------

DID NOT FIND!!!!!

<search for>
<a href="javascript:void(0);" onclick="shrinkHeader(!current_header); return false;"><img id="upshrink" src="', $settings['images_url'], '/', empty($options['collapse_header']) ? 'upshrink.gif' : 'upshrink2.gif', '" alt="*" title="', $txt['upshrink_description'], '" style="margin: 2px 2ex 2px 0;" border="0" /></a>';
</search for>
<replace>
';
// TinyPortal

         if($context['TPortal']['showtop'])
             echo '<a href="javascript:void(0);" onclick="shrinkHeader(!current_header); return false;"><img id="upshrink" src="', $settings['images_url'], '/', empty($options['collapse_header']) ? 'upshrink.gif' : 'upshrink2.gif', '" alt="*" title="', $txt['upshrink_description'], '" style="margin: 2px 0;" border="0" /></a><img id="upshrinkTemp" src="', $settings['images_url'], '/blank.gif" alt="" style="margin-right: 1ex;" /> ';
         if($context['TPortal']['leftbar'])
             echo '<a href="javascript:void(0);" 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;" />';
         if($context['TPortal']['rightbar'])
             echo '<a href="javascript:void(0);" 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;" />';
// TinyPortal end
</replace>


-----------------
DID NOT FIND!!!!!

<search for>
// The main content should go here.  A table is used because IE 6 just can't handle a div.
echo '
<table width="100%" cellpadding="0" cellspacing="0" border="0"><tr>
<td id="bodyarea" style="padding: 1ex 20px 2ex 20px;">';
</search for>
<replace>
     // 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'])
          {
              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_sidebar('left');
              echo '</div></td>';

          }

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

-------------------

DID NOT FIND!!!!!

<search for>
echo '</td>
</tr></table>';
</search for>
<replace>
   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>';

</replace>

---------------------
DID NOT FIND!!!!!

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

</add before>

---------------------
DID NOT FIND!!!!!

<search for>
// 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'], '
<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'];
</search for>
<replace>
     // 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'];
</replace>

G6Cad

We know that some strings are kind of outdated, here you have a index.template.php file for 1.1rc2 with the TP code in place :)

Hope it will help out :)
Dont forget to run the manual_tp_install.php file from your browser to get the DB tables in place to, and to wiev the install from your default 1.1rc2 theme, from now you going to need the TP enabled themes :)
Good luck.

mediamon

G6-

Thank you for the kind followup.

Where does the source of the index.template.php file you provide come from and why not make it available as a regular download if it is needed? Or why not just simply update the instructions, it would just take a second to do this and alleviate many repeated questions, no?

Also what is "manual_tp_install.php"? I do not have. I have tp_install.php.

And some other instructions IchBin provided in another recent thread says to install with packet manager? So should I run tp_install.php or use packet manager.

I am thoroughly confused. I have installed many much more packages in my day (many alpha and beta), and written much tech documentation. So I truly don't understand why the current TP install has to be so confusing, with so much different advice provided. Ouch.

Please do take this info constructively. Thanks again.

Woody




G6Cad

Im not a waitres with a silver plate ;)

You know your self where to find the index.template.php, you said your self that you didnt find the code in the very same file, so replace the one i gave you with the one you didnt find the correct code in it.
If you went with the manual install, i assumed that you read through the forum with the instructions we have here, like the others do when they need to install it the manual way.

We do have a search, IchBin kindly gave you the links to the forum and the guides avaliable, so I think you can read through the guide and you will know where to put what to get a working TP

agridoc also posted the links to the smf forums and the "how to use the packagemanager"
If you go with the package manager, you have to upload the full install package of TP there, and run it through your packagemanager in your admin control in the forum.

You said that didnt work for you, and you went for the manual install, and you missed out on the codes in the index.template.php. I gave you a new file with all code added, just replace that file with the one you have in the themes/default/

The tp_install.php is the file you need to run through your browser after you have edited the TP codes needed in the smf files, and upload all the tp files from the manual install package.
the TP_install.php is in that package. So that is the file you need to run from the browser, not the one i said before (mixed it up with the new version file in the Alpha package)


mediamon

Quote from: G6 on July 14, 2006, 09:49:53 AM
Im not a waitres with a silver plate ;)

Who said you were and why do I deserve comback like that? I thanked you for your assistance and I was polite.

I asked kindly as possible if someone could post difinitive instructions in once single place on this forum, and suggested make it a sticky. There are so many people that have posting similar requests in this forum for so long its hard to believe it has not been done.

QuoteYou know your self where to find the index.template.php, you said your self that you didnt find the code in the very same file, so replace the one i gave you with the one you didnt find the correct code in it.

I did. All I asked was where it came from and why it is not included in the distribution. Am I so wrong for asking. Geesh.

QuoteIf you went with the manual install, i assumed that you read through the forum with the instructions we have here, like the others do when they need to install it the manual way.

I had no idea there was more than one install method. Nothing to such, manual or package install, is suggested once in the disttirbution. That was my point.

QuoteWe do have a search,

Yes what keyword to search on in the install forum with hundreds of individual threads with similar issues. Again suggestion is to make a difinitive install doc. What's so difficult with that? But if you guys are just interested in answering the same old repeated questions then that is fine to. I would just think the TP devs and TP support team would not want that.

QuoteIchBin kindly gave you the links to the forum and the guides avaliable,

Actually he posted info someone else. I was just reading through various forum posts and happened to find his referral to an old version install doc. I did not see links to any "available guides".

Quoteso I think you can read through the guide and you will know where to put what to get a working TP

The only doc I have found thus far is the 0.85b install doc. Are there updated docs or guides available?

But to get back to the issue at hand I did upload the template file you provided. (thank you again for providing). Then I ran the tp-install.php script and I observed many SQL errors.

For example:

Warning: mysql_query(): Access denied for user 'nobody'@'localhost' (using password: NO0 in /correct-path-to-my-account/forum/tp_install.php on line ##

Warning: mysql_query(): A link to the server could not be established in /correct-path-to-my-account/forum/tp_install.php  on line ##


These errors repeat a 100 times or so. Then at the end the script message:

TinyPortal's table strucure is now installed/updated.
Please restart your forum to see changes.


But that is not he case. From this point I cannot get into SMF.
SMF home page now shows:
Table 'mydatabase.myextension_tp_settings' doesn't exist.

So this all indicates the DB did not get patched via manual process, although the message displayed at the end of the tp_install script says otherwise.

And now since I cannot access SMF Admin, the packet manager option is no longer available. ;-)

So how to manually patch the db, that is how to make the tp_install script authenticate and connect to the DB?

Where is the script obtaining such db connection credentails?

Quoteagridoc also posted the links to the smf forums and the "how to use the packagemanager"
If you go with the package manager, you have to upload the full install package of TP there, and run it through your packagemanager in your admin control in the forum.

QuoteYou said that didnt work for you

I said no such thing. Again, I was unaware that installing TP thru the packet manager was an option, until I read the old 0.85 doc Inchbin posted. You suggested the manual install process so I selected that route.

Quoteand you went for the manual install, and you missed out on the codes in the index.template.php. I gave you a new file with all code added, just replace that file with the one you have in the themes/default/

Done as explained above.

QuoteThe tp_install.php is the file you need to run through your browser after you have edited the TP codes needed in the smf files, and upload all the tp files from the manual install package.
the TP_install.php is in that package. So that is the file you need to run from the browser, not the one i said before (mixed it up with the new version file in the Alpha package)

Done as explained above.

So now the mysql errors and inability of tp_install.php to connect to DB

Appreciate any recommends. Thanks.

Woody

mediamon

Solved.

Downloaded "TinyPortal v.0.8.6 - manual install (database only)"
from http://www.tinyportal.net/smf/index.php?action=tpmod;dl=get101

Then placed in root of SMF and ran the php script.

Then observed:

Quote
Install / Upgrade TinyPortal v0.8.6beta

    * Upshrink table created
    * Settings table created
    * Blocks table created.
          o some sample values were added to the blocks table
    * Variables table created.
    * Articles table created.
    * DL manager table created

TinyPortalÂÃ,´s table structure is now installed/updated.
Thank you for trying out TinyPortal.

So everything is well now.

Any idea why the bundled tp-install.php did not work but the downloaded db script upgrade did work? I see many peole posting similar errors.

Now I get to go play with TP!

Thanks.
Woody


IchBin

I don't see that many people posting with these database problems that you are talking about. As for the documentation, people just need to be patient thats all. It's coming. We all do this for free. Feel free to write the install doc now that you know how. :) For the most part only 2 or 3 people seem to have the time to do it. And as G6 put it, maybe people shouldn't be using it in beta status if they don't how to use SMF that well.

Xarcell

I've seen a few having that problem. In fact, I had that problem on all three of my test sites. However, it's not a major issue...

As I said, I'm sure Bloc will fix it.

Xarcell

BTW,

"difinitive instructions" are posted in several places on this site. Please search for it.

We are currently working on placing those "difinitive instructions" all in one place such as the "documentation" board.

Also, I think G6 misread your post. She reads about 100 support requests a day. She works hard for free, so sometimes it happens. We all do it...

Finally, always remember that this is beta. Use at your own risk.

This website is proudly hosted on Crocweb Cloud Website Hosting.