Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> NukeSentinel™
Author Message
lochball
New Member
New Member


Joined: Dec 03, 2004
Posts: 17

PostPosted: Wed Dec 29, 2004 7:05 am Reply with quote

Hi Nukers.

Due to the fact that I have local and remote sites to maintain, it's always a bit tricky to cope with different upgrading work on both sites. So I decided to simply copy all files on both sites where means or infos should be present to get the knowledge if local or remote. I therefore introduced the following changes on my sites (7.5, 2.8, 2.1.3) this morning:

a) Set a file 'local.php' only on local site in 'root/includes' e.g. with 'touch local.php'

b) Made two config-blocks in 'root/config.php' for distinguishing local/remote matters as follows:

Quote:
if ($forum_admin == 1) {
if (file_exists("../../../includes/local.php")) $blah_local = 1;
} else {
if (file_exists("./includes/local.php")) $blah_local = 1;
}

if($blah_local) {

...here are local config settings

} else {

...here are remote config settings

}


c) In 'root/includes/sentinel.php' I made the following changes:

old:
Quote:
if($remote=="none") { die("Invalid IP used"); }


new:
Quote:
if (!$blah_local) {
if($remote=="none") { die("Invalid IP used"); }
}


d) Finally I get the version number of the new NukeSentinel upgrade files no longer from the DB and placed it instead in 'root/language/sentinel/lang-english.php' with a new variable as follows:

Quote:
define ("_AB_VERSION","2.1.3");


All calls to the version numbers within the code have been replaced accordingly.

With these changes I only have to copy the new files in case of an upgrade on my local or remote sites without touching the DBs an leaving thme as they are now - have not longer to think 'What to change differently on both sites?'.

Next step is to write a script for simply copying all the new stuff from the download directory to the local and remote machines.

So, how is it?

Greetings.

_________________
Unihockey is much more than only a new sporting activity... 
View user's profile Send private message Visit poster's website
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 17077

PostPosted: Wed Dec 29, 2004 7:56 am Reply with quote

Quote:
With these changes I only have to copy the new files in case of an upgrade on my local or remote sites without touching the DBs an leaving thme as they are now - have not longer to think 'What to change differently on both sites?'.

I'm following everything except this statement. DB changes have to be made regardless. So how does this keep you from doing the DB changes?
 
View user's profile Send private message
lochball
PostPosted: Wed Dec 29, 2004 8:32 am Reply with quote

Oops, you are fully right: I missed to run the 'nsnst.php' script for updating the DBs on both sites... Wink
 
Raven
PostPosted: Wed Dec 29, 2004 8:36 am Reply with quote

Laughing I thought you had found a magical script that worked by osmosis ROTFL Thanks again!
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> NukeSentinel™

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©