Jump to content
MakeWebGames

[MCCODES V2] small mod change link name when file name has changed


Recommended Posts

Posted

This is quite useful for those that have the same url link on multiple files and want to change the name of the actual file name.

example there are various files that can use the viewuser.php but if we changed the filename to say look_at_user.php then we would have to change every files so it matches the new link..

what this trick does is it lets you change the config.php file so every link for look_at_user.php is automatically updated on every file that calls for the file..

so for arguments sake we want to add a new staff.php name which we will call staff_new_name.php so open up config.php

after the cron code add a , at the end and add

$staff_file = 'staff_new_name'

now open up mainmenu.php and under the <?

add

include "config.php";

and change the url for the staff link to

if your using the echo statement

echo "Staff Menu";

or this if your using the print statement

print "Staff Menu

";

 

 

change name of the file as well so it reflects to staff_new_name.php << this is just an example name obviously...

 

repeat the procedure for all the new file names you want to create.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...