emoticon integration into shout box

Reply

Join Date: Mar 2004
Posts: 17
Reputation: nikuki is an unknown quantity at this point 
Solved Threads: 0
nikuki's Avatar
nikuki nikuki is offline Offline
Newbie Poster

emoticon integration into shout box

 
0
  #1
Apr 3rd, 2004
I recently added a shout box to my page and I am interesting in adding emoticons. I have searched around and found no standalone emoticon script, at least none that I could get to work.

I would appreciate any suggestions on how to add emoticons to my shout box script.

Thanks


www.nikuki.com
Reply With Quote Quick reply to this message  
Join Date: Feb 2002
Posts: 12,057
Reputation: cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light 
Solved Threads: 129
Administrator
Staff Writer
cscgal's Avatar
cscgal cscgal is online now Online
The Queen of DaniWeb

Re: emoticon integration into shout box

 
0
  #2
Apr 3rd, 2004
Suppose a user enters something and it is stored as a string. Run the php function str_replace on that string before posting. Each time you find the sequence :) then replace it with <img src="smiley.gif">

Here is some more info: http://us2.php.net/str-replace
Dani the Computer Science Gal
Follow my Twitter feed! twitter.com/DaniWeb
And if you're interested in Internet marketing there is twitter.com/DaniWebAds
Reply With Quote Quick reply to this message  
Join Date: Mar 2004
Posts: 17
Reputation: nikuki is an unknown quantity at this point 
Solved Threads: 0
nikuki's Avatar
nikuki nikuki is offline Offline
Newbie Poster

Re: emoticon integration into shout box

 
0
  #3
Apr 3rd, 2004
thanks

i'm so new to PHP... sometimes i have to look at many different example to be able to wrap my mind around something!

that link really helped me.
Reply With Quote Quick reply to this message  
Join Date: Mar 2004
Posts: 17
Reputation: nikuki is an unknown quantity at this point 
Solved Threads: 0
nikuki's Avatar
nikuki nikuki is offline Offline
Newbie Poster

Re: emoticon integration into shout box

 
0
  #4
Apr 3rd, 2004
ok, so now, i want to offer a page with a list of all emoticons and let the user click on one to add it to their post... like on www.skinbase.org
Reply With Quote Quick reply to this message  
Join Date: Feb 2002
Posts: 12,057
Reputation: cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light 
Solved Threads: 129
Administrator
Staff Writer
cscgal's Avatar
cscgal cscgal is online now Online
The Queen of DaniWeb

Re: emoticon integration into shout box

 
0
  #5
Apr 3rd, 2004
Create a table with all of the different icons as images. Use javascript (sorry, I don't know the language enough to provide sample code, but it shouldn't be difficult at all) so that when an image is clicked on, it adds the text equivalent of the smilie to the textbox. When the user clicks submit, the php file will run the str_replace function and make it into an image.
Dani the Computer Science Gal
Follow my Twitter feed! twitter.com/DaniWeb
And if you're interested in Internet marketing there is twitter.com/DaniWebAds
Reply With Quote Quick reply to this message  
Join Date: Feb 2003
Posts: 282
Reputation: Roberdin will become famous soon enough Roberdin will become famous soon enough 
Solved Threads: 6
Team Colleague
Roberdin Roberdin is offline Offline
Supreme Evil Overlord

Re: emoticon integration into shout box

 
0
  #6
Apr 4th, 2004
Make sure your code is compatible with more browsers than just IE. And Dani, the code should be: <img src="smiley.gif" /> :p
Reply With Quote Quick reply to this message  
Join Date: Nov 2003
Posts: 781
Reputation: Zachery has a spectacular aura about Zachery has a spectacular aura about 
Solved Threads: 21
Team Colleague
Zachery's Avatar
Zachery Zachery is offline Offline
The Geek Father

Re: emoticon integration into shout box

 
0
  #7
Apr 4th, 2004
actually it should be

<img src="smilie.gif" alt="" />
Firefox: no, its not the end all solution, it has its own issues and in time it will be just as insecure as IE, when its hit Firefox 6, if it makes it that far. Oh, and AOL pays for it, incase you didn't know.

Microsoft & Windows: If you hate it so much, move to linux, or bsd, or anything else, stop complaning and move on.
Good starting places: Gentoo Novell SUSE Fedora Core Apple
Reply With Quote Quick reply to this message  
Join Date: Feb 2003
Posts: 282
Reputation: Roberdin will become famous soon enough Roberdin will become famous soon enough 
Solved Threads: 6
Team Colleague
Roberdin Roberdin is offline Offline
Supreme Evil Overlord

Re: emoticon integration into shout box

 
0
  #8
Apr 5th, 2004
Well if you wanna be like that, you should have included some alt text.

Besides, come to think of it, there's anotherr new standard which is something like <object type="image/gif" src="smilie.gif" alt="Smile!" />
Reply With Quote Quick reply to this message  
Join Date: Mar 2005
Posts: 1
Reputation: alina is an unknown quantity at this point 
Solved Threads: 0
alina alina is offline Offline
Newbie Poster

Re: emoticon integration into shout box

 
0
  #9
Mar 27th, 2005
hi..
can u give me an example for that script ? (adding emoticons to a shoutbox)

I really new to php :rolleyes:
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:




Views: 6883 | Replies: 8
Thread Tools Search this Thread



Tag cloud for PHP
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC