Loading...

Top
PFQ Banner

This is PokéFarm Q, a free online Pokémon collectables game.

Already a user? New to PFQ?

Scriptable Forum Posts

Forum Index > Core > Suggestions > Rejected >

Ganorith's AvatarGanorith
Ganorith's Avatar
Suggestion Title: Scriptable Forum Posts Suggestion Summary: What I suggest is a watered down version of JavaScript (or something similar) that we can use in forum posts to create more awesome things. This could also potentially let us have limited access to the PFQ API/Database to make requests to sally to get information to put into a forum post. Positive points:
  • Allows users to dynamically change BBCode/HTML (depending on how this would be implemented) to do things that CSS on it's own would find difficult, AKA cooler templates. Some examples of this includes: - Dynamic table sorting based off of inventory numbers - Forms in which you can enter text then output BBCode (for things like shops) (Basically, think of whatever JavaScript can do and apply it here)
  • Could potentially allow users to get information on their account, such as Delta Points, and also can be used to future-proof for similar variables in the future
  • Could lead to teaching people about the basics of JavaScript, similar to how people can learn CSS on the site.
  • Could greatly shorten the amount of code it gets to get the same effect as doing things with only CSS/BBCode
Negative points:
  • This would lead to a ton of new coders who aren't familiar with JS making non/poorly functional code, which could lead to problems.
  • This could potentially lead to a harsh strain on Sally (à la Summary of Rejected Submissions > Field Counting BBCode) if the API calls aren't ratelimited, and if the ratelimits are high enough then there would eventually be little to no point in using the API things, leaving only templates to be used for this.
Reason For Consideration: While it is possible to do a lot of fairly neat things with CSS if you can think about it the right way, a lot of the things you can do are either impossible with CSS alone or require so much additional CSS/BBCode that it's most likely not worth the effort. By being able to introduce a script to a forum post, templates can be a lot more open to being able to do more things without having to jump through hoops to try and sometimes get the effect you want with only CSS. Also, considering we already have a couple people making Userscripts to add features to PFQ, we would definitely have a couple people on standby ready to teach people how to use such a feature.
PFP/BG/IMG from Golden Sun Code Collection
Mirzam's AvatarMirzam
Mirzam's Avatar
My knee jerk reaction is "very no". You can do some nasty stuff with JavaScript, and I think that striking the balance between useful enough to bother with and safe will be difficult if not impossible. And I'm not sure you can sandbox it like you can CSS without doing something weird like making every post its own iFrame. As for the API portion, that's kind of what many of the BBCode tags already are? It's not like we'll get direct db access so I can't see how APIs are any easier to implement/maintain than additional BBCode tags. Let's take just one concept: loops. I doubt there's a programmer out there who hasn't accidentally written at least one infinite loop. But loops are so useful - so you wouldn't want to just remove them. Do you only allow for loops? Do you limit how many loops can be nested? Someone will probably still find a way to crash browsers - and that's just one operation.
selocon's Avatarselocon
selocon's Avatar
Not only can you do some nasty stuff, but have you ever been on a site as active as PFQ with large amounts of JS running? It slows everything down to a crawl and the lag is outrageous. As Tarashia said, browsers could easily be made to crash with one post.
Avatar by the best lizard ever, Bananalizard #standwithEMS #ELM
Score: 0
Niet [Adam]'s AvatarNiet [Adam]
Niet [Adam]'s Avatar
Yeah, it's unfortunate, but this one's a hard "no." But if there are specific things you want, they might be possible.
Clip from Pokémon anime, re-lined by me
-- OMNOMNOM!
Featured story: Injustice Feedback welcome!

Cannot post: Please log in to post

© PokéFarm 2009-2024 (Full details)Contact | Rules | Privacy | Reviews 4.6★Get shortlink for this page