Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG  Not logged in ELOG logo
icon3.gif   require smileys to have whitespace on either side?, posted by Glenn Horton-Smith on Sat Mar 4 05:17:14 2006 
    icon2.gif   Re: require smileys to have whitespace on either side?, posted by Stefan Ritt on Mon Mar 6 13:50:07 2006 
       icon3.gif   Provide option to require smileys to be bracketed a la ELCode?, posted by Glenn Horton-Smith on Mon Mar 6 20:51:57 2006 
Message ID: 1760     Entry time: Mon Mar 6 20:51:57 2006     In reply to: 1751
Icon: Idea  Author: Glenn Horton-Smith  Author Email: gahs@phys.ksu.edu 
Category: Request  OS: All  ELOG Version: 2.6.1-1668 
Subject: Provide option to require smileys to be bracketed a la ELCode? 

Stefan Ritt wrote:

Glenn Horton-Smith wrote:
It would be nice if elog would only interpret something as a smiley if it is surrounded by whitespace. It can be particularly annoying that an 8 followed by a right paren becomes a "cool" smiley -- e.g., a parenthetical reference to event eighteen (18) becomes mangled... [That was "18" inside the parens.] ...


Interpreting smileys only if they are surrounded by whitespace does not solve the problem completely. It will solve it for (1\8), but not if you have (1, \8) (1, 9) in your text. So it's not a good solution. If you have problems with simleys, I would post my text in plain mode, or surround your numbers with [code]...[/code] tags...


Hmm, you're right. But I like EL Code, and I don't want to give it up just because of the smileys! A better solution would be to provide an option, which when set, would require smileys to be in brackets, e.g., [\8)] would become the cool smiley [8)], rendered without surrounding brackets if the option was set.

I actually just spent some time I didn't really have and modified my copy of elogd to see if it could be done and would work as intended. Eureka, it works! The modification implements an option "use bracketed smileys" which, if set to 1, causes the editor smiley bar to insert smileys with the square brackets around them and causes rsputs_elcode() to only substitute for smileys if there are square brackets around them, suppressing the square brackets.

I like this feature. Maybe others would like it too. I have a patch file (diff -cbw) w.r.t. svn version 1663 if you're interested.
ELOG V3.1.5-fe60aaf