Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Aiheen aloitti: SolidSnake2003 - maaliskuu 10, 2008, 07:16:45 IP

Otsikko: Karma Total in Image like VBulletin
Kirjoitti: SolidSnake2003 - maaliskuu 10, 2008, 07:16:45 IP
Is there a way to have Karma total show in image like VBulletin?
Otsikko: Re: Karma Total in Image like VBulletin
Kirjoitti: Bulakbol - maaliskuu 12, 2008, 05:46:26 IP
I don't know any Vbulletin site. Can you post the image? Maybe we can do something.
Otsikko: Re: Karma Total in Image like VBulletin
Kirjoitti: Eliana Tamerin - maaliskuu 12, 2008, 07:16:28 IP
I think it's similar to our stars

Otsikko: Re: Karma Total in Image like VBulletin
Kirjoitti: Bulakbol - maaliskuu 12, 2008, 07:31:16 IP
Thanks Eliana. Doesn't the mod site have that mod already? No sure though.
Otsikko: Re: Karma Total in Image like VBulletin
Kirjoitti: Eliana Tamerin - maaliskuu 12, 2008, 07:34:17 IP
I don't think so. The only one closest is a mod that changes the [applaud]/[smite] buttons to images.
Otsikko: Re: Karma Total in Image like VBulletin
Kirjoitti: Bulakbol - maaliskuu 12, 2008, 07:46:32 IP
I am not using Karma but I know that clicking the  +/- characters will increase/decrease the Karma.  The images represents only the count or percentage of Karma isn't it?  How would you increase/decrease the Karma with images? Sorry, I am noob.  :P

Someone might make the mod for the guy. 
Otsikko: Re: Karma Total in Image like VBulletin
Kirjoitti: Eliana Tamerin - maaliskuu 12, 2008, 07:48:42 IP
I think vB might have it on a percentage system? I don't know how their karma works. My guess is someone could code it like our post count images, so that when you reach a certain amount of karma, you get another image. When you get to the last one, TS.
Otsikko: Re: Karma Total in Image like VBulletin
Kirjoitti: Bulakbol - maaliskuu 12, 2008, 08:06:49 IP
But our Karma system is... you have to click the +/- to increase/decrease the Karma. The image that you posted looks like they are using some kind of unseen way to do it.   :)
Otsikko: Re: Karma Total in Image like VBulletin
Kirjoitti: Eliana Tamerin - maaliskuu 12, 2008, 08:22:01 IP
I wasn't logged in, so I couldn't adjust the karma. :P
Otsikko: Re: Karma Total in Image like VBulletin
Kirjoitti: ℓσяєиz - maaliskuu 13, 2008, 08:44:39 AP
open  Themes/your theme/Display.template.php

Koodi (search) [Valitse]
// Show their personal text?

Koodi (add before) [Valitse]


$rep = '<img src="' . $settings['images_url'] . '/rep.gif" border="0" />';

if ($message['member']['karma']['good'] <= 4) {
echo'';
}
elseif ($message['member']['karma']['good'] <= 10) {
echo '<div class="profil" align="center">' , $rep, '</div>';
}
elseif ($message['member']['karma']['good'] <= 20) {
echo '<div class="profil" align="center">' , $rep, '' , $rep , '</div>';
}
elseif ($message['member']['karma']['good'] <= 30) {
echo'<div class="profil" align="center">' , $rep , '' , $rep , '' , $rep  , '</div>';
}
elseif ($message['member']['karma']['good'] <= 40) {
echo'<div class="profil" align="center">' , $rep  , '' , $rep  , '' , $rep  , '' , $rep  , '</div>';
}
elseif ($message['member']['karma']['good'] <= 50) {
echo'<div class="profil" align="center">' , $rep  , '' , $rep , '' , $rep , '' , $rep , '' , $rep , '</div>';
}
elseif ($message['member']['karma']['good'] <= 60) {
echo'<div class="profil" align="center">' , $rep , '' , $rep , '' , $rep , '' , $rep , '' , $rep , '' , $rep , '' , $rep , '</div>';
}
elseif ($message['member']['karma']['good'] <= 70) {
echo'<div class="profil" align="center">' , $rep , '' , $rep , '' , $rep , '' , $rep , '' , $rep , '' , $rep , '' , $rep , '' , $rep , '' , $rep , '</div>';
}
elseif ($message['member']['karma']['good'] <= 80) {
echo'<div class="profil" align="center">' , $rep , '' , $rep , '' , $rep , '' , $rep , '' , $rep , '' , $rep , '' , $rep , '' , $rep , '</div>';
}
elseif ($message['member']['karma']['good'] >= 80) {
echo'<div class="profil" align="center">' , $rep , '' , $rep , '' , $rep , '' , $rep , '' , $rep , '' , $rep , '' , $rep , '' , $rep , '' , $rep , '</div>';



  -> Themes/your theme/images
Otsikko: Re: Karma Total in Image like VBulletin
Kirjoitti: LOLwut - maaliskuu 13, 2008, 05:54:53 IP
omg you rock!!!!!!! AHHHHH!!! But if negative, it can go red.
Otsikko: Re: Karma Total in Image like VBulletin
Kirjoitti: Bulakbol - maaliskuu 14, 2008, 01:38:04 AP
There you go. Lots of if's. So the +/- still exist. I thought it's replaced by image.
Otsikko: Re: Karma Total in Image like VBulletin
Kirjoitti: LOLwut - huhtikuu 05, 2008, 04:36:55 IP
This No work

Otsikko: Re: Karma Total in Image like VBulletin
Kirjoitti: drgnfireinferno - huhtikuu 25, 2008, 01:15:29 IP
Lainaus käyttäjältä: JohnyB - maaliskuu 14, 2008, 01:38:04 AP
There you go. Lots of if's. So the +/- still exist. I thought it's replaced by image.
The image thing you're thinking of just replaces the + and - text for increasing and decreasing karma. It basicly meand that instead of having text for + and text for - it loads an image of the admins' choice to replace them. so you could have a picture as the link for increase and decrease of karma. On mine I use red and green arrows