News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Modify Karma to use images (problem)

Started by TGB, April 18, 2006, 07:14:57 AM

Previous topic - Next topic

TGB

I have successfully modified the karma to use images instead of words using the methods in this thread http://www.simplemachines.org/community/index.php?topic=40093.0

my problem is that the links have borders around them.  none of my other links have any borders (pm links, smilie links, etc.)

here is my code in displays.template.php

// Is this user allowed to modify this member's karma?

if ($message['member']['karma']['allow'])

echo '

<a href="', $scripturl, '?action=modifykarma;sa=applaud;uid=', $message['member']['id'], ';topic=', $context['current_topic'], '.' . $context['start'], ';m=', $message['id'], ';sesc=', $context['session_id'], '"><img src="Smileys/default/icon_thumbsup.gif" alt="" /></a>

<a href="', $scripturl, '?action=modifykarma;sa=smite;uid=', $message['member']['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';m=', $message['id'], ';sesc=', $context['session_id'], '"><img src="Smileys/default/icon_thumbsdown.gif" alt="" /></a><br />';



here is a pic of what it looks like:



these links all look fine:

www.dreamcasthaven.com <----- Running SMF 1.1.16 & heavily modified
www.psxhaven.com <----- Running SMF 1.1.16 & heavily modified
www.romhaven.info <----- Running SMF 1.1.16 & heavily modified
www.bthaven.com <----- Running TT 2.06

kezayah

         // Is this user allowed to modify this member's karma?

         if ($message['member']['karma']['allow'])

            echo '

                        <a href="', $scripturl, '?action=modifykarma;sa=applaud;uid=', $message['member']['id'], ';topic=', $context['current_topic'], '.' . $context['start'], ';m=', $message['id'], ';sesc=', $context['session_id'], '"><img src="Smileys/default/icon_thumbsup.gif" alt="" border="0" /></a>

                        <a href="', $scripturl, '?action=modifykarma;sa=smite;uid=', $message['member']['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';m=', $message['id'], ';sesc=', $context['session_id'], '"><img src="Smileys/default/icon_thumbsdown.gif" alt="" border="0" /></a><br />';


Kindred

or, in yuor style.css, just add the line

img a { border:0;}
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

TGB

thanks alot guys.  that worked perfectly.  :)
www.dreamcasthaven.com <----- Running SMF 1.1.16 & heavily modified
www.psxhaven.com <----- Running SMF 1.1.16 & heavily modified
www.romhaven.info <----- Running SMF 1.1.16 & heavily modified
www.bthaven.com <----- Running TT 2.06

Søren Bjerg

While this problem has been resolved, I just wanted to chime in and add that you don't need to edit the code to change the text link into image links.

Just use HTML in the applaud/smite label textfields on ./index.php?action=featuresettings;sa=karma - works like a charm too (shows no image border in 1.1 RC2 default theme either) :).
RUNE HORDES dot INFO - SMF 1.1.10 w/ Custom Profile Mod... and various permissions hooks and template changes (new topic form).

Advertisement: