TinyPortal

Development => Support => Installation => Topic started by: CDesign on June 21, 2009, 12:41:10 AM

Title: index.template.php Test failed
Post by: CDesign on June 21, 2009, 12:41:10 AM
Simple version.

Had smf 1.1.7 with tp 0.983. Wanted to upgrade to tp1.0.*. I uninstalled got an error.
Went to try different tp 1.0 beta versions got index.template.php  Test failed error.
I didn't like the tp 1.0 beta versions I tried. Went back to 0.983, got the same error, but the side blocks and panels wouldn't show this time on 0.983.

Details below.
------------------------------------------------------------------------------------

I wanted to update to a tp 1.0* beta version since I liked some of the feature, like the multi feature or article "sticky" option I read about. I went to uninstall my 0.98 and 2-3 errors were listed. I uninstalled anyway, I'm not sure what those errors were.

After installing a 1.0.* beta version I noticed I didn't like the way the text was formatted.
The main dislike was that the text for the Recent Topics block was the same and the formatting seemed odd. To be more detailed, the topic titles and the topic author or poster was the same text. With 0.983 the topic author or poster's name was bold. To me that seems easier than having the same text. (If there is a way to edit that in tp 1.0*,  I would appreciate help in that area. Thanks. ) Here is an example of what I mean for tp 0.983.

index.template.php error by CDdesign

I tried different versions of tp 1.0.* seems all of them so far had that issue.

When installing and uninstalling versions of tp 1.0. beta I got the same index.template.php   test failed error.

I uninstalled the beta tp versions and wanting to go back to 0.98. I got the .php test failed error again.

This time the blocks, panels and modules wouldn't show. Though they showed on the tp beta versions.

Thanks for reading this and please help.  :)
Title: Re: index.template.php Test failed
Post by: IchBin on June 21, 2009, 04:08:59 AM
I have no idea what you want help with. Do you want help with down grading? Or do you want help with upgrading? You talked in circles about upgrading and down grading yet didn't specify what it is that you're actually trying to achieve.

You can't down grade unless you restore your database to a version where you were running TP 0.9.8.
Title: Re: index.template.php Test failed
Post by: CDesign on June 21, 2009, 04:22:46 AM
I'd like to get my forum back to 0.983. You mentioned something about restoring a database. How would I do that?

If that can't be done, is there a way to make the poster's name bold on the Recent Topics block?

Title: Re: index.template.php Test failed
Post by: IchBin on June 21, 2009, 04:29:52 AM
You can only down grade if you made a backup anytime before you upgraded to TP 1.x. Just remember doing the restore that way you will lose any info like posts and stuff on your forum if you restore the DB.

If you don't have a way to restore to a previous backup, then you are stuck with TP 1.x. If I were you, instead of modifying the code in the TP files I would take a look at the recentTopics block code snippets. Once you find one you want, you can modify that instead. This way, you don't lose the change when you upgrade in future versions either.
Title: Re: index.template.php Test failed
Post by: CDesign on June 21, 2009, 04:42:20 AM
I'm not sure what exactly you meant by "Just remember doing the restore that way you will lose any info like posts and stuff on your forum if you restore the DB.
".

As for modifying the code, that seems like a good idea, and you have a good point about future upgrades. I'm not sure where to access the block code or what to do when I get there. Could you help me with that?

