is there any code people can not add more then 1 image

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    is there any code people can not add more then 1 image

    is there any code people can not add more then 1 smiles in there messages for example if the text is hi to all :D :D :D :D ... only 1 smile will show not the other 3 anybody know how to code this ?

    #2
    Try sumfin like this, its from the chat.php on my lavalair edit:

    $text = parsepm($text, $sid);
    $nos = substr_count($text,"<img src=");
    if($nos>1){
    echo "Sorry you can only use 1 smiley per message.<br/>";
    }

    Comment


      #3
      i didn't actually get you i don't use lavalair script

      Comment


        #4
        sorry i just read it again.. it'l be the same type of thing tho wont it? but u need a function to take out the extra smileys from the text after uv found more than 1...

        Comment


          #5
          hey bro its working fine just need to edit the text thats all anyways do you know enable disable code for smiley how to user will able to enable disable there smiley so that they will not get any smiley

          Comment


            #6
            Originally posted by bijaybd View Post
            hey bro its working fine just need to edit the text thats all anyways do you know enable disable code for smiley how to user will able to enable disable there smiley so that they will not get any smiley
            Just code it yourself heres a sketch


            function getsmilies($sid){
            $usr = mysql_fetch_array(mysql_query("SELECT dissml FROM ibwf_users WHERE uid='".uidfromsid($sid)."'"));

            if($usr[0]=='1'){
            ////Run the code that str_replaces text to smilies
            }else{
            ///return the original text as is
            }

            }

            Comment


              #7
              i have done it bro anyways thanks again

              Comment

              Working...
              X