This is the community forum. For a developer response use the Client Area.
Follow us on Facebook, Twitter and YouTube!

Changing Smilies
#1

Created a custom smiley. I created the GIF and saved it over the "confused.gif". The new smiley is a [Image: confused.gif] happy pterodactyl.

It still has the tag "confused" when it appears in the comment box before it's submitted. Is there an easy way to edit the tag
Reply
#2

Editing and adding smilies is a little complicated currently. If people really want to change it, I could write a tutorial. To change the text, go to "comments/includes/functions/processor.php", find the function 'comment_add_smilies', find the line with the ':­confused:' line and change the title and alt attributes.

I'm giving you three guesses...
Reply
#3

Found the line and made the changes but it's not reflecting the change. Can you check to see if it's not cached properly?
http://www.societygonewild.com/emptypitchers/

Here's the edited code:
if ($enabled_smilies_confused) {
$comment = str_ireplace(":yellowpterodactyl:", "<img src='" . $url_to_comments_folder . "images/smilies/yellowptack.gif' title='Yellow Ptack' alt='Yellow Ptack' style='" . $smiley_styling . "'/>", $comment);
Reply
#4

Leave :yellowpterodactyl: as :­confused: for now.

I'm giving you three guesses...
Reply
#5

Will do. Thanks Static
Reply
#6

No, I meant to say that
PHP Code:
<?php 
if ($enabled_smilies_confused) {
$comment = str_ireplace(":yellowpterodactyl:", "<img src='" . $url_to_comments_folder . "images/smilies/yellowptack.gif' title='Yellow Ptack' alt='Yellow Ptack' style='" . $smiley_styling . "'/>", $comment);
should be
PHP Code:
<?php 
if ($enabled_smilies_confused) {
$comment = str_ireplace(":confused:", "<img src='" . $url_to_comments_folder . "images/smilies/yellowptack.gif' title='Yellow Ptack' alt='Yellow Ptack' style='" . $smiley_styling . "'/>", $comment);
but that will only change it in the comment itself.

If you change it back to :yellowpterodactyl: and edit this in "includes/template/form.php" on lines 402-404 to be
PHP Code:
<?php if ($enabled_smilies_confused) { ?>
<img src="<?php echo $path_to_comments_folder . "images/smilies/confused.gif";?>" title="Yellow Ptack" alt="Yellow Ptack" class="smiley_image" onmousedown="addTags('',':yellowpterodactyl:')"/>
<?php } ?>
then it should work.

I'm giving you three guesses...
Reply
#7

Wile. E. Coyote... super genius.

Nice work Static. =)
Well... strike that - it works good when filling out the comment but when it posts, it doesn't put the icon - just the words ":yellowpterodactyl:" and ":bluepterodactyl:"

PHP Code:
<?php if ($enabled_smilies_unsure) { ?>
<img src="<?php echo $path_to_comments_folder . "images/smilies/unsure.gif";?>" title="Blue Ptack" alt="Blue Ptack" class="smiley_image" onmousedown="addTags('',':bluepterodactyl:')"/>
<?php } ?>

<?php if ($enabled_smilies_confused) { ?>
<img src="<?php echo $path_to_comments_folder . "images/smilies/confused.gif";?>" title="Yellow Ptack" alt="Yellow Ptack" class="smiley_image" onmousedown="addTags('',':yellowpterodactyl:')"/>
<?php } ?>



PHP Code:
<?php 
if ($enabled_smilies_unsure) {
$comment = str_ireplace(":unsure:", "<img src='" . $url_to_comments_folder . "images/smilies/blueptack.gif' title='Blue Ptack' alt='Blue Ptack' style='" . $smiley_styling . "'/>", $comment);
}

if (
$enabled_smilies_confused) {
$comment = str_ireplace(":confused:", "<img src='" . $url_to_comments_folder . "images/smilies/yellowptack.gif' title='Yellow Ptack' alt='Yellow Ptack' style='" . $smiley_styling . "'/>", $comment);
}
Reply
#8

The bottom two should be:
PHP Code:
<?php 
if ($enabled_smilies_unsure) {
$comment = str_ireplace(":bluepterodactyl:", "<img src='" . $url_to_comments_folder . "images/smilies/yellowptack.gif' title='Yellow Ptack' alt='Yellow Ptack' style='" . $smiley_styling . "'/>", $comment);

if (
$enabled_smilies_confused) {
$comment = str_ireplace(":yellowpterodactyl:", "<img src='" . $url_to_comments_folder . "images/smilies/yellowptack.gif' title='Yellow Ptack' alt='Yellow Ptack' style='" . $smiley_styling . "'/>", $comment);

And please use [p­hp][/p­hp] tags.

I'm giving you three guesses...
Reply
#9

You got it. Thanks for spending so much time helping. I'll pass along Commentics to several web programmers I know. Solid forum work for just you and Steven.
Reply
#10

Great, I'm glad I could help. Just do one favor for me. If you use Internet Explorer, change your browser to something infinitely better, such as: Firefox, Opera, or Chrome. You'll like it. If you don't then you could keep using IE. If you don't use IE in the first place, then sorry for bugging you about it. I don't like that browserRolleyes.

I'm giving you three guesses...
Reply


Possibly Related Threads…
Thread / Author Replies Views Last Post
Last Post by Steven
01-Jun-2020, 10:53 AM
Last Post by Steven
10-Oct-2013, 09:51 PM
Last Post by 2hands
24-Jun-2012, 08:56 PM
Last Post by Ming
25-Jan-2012, 05:00 PM
Last Post by aivarlipp
28-Sep-2010, 05:08 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)