smileys not working

srlinuxx - May 30, 2006 - 03:44
Project:Smileys
Version:HEAD
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

Smileys not working. They appear to be showing up in node teasers (using the exerpt module) but the same text in the node body only show the alternative text.

I dropped the smileys table and allowed the mysql and examples script to remake them. I have the smileys in the misc/smileys/ directory.

If one right clicks to choose view image, it's looking for the image in www.example.com/node/misc/smileys/ instead of www.example.com/misc/smileys/ .

using drupal 4.7.1, mysql 4.1.19, php 4.4.0, apache 2.0.58. thanks.

#1

Shiva Thomas - May 30, 2006 - 04:57
Status:active» patch (code needs work)

I have the same problem with the current CVS version of Drupal. Here is a quick & dirty patch you can use.

find this line in the smiley.module file:

    $content .= '<tr><td align="left"><img src="'. $smiley->image .'" title="'. $alt .'" alt="'. $alt .'" /></td><td align="right">&nbsp;'. $alt .'</td></tr>';

and replace img src="' with img src="/'

There must be a more elegant solution with inclusion of the base url, but it worked for me.

Regards,
Shiva

#2

srlinuxx - May 30, 2006 - 06:05

Yes! Thank you. Actually there was 3 instances of it that needed that hack to make it work, but thank you.

#3

frostschutz - June 5, 2006 - 16:55

Without changing any code, you can also just edit the smileys in the administer menu, and add the / to their path. Still not a nice solution, but this way people without PHP knowledge can work around it too.

#4

curtis - June 20, 2006 - 05:07

Adding a patch that uses base_path()

AttachmentSize
smileys.diff.txt1.95 KB

#5

Steven - July 12, 2006 - 10:42
Status:patch (code needs work)» fixed

Fixed with a better patch.

#6

Anonymous - July 26, 2006 - 10:45
Status:fixed» closed
 
 

Drupal is a registered trademark of Dries Buytaert.