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

Started on the old forum in May 2009 · view the original in the archive · old links redirect here

6 replies · 487 views · started 17 years ago · 1 min read

3 participants
bijaybd Developer · 178 posts #1

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

pimpin Junior · 20 posts #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. "; }

bijaybd Developer · 178 posts #3

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

pimpin Junior · 20 posts #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...

bijaybd Developer · 178 posts #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

CreativityKills Lead · 833 posts #6

bijaybd wrote: 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 }

}

bijaybd Developer · 178 posts #7

i have done it bro anyways thanks again

Write your reply now; next you create a free account (or sign in) and it is posted right away. Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close