PHP Web Host - Quality Web Hosting For All PHP Applications Clan Themes! We make clans look good!!
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
Author Message
SuperCat
Hangin' Around


Joined: Nov 27, 2004
Posts: 37
Location: MN

PostPosted: Sun Nov 28, 2004 8:27 pm Reply with quote Back to top

For those that distribute scripts, you will want to update them for v7.6, but want to keep them backward compatible with previous versions of nuke. This is how you do it for the admin URL redirect that hides the admin.php filename:

Lets say you have this coded:
Code:
<a target='_blank' href='http://www.google.com'>Google</a>


This will tell google that the referring page is:
Code:
http://www.mysite.com/admin.php


Were not worried that google knows what our admin file has been renamed to, but we are worried about those hackers finding out. We need to hide them. This is what you need to do:

Near the top of the admin file, put:
Code:
global $hideURL;

$sqlV = "select * from ".$prefix."_config";
$resultV = $db->sql_query($sqlV);
$confV = $db->sql_fetchrow($resultV);
if ($confV['Version_Num'] >= '7.6') {
   $hideURL = 'index.php?url=';
} else {
   $hideURL = '';
}


At the top of each function in the admin file, put:
Code:
global $hideURL;


Where you have every outbound URL, add to the beginning of it:
Code:
".$hideURL."


Like this:
Code:
<a target='_blank' href='".$hideURL."http://www.google.com'>Google</a>


note the single quote before the double quote

This adds index.php?url= before the outbound URL if the version of nuke is 7.6 or higher. For older versions, nothing is added, and the URL looks as it has always looked. An added bonus for this is, if a user now is using nuke less that 7.6, updates your script, then in the future, updates to 7.6 or higher, your script will automatically start using the URL redirect protection.
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.

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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum