Hey guys,
I haven't really done a nice release in a while, So today here is a little filter script. Which will make words like, "tbh" come out as "To be honest".
I know there is easier ways, but you do have to keep rebooting your emulator doing it the other way. Whereas this way you don't!
Anyway here we go;
1) Open stringManager.cs
2) Search for this; "private static string filterCensor;" (with no quotations).
3) Change it to "private static string[] filterCensor;" (with no quotations).
4) Search for this; "public static void initFilter(bool Update)" (with no quotations).
5) Under "swearWords = dataHandling.dColToArray(dCol);" (with no quotations).
6) Add this:
7) Find this:
8) Replace with this:
9) Upload this SQL to your database:
10) Reboot your emulator, When you add data to it, make sure you do :refresh filter (if you have the command).
This does work, If not tell me the error (As I had to guess what I had done cause I had done this ages ago lol).
I haven't really done a nice release in a while, So today here is a little filter script. Which will make words like, "tbh" come out as "To be honest".
I know there is easier ways, but you do have to keep rebooting your emulator doing it the other way. Whereas this way you don't!
Anyway here we go;
1) Open stringManager.cs
2) Search for this; "private static string filterCensor;" (with no quotations).
3) Change it to "private static string[] filterCensor;" (with no quotations).
4) Search for this; "public static void initFilter(bool Update)" (with no quotations).
5) Under "swearWords = dataHandling.dColToArray(dCol);" (with no quotations).
6) Add this:
Code:
DataColumn dCol2;
using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
{
dCol2 = dbClient.getColumn("SELECT wordfilter_censor FROM wordfilter");
}
filterCensor = dataHandling.dColToArray(dCol2);
Code:
Text = Strings.Replace(Text, swearWords[i], filterCensor, 1, -1, Constants.vbTextCompare);
Code:
Text = Strings.Replace(Text, swearWords[i], filterCensor[i], 1, -1, Constants.vbTextCompare);
Code:
CREATE TABLE IF NOT EXISTS `wordfilter` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`word` varchar(100) COLLATE latin1_general_ci NOT NULL,
`wordfilter_censor` varchar(100) COLLATE latin1_general_ci NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=12 ;
10) Reboot your emulator, When you add data to it, make sure you do :refresh filter (if you have the command).
This does work, If not tell me the error (As I had to guess what I had done cause I had done this ages ago lol).