• Welcome to Simple Machines Community Forum. Please login or sign up.
October 25, 2021, 01:25:19 AM

News:

Want to get involved in developing SMF, then why not lend a hand on our github!


Sorted Package Manager Listing

Started by vbgamer45, July 28, 2007, 03:53:42 AM

Previous topic - Next topic

kizer

Yep I had to uninstall this mod to install 1.1.7 went to reinstall it and well it doesn't look like it would be an easy fix.
Own a Jeep? Links4Jeeps.com

Finny

Yes. It looks like it is making a problem upgrading to 1.1.7.

When I go to ujinstall it, I get:

Type Action Description
1. Execute Modification ./Sources/Packages.php Test successful
2. Execute Modification ./Themes/default/Packages.template.php Test successful
3. Execute Modification ./Themes/default/languages/Modifications.english.php Test failed
4. Execute Modification ./Themes/default/languages/Modifications.german.php Test failed
5. Execute Modification ./Themes/default/languages/Modifications.german-utf8.php Test successful
6. Execute Modification ./Themes/default/languages/Modifications.turkish.php Test failed
7. Execute Modification ./Themes/default/languages/Modifications.russian.php Skipping file



So I would have to do a manual uninstall in the ./Themes/default/languages/Modifications.english.php file.

What do I take out or fix to do this?

Thanks.
SMF 1.1.12 MKPortal C1.2 rc1

Finny

I did a manual uninstall of the area of code in ./Themes/default/languages/Modifications.english.php, then I used the package manager to uninstall this. Even though there was still an arror in the ./Themes/default/languages/Modifications.english.php I did it anyway.

I was then able to upgrade from 1.1.6 to 1.1.7 without issue.
SMF 1.1.12 MKPortal C1.2 rc1

Sabre™

November 15, 2008, 03:44:50 AM #23 Last Edit: November 15, 2008, 04:14:26 AM by Sabre™
@ Finny

You will need to manually add the language edits to each of those files which failed.

So you may install the mod even though it says failed...

Then

Add this to the bottom of your  Modifications.english.php  before the  ?>

// --- Sorted Package Manager Listing ---
$txt['pkgstate_cannot_install'] = 'Can\'t install';
$txt['pkgstate_cannot_uninstall'] = 'Installed - Not Uninstallable (no uninstall section for this version of SMF)';
$txt['pkgstate_cannot_uninstall_2'] = 'Installed - Not Uninstallable';
$txt['pkgstate_cannot_upgrade'] = 'Not Upgradeable';
//$txt['pkgstate_install'] = 'Installable';
$txt['pkgstate_install'] = 'Not Installed';
//$txt['pkgstate_uninstall'] = 'Installed - Uninstallable';
$txt['pkgstate_uninstall'] = 'Installed';
$txt['pkgstate_upgrade'] = 'Upgradeable';

$txt['pkgstatehelp_cannot_install'] = 'These mod can not be installed on your current SMF version. You may want to contact the mod author and ask if they can update it to support the latest SMF version.';
$txt['pkgstatehelp_cannot_uninstall_2'] = 'These mods are installed, but the authors were lazy and did not make them uninstallable. You\'ll need to uninstall them manually.';
$txt['pkgstatehelp_cannot_upgrade'] = 'These mods are installed, and an upgrade is available. However, something is preventing the upgrade from working successfully.';
$txt['pkgstatehelp_install'] = 'These mods are not installed. The mods specify that they\'re compatible with your SMF version.';
$txt['pkgstatehelp_uninstall'] = 'These mods are currently installed, and may be uninstalled.';
$txt['pkgstatehelp_upgrade'] = 'A previous version of these mods is installed. Installing the new version will upgrade your current installation.';


Now click [HERE], look where it says  "Download this mod"  to the right, and use the drop menu to select your version of smf(1.1.7), then click submit.
Scroll down till you see the edits for the other failed language files, and make the necessary adjustments to those templates.
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


Blastyr

??? The 1.1.7 patch shouldn't interfere with automated installation with regard to the language files. I installed the patch before I attempted to install this mod. The test of the language file was successful; the test that failed was on "./Themes/default/Packages.template.php". The 1.1.7 patch made a change to this file that makes automated installation of Sorted Package Manager Listing impossible.

Here is the section of the file that is affecting automated installation of the mod:
foreach ($context['available_mods'] as $i => $package)
{
echo '
<tr>
<td>', ++$i, '.</td>
<td>', $package['name'], '</td>
<td>
', $package['version'];

if ($package['is_installed'] && !$package['is_newer'])
echo '
<img src="', $settings['images_url'], '/icons/package_', $package['is_current'] ? 'installed' : 'old', '.gif" alt="" width="12" height="11" align="middle" style="margin-left: 2ex;" />';

echo '
</td>
<td align="right">';

if ($package['can_uninstall'])
echo '
<a href="', $scripturl, '?action=packages;sa=uninstall;package=', $package['filename'], ';sesc=', $context['session_id'], '">[ ', $txt['smf198b'], ' ]</a>';
elseif ($package['can_upgrade'])
echo '
<a href="', $scripturl, '?action=packages;sa=install;package=', $package['filename'], ';sesc=', $context['session_id'], '">[ ', $txt['package_upgrade'], ' ]</a>';
elseif ($package['can_install'])
echo '
<a href="', $scripturl, '?action=packages;sa=install;package=', $package['filename'], ';sesc=', $context['session_id'], '">[ ', $txt['package11'], ' ]</a>';

echo '
<a href="', $scripturl, '?action=packages;sa=list;package=', $package['filename'], '">[ ', $txt['package14'], ' ]</a>
<a href="', $scripturl, '?action=packages;sa=remove;package=', $package['filename'], ';sesc=', $context['session_id'], '"', $package['is_installed'] && $package['is_current'] ? ' onclick="return confirm(\'' . $txt['package_delete_bad'] . '\');"' : '', '>[ ', $txt['package52'], ' ]</a>
</td>
</tr>';
}

echo '
</table>
</td>
</tr>';
}


And here is the operation in install.xml which is failing as a result of changes made in SMF 1.1.7 to that file:
<operation>
<search position="replace"><![CDATA[
foreach ($context['available_mods'] as $i => $package)
{
echo '
<tr>
<td>', ++$i, '.</td>
<td>', $package['name'], '</td>
<td>
', $package['version'];

if ($package['is_installed'] && !$package['is_newer'])
echo '
<img src="', $settings['images_url'], '/icons/package_', $package['is_current'] ? 'installed' : 'old', '.gif" alt="" width="12" height="11" align="middle" style="margin-left: 2ex;" />';

echo '
</td>
<td align="right">';

if ($package['can_uninstall'])
echo '
<a href="', $scripturl, '?action=packages;sa=uninstall;package=', $package['filename'], '">[ ', $txt['smf198b'], ' ]</a>';
elseif ($package['can_upgrade'])
echo '
<a href="', $scripturl, '?action=packages;sa=install;package=', $package['filename'], '">[ ', $txt['package_upgrade'], ' ]</a>';
elseif ($package['can_install'])
echo '
<a href="', $scripturl, '?action=packages;sa=install;package=', $package['filename'], '">[ ', $txt['package11'], ' ]</a>';

echo '
<a href="', $scripturl, '?action=packages;sa=list;package=', $package['filename'], '">[ ', $txt['package14'], ' ]</a>
<a href="', $scripturl, '?action=packages;sa=remove;package=', $package['filename'], '"', $package['is_installed'] && $package['is_current'] ? ' onclick="return confirm(\'' . $txt['package_delete_bad'] . '\');"' : '', '>[ ', $txt['package52'], ' ]</a>
</td>
</tr>';
}

echo '
</table>
</td>
</tr>';
}
]]></search>
<add><![CDATA[
foreach ($available_mods as $i => $package)
{
echo '
<tr>
<td>', ++$i, '.</td>
<td>', $package['name'], '</td>
<td>
', $package['version'];

if ($package['is_installed'] && !$package['is_newer'])
echo '
<img src="', $settings['images_url'], '/icons/package_', $package['is_current'] ? 'installed' : 'old', '.gif" alt="" width="12" height="11" align="middle" style="margin-left: 2ex;" />';

echo '
</td>
<td align="right">';

if ($package['can_uninstall'])
echo '
<a href="', $scripturl, '?action=packages;sa=uninstall;package=', $package['filename'], '">[ ', $txt['smf198b'], ' ]</a>';
elseif ($package['can_upgrade'])
echo '
<a href="', $scripturl, '?action=packages;sa=install;package=', $package['filename'], '">[ ', $txt['package_upgrade'], ' ]</a>';
elseif ($package['can_install'])
echo '
<a href="', $scripturl, '?action=packages;sa=install;package=', $package['filename'], '">[ ', $txt['package11'], ' ]</a>';

echo '
<a href="', $scripturl, '?action=packages;sa=list;package=', $package['filename'], '">[ ', $txt['package14'], ' ]</a>
<a href="', $scripturl, '?action=packages;sa=remove;package=', $package['filename'], '"', $package['is_installed'] && $package['is_current'] ? ' onclick="return confirm(\'' . $txt['package_delete_bad'] . '\');"' : '', '>[ ', $txt['package52'], ' ]</a>
</td>
</tr>';
}

echo '
</table>
</td>
</tr>';
}
}
]]></add>
</operation>


I've installed quite a few mods on the forum I help maintain. This mod would make managing all of those packages a lot easier, but I don't have the proper access to do a manual installation or make a backup before running a hacked installer.

Sabre™

Yep, I had the same issue.
After manually adding the code, I kept getting a session timed out error while trying to do anything in the packages area(adding, uninstalling, delete).
I was too tired to read through the code, and dont know enough to fix it anyway, so I like you, will wait for the solution.

