FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » FUDforum Suggestions » Maximum smileys
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Maximum smileys [message #13872 is a reply to message #13870] Wed, 29 October 2003 22:37 Go to previous messageGo to previous message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma:
Senior Member
Administrator
Core Developer
AzaToth wrote on Wed, 29 October 2003 17:02

ok, but perhaps just render 3 smileys and skip render the rest like:
Embarassed Embarassed Embarassed ·:blush:

so the users realise that a lot of smileys is not necicary Smile

And I'm thinking, why traverse?
why not:
<?php
$smileys = preg_match_all("#:(.*?):#is", $msg);
if($smileys > (3 + (strlen($msg)-$smileys)/$smileys)) {
print "Too many smileys, try again";
}
?>



Because preg_match_all() while shorter is actually much much slower. Smileys are rendered by a single strtr() function there is no way to render only 'some' smileys.


FUDforum Core Developer
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Disable Tree View
Next Topic: default theme css split
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Tue Nov 26 02:36:59 GMT 2024

Total time taken to generate the page: 0.04276 seconds