Yes, I realize that TP likely installs cleanly on a FRESH install of SMF, but how many people actually DO that? A lot of us are undoubtedly trying TP out on an old, cluttered forum.
PLEASE don't tell us to uninstall *everything* to get TP to go, as that sounds like Microsoft's standard tech-support reply of "Well, when was the last time you wiped your harddrive and re-installed Windoze?" I've heard that so many times I want to barf or go postal. :knuppel2:
Anyhoo, I see one OVERLY BROAD 'search for' in the install mod that caused my problem, and anyone that's added a mod that includes a new menu / context item will have the same install failure as well. It complains about $themedir/index.template.php
<search for>
if (in_array($context['current_action'], array('search', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm')))
</search for>
<replace>
if (in_array($context['current_action'], array('search', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm', 'forum', 'tpadmin')))
</replace>
I have arcade and chat actions in that string, so here's a VERY simple work-around that is solid and will still uninstall correctly:
<search for>
if (in_array($context['current_action'], array('search',
</search for>
<add after>
'forum', 'tpadmin',
</add after>
(gotta watch that you add the space in there after 'search',_)
This isn't a bug, but it's the likely cause of installation failures that complain about $themedir/index.template.php. I spotted the overly broad search string almost instantly when I started looking for the source of the installation error. As a side note, that's the same style of insert that the arcade mod does in that 'current action' array.
BTW, you folks DO know that the 'BoardMod' format has been deprecated for over 2 years now, don't you? Since you're using the old package format, NONE of the various 'Package Parser' programs can be used to tell us what needs to be done to modify any individual custom theme that we're running. When I toss TinyPortal at the package parsers, I get an amazingly unhelpful page with the install comments, and no theme edit instructions. :(
Actually, SMF Arcade does add a space after "search,". Many older versions did not. If you check the code in install.xml in the arcade package you'll see it.
<file name="$themes_dir/default/index.template.php">
<operation>
<search position="before"><![CDATA[ if (in_array($context['current_action'], array('admin', ]]></search>
<add><![CDATA['managegames', 'arcadesettings', 'arcadecategory', ]]></add>
</operation>
<operation>
<search position="before"><![CDATA[ if (in_array($context['current_action'], array('search', ]]></search>
<add><![CDATA['arcade', ]]></add>
I'm Head Admin there and asked that this be changed quite awhile ago for the same reasons.
The problem is that other mods that do this and when you install it afterward you'll get a "test failed". You'll also have uninstall issues if the space is not there.
The .mod format will be supported in SMF for a long time to come, so I wouldn't worry about that. If you are wondering what to modify, why not look at our instructions on our Doc board that have been linked to so many times?
Modification Instructions (http://docs.tinyportal.co.uk/index.php?topic=140)
And while it may have been suggested here or there to uninstall mods, it is usually only when the user doesn't want to do a manual install or something. We already have instructions on our doc board to tell you to do the exact same thing you have posted.
Test FAILED on Installation? (http://docs.tinyportal.co.uk/index.php?topic=32)
IchBin, I'm with you on your first reply... ANYTHING that reduces failures during installation cuts down on the number of junk posts (like mine!)
To be more to the point, I'm quite comfortable hacking PHP. MANY, MANY of the forum Admins I've talked to are *not*, nor should they attempt manually inserting the updates without a basic familiarity with coding. That makes reducing the number of installation failures more important. I don't know how many times I've seen someone say "I had an error during the package install and told it to go ahead, and now my forum is dead. HELP!"
Save early, save often...
And yes, I'd already seen the doc board and manual install instructions, thanks. However, the manual instructions don't specify WHICH version of TinyPortal they are for, so I ignored the specific details of that doc, as I wasn't sure they were up to date.
The docs clearly state which version they are for. Iif you pick the TP 1.0.5 menu link it is for TP 1.x.x. If you pick the TP ).9.8 menu link it is for that version. Seems clear as glass to me.
Hi ArrEff,
Quote from: ArrEff on July 11, 2009, 06:13:03 AM
IchBin, I'm with you on your first reply... ANYTHING that reduces failures during installation cuts down on the number of junk posts (like mine!)
To be more to the point, I'm quite comfortable hacking PHP. MANY, MANY of the forum Admins I've talked to are *not*, nor should they attempt manually inserting the updates without a basic familiarity with coding. That makes reducing the number of installation failures more important. I don't know how many times I've seen someone say "I had an error during the package install and told it to go ahead, and now my forum is dead. HELP!"
Save early, save often...
Of course, you are correct, to a point. Our ultimate goal is to make it so that TP can be installed easily by anybody, but sometimes that is just not possible. In many cases, installation failure is caused by another SMF Mod getting in the way, or by a new user trying to install TP while in a custom theme. When a user of TP has no problems with their install, it certainly makes for less headaches for us. The system will never be perfect and there will always be someone who has permission problems on their server or something else that causes problems.
In most cases, we don't consider posts by a new user to be "junk posts" for this reason, especially if their post can help another user at some time in the future that is having the same problems.
ZarPrime
Quote from: ArrEff on July 11, 2009, 06:13:03 AMMANY, MANY of the forum Admins I've talked to are *not*, nor should they attempt manually inserting the updates without a basic familiarity with coding. That makes reducing the number of installation failures more important.
Since they are running a website they will have to learn sooner or later. That is their job.
Quote from: ArrEff on July 11, 2009, 06:13:03 AMI don't know how many times I've seen someone say "I had an error during the package install and told it to go ahead, and now my forum is dead. HELP!"
Save early, save often...
If they backup/save, as I'm sure they've been told and have seen many times, they can recover. It's not an exact science but it works if you take the time to read and follow instructions.
True, they may not know and have to learn but we all did...even you.