TinyPortal

Development => Support => Installation => Topic started by: mediamon on July 14, 2006, 08:50:52 AM

Title: Install TP v0.8.6b on 1.1RC2 issue - editing Themes/default/index.template.php
Post by: mediamon on July 14, 2006, 08:50:52 AM
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>
Title: Re: Install TP v0.8.6b on 1.1RC2 issue - editing Themes/default/index.template.p
Post by: G6Cad on July 14, 2006, 09:06:32 AM
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.
Title: Re: Install TP v0.8.6b on 1.1RC2 issue - editing Themes/default/index.template.p
Post by: mediamon on July 14, 2006, 09:32:24 AM
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



Title: Re: Install TP v0.8.6b on 1.1RC2 issue - editing Themes/default/index.template.p
Post by: G6Cad on July 14, 2006, 09:49:53 AM
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)

Title: Re: Install TP v0.8.6b on 1.1RC2 issue - editing Themes/default/index.template.p
Post by: mediamon on July 14, 2006, 10:26:39 AM
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
Title: Re: Install TP v0.8.6b on 1.1RC2 issue - editing Themes/default/index.template.p
Post by: mediamon on July 14, 2006, 10:51:57 AM
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
Title: Re: Install TP v0.8.6b on 1.1RC2 issue - editing Themes/default/index.template.php
Post by: Xarcell on July 14, 2006, 12:12:05 PM
i dunno, but i'm sure Bloc will fix it.
Title: Re: Install TP v0.8.6b on 1.1RC2 issue - editing Themes/default/index.template.php
Post by: IchBin on July 14, 2006, 02:24:12 PM
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.
Title: Re: Install TP v0.8.6b on 1.1RC2 issue - editing Themes/default/index.template.php
Post by: Xarcell on July 14, 2006, 02:49:46 PM
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.
Title: Re: Install TP v0.8.6b on 1.1RC2 issue - editing Themes/default/index.template.php
Post by: Xarcell on July 14, 2006, 02:55:41 PM
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.
Title: Re: Install TP v0.8.6b on 1.1RC2 issue - editing Themes/default/index.template.p
Post by: mediamon on July 15, 2006, 06:47:44 AM
1. I provide volunteer support in a number of open-source product forums as well as providing help desk support at my place of business. So my suggestions/comments come from experience as I'm sure your comments do also. There is no need for  defensive posturing.

2. I understand TP is beta and I mentioned that a number of times. No need to remind me. ;) And I completely understand the installer might not quite be finished and some hiccups might be encountered installing or otherwise. All I was requesting was a a very simple install document for the current version.

3. If there is indeed a definitive location for an updated install document I would never tell anyone to go "search for it". Especially after that person already stated they had already treaded though the boards and searched for current docs. But if you do decide to take the easy way and cannot provide a URL and have that overriding need to tell someone to search for it, maybe offer a few keywords to search on.

4. I would gamble the number of support inquiries posted in this install forum would be cut in half, if a doc was made sticky and/or provided with the distribution. Compare the amount of time it takes to create a simple doc versus the time it takes to repeatedly respond to common/similar inquiries, many inquires that could be prevented. You do the math.

5. No one yet has responded to why an install read me is not offered in the distribution package and why the provided instructions to edit the index.template.php file is so out of whack. And why an updated index.template.php is not available for download or bundled in the distribution. This is especially odd since both  SMF 1.1RC2 and TP 0.86b have been in existence for awhile.

6. Just because it's beta is no reason to tell people to search for it or to suggest that since do not know how to use the forum packet manager that they should not be using it. It is just better to not respond. Your assumption was false I had previously updated my SMF through the SMF packet manager so I do know how to use it. I stated that I did not know TP could be installed through the packet manager.

7. I have documented the install process and some of issues I observed and solutions and workarounds implemented. It truly did not take very long to put together so that is the crux of my question, why had it not been done before? I would be willing to contribute this document to your project, if Bloc would ensure it would be posted in a conspicuous location and would distribute with the software, and provide  he URL to the forum support team so they don't have to tell well meaning people to "search for it".

8. I do certainly appreciate the volunteer "tech" support you all have provided on this board. But the tone/delivery needs a little tweaking. Volunteer or not there is no need for such defensiveness. That kind of approach in the support forums is detrimental to this fine project.
Title: Re: Install TP v0.8.6b on 1.1RC2 issue - editing Themes/default/index.template.p
Post by: G6Cad on July 15, 2006, 08:41:50 AM
Quote4. I would gamble the number of support inquiries posted in this install forum would be cut in half, if a doc was made sticky and/or provided with the distribution. Compare the amount of time it takes to create a simple doc versus the time it takes to repeatedly respond to common/similar inquiries, many inquires that could be prevented. You do the math.

