|
 |
|
09-04-2008
|
#121 (permalink)
|
|
Administrator
Join Date: Jun 2008
Posts: 376
Wiki Edits: 919
iTrader: ( 0)

IGN: Medoria
Class: Sorceress
Level: 2X
Guild: Kitty Empire
|
Quote:
Originally Posted by OrangeJuice
Thanks Adipiciu for the reply.
>.<; I ran into some other problems.
http://i224.photobucket.com/albums/d...OCTEA/wiki.jpg
^ So here I was trying to edit the Category page so that it said Category: TO Use. Is where I put the TO in the picture the correct place for the namespace?
2nd question: I was looking through the Masterlist of Nameless namespaces. I can't seem to find which are the ones needed to be changed. The ones with -TO by them are already labled Tricksdter Online and then the ones that are just bolded all seem to lead to a deleted page. It was deleted by Chesters, so I assume it's supposed to be, or am I suppose to recreate it? o-o..
|
First off, yes, that TO link looks correct
Secondly, that list is horribly outdated so i wouldn't go by it. ^^"
__________________
Faith, Trust, and Pixie Dust!
 
|
|
|
09-04-2008
|
#122 (permalink)
|
|
VIP
Join Date: Jun 2008
Posts: 62
Wiki Edits: 14,836
iTrader: ( 0)
|
Quote:
Originally Posted by Medoria
sounds awesome adipiciu. I look forward to seeing the code.
|
The bot is done! How to name the bot? I want to make a special page on the wiki to report malfunctions or new ideas and also a thread on the forum.
Info about the code.
The code is made in php. The code behind does all the work (connecting, reading, editing, saving, etc) and all you need to to is adding new function like this, where $content contains tha code from the page. You will work only with the content of the page and search for particular strings to delete, rename or add new content. Example (the only function available for now):
function renameCategory($content){
$content = trim($content);
//This can be done probably using just one regular expression, but didn't had time to do it ^^
$pattern = '|(\[\[:Category (?!TO)|';
$replacement = "[[:Category:TO ${2}";
$content = preg_replace ($pattern, $replacement, $content);
$pattern1 = '|(\[\[Category (?!TO)|';
$replacement1 = "[[Category:TO ${2}";
$content = preg_replace ($pattern1, $replacement1, $content);
return $content;
}
I started the bot and i'm monitoring for the next 1h. It checks 3 pages per minute so it doesn't load the server.
Last edited by adipiciu; 09-04-2008 at 08:34 PM.
|
|
|
09-05-2008
|
#123 (permalink)
|
|
VIP
Join Date: Jun 2008
Posts: 62
Wiki Edits: 14,836
iTrader: ( 0)
|
I have named the bot MOG Bot and it can do the following things:
1. Renaming categories (e.g. Category:Use to Category:TO Use)
2. Renaming templates (e.g. {{Use to {{TO Use)
3. Fixing links (adding the NAMESPACE to the links) (the hardest part)
The bot is now running for tests and will do aprox 800 edits. The total amount of pages that need to be fixed is ~10,000.
I still wait for new functions and how to implement them like correcting the template names (from {{TO Cards to {{TO Card or from Category:TO Equip to Category:TO Equipment)
I didn't implement the renaming for images from Image: to Image:TO because i don't know the status of uploaded images.
I'm waiting for responses.
PHP Code:
function maintenance($content){
$content = trim($content);
$pattern = '|(\[\[:Category:)(?!TO)|';
$replacement = "[[:Category:TO ${2}";
$content = preg_replace ($pattern, $replacement, $content);
$pattern1 = '|(\[\[Category:)(?!TO)|';
$replacement1 = "[[Category:TO ${2}";
$content = preg_replace ($pattern1, $replacement1, $content);
$pattern2 = '|(\{\{)(?!TO\s)(\w+)(?=\s)|';
$replacement2 = '{{TO ${2}';
$content = preg_replace ($pattern2, $replacement2, $content);
$pattern3 = '/(\[\[)(?!:|Image|Trickster|Category|\{\{)([^|\]]*)(\]\])/';
$replacement3 = '[[{{NAMESPACE}}:${2}|${2}]]';
$content = preg_replace ($pattern3, $replacement3, $content);
$pattern4 = '/(\[\[)(?!:|Image|Trickster|Category|\{\{)([^|]+)([|])([^|]+)(?=\]\])/';
$replacement4 = '${1}{{NAMESPACE}}:${2}${3}${4}';
$content = preg_replace ($pattern4, $replacement4, $content);
return $content;
}
|
|
|
09-07-2008
|
#124 (permalink)
|
|
VIP
Join Date: Jun 2008
Posts: 155
Wiki Edits: 1,053
iTrader: ( 0)
Class: GeassGundam
|
So should I wait until bots clean up before editing or will it edit the stuff again if i change an edited page?Also it changed some {{Trickster Online:???}} into templates should i changed them into templates instead or keep it like before i don't know.
|
|
|
09-07-2008
|
#125 (permalink)
|
|
VIP
Join Date: Jun 2008
Posts: 62
Wiki Edits: 14,836
iTrader: ( 0)
|
Quote:
Originally Posted by Dread
So should I wait until bots clean up before editing or will it edit the stuff again if i change an edited page?
|
You can edit when you want. You don't need to wait for the bot.
Quote:
Originally Posted by Dread
Also it changed some {{Trickster Online:???}} into templates should i changed them into templates instead or keep it like before i don't know.
|
Corrected. If you know where the bot changed the {{Trickster Online:???}} to template, change it back. They aren't many places i think.
|
|
|
09-08-2008
|
#126 (permalink)
|
|
Hurricane Kick
Join Date: Jun 2008
Posts: 96
Wiki Edits: 7,446
iTrader: ( 0)
Class: Cat
|
Your bot just roxx and saves the day, simply! Thats amazing how much work it has done in a fistfull of days.
Btw the search engine needs a little fix somehow, is it scheduled ? It's quite a useful feature, I use it often and I'm not the only one. Thx.
Now just a suggestion, if some "little helpers" are still willing to give a hand with the wiki: we need a few volunteers to update the pictures. Yea it's easy, but that's a lot of work. You can get most of them via the old wiki, or using Vix if you feel like it. "Together everyone wins" like they said ;o
|
|
|
09-08-2008
|
#127 (permalink)
|
|
MMOG's #1 Idol
Join Date: Jun 2008
Location: San Jose, CA
Posts: 2,137
Wiki Edits: 60
iTrader: ( 0)

IGN: NoeJeko
Class: Warrior
Level: 23
Guild: Kirameki
|
The new revision of the site has a Google search across all aspects of the site. On the wiki in particular, there's still a link to the wiki search if people want to just search the wiki. If there are any tweaks I can do to the wiki search engine, please let me know.
|
|
|
09-09-2008
|
#128 (permalink)
|
|
Reality to tear apart.
Join Date: Jun 2008
Location: USA
Posts: 1,049
Wiki Edits: 5,338
iTrader: ( 1)
IGN: Chesters
Class: Messer Forscher
Level: 40
Guild: SOS Brigade/Empire
|
The search doesn't need a 'fix', it's just slightly inconvenient at the time if you aren't aware of the search preferences. (what those boxes are at the bottom of the search, and in your preferences)
However, what Noe said ^ should remove this problem.
|
|
|
09-09-2008
|
#129 (permalink)
|
|
VIP
Join Date: Jul 2008
Posts: 85
Wiki Edits: 956
|
Quote:
Originally Posted by Sirnaq
Your bot just roxx and saves the day, simply! Thats amazing how much work it has done in a fistfull of days.
Btw the search engine needs a little fix somehow, is it scheduled ? It's quite a useful feature, I use it often and I'm not the only one. Thx.
Now just a suggestion, if some "little helpers" are still willing to give a hand with the wiki: we need a few volunteers to update the pictures. Yea it's easy, but that's a lot of work. You can get most of them via the old wiki, or using Vix if you feel like it. "Together everyone wins" like they said ;o
|
(^o^) Yeah, very nice bot, Adi! (o-o;; it sounds so confusing to me lol..).
>.<;Um for re-uloading the pictures, do we load the pictures on our photobucket first? We won't have a problem with bandwith (ex. when the image won't show due to exceeded bandwith.)?
|
|
|
09-09-2008
|
#130 (permalink)
|
|
Reality to tear apart.
Join Date: Jun 2008
Location: USA
Posts: 1,049
Wiki Edits: 5,338
iTrader: ( 1)
IGN: Chesters
Class: Messer Forscher
Level: 40
Guild: SOS Brigade/Empire
|
Quote:
Originally Posted by OrangeJuice
(^o^) Yeah, very nice bot, Adi! (o-o;; it sounds so confusing to me lol..).
>.<;Um for re-uloading the pictures, do we load the pictures on our photobucket first? We won't have a problem with bandwith (ex. when the image won't show due to exceeded bandwith.)?
|
All images must be saved to the Wiki. (the image links are already there if the image doesn't exist)
|
|
|
09-09-2008
|
#131 (permalink)
|
|
Hurricane Kick
Join Date: Jun 2008
Posts: 96
Wiki Edits: 7,446
iTrader: ( 0)
Class: Cat
|
Quote:
Originally Posted by NoeJeko
The new revision of the site has a Google search across all aspects of the site. On the wiki in particular, there's still a link to the wiki search if people want to just search the wiki. If there are any tweaks I can do to the wiki search engine, please let me know.
|
About the search engine (the one that is already implemented), the problem is that we deleted a few of the "original" pages, those without the "Trickster Online:" prefix. As a result, just try to search for " Confession Letter": it will work and show you the page. Now with " Abiox". The page doesn't exist anymore. However, if you type " Trickster Online:Abiox", it's pretty long and inconvenient (and I doubt random users will think of adding the prefix in their research), still it works (and hopefully such capricious pages are a minority)...
Uploading images to the wiki is a piece of cake: the "Upload file" option is at the bottom of the left menu. Just don't forget to add the prefix before any image filename:
* Confession_Letter.gif -> Bad!!
* TO_Confession_Letter.gif -> Good
|
|
|
09-09-2008
|
#132 (permalink)
|
|
Reality to tear apart.
Join Date: Jun 2008
Location: USA
Posts: 1,049
Wiki Edits: 5,338
iTrader: ( 1)
IGN: Chesters
Class: Messer Forscher
Level: 40
Guild: SOS Brigade/Empire
|
You need to check the boxes at the bottom of the search page. The search works, however, most people don't realize you need to specifiy namespaces. (you can set the defaults of your search in your preferences on the wiki)
However, again, this won't be a problem later anyway.
|
|
|
09-09-2008
|
#133 (permalink)
|
|
VIP
Join Date: Jul 2008
Posts: 85
Wiki Edits: 956
|
Quote:
Uploading images to the wiki is a piece of cake: the "Upload file" option is at the bottom of the left menu. Just don't forget to add the prefix before any image filename:
* Confession_Letter.gif -> Bad!!
* TO_Confession_Letter.gif -> Good
|
Alright, I did these for the filename. Should I add TO_ in front of the source (aka when I save an image to my comp. to upload), as well? (I did it for some, but only for the ones that didn't have an image at all).
|
|
|
09-09-2008
|
#134 (permalink)
|
|
Reality to tear apart.
Join Date: Jun 2008
Location: USA
Posts: 1,049
Wiki Edits: 5,338
iTrader: ( 1)
IGN: Chesters
Class: Messer Forscher
Level: 40
Guild: SOS Brigade/Empire
|
Quote:
Originally Posted by OrangeJuice
Alright, I did these for the filename. Should I add TO_ in front of the source (aka when I save an image to my comp. to upload), as well? (I did it for some, but only for the ones that didn't have an image at all).
|
The name of your image (on your computer) does not affect anything when you upload it to the Wiki. ~ (besides extension, but that's not exactly the 'name' of it anyway)
|
|
|
09-09-2008
|
#135 (permalink)
|
|
VIP
Join Date: Jul 2008
Posts: 85
Wiki Edits: 956
|
Oh ok. Thanks very much for quick reply =]
|
|
|
09-09-2008
|
#136 (permalink)
|
|
어머나!
Join Date: Jun 2008
Location: NYC
Posts: 2,097
Wiki Edits: 1,881
| |