Simple Machines Community Forum

Archived Boards and Threads... => Archived Boards => Install and Upgrade Help => Topic started by: Harro on June 09, 2005, 07:27:57 PM

Title: upgrade when you've got many mods installed
Post by: Harro on June 09, 2005, 07:27:57 PM
As far as I know, you loose all mods when you use the upgrade.
So my question is:
will there ever be a mod-like upgrade package that allows you do upgrade everything manual, just like installing a mod manual.
I know that phpBB has this, but it would be great if SMF would also get this.
Cuz for the moment, I don't feel like installing all my mods again, just to upgrade to 1.0.4 , and maybe in a few weeks again to 1.1
Title: Re: upgrade when you've got many mods installed
Post by: Oldiesmann on June 09, 2005, 07:37:38 PM
If you use the "patch" in the package manager (go to the package manager and read the entire page... You should see some stuff at the top about a patch), you shouldn't run into any problems as that will make the appropriate changes directly to the files instead of just replacing the files.

When you decide to upgrade to 1.1 (either by becoming a charter member or when the public beta is released), you will have to live without your mods for a bit or wait a little while to upgrade, because there are so many changes in 1.1 that it is unlikely many mods from 1.0.x would work with 1.1 without some changes.
Title: Re: upgrade when you've got many mods installed
Post by: Harro on June 09, 2005, 07:41:19 PM
Problem is that I can't use the package manager due to safemod restrictions.
And I did try the tool that somebody posted here. Didn't work for me.

Somebody did gave me a tip how I could solve this problem, but it's not sure that that would work, and I still have to learn a little more php for that :p
Title: Re: upgrade when you've got many mods installed
Post by: Oldiesmann on June 09, 2005, 07:58:16 PM
Tell your host to look at http://us4.php.net/manual/en/features.safe-mode.php#ini.open-basedir - that setting is much more useful than Safe Mode... :)
Title: Re: upgrade when you've got many mods installed
Post by: Harro on June 09, 2005, 08:02:02 PM
I'll take a look at that. thanks  :)

btw, sollution he gave me was to write a script to change the permissions using this
http://be2.php.net/system
Still have to try that though.
Will probably be something after my exams are over.
Title: Re: upgrade when you've got many mods installed
Post by: Oldiesmann on June 09, 2005, 08:23:27 PM
Yeah, you could do that, but you would have to run that every time you download a new package and/or theme... open_basedir makes it so you don't really need to have safe mode enabled in the first place (open_basedir prevents PHP from opening files or directories that are located outside of the specified directories).
Title: Re: upgrade when you've got many mods installed
Post by: Grudge on June 11, 2005, 06:39:34 AM
Also Harro, if you do want to install the update manually simply download the "package" update:

mods.simplemachines.org/downloads/smf_1-0-4_package.tar.gz

Extract it onto your own PC and make the changes documented in the .mod file. .mod files are *very* easy to understand.
Title: Re: upgrade when you've got many mods installed
Post by: Harro on June 11, 2005, 05:52:33 PM
Woohoo, thanks!
That was exactly what I was looking for :)
But this file isn't included in the regular zip file is it?
Cuz I looked there, but couldn't find it.
But thanks, Now I can start upgrading (and hopefully won't mess up any of the mods).
Title: Re: upgrade when you've got many mods installed
Post by: Grudge on June 12, 2005, 07:16:25 AM
No, this file is a "special" file which is only for use with the package manager. The files on the download page here are for "full" upgrades (Where you lose your mods and need to reinstall them all), the package I linked to above is for the "patch" upgrade - which shouldn't affect other mods.
Title: Re: upgrade when you've got many mods installed
Post by: Harro on June 12, 2005, 07:18:01 AM
I see..
Thanks for it, I'll start upgrading as soon as my exams are over ;)
Thanks for the help.
Title: Re: upgrade when you've got many mods installed
Post by: rbrown3rd on June 17, 2005, 12:00:32 PM
I have a few mods in my style.css and a custom logo, not major mods but I do not want to lose them.  In my package manager I have the following:

Modification Packages
      Mod Name    Version     
1.    SMF 1.0.4 Update Package    1.0.4    [ Apply Mod ] [ List Files ] [ Delete ]

Can I just apply the mod?  Do I have to do anything in advance of applying the mod or is that it? 

Thanks.  I have never used the package manager so this is a bit new to me.

I used the "install patch" option on my other smaller and less used site and it worked perfectly.  I then tried it on my heavily used site that has thousands of users and is on a different server.  It returned the following:

2: fopen(): SAFE MODE Restriction in effect.

I have no idea what this means.

Bob
Title: Re: upgrade when you've got many mods installed
Post by: Harro on June 17, 2005, 12:40:31 PM
there are many topics about that error.
I also had it, and none of the ways to fix it worked for me.
So I installed the whole thing maually. Didn't take very long...
Title: Re: upgrade when you've got many mods installed
Post by: rbrown3rd on June 17, 2005, 03:12:18 PM
Thanks Harro.  I guess I am going to have to do that but I am concerned about losing all of my posts and user accounts as well as the few mods that I have made.  Do I use the upgrade package or the update package?  As I understand it if you have any mods you should use the upgrade package.   Upload all to the server overwriting the existing files, (man that scares me to death), and then run the upgrade script?  I suppose the script will give you some options to keep certain things as they are such as the style.css and any custom graphics?  I am being overly cautious because this particular site has a ton of users on it and I don't want to cause them any problems.
Title: Re: upgrade when you've got many mods installed
Post by: [Unknown] on June 17, 2005, 03:16:57 PM
The database contains all your important data.  If you're worried, just make a backup.  If anything happens, we can help you restore it.

Upload the upgrade package is the safest route, and only uninstalls your mods.  Everything else stays the same - your posts won't even notice.

You shouldn't change the default theme; if you haven't, uploading the new templates won't affect anything.

-[Unknown]
Title: Re: upgrade when you've got many mods installed
Post by: rbrown3rd on June 17, 2005, 03:49:05 PM
That is encouraging and thanks for the offer of support.  SMF has served us well over at http://fs-freeflow.com/ and I am just being careful not to interupt the users.  the only changes I made were:

A color tweak in style.css and I have the backup for that.
A custom logo to replace smflogo.gif and I have a backup for that.

If you look at that site you will see that we are running it with MKPortal.  That makes a very nice combination.  We love SMF.  Thanks so much for contributing such a wonderful package to the online community.

Sorry for asking such basic questions but I am pretty new at administering a forum with a large number of users like this so I am being very careful. 

Thanks very much for your support,

Bob http://fs-freeflow.com/

PS..... because of the Safemod on situation I guess the package manager will not work for me at all on that particular site.  Right?
Title: Re: upgrade when you've got many mods installed
Post by: Harro on June 17, 2005, 05:16:24 PM
And if you want to keep your mods, download this:
mods.simplemachines.org/downloads/smf_1-0-4_package.tar.gz
And just do it all manually :)
Title: Re: upgrade when you've got many mods installed
Post by: rbrown3rd on June 18, 2005, 11:18:30 PM
Quote from: Harro on June 17, 2005, 05:16:24 PM
And if you want to keep your mods, download this:
mods.simplemachines.org/downloads/smf_1-0-4_package.tar.gz
And just do it all manually :)
Wow, that is great.  Thanks so much.  I downloaded and unpacked the tar file.  In it I see two files, an XML file, and a Mod file.  I have them, what do I do now?  Sorry for such basic questions but this is my first upgrade.
Title: Re: upgrade when you've got many mods installed
Post by: Harro on June 19, 2005, 03:14:10 AM
You open the .mod file with notepad or something like that. and then just follow the instructions.
open files, search for certain parts of the file, and replace them, or add piece of code below it,...
Title: Re: upgrade when you've got many mods installed
Post by: rbrown3rd on June 19, 2005, 05:15:27 PM
Quote from: Harro on June 19, 2005, 03:14:10 AM
You open the .mod file with notepad or something like that. and then just follow the instructions.
open files, search for certain parts of the file, and replace them, or add piece of code below it,...
Great.  I understand and can handle that. 
Title: Re: upgrade when you've got many mods installed
Post by: rbrown3rd on June 20, 2005, 10:26:56 AM
Firstly, I downloaded and backed up my entire forum folder.  Then I went in and edited each of the following files by hand:

Quote$boarddir/changelog.txt
$boarddir/changelog-themes.txt
$boarddir/index.php
$sourcedir/Admin.php
$sourcedir/Subs.php
$themedir/Admin.template.php
$themedir/languages/Admin.english.php
$themedir/Profile.template.php

The results were less than satisfactory.  After doing the edits by following the actions in the MOD script to find text strings and replace or add new text my forum would not run.  I then uploaded each of the above files from my backup and I am back and running again.  Am I doing this correctly?  I am sure that doing it by hand I probably made an error somewhere.  I am going to do it again using a copy of the files I downloaded to backup the forum and then upload those into the correct location in my online folder. 

I think all of this would have been unnecessary had the provider I am using not had the Safemod on.  But, since the server and the provider are donated to me I cannot complain about it.  I will assume that I made a typo somewhere even though I was doing a copy and paste from the Mod script into the files. 

As support for my confidence would one of you SMF experts comment on my approach?

Thanks so much,

Bob
Title: Re: upgrade when you've got many mods installed
Post by: rbrown3rd on June 20, 2005, 11:23:38 AM
I am working offline with a copy of the files from my working forum.  When I look for the string to be replaced that begins with:
Quote'~\[/quote\](?:<br />)?~i' => isset($disabled['quote']) ? '</div>' : '</div>',

I find no such entry.  My forum is running ok but now I am really worried about it. 
Title: Re: upgrade when you've got many mods installed
Post by: Harro on June 20, 2005, 07:42:54 PM
Which file is it?
If you can't find the exact same thing, thin you'll have to look for something similar.
It can all depend of the template eg you are using, or other mods you've installed.
Try to look for  isset($disabled['quote'])   for example, and see if you can find that.
Title: Re: upgrade when you've got many mods installed
Post by: rbrown3rd on June 21, 2005, 09:51:19 AM
Ok, I do have four instances of that sub string in the subs.php file.  Now to find which one is the correct one.  If only I knew what I was doing here.  LOL.  ;D

I am running SMF embedded in a MKPortal and the only mods were to make it run inside the MKPortal.  I checked and those mods did not involve removing anything with any strings like that. 

Thanks for your patience with me on this.  I just am not a programmer.

Bob
Title: Re: upgrade when you've got many mods installed
Post by: rbrown3rd on June 21, 2005, 10:02:20 AM
Ok, I think I have located it as:

Quote~\[/quote\](?:<br />)?~i' => isset($disabled['quote']) ? '</div>' : '</div>',
         // An image.  Width and height can be are optional.
         '~\[img(\s+width=([\d]+))?(\s+height=([\d]+))?\s*\](?:<br />)*(.+?)(?:<br />)*\[/img\]~ei' => isset($disabled['img']) ? '\'$5\'' : '\'<img src="$5" alt=""\' . (\'$2\' != \'\' ? \' width="$2"\' : \'\') . (\'$4\' != \'\' ? \' height="$4"\' : \'\') . \' border="0" />\'',
Title: Re: upgrade when you've got many mods installed
Post by: rbrown3rd on June 21, 2005, 11:46:36 AM
After learning that there might be slight variations on the strings to be replaced or located for adding before or after in the mod file I think I have all of the edits done.   I guess I have to place the forum in maitenance mode to FTP the edited files up?  Maybe I will wait until a slack time like the early morning hours to try them out. 
Title: Re: upgrade when you've got many mods installed
Post by: Harro on June 21, 2005, 05:11:10 PM
You don't have to put it in maintance, but you can do it.
If you got any erros, just post them here :)
Title: Re: upgrade when you've got many mods installed
Post by: rbrown3rd on June 22, 2005, 05:33:11 PM
Thank you very much for your support Harro.  I will post here if I have any problems and probably will if it goes well too.  I am sure it will be the latter.
Title: Re: upgrade when you've got many mods installed
Post by: rbrown3rd on June 23, 2005, 05:49:09 AM
FTP'ed my modded files this morning.  Ran the site and qot:

Quote
Parse error: parse error, unexpected '~', expecting ')' in /home3/sub007/sc11567-AWTY/www/freeflow/forum2/Sources/Subs.php on line 914
Panicked.
Reloaded old files.
Site seems to be back to normal. 

Advice?