Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> How To's
Author Message
Mesum
Useless



Joined: Aug 23, 2002
Posts: 213
Location: Chicago

PostPosted: Sun Dec 05, 2004 7:21 pm Reply with quote

I was just wondering if I could only strip out the admin.php's code from mainfile.php and make it work with 7.4, would that work or do I have to add more things? Also, as many of you know, NSN modules and few other modules have admin area in module too, would that affect too or those files need to change as well?
 
View user's profile Send private message Visit poster's website
BobMarion
Former Admin in Good Standing



Joined: Oct 30, 2002
Posts: 1037
Location: RedNeck Land (known as Kentucky)

PostPosted: Sun Dec 05, 2004 9:36 pm Reply with quote

Since I know NSN better then anyone Wink Most NSN Modules with admin.php files in the module's directory use modules.php for access and not admin.php . So on them it shouldn't matter what you name your admin.php file Smile

Onto your other question, let's take a leason from ChatServ and add:
Code:
$admin_file = "admin";
to your config.php file. Then go thru each admin file searching for:
Code:
admin.php
and replacing it with:
Code:
".$admin_file.".php
You will need to make note to add $admin_file to each routine's global line and for routine's without a global line you will need to add:
Code:
global $admin_file;


Yes, this is a long process with some trial and error to make sure you caught all the admin.php's and globaled all the $admin_file's. Remember that line you added to your config.php file, here's where it comes in: say you rename your admin.php file to upyours.php then you would change that new line to say:
Code:
$admin_file = "upyours";


Hope this little primer helps you out Smile

_________________
Bob Marion
Codito Ergo Sum
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Send e-mail Visit poster's website
Mesum







PostPosted: Mon Dec 06, 2004 2:43 am Reply with quote

This might be a long process but at least I won't have to worry about my site breaking everytime I try to update to the new version.

This should be adopted to all versions of PHP-Nuke and I am going to use that for my 7.4 (maybe soon-to-be yet-another-modded-version) PHP-Nuke.

Thanks so much for your help man.
 
Mesum







PostPosted: Mon Dec 06, 2004 1:42 pm Reply with quote

Here is another question.
Can't we just add the globals in mainfile.php and use it instead of editing all these files? from my understand, all files to include mainfile.php anyways, no?
 
PHrEEkie
Subject Matter Expert



Joined: Feb 23, 2004
Posts: 358

PostPosted: Mon Dec 06, 2004 11:37 pm Reply with quote

That's another really annoying difference between phpBB and Nuke. phpBB holds almost every necessary variable in these nice and tidy little arrays, while Nuke throws variables every which way and with total disarray. While conceivably adding something to mainfile should make it available almost anywhere, be prepared to track down about 10 thousand places where it mysteriously isn't available.

We spend a lot of time trying to figure ways of hiding this or hiding that from hackers, but when you think about it (and the popularity of phpBB standalone), don't you wonder why phpBB doesn't have to hide or rename its Admin area? Makes you wonder whether it's a sound direction to try and hide something versus just securing it to begin with, eh?

PHrEEk
 
View user's profile Send private message
Mesum







PostPosted: Tue Dec 07, 2004 2:08 am Reply with quote

Well it can be done if FB stops thinking about his bank (Club) and spend some good time at first fix all the bugs and then correct them but as we all know this is not going to happen and we'll have with whatever we get and this fix it or pick a version for ourselves and stick to it, just like I am planning right now.
 
BobMarion







PostPosted: Thu Dec 09, 2004 12:34 am Reply with quote

Mesum wrote:
This might be a long process but at least I won't have to worry about my site breaking everytime I try to update to the new version.

This should be adopted to all versions of PHP-Nuke and I am going to use that for my 7.4 (maybe soon-to-be yet-another-modded-version) PHP-Nuke.

Thanks so much for your help man.

I'm waiting for ChatServ to finish off his 2.8 Patch set and then I'll be modding the PHP-Nuke packages on my site to have the $admin_file value in them. It will make a little more work for me when CS releases new patches but I do file compares on each and every file to see which ones change anyway Smile
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> How To's

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 ©