News:

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

Main Menu

Day Of Defeat

Started by Xarcell, December 20, 2007, 12:38:20 PM

Previous topic - Next topic

tridirk

Anyone help me with Karma as discussed in this thread?
from Coding section
Learning SMF..... Thanks for your help!

tridirk

The Karma doesn't appear in the DoD theme I am using.  It appears on the other themes and the default theme.  It appears in the Private Message area but not the general display.

echo '<tr><td class="', $message['alternate'] == 0 ? 'windowbg2' : 'windowbg', '" align="center" valign="middle"><span class="normaltext">', $message['member']['group_stars'], '</span></td></tr>';
}

// Is karma display enabled?  Total or +/-?
if ($modSettings['karmaMode'] == '1')
{
    echo '<tr><td align="left" style="padding-left: 20px;" class="', $message['alternate'] == 0 ? 'windowbg2' : 'windowbg', '" valign="top">';

    echo '
                 <table width="100%" border="0" cellpadding="0" cellspacing="0">
                 <tr>
                       <td align="center" class="smalltext">', $modSettings['karmaLabel'], ' ', $message['member']['karma']['good'] - $message['member']['karma']['bad'], '</td>';

// Is this user allowed to modify this member's karma?
if ($message['member']['karma']['allow'])
  echo '<td>
   <a href="', $scripturl, '?action=modifykarma;sa=applaud;uid=', $message['member']['id'], ';topic=', $context['current_topic'], '.' . $context['start'], ';m=', $message['id'], ';sesc=', $context['session_id'], '" style="padding-left: 0px;"><img src="', $settings['images_url'], '/thumbsup.gif" /></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="', $settings['images_url'], '/thumbsdown.gif" /></a></td>';

    echo '
  </tr>
</table>';

   echo '
  </td>
</tr>';

}
}
// Show how many posts they have made.
echo '<tr>
<td class="', $message['alternate'] == 0 ? 'windowbg2' : 'windowbg', '" align="center" valign="middle" ><span class="smalltext">', $txt[26], ': ', $message['member']['posts'], '</span></td></tr>';

It is in the diplayt.template.php and above is the code
Learning SMF..... Thanks for your help!

tridirk

On my DoD custom theme, what would cause my smilies, and/or the bb commands not to work when you click on them?  Click on quote and the quotequtote/ boxes do not appear.  Click on a smilie they don't appear you can type in the commands and they work.

Also, I can not highlight a full line of text with the left click drag either?

I also get a java script error at the bottom of the page  on the reply page only.  When I click a bb command it then says javascript:void(0);
Learning SMF..... Thanks for your help!

tridirk

I found the error in the index.template  it was a java script error.  YOu can delete this if you wish.
Learning SMF..... Thanks for your help!

Doc.Blade

Hello,

Firstly, i would like to say this is a brilliant theme, i really like it!

The only thing i would like to be able to do is have the membergroup avatars show up in the post info.

Does anyone know how to do this, or can give me the file and the code needed to do this please?

Cheers

Doc

Doc.Blade

Someone outside of SMF fixed this issue for me.  Thought i would post it here in case anyone else can use the info.

File to edit:

Display.template.php


Find:

// Show the post group if and only if they have no other group or the option is on, and they are in a post group.

if ((empty($settings['hide_post_group']) || $message['member']['group'] == '') && $message['member']['post_group'] != '')

    {

echo '<tr><td class="', $message['alternate'] == 0 ? 'windowbg2' : 'windowbg', '" align="center" valign="middle"><span class="smalltext">', $message['member']['post_group'], '</span></td></tr>';

echo '<tr><td class="', $message['alternate'] == 0 ? 'windowbg2' : 'windowbg', '" align="center" valign="middle"><span class="normaltext">', $message['member']['group_stars'], '</span></td></tr>';

}




Replace with:

// Show the post group if and only if they have no other group or the option is on, and they are in a post group.

if ((empty($settings['hide_post_group']) || $message['member']['group'] == '') && $message['member']['post_group'] != '')


echo '<tr><td class="', $message['alternate'] == 0 ? 'windowbg2' : 'windowbg', '" align="center" valign="middle"><span class="smalltext">', $message['member']['post_group'], '</span></td></tr>';

echo '<tr><td class="', $message['alternate'] == 0 ? 'windowbg2' : 'windowbg', '" align="center" valign="middle"><span class="normaltext">', $message['member']['group_stars'], '</span></td></tr>';



Make that change and upload the file back to your theme directory, and your assigned Member Group Avatars will now display in the post info.

A big thank you to =SAMS=Hairy for helping me out with this. 

Hope this can help someone else too :)

Remixed

Thanks for this I may find it useful in the future, not much editing done to it though, but I guess that's not exactly a bad thing less work. :P

-Remixed

Advertisement: