Changing Filenames/urls

Forum
Last Post
Threads / Messages

MikiHeart

Premium Member
Premium Member
Joined
Apr 26, 2009
Messages
186
Points
0
Age
32
Mysidian Dollar
13,385
I want to customize my script and relabel a lot of things. Like the "myadops" url and page becomes "mypets"

As far as I can tell, I would have to change the file names, the class controller, class view, and classes as well so that they all match.

But I'm wondering how hard it would be? or if there's an easier way?

Some examples that I want to change are like the following:

myadops to mypets
promo to redeempet
adopt to aquirepets
 
Well changing these names wont really be very difficult, although you also need to make sure to change the link url for dropdown menu, which can be done through ACP.
 
Most of them should be easy, but I worry about the 'adopt' one, because there are so many classes to go with it. I don't want things to go wonky.
 
I suggest making a copy of myadopts and viewmyadoptsview.php first, but -

Three easy steps, only edit two lines of code, change no class files:

1) Open myadopts.php. Save it as your new name, in my case, yournovu.php. At the very top of the page, change "class MyadoptsController extends AppController" to "class YournovuController extends AppController". Save.

2) Open view/myadoptsview.php. Save it as your new name to match the above, in this case, yournovuview.php. At the top of the page, change "class MyadoptsView extends View" to "class YournovuView extends View". Save.

3) Go into the lang folder, find lang_myadopts.php, and rename the file to match your changes. In this case, it becomes lang_mynovu.php.

Done. You'll immediately be able to visit your new page in your browser. Don't forget to change the links!**

*There are also links inside that page. Open up what was myadoptsview.php and change all instances of the word 'myadopts' to your new page name. There are also many other pages on the site that may link there, such as poundview.php's "Nevermind" option.

I suggest getting a nice text editor/IDE like Sublime Text. It's capable of making 'Projects' that can contain entire folders of files, then, 'search all files' will let you search them all for a specific word or line. Windows is also capable of searching through all files for text, but it's not enabled by default.
 
Last edited:
Thank you Kyttias, you're such a big help *.*
I use php designer for coding. The search feature is really good. I can search an entire document, or every single one open and get multiple results. It's how I went through the lang files to change 'adoptsables' to 'pets' There's also a replace feature, but I wanted to make sure it was done right, and not replace things that weren't meant to be replaced.
 
Good! I'm glad you've already got something fancy like that. I feel bad for people who don't. There are around 30 occurrences of 'myadopts' across 13 files, from what my editor is telling me.
 
Last edited:

Similar threads

Users who are viewing this thread

  • Forum Contains New Posts
  • Forum Contains No New Posts

Forum statistics

Threads
4,280
Messages
33,132
Members
1,603
Latest member
Monako
BETA

Latest Threads

Top