Jump to content
MakeWebGames

Recommended Posts

Posted

Re: Crystals V2

Nope there is no quick way...

i actually have to do this on my new game easiest way i think of doing this is to go through the database and change every database field that is crystals to (in my case) Tobacco (notice the capital letter on Tobacco)

then use your file editing software and use the find and replace option...

eg:

find crystals

replace with

Tobacco (again notice the capital T)

find crystals will find Crystals and crystals

ie it will find crystals in sql queries and also find Crystals where you may have a capital letter on displaying the word in game...

this saves you having to manually go through and change them...

remember though Gold Bars will not work with this method as its two words, so either manually go through all script files or change to just Gold

Posted

Re: Crystals V2

To those who say "no easy way." i say bull :)

 

function buffer($content)    {
   $content = preg_replace('~(crystals)~i','Tobacco', $content);
   return $content;
}
ob_start('buffer');

 

Add that to globals.php and see everything from:

Crystals, crySTALS, crystals, CRYSTALS, crystAlS change to Tobacco. :)

Enjoy ;)

Posted

Re: Crystals V2

 

To those who say "no easy way." i say bull :)

 

function buffer($content)    {
   $content = preg_replace('~(crystals)~i','Tobacco', $content);
   return $content;
}
ob_start('buffer');

 

Add that to globals.php and see everything from:

Crystals, crySTALS, crystals, CRYSTALS, crystAlS change to Tobacco. :)

Enjoy ;)

Its quicker just simply returning it.

function buffer($content) {
   return $content = preg_replace('~(crystals)~i','Tobacco', $content);
}
Posted

Re: Crystals V2

hmm i stand part corrected i have just tried this...

however in globals.php it doesn't work in global_function.php it part works...

it doesn't change all instances of it, it has left links in explore as crystal temple etc and a few other places...

also i am assuming you still need to change the database fields from crystals to tobacco...

Posted

Re: Crystals V2

From what Haunted Dawg said you can just use the one below, same as his one but i just removed the (s) now it works fine.

function buffer($content)    {
   return preg_replace('~(crystal)~i','Tobacco', $content);
}
ob_start('buffer');

 

Add that in header right under the <?php

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...