News:

Wondering if this will always be free?  See why free is better.

Main Menu

fix karma images

Started by goldenstudios, April 04, 2020, 03:03:07 PM

Previous topic - Next topic

goldenstudios

hi guys I would like to understand how to fix the karma images (inches) with the number next to that the value of karma because as you will see in the second image you risk that increasing the number of karma goes attached to the thanks of the posts
how can i fix it?

what others see


what I see from my profile



this and the code about it
// Is this user allowed to modify this member's karma?
if ($modSettings['karmaMode'] == '1' || ($modSettings['karmaMode'] == '2')) {
echo '
<li class="karma_allow"><span class="kmtitle">', $modSettings['karmaLabel'], '</span><img class="kmimages" src="', $settings['images_url'], '/id/star.png" alt="" /><hr class="kmdivisor2" />';



// Is karma display enabled?  Total or +/-?
if ($modSettings['karmaMode'] == '1')
echo '
<center><span class="karma_n">', $message['member']['karma']['good'] - $message['member']['karma']['bad'], '</span></center>';
elseif ($modSettings['karmaMode'] == '2')
echo '
<center><span class="karma_n">+', $message['member']['karma']['good'], '/-', $message['member']['karma']['bad'], '</span></center>';

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'], ';', $context['session_var'], '=', $context['session_id'], '"><img src="', $settings['images_url'], '/id/up.png" alt="', $modSettings['karmaApplaudLabel'], '" /></a>
<a href="', $scripturl, '?action=modifykarma;sa=smite;uid=', $message['member']['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';m=', $message['id'], ';', $context['session_var'], '=', $context['session_id'], '"><img src="', $settings['images_url'], '/id/down.png" alt="', $modSettings['karmaSmiteLabel'], '" /></a>';

echo '
</li>';



I attached my display file anyway
tips? on how could I improve that interface?

Deaks

goldenstudios did you get this sorted?  I am curious on what you are wishing to do exactly, are you wishing to remove the karma buttons?
~~~~
Former SMF Project Manager
Former SMF Customizer

"For as lang as hunner o us is in life, in nae wey
will we thole the Soothron tae owergang us. In truth it isna for glory, or wealth, or
honours that we fecht, but for freedom alane, that nae honest cheil gies up but wi life
itsel."

goldenstudios

I didn't just want to order the structure, as you see number 24 and on the same line as the karma symbol (positive / negative) I wanted to put it under the center

Antechinus

Ok, just to check, because most of us don't read Italiano:

grazie ricevuti = thanks received
ringraziato = thanked
testo personale = personal text
questione di tempo = matter of time (I assume Google has this wrong :) )

Is karma "grazie ricevuti", or is karma "ringraziato"? Google confuses this when trying to translate it to English.

Do you want it to look like this?

goldenstudios


Antechinus

Try adding this to index.css:

a[href*="action=modifykarma;sa=applaud"]::before {display: block; clear: both; content:'';}

That should put the thumbs images to a new line. To centre the "24" I would need to see the code for the Thanks mod.

Edit: I just noticed your template is attached. I'll look at that. :)

Antechinus

Ok, forget the CSS. Try this template. :)

goldenstudios


Antechinus

The template you just posted is your original one, not the one I edited. Did you try the one I edited?

If you did try the one I edited, I will need to see your CSS.

goldenstudios


I attached my last display to you in the previous post

Antechinus

Yes, I know. That is not the one I edited. It is the same template you started with. Did you test the one I edited?

goldenstudios


Antechinus

Ok. I will need to see your CSS, or I will need a live link to the problem.

goldenstudios


goldenstudios


Antechinus

Your karma_n class is floated to the right. Change this:

.karma_n
{
color: #575757;
font-size: 14pt;
font-weight: bold;
text-shadow: 0 1px 0 white;
float: right;
}


To this:

.karma_n
{
display: block;
text-align: center;
color: #575757;
font-size: 14pt;
font-weight: bold;
text-shadow: 0 1px 0 white;
}

goldenstudios


Advertisement: