turning ascii smilies into smiley.gif PHP
1
Name:
Anonymous
2008-12-03 5:22
Does this look right?
$comment = str_replace(":D", "<img src='myimage.gif' alt=':D' />");
It will be for the comment system seen here.
http://www.plentyoftorrents.com/flsh/animation/princess-1
Also would this replace any :D that is already posted or just when someone makes a post after its put in.
2
Name:
Anonymous
2008-12-03 5:23
No.
3
Name:
Anonymous
2008-12-03 5:27
Whats wrong with it?
4
Name:
Anonymous
2008-12-03 5:33
>>3
1. It's in PHP
2.
:DOING IT WRONG
5
Name:
Anonymous
2008-12-03 5:37
why not use ☺ (U+263A) or ☻ (U+263B) instead?
6
Name:
Anonymous
2008-12-03 5:38
hax my ASCII anus
7
Name:
Anonymous
2008-12-03 6:03
>>6
Ify ou payme enough ;)
8
Name:
Anonymous
2008-12-03 7:50
Warning: Wrong parameter count for str_replace() in /home/content/c/u/c/cuchullainn/html/flsh/animation/comments/comments_show.php on line 98
Warning: Wrong parameter count for str_replace() in /home/content/c/u/c/cuchullainn/html/flsh/animation/comments/comments_show.php on line 98
Warning: Wrong parameter count for str_replace() in /home/content/c/u/c/cuchullainn/html/flsh/animation/comments/comments_show.php on line 98
Warning: Wrong parameter count for str_replace() in /home/content/c/u/c/cuchullainn/html/flsh/animation/comments/comments_show.php on line 98
9
Name:
sage
2008-12-03 8:04
SAGE .
10
Name:
sage
2008-12-03 8:15
okay
11
Name:
Anonymous
2008-12-03 9:05
Here is your problem:
<img src='myimage.gif' alt=':D' />
12
Name:
Anonymous
2008-12-03 9:18
13
Name:
Anonymous
2008-12-03 9:20
u
14
Name:
Anonymous
2008-12-03 9:20
15
Name:
Anonymous
2008-12-03 9:21
oh poo! :(
16
Name:
Anonymous
2008-12-03 9:40
could I make it apear with an if statemant? that seems to work well for the stars(rating png) and flags.
if (($smiley>) {
$smiley = :D );
echo $smiley. "<img src='smileys/hey_gais.gif" alt=''/></center>";
}
echo "</p>";
17
Name:
Anonymous
2008-12-03 10:10
18
Name:
Anonymous
2008-12-03 11:18
>>1
I read that as
Turing ascii smileys
Went "
AWESOME! "
Now I'm
disappointed
19
Name:
Anonymous
2008-12-03 11:49
>>12
code full of sql in
vitation s
20
Name:
Anonymous
2008-12-03 13:31
>>18
Touring ASCII smileys.
21
Name:
Anonymous
2008-12-03 18:29
no turning ascii smileys into .gif smileys.
22
Name:
Anonymous
2008-12-03 21:30
that looks correct. it will only change new instances of ":D"
23
Name:
Anonymous
2010-05-30 8:04
why is plenty of torrents so popular now?
24
Name:
Anonymous
2010-05-30 8:46
>>1
Also would this replace any :D that is already posted or just when someone makes a post after its put in.
Why the fuck are you asking us? How the hell would we know, when you , the developer, have no clue?
"Programmers" these days...
25
Name:
Anonymous
2010-05-30 11:02
$str = str_replace(':D','<img src="smiley.png" alt=":D"/>',$str);
Bonus:
Use RegEx to make sure theres a space on either side (and don't replace it).
Also:
PHP fails, you fail, 4chan fails, get the fuck out of this board.
26
Name:
Anonymous
2010-05-30 11:06
>>24
who says im a programmer, im a markup editor.
27
Name:
Anonymous
2010-05-30 11:14
>>24,25
Hello, people who are raging at a person who left two years ago.
>>23,26
Hello, worthless people.
28
Name:
Anonymous
2010-05-30 12:06
i luve plenty of torrents
29
Name:
Anonymous
2010-05-30 12:22
Stop using fucking graphic nonportable smileys.
30
Name:
Anonymous
2010-05-30 13:13
I like the new page plentyoftorrents.com is working on
http://www.plentyoftorrents.com/vip/ its buggy in IE though but thankfully I use FF.
31
Name:
Anonymous
2010-05-30 13:38
>>29
It's even worse when their stupid regexps end up ruining other people's text or code. It's not the first time when such smiley scripts incorrectly replaced legitimate non-smiley text.
32
Name:
>>24
2010-05-30 13:47
33
Name:
Anonymous
2010-05-30 14:05
34
Name:
Anonymous
2010-05-30 14:26
>>31
If only SexpCode supported emoticons, we wouldn't have these problems. {emote :(}
35
Name:
Anonymous
2010-05-30 14:53
36
Name:
Anonymous
2010-05-30 15:26
37
Name:
Anonymous
2010-05-30 17:44
>>35
Take your ``
x detected '' nonsense back to the imageboards whence it came.
38
Name:
Anonymous
2010-05-31 7:52
>>37
You're like those people who protest about America not speaking English exclusively.
39
Name:
Anonymous
2010-05-31 8:36
plenty of torrents needs a better domain name. stop mooching off the success of plenty of fish!
40
Name:
Anonymous
2010-05-31 9:34
fuck pot! like pof bought pof.com pot will never afford pot.com lol
41
Name:
Anonymous
2010-05-31 10:05
>>40
As per usual, post 40 is the best post in the thread.
42
Name:
Anonymous
2010-05-31 11:17
43
Name:
Anonymous
2010-05-31 11:18
44
Name:
Anonymous
2010-05-31 11:22
45
Name:
Anonymous
2010-05-31 11:35
46
Name:
Anonymous
2010-05-31 13:40
You're all morons.
47
Name:
Anonymous
2010-05-31 14:04
48
Name:
>>41
2010-05-31 20:06
49
Name:
Anonymous
2010-06-01 5:53
pjipmk
50
Name:
Anonymous
2010-06-01 6:01
>>49
4 CHAN CONSIDERED HARMFUL
51
Name:
Anonymous
2010-06-01 6:23
your comment system is getting spammed cuz u spammed us with your bs link. :)
52
Name:
Anonymous
2010-06-01 7:03
55
Name:
Anonymous
2011-01-31 20:27
<-- check em dubz