Quote from: TurboTeam on November 15, 2008, 12:04:17 PM
...but I don't have the proper access to do a manual installation or make a backup before running a hacked installer.

Thats a new one for me.
If I have a site, I'd usually enjoy having access to those areas lol

If you can get to your packages/backup  folder, then you can use the   "BEFORE Sorted Package Manager Listing"   backup.
But you need access to that :-\
Good luck :)
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


Blastyr

Quote from: Sabre™ on November 15, 2008, 02:52:32 PM
Quote from: TurboTeam on November 15, 2008, 12:04:17 PM
...but I don't have the proper access to do a manual installation or make a backup before running a hacked installer.

Thats a new one for me.
If I have a site, I'd usually enjoy having access to those areas lol

If you can get to your packages/backup  folder, then you can use the   "BEFORE Sorted Package Manager Listing"   backup.
But you need access to that :-\
Good luck :)
That's exactly my point. If I had access to the files, I could make a backup and put the board into maintenance mode at like 2 AM when no one is on while I monkey around with the code trying to get the mod to work. Then, if I got it to work, I could fix the package and attach it here.

I'm just an admin, though; I'm not the one who started the community. The founder is a friend of mine, but he won't give me or the other admin FTP access, and for good reason. He only gets one FTP account with his hosting plan, and there's more than just this board in his document root.

So, I guess we're both SOL until someone who knows what they're doing can fix this. :-\

HR

December 28, 2008, 05:46:37 PM #27 Last Edit: December 28, 2008, 05:48:37 PM by HR
Modification for 1.1.7 (sessions inserted).
IF its still of interest

I can explain this as simply as possible.. If I do it & implement I guarantee it.
If I do it and you implement it its a crap shoot.

Sabre™

Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


Finny

Worked like a charm.

Thanks for that!

SMF 1.1.12 MKPortal C1.2 rc1

Blastyr


chrisb

error mesaage i am getting once i have edited the Themes/default/Packages.template.php

Template Parse Error!
There was a problem loading the /Themes/default/Packages.template.php template or language file. Please check the syntax and try again - remember, single quotes (') often have to be escaped with a slash (\). To see more specific error information from PHP, try accessing the file directly.

You may want to try to refresh this page or use the default theme.

Parse error: syntax error, unexpected $end in .../Themes/default/Packages.template.php on line 993

984: <input type="text" size="50" name="ftp_path" id="ftp_path" value="', $context['package_ftp']['path'], '" style="width: 99%;" />
985: </td>
986: </tr>
987: </table>
988:
989: <div align="right" style="margin: 1ex;"><input type="submit" value="', $txt['smf154'], '" /></div>
990: <input type="hidden" name="sc" value="', $context['session_id'], '" />
991: </form>
992: </div></div>';

993: ?>

994:
995:

chrisb

December 29, 2008, 09:11:41 PM #32 Last Edit: December 29, 2008, 09:23:07 PM by chrisb
Parse error: syntax error, unexpected $end in /home/cxtxtsju/public_html/forum/Themes/default/Packages.template.php on line 994


Sabre™

Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


chrisb

we are using the updated version from hr and still getting these issues

Sabre™

There were areas you did not edit properly eg.
foreach ($context['available_mods'] as $i => $package)

should be
foreach ($available_mods as $i => $package)

there were a few others, closing brackets etc etc..

try the attached template.
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


HR

Quote from: Sabre™ on December 31, 2008, 11:24:48 PM
There were areas you did not edit properly eg.
foreach ($context['available_mods'] as $i => $package)

should be
foreach ($available_mods as $i => $package)

Hmm using 1.1.7 and not having issue one with the package above. As I pointed out all I added was the session calls

there were a few others, closing brackets etc etc..

try the attached template.

I can explain this as simply as possible.. If I do it & implement I guarantee it.
If I do it and you implement it its a crap shoot.

rexdelsar

I installed this package last year without any problem. Now I tried to upgrade to 1.1.7 but testing failed. I deactivated this package and 1.1.7 patch installed successfully. However,  I am now getting this error in my package manager:

Quote
Fatal error: Cannot use object of type xmlArray as array in /home/upvisaya/public_html/forum/Sources/Load.php(1731) : eval()'d code on line 436

My package manager does not load properly now and I can't even reactivate this package because of that. What did I do wrong?

Sabre™

Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


[unplugged]

January 14, 2009, 10:21:14 PM #39 Last Edit: January 14, 2009, 10:47:43 PM by SunKing
This mod seems to work good in SMF 2 Beta 4 with only minor manual edits (mainly due to it searching for $strings that have been renamed in 2b4). ;) The only thing I see that doesn't seem to be working correctly is the alternating background colors for the list items.

Nice mod!


EDIT: It seems that the links, [ Apply ][ List ] [ Delete ] etc, aren't working correctly and so send you back to main page.
99% working then. ;)
« Next Edit: Tomorrow at 08:34:45 PM by SunKing »   <---- « someone stole my sig... :o »



Advertisement: