Advertisement:

Author Topic: Sorted Package Manager Listing  (Read 40199 times)

Offline kizer

  • Jr. Member
  • **
  • Posts: 383
  • Gender: Male
    • Links4Jeeps.com
Re: Sorted Package Manager Listing
« Reply #20 on: November 08, 2008, 03:01:19 AM »
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

Offline Finny

  • Semi-Newbie
  • *
  • Posts: 18
  • Gender: Male
Re: Sorted Package Manager Listing
« Reply #21 on: November 13, 2008, 01:34:23 PM »
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

Offline Finny

  • Semi-Newbie
  • *
  • Posts: 18
  • Gender: Male
Re: Sorted Package Manager Listing
« Reply #22 on: November 14, 2008, 04:22:56 PM »
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

Offline Sabre™

  • SMF Hero
  • ******
  • Posts: 2,527
  • Gender: Male
  • IF IT AINT BROKE, I CAN FIX IT TILL IT IS!!
Re: Sorted Package Manager Listing
« Reply #23 on: November 15, 2008, 03:44:50 AM »
@ 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  ?>
Code: [Select]
// --- 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.
« Last Edit: November 15, 2008, 04:14:26 AM by Sabre™ »
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


Offline Blastyr

  • Semi-Newbie
  • *
  • Posts: 10
Re: Sorted Package Manager Listing
« Reply #24 on: November 15, 2008, 12:04:17 PM »
??? 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:
Code: [Select]
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:
Code: [Select]
<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.

Offline Sabre™

  • SMF Hero
  • ******
  • Posts: 2,527
  • Gender: Male
  • IF IT AINT BROKE, I CAN FIX IT TILL IT IS!!
Re: Sorted Package Manager Listing
« Reply #25 on: November 15, 2008, 02:52:32 PM »
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.

...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 ;)


Offline Blastyr

  • Semi-Newbie
  • *
  • Posts: 10
Re: Sorted Package Manager Listing
« Reply #26 on: November 15, 2008, 07:48:25 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. :-\

Offline HR

  • Jr. Member
  • **
  • Posts: 321
  • Gender: Male
  • There is only ONE 'Reality!
    • http://only-harshreality.com/forums/
Re: Sorted Package Manager Listing
« Reply #27 on: December 28, 2008, 05:46:37 PM »
Modification for 1.1.7 (sessions inserted).
IF its still of interest
« Last Edit: December 28, 2008, 05:48:37 PM by HR »
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.

Offline Sabre™

  • SMF Hero
  • ******
  • Posts: 2,527
  • Gender: Male
  • IF IT AINT BROKE, I CAN FIX IT TILL IT IS!!
Re: Sorted Package Manager Listing
« Reply #28 on: December 28, 2008, 06:51:00 PM »
Good stuff HR.
Thanks mate :)
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


Offline Finny

  • Semi-Newbie
  • *
  • Posts: 18
  • Gender: Male
Re: Sorted Package Manager Listing
« Reply #29 on: December 29, 2008, 12:32:44 PM »
Worked like a charm.

Thanks for that!

SMF 1.1.12 MKPortal C1.2 rc1

Offline Blastyr

  • Semi-Newbie
  • *
  • Posts: 10
Re: Sorted Package Manager Listing
« Reply #30 on: December 29, 2008, 01:46:53 PM »
Nice. Thanks, man. :)

Offline chrisb

  • Jr. Member
  • **
  • Posts: 214
Re: Sorted Package Manager Listing
« Reply #31 on: December 29, 2008, 08:54:09 PM »
error mesaage i am getting once i have edited the Themes/default/Packages.template.php

Code: [Select]
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:

Offline chrisb

  • Jr. Member
  • **
  • Posts: 214
Re: Sorted Package Manager Listing
« Reply #32 on: December 29, 2008, 09:11:41 PM »
Parse error: syntax error, unexpected $end in /home/cxtxtsju/public_html/forum/Themes/default/Packages.template.php on line 994

« Last Edit: December 29, 2008, 09:23:07 PM by chrisb »

Offline Sabre™

  • SMF Hero
  • ******
  • Posts: 2,527
  • Gender: Male
  • IF IT AINT BROKE, I CAN FIX IT TILL IT IS!!
Re: Sorted Package Manager Listing
« Reply #33 on: December 29, 2008, 10:34:17 PM »
Are you usin [THIS] updated package?
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


Offline chrisb

  • Jr. Member
  • **
  • Posts: 214
Re: Sorted Package Manager Listing
« Reply #34 on: December 31, 2008, 09:57:52 PM »
we are using the updated version from hr and still getting these issues

Offline Sabre™

  • SMF Hero
  • ******
  • Posts: 2,527
  • Gender: Male
  • IF IT AINT BROKE, I CAN FIX IT TILL IT IS!!
Re: Sorted Package Manager Listing
« Reply #35 on: December 31, 2008, 11:24:48 PM »
There were areas you did not edit properly eg.
Code: [Select]
foreach ($context['available_mods'] as $i => $package)
should be
Code: [Select]
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 ;)


Offline HR

  • Jr. Member
  • **
  • Posts: 321
  • Gender: Male
  • There is only ONE 'Reality!
    • http://only-harshreality.com/forums/
Re: Sorted Package Manager Listing
« Reply #36 on: January 01, 2009, 12:03:49 AM »
There were areas you did not edit properly eg.
Code: [Select]
foreach ($context['available_mods'] as $i => $package)
should be
Code: [Select]
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.

Offline rexdelsar

  • Newbie
  • *
  • Posts: 2
Re: Sorted Package Manager Listing
« Reply #37 on: January 14, 2009, 03:48:31 AM »
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?

Offline Sabre™

  • SMF Hero
  • ******
  • Posts: 2,527
  • Gender: Male
  • IF IT AINT BROKE, I CAN FIX IT TILL IT IS!!
Re: Sorted Package Manager Listing
« Reply #38 on: January 14, 2009, 10:30:08 AM »
Are you using [THIS] version?
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


Offline [unplugged]

  • Sophist Member
  • *****
  • Posts: 1,312
  • Gender: Male
  • I know just enough to get me in trouble...
    • Empire of the Sun
Re: Sorted Package Manager Listing
« Reply #39 on: January 14, 2009, 10:21:14 PM »
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. ;)
« Last Edit: January 14, 2009, 10:47:43 PM by SunKing »
« Next Edit: Tomorrow at 08:34:45 PM by SunKing »   <---- « someone stole my sig... :o »