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
I think a bot is the only way to quickly implement it by yourself (you can be the one hosting the bot). you can just use the source from existing bots, and change the urls so it is compatible with this wiki. I don't think a check frequency of every 5~20 minutes puts much strain on the server. it only edits the page when the status doesn't match the ones hosted on your website. if anything goes wrong the bot account can be blocked. Many large wikis have bots implemented for automatic features. for example, on the Runescape wiki, there are automatic Grand Exchange (item trading) prices listed for items by bots that check the runescape website for price changes. I would say they are pretty reliable when made correctly.
Ahh, but the thing is, a bot is unnecessary in this case. Really, all we need to do is replace the current table with <iframe src="...."></iframe> and we'll have exactly what we're looking for, in an easy way that can be reverted at any time...
but this would mean that users would not be able to edit the table. it would also require the installation of the widgets extension by irjustman, since the iframe extension has security problems.
A) Users CAN edit the table, much like they do now. Did you see the edit link below my table? B) iFrame is HTML. It is _NOT_ an extention. There is NO add on needed here. iFrames are not a security risk either, s they're all client sided... (see http://www.w3schools.com/tags/tag_iframe.asp)
Xcelled194: Can you please not load JQuery on your site? I'm being nitpicky but you aren't using it for any good reason that I can see. The one thing I see that uses it should be a CSS rule. The main page triggers two JQuery loads because it is also embedded in MediaWiki:Common.js. Btw, I also agree with Ikkisuki about IFrames, but I don't care as much about that.
Also I saw that you mentioned using AJAX instead of an iframe. If you don't know how to do this and need help, I am happy to, but it sounds like there is no quorum on that solution either.
I work fulltime so I work on other things when I feel like it. Like I completely rewrote the timers code so it could be used as a library for other people this weekend. There will always be a server component to anything that checks server health because it involves opening TCP or UDP connections. Plus there needs to be a server to prevent Nexon's servers from being pinged every time someone loads the wiki main page. You can use JS tricks to get JSON from this middle-man server and get around the iframe security issue, but there will always be a server, unless you use a bot that pushes data to the wiki. The downsides to that were already discussed to some degree, but I am not sure how Xcelled194 is allowing people to edit the status either.
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.