PDA

View Full Version : Smiley-Style text replacement on output only. (Like "replacements" but not quite)


Milorad
07-12-2004, 06:02 PM
I know this has been asked before... I've read numerous threads about it but there still isnt something like that freely available.

I know for sure you'd get 50 installs on the first day alone, just judging by how many similar unsolved threads there are on this subject.

What I'm proposing is a hack which added a single table and an admin interface with two fields (much like the who's online search spider admin option) that way you could associate a word with a replacement string (HTML enabled).

This would need to perform the 'replacement' only for the output stage

This would turn:
"Why don't you install the Blah hack" into
"Why don't you install the Blah (#) hack"

... on the fly, and without affecting post editing.

An option to list forums in which this was active would be GREAT.

The Smileys work very much like this already.... perhaps hijacking a smiley category would be possible? though the 10 char smiley-text limitation would have to be overcome.

Please guys, think about this seriously, it would be a FABULOUS addition to those with any kind of news displayed, and especially to those with articles on their sites.

Thanks for your consideration.


...

Before people suggest using replacement variables, this is very problematic, and even if you avoid thread titles, you still have the problem of not being able to edit your posts properly.

Andreas
07-12-2004, 06:05 PM
So this replacement should only take place in posts, right?

Milorad
07-12-2004, 06:10 PM
well yes but actually only on the OUTPUT of posts.... rather than in the post itself.... exactly like smileys.

":" + ")" is replaced with " :) " (HTML image code) but only at the output stage.

Andreas
07-12-2004, 06:14 PM
OK ... let's see how long this will take. Shouldn't be very difficult.

Milorad
07-12-2004, 06:18 PM
Fantastic! Thank you for your reply Kirby :)

Please also include a forumID check, if its not asking too much, that would allow it to be used on news by nowhere else, for instance.