Mabinogi World Wiki is brought to you by Coty C., 808idiotz, our other patrons, and contributors like you!!
Want to make the wiki better? Contribute towards getting larger projects done on our Patreon!

automatic status implementation

automatic status implementation

Edited by author.
Last edit: 16:31, 10 September 2011

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.

Hengsheng120·TALKCONTRIBS15:56, 10 September 2011

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

Xcelled19416:13, 10 September 2011
 

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.

Hengsheng120·TALKCONTRIBS16:31, 10 September 2011
 

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)

Xcelled19417:17, 10 September 2011
 

We're talking about Server security risks, though. Interesting article.

Xcelled19418:28, 11 September 2011
 

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.

Saiyr22:25, 11 September 2011
 

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.

Saiyr22:29, 11 September 2011
 

Think you can script one, Saiyr? ;)

 

Given sufficient time and motivation.

Saiyr23:19, 11 September 2011
 

Is it possible to use javascript to do something similar?

 

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.

Saiyr23:37, 11 September 2011
 

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

Xcelled19407:35, 12 September 2011

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.

Saiyr10:24, 12 September 2011
 

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 ;)

Xcelled19411:19, 12 September 2011
 

A bot would not require iframes. If your site was somehow compromised, it could affect the entire wiki.

Saiyr11:40, 12 September 2011
 

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.

Saiyr11:43, 12 September 2011
 

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

Xcelled19412:34, 12 September 2011
 

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.

Saiyr12:49, 12 September 2011
 

Sure. Do you mind if I email it to you? I'd rather not post it on the wiki, for obvious reasons.

Xcelled19412:55, 12 September 2011
 

No problem. me at saiyr.org

Saiyr13:04, 12 September 2011

Sent

Xcelled19413:15, 12 September 2011