Stunts Forum

Stunts - the Game => Stunts Forum & Portal => Topic started by: dreadnaut on August 21, 2013, 11:52:25 AM

Title: More news tweaks?
Post by: dreadnaut on August 21, 2013, 11:52:25 AM
I have another idea on the back of my mind, but I think I need feedback before I touch the relative code.

At the moment one can write anything in the news box. This is nice (images, videos!), although it can lead to serious trouble. I have already fixed the nasty kind (http://xkcd.com/327/), but accepting html and javascript is still a problem.

I'd like to filter more stuff then, but without cutting useful features. I was thinking about:

Title: Re: More news tweaks?
Post by: zaqrack on August 21, 2013, 02:05:55 PM
thanks for the added security!

Since the shoutbox has very limited use, disabling HTML would not be a real issue IMHO. Formatiing is not that necessary either.
auto-links to track pages is space technology :)
Title: Re: More news tweaks?
Post by: Duplode on August 21, 2013, 08:08:31 PM
Quote from: dreadnaut on August 21, 2013, 11:52:25 AM
I'd like to filter more stuff then, but without cutting useful features. I was thinking about:

  • filter all html stuff (I can either remove it silently or make it appear as inactive code)
  • accept links and do smart things: e.g., if one sends a youtube link, the video gets embedded, same with images.

    Would that work? Is there anything else that would make sense?

    Maybe some text formatting such as *bold text* or ZCTxxx becoming links to the track page?
Sounds perfect to me. On seeing this topic my gut reaction was "add a Markdown parser"; however, Zak is right in saying that formatting is inessential - little "smart things" like the ones you suggested are far more interesting.
Title: Re: More news tweaks?
Post by: dreadnaut on September 13, 2013, 05:41:18 PM
Space technology, here we go! 8)   Things that are recognised in the shoutbox:

* stuff like www.something.abc and http/https links become clickable
* links to youtube videos (youtube.com or youtu.be) become tiny video players
* links to an image will show the image itself
* links to forum topics will have the topic title pulled from the database!
* ZCT<number> become links to the track results
* *something* and _something_ can be used to emphasize words

Other suggestions?
Title: Re: More news tweaks?
Post by: Duplode on September 13, 2013, 05:55:52 PM
Quote from: dreadnaut on September 13, 2013, 05:41:18 PM
* links to forum topics will have the topic title pulled from the database!

That is really cool! 8)
Title: Re: More news tweaks?
Post by: dreadnaut on September 13, 2013, 06:30:34 PM
Aaaand... smileys! All those available in the forum  :o  :P  :-X  ;D
Title: Re: More news tweaks?
Post by: alanrotoi on September 13, 2013, 10:15:20 PM
Nice work! Thanks!
Title: Re: More news tweaks?
Post by: zaqrack on September 14, 2013, 02:45:20 PM
Mr Awesome!!!! many thanks!
Title: Re: More news tweaks?
Post by: CTG on September 14, 2013, 03:11:01 PM
Quote from: zaqrack on September 14, 2013, 02:45:20 PM
Mr Awesome!!!! many thanks!

That was a coming out, huh?
Title: Re: More news tweaks?
Post by: Friker on September 14, 2013, 04:46:17 PM
please do no add a feature "- something -" resulting in "somthing" (most hated thing in gtalk..) i also do not like *sth* but it is more tolerable than that dashed thing :-/
Title: Re: More news tweaks?
Post by: dreadnaut on September 14, 2013, 11:56:14 PM
I can probably remove *something* and leave only _something_, since bold does not actually work at that text size.
Title: Re: More news tweaks?
Post by: dreadnaut on September 17, 2013, 06:01:48 PM
Quote from: dreadnaut on September 14, 2013, 11:56:14 PM
I can probably remove *something* and leave only _something_, since bold does not actually work at that text size.

The above, and I added a list of the available shortcuts to the post news (http://zak.stunts.hu/index.php?page=postnews) page.
Title: Re: More news tweaks?
Post by: dreadnaut on November 14, 2013, 06:14:33 PM
ZCTnnn track names now work in the admin news too. Also, fixed markdown not being markdowned in the archives.