Mabinogi World Wiki is brought to you by Coty C., 808idiotz, our other patrons, and contributors like you!!
Keep this wiki going by contributing to our Patreon!
automatic status implementation
Saiyr, JQuery was recommended to me by an experienced web developer. It servers as a fail safe. The CSS rule specifies that the table should be "open". The JQuery changes all those to "close". In this way, people who do not have JS enabled would still be able to see the channel status, and the table would still work for those who have JS enabled. However,m if you can find some way to accomplish this with plain JS, I'd gladly modify the script.
Also, I allow people to edit the table by retrieving and parsing http://wiki.mabinogiworld.com/index.php?title=Wiki_Home/Automated_Server_Status&action=raw
I see. It's a lot harder to do that in plain JS so I guess we can leave it. I will try to get a server admin to add JQuery to the skin so we can take it out of Common.js and save on redundant loading. Though I would be surprised if wiki users had JS disabled because last time I checked (a long time ago), everyone loved having content collapsed by default. It's been too long so I don't remember if MediaWiki does something similar.
Also, I think it would be possible to use a bot to update one template while having users modify another template that overrides the values from the bot. It would be quite magical.
Or, we could do a little hackjob. If we repleaced the jQuery with <script type="text/javascript">document.write("<style type="text/css">blahblahblah</style>");</script>
Where blahblahblah is a CSS rule that sets the statuses to "Show". Kinda hackey, but works.
In addition, your bot idea is pretty much what I do now. Click the edit link below the table. That's the "overrides". Long story short, the script gets the server statues, parses the overrides, and then displays the finished table. So a bot would be redundant ;)
A bot would not require iframes. If your site was somehow compromised, it could affect the entire wiki.
And you're right, you could do something like that. It would be less hackish to not use document.write and insert a script tag in the head, but either way would work.
Well, I disagree that my site going down could affect the entire wiki. All that would happen is the server statuses wouldn't show up. And while you're right that a bot would solve this, here are my issues with a bot:
- Have to actually code the bot
- Have to get the bot approved (?)
- Have to completely recode the script, so instead of displaying the table, it'd display bot-parseable information.
- Have to change all the templates we just set up
- Bot would be *very* error intolerant, even more so than my script is at the present time.
- Bot would compete with human editors
- Bot would then be load-sensitive. The way it is now, the wiki could get so much traffic that it crashes, and my script would still load extremely fast and accuratly (due to cacheing).
- Because of the two above, the bot would spam the recent changes.
So, having outlined that, here's my solution:
- Get the script hosted on the wiki server. This is as easy as IJ copying my script folder somewhere, and updating the link to match.
- Code AJAX to replace iframe. Not necessary, but nicer and more secure.
IJ could implement my solution in about 30 seconds. Another note: The bot wouldn't have to go under the mediawiki umbrella. IJ, correct me if I'm wrong, but you could drop a folder called "ServerStatus" in the same directory as index.php for mediawiki, and that folder is then accessible via http://wiki.mabinogiworld.com/ServerStatus/page.whatever
Compromised does not mean going down. Compromised means hacked.
Having the script hosted on the wiki would be fine too, assuming IJ or another admin was interested in having it there. IJ has been pretty busy though. It would still be load-sensitive too, as the wiki load would make everything on the server slow. I'm guessing they would also be uncomfortable putting a script on the server without reviewing it first.
I think your issues with a bot are somewhat overblown, perhaps because we envision different solutions, but put that aside for now. I would like to see your source, if you don't mind.