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 #13868 is a reply to message #13867] Wed, 29 October 2003 21:45 Go to previous messageGo to previous message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma:
Senior Member
Administrator
Core Developer
I am not really sure it is worth the effort, if you don't want smilies you can turn them off. If 1-2 users abuse the feature you can use permission system to take away that ability from just those users.

Counting smileys is incredibly expensive, it would require traversal of the entire message for every smiley in the following manner:
<?php
$smiley_count
= 0;

foreach (
$smiley as $v) {
      
$p = 0;
      while ((
$p = strpos($msg, $v, $p)) !== false) {
            ++
$p;
            ++
$smiley_count;
      }
}
?>


I just can't justify this sort of performance inhibitor.


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: Fri Nov 22 04:38:29 GMT 2024

Total time taken to generate the page: 0.03784 seconds