What about the Re: index.template.php  Test failed error I get, I get that when installing and uninstalling tp either version.
Title: Re: index.template.php Test failed
Post by: G6Cad on June 21, 2009, 09:28:21 AM
Test FAILED on Installation? (http://docs.tinyportal.co.uk/index.php?topic=32) Klick the link
Title: Re: index.template.php Test failed
Post by: CDesign on June 21, 2009, 01:56:19 PM
Quote from: G6 on June 21, 2009, 09:28:21 AM
Test FAILED on Installation? (http://docs.tinyportal.co.uk/index.php?topic=32) Klick the link

Seems like that path would set the tp files back to the .983 mode. Would it?
Another question is, where do you get the "tp-version.mod"?
Title: Re: index.template.php Test failed
Post by: ZarPrime on June 21, 2009, 05:55:18 PM
Hi CDesign,

Welcome to TinyPortal.

What version of TinyPortal, if any, do you have installed right now?  It might help if you Please Read and Follow the Posting Guidelines (http://www.tinyportal.net/index.php/topic,581), and include a link to your site so that we can see what you have installed right now.

1.  If you upgraded to to TP 1.0x, you can NOT go back to TP 0.98 unless you have a copy of your database from when you were using TP 0.98.  If you have that database then you can revert to it and reinstall TP 0.98.  Otherwise, you can't go back.  When Ichbin said "Just remember doing the restore that way you will lose any info like posts and stuff on your forum if you restore the DB." he was referring to the fact that anything you have added to the Forum since you upgraded will be missing when you revert to the previous database.  In other words, if you upgraded on June 1st, and you now are going to now revert to the 0.98 database, any posts on your Forum between June 1st and now will no longer be there.

2.  When you install another version of TP, you should uninstall the previous version first and this should be done while your forum is set to the default SMF core theme.  If you have continually installed other versions without uninstalling previous versions there is a good chance you will get errors like you have described, and this could even give you duplicate entries that will mess other things up.

3.  Suggestion - Uninstall all versions of TP that appear in your package manager, preferably in the order you installed them.  If you get any errors that you can't uninstall then do a manual uninstall of that particular version.  If you need help with that, ask.

4.  After this, install the latest version of TP (1.0 beta 4).  If you get errors on install, then complete the manual installation located here --> How do I manually install TinyPortal (http://docs.tinyportal.co.uk/index.php?topic=29)

5.  Finally, Ichbin mentioned that there is probably some code in our Block Code Snippets Board (http://www.tinyportal.net/index.php/board,46.0.html) that will fix the problem you are having with the poster's name not being bold faced.  If you can't find one that suits you, let me know and I will give you some code that you can put into a php block that will do what you want.

ZarPrime
Title: Re: index.template.php Test failed
Post by: CDesign on June 21, 2009, 07:22:59 PM
Thanks a lot for your helpful posts, Ichbin, G6, and Zarprime. From what has been posted, seems I might have to keep  the beta 1.0.+. I'm going to ask anyway lol. Is there a way to manually edit forum files to get back to 0.983?

If you would please look at the picture posted, you may notice some difference that I mentioned in the topic post.
(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fimg191.imageshack.us%2Fimg191%2F8419%2Ftp0983sample.png&hash=59e638adb825b84271d370bd9d801ff5da0b7f41)

That is a picture of the forum front page with tp 0.983. If you check the Recent Topics block (on the right), the text is organized nicely to me.

The topic title is in the first line. On the line after that, there is "by" then the poster's name , which is bold.
Then the date on the next line.
To me this is much more organized, and easier to navigate.

The layout for tp beta 1.0.* seem to be all the same text and jumbled together with little or no separation. Plus the poster's name isn't bold to easily differentiation them. The poster's name and the topic link are both clickable links. Would be nice to have a way to easily separate the two to help avoid miss clicks.

Can something like that please be implemented in the next tp 1.0* updates? Currently is there a way to change edit the  1.0* text format for that block?
Title: Re: index.template.php Test failed
Post by: ZarPrime on June 21, 2009, 07:41:28 PM
Well, I wanted a link to your site so that I could see it in action.  Did you do as I asked and search the Block Code Snippets Board for a suitable piece of code that will do what you want.  No?  I thought not.

I told you that if you would just look there for some code that would show the recent topics the way you wanted them and couldn't find one, that I would give you the code to do it.  It's easier to help you if you'll do what we ask you to do.

In any case, I'm feeling nice today so put the following code in a php block and I think you will find that this will do what you want it to do.

//Start Here ...
   // is it a number?
//if(!is_numeric($context['TPortal']['recentboxnum']))
// Change 15 in the next line to whatever number of recent posts you want to show
$context['TPortal']['recentboxnum']='15';

// leave out the recycle board, if any
if(isset($modSettings['recycle_board']))
$bb=array($modSettings['recycle_board']);
else
$bb=array();

$what=ssi_recentTopics($num_recent = $context['TPortal']['recentboxnum'], $bb, $output_method = 'array');
// Output the topics
$counter=1; $cmax=count($what);
echo '
<div style="width: 100%; overflow: auto; height: 30ex;">';
foreach($what as $w){
echo '
<div class="smalltext"><a href="'.$w['href'].'">'.$w['short_subject'].'</a></div>
<div class="smalltext">', $txt[525], ' <b>', $w['poster']['link'], '</b></div>
<div class="smalltext">';
if(!$w['new'])
echo '<a href="'.$w['href'].'"><img border="0" src="'.$settings['images_url'].'/'.$context['user']['language'].'/new.gif" alt="new" /></a> ';

echo '['.$w['time'].']
</div>';

if($counter != $cmax)
echo '<hr />';
$counter++;
}
echo '
</div>';


BTW, this is not my code.  I don't even know where I got it at this point, but I had it laying around and tried it in my test site and works fine.

ZarPrime
Title: Re: index.template.php Test failed
Post by: CDesign on June 21, 2009, 08:03:39 PM
Actually I did search. I was very happy to find that an area like that exists. I even saw some code requests. That was very surprising.

The current forum has the maintenance mode on.

Thanks a lot!  :) I will try the code and post back.
Title: Re: index.template.php Test failed
Post by: CDesign on June 23, 2009, 07:17:32 AM
I have tried the code, and it worked fine. Though I am still changing some things around at the forum, it is up and here is a link.

http://sonicgamer.net/forum/index.php

I got another error though.

I went to post an article on the front page, and this came up.

Fatal error: Call to undefined function: preparsecode() in /home/public_html/forum/Sources/TPortalAdmin.php on line 1016
Title: Re: index.template.php Test failed
Post by: Freddy on June 23, 2009, 12:17:36 PM
If it was a BBC article then it's probably this bug :

http://www.tinyportal.net/index.php/topic,29789.0.html

There's a temporary fix from me there until Bloc gets around to sorting it out.
Title: Re: index.template.php Test failed
Post by: CDesign on June 24, 2009, 02:46:14 AM
Thank you very much, this worked fine. =)
Amazing job on the code!

Thanks to all who helped me on this topic.
Title: Re: index.template.php Test failed
Post by: ZarPrime on June 24, 2009, 01:32:07 PM
Glad you got everything all squared away. :up:

I'll mark this solved then.

ZarPrime