Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-4041-

turning ascii smilies into smiley.gif PHP

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.

Name: Anonymous 2008-12-03 5:23

No.

Name: Anonymous 2008-12-03 5:27

Whats wrong with it?

Name: Anonymous 2008-12-03 5:33

>>3
1. It's in PHP
2. :DOING IT WRONG

Name: Anonymous 2008-12-03 5:37

why not use ☺ (U+263A) or ☻ (U+263B) instead?

Name: Anonymous 2008-12-03 5:38

hax my ASCII anus

Name: Anonymous 2008-12-03 6:03

>>6
Ify ou payme enough ;)

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

Name: sage 2008-12-03 8:04

SAGE.

Name: sage 2008-12-03 8:15

okay

Name: Anonymous 2008-12-03 9:05

Here is your problem:

<img src='myimage.gif' alt=':D' />

Name: Anonymous 2008-12-03 9:18

It wont work no matter what I do. :( I should have just used a forum under the flashes.
Can u find what im doing wrong?
heres the sauce
http://www.plentyoftorrents.com/flsh/animation/comments/sauce/comments_show.phps

http://www.plentyoftorrents.com/flsh/animation/comments/sauce/comments_process.phps

includes folder
http://www.plentyoftorrents.com/flsh/animation/comments/sauce/includes/clean_input.phps
(should I be taking out this? is this getting rid of html?

http://www.plentyoftorrents.com/flsh/animation/comments/sauce/includes/comments-config.phps

It looks like something keeps stripping my html code even if i disable the filters in the config file. :S

Name: Anonymous 2008-12-03 9:20

u

Name: Anonymous 2008-12-03 9:20

and the myimage.gif thing is supposed to be http://www.plentyoftorrents.com/flsh/smileys/hai_gais.gif

Name: Anonymous 2008-12-03 9:21

oh poo! :(

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>";

Name: Anonymous 2008-12-03 10:10

Name: Anonymous 2008-12-03 11:18

>>1
I read that as
Turing ascii smileys
Went "AWESOME!"
Now I'm disappointed

Name: Anonymous 2008-12-03 11:49

>>12
code full of sql invitations

Name: Anonymous 2008-12-03 13:31

>>18
Touring ASCII smileys.

Name: Anonymous 2008-12-03 18:29

no turning ascii smileys into .gif smileys.

Name: Anonymous 2008-12-03 21:30

that looks correct. it will only change new instances of ":D"

Name: Anonymous 2010-05-30 8:04

why is plenty of torrents so popular now?

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...

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.

Name: Anonymous 2010-05-30 11:06

>>24
who says im a programmer, im a markup editor.

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.

Name: Anonymous 2010-05-30 12:06

i luve plenty of torrents

Name: Anonymous 2010-05-30 12:22

Stop using fucking graphic nonportable smileys.

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.

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.

Name: >>24 2010-05-30 13:47

>>27
Hey, how you doin'?

Name: Anonymous 2010-05-30 14:05

>>32
friend?

Name: Anonymous 2010-05-30 14:26

>>31
If only SexpCode supported emoticons, we wouldn't have these problems. {emote :(}

Name: Anonymous 2010-05-30 14:53

>>34
Xarn detected.

Name: Anonymous 2010-05-30 15:26

>>33
What?

Name: Anonymous 2010-05-30 17:44

>>35
Take your ``x detected'' nonsense back to the imageboards whence it came.

Name: Anonymous 2010-05-31 7:52

>>37
You're like those people who protest about America not speaking English exclusively.

Name: Anonymous 2010-05-31 8:36

plenty of torrents needs a better domain name. stop mooching off the success of plenty of fish!

Name: Anonymous 2010-05-31 9:34

fuck pot! like pof bought pof.com pot will never afford pot.com lol

Name: Anonymous 2010-05-31 10:05

>>40
As per usual, post 40 is the best post in the thread.

Name: Anonymous 2010-05-31 11:17

>>41
you're an idiot

Name: Anonymous 2010-05-31 11:18

>>42
He is. So are you.

Name: Anonymous 2010-05-31 11:22

>>43
no u

Name: Anonymous 2010-05-31 11:35

>>44
nana nana na na :P

Name: Anonymous 2010-05-31 13:40

You're all morons.

Name: Anonymous 2010-05-31 14:04

>>46
even me?

Name: >>41 2010-05-31 20:06

>>42
Yes I am. Fuck you.

Name: Anonymous 2010-06-01 5:53

pjipmk

Name: Anonymous 2010-06-01 6:01

>>49
4 CHAN CONSIDERED HARMFUL

Name: Anonymous 2010-06-01 6:23

your comment system is getting spammed cuz u spammed us with your bs link. :)

Name: Anonymous 2010-06-01 7:03

>>51
SPAM MY ANUS

Name: cheap ugg boots 2010-08-07 3:03

He is. So are you.

Name: Anonymous 2011-01-31 20:27

<-- check em dubz

Don't change these.
Name: Email:
Entire Thread Thread List