I totally agree with you ;) thats why we HAVE sticky posts with how to install, upgrade, convert, replace and more.
But the thing is, mist users don't know how to read them or follow them, they read a line, and OH, lets do this, and then they don't follow the rest of the steps, and end up with errors. (Not saying you did that though)

But one thing we all have noticed are that we could spend a lot of time writing docs to explain the steps on how to install the diffrent versions. But the hard thing in this is that not many servers they install it on work the same, diffrent versions of sql, diffrent versions of phpmyadmin, Linux setups that don't work proper and so on.
Not many hosts work flawless right now, but the development is in progress for the scripts to read and/or rewrite the code to suit more servers.
When we have a fully working script we will build up a massive documentation for how to with every thing regarding TP :)
But as long as the development change form one day to an other, there is no reason for us to spend time writing docs that are not valid the day after.

But i know what you want to see, and your thinking is great, but we cant provide a documentation other then the helping threads through several installs with errors that wi manage to solve in one way or another.
Thats the biggest issue with beta testing, we all are beta testers, and beta versions change drastic some time. In the next release there are numerous of changes that are going to make things easier for the users to install TP through diffrent setups, so it will be better. Bloc and some other mods here are writing up diffrent guides as is now, a whole new documentation section is there and are building up every day.

So i hope you will see this soon and feel that your thinking was answered to a long time ago :)
Both by you, and by us that help out here :)
Title: Re: Install TP v0.8.6b on 1.1RC2 issue - editing Themes/default/index.template.p
Post by: kulbrich on July 17, 2006, 08:50:31 AM
This topic looks closest to where I'm now stuck (and yes, I've searched, and yes, I've read, and yes, I've tried what I could think of, but sadly I'm still a newbie to this!).

I have SMF 1.1RC2, and applied the patch to RC2 for that security issue (which I guess didn't warrant a new release #).  Next, downloaded TP 0.86 and installed it via the Package Manager.    Nothing happened.  After a while of trying out everything I could think of, I realized there were additional steps listed in the "TP_mod-instructions.txt" file that I guess I'd assumed were done programmatically but were left for me to do.

Patched as instructed, by hand. 

Ran into the snag on the index.template.php file with the text missing.  Searched.  Downloaded the updated version from this other thread --> http://www.tinyportal.net/smf/index.php?topic=6456.0 , and replaced my version with that one.

Then it occured to me to test my results ... and, well, after all those steps, I now have a pure blank forum, that responds on no urls whatsoever, and renders no content at all. 

Any suggestions where I should take my troubleshooting next?  I doublechecked all my edits, and they all appear correct.
Title: Re: Install TP v0.8.6b on 1.1RC2 issue - editing Themes/default/index.template.php
Post by: mediamon on July 17, 2006, 09:00:44 AM
Quote from: kulbrich on July 17, 2006, 08:50:31 AM
Any suggestions where I should take my troubleshooting next?  I doublechecked all my edits, and they all appear correct.

Hi Kulbrich-

I'm presuming your DB did not get updated. I solved my issue by downloading the database update only version of TP (manual_tp_install.hp) then copying it over to the root of SMF, then running the script from the browser.

See my post at http://www.tinyportal.net/smf/index.php?topic=6456.msg52755#msg52755

Hope this helps,
Woody
Title: Re: Install TP v0.8.6b on 1.1RC2 issue - editing Themes/default/index.template.p
Post by: kulbrich on July 17, 2006, 09:09:34 AM
Thanks ... I'll take a look at that.  Also after downloading and examining the "manual install" zips for files as well as db, I think the Package Manager install just failed utterly and completely (while reporting "Success" at every step) -- because there are no TP source files anywhere (unless you count the zipfile and the temp folder in the Packages directory) in my whole SMF installation. 

I guess I'll see about installing stuff by-hand?  (I'm thinking an SMF reinstallation is in my near future).   Thanks for the suggestion!

Karl

UPDATE: Manually installing the files appears to have fixed the install -- at least, TP shows up now and lets me play!  Odd the package didn't install.
Title: Re: Install TP v0.8.6b on 1.1RC2 issue - editing Themes/default/index.template.p
Post by: G6Cad on July 17, 2006, 09:43:05 AM
Some times the hosts have activated the php security on their servers, and when the security is set a bit high by the host, the files don't get uploaded correct through the package manager, and give a blank forum even if the package did get installed correct.

Usually it helps with just upload all the TP files from the manual package, but sometimes even that fail for some reason, but almost every time it is the security settings on the host that are the reason for non working packagemanager, and not TP install package.  :-\