Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+- Forum Stats

Members
Total Members: 4255
Latest: andreios
New This Month: 3
New This Week: 1
New Today: 0
Stats
Total Posts: 43259
Total Topics: 7518
Most Online Today: 201
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 276
Total: 276

Author Topic: Karma Option update  (Read 5717 times)

0 Members and 1 Guest are viewing this topic.

Offline Empire

  • Member
  • *
  • Posts: 48
    • View Profile
Karma Option update
« on: May 03, 2015, 02:26:59 am »
I have updated my Karma option, Improved it more for the posts on the forums. I have the Karma Description Mod. From the images you see I have up and down images.

Anyway I wanted that option for the comments in the Gallery pro and the download pro to. So that way it does not look blend. it will look all the same 

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16436
    • View Profile
Re: Karma Option update
« Reply #1 on: May 05, 2015, 01:29:33 pm »
You would need to modify gallery.template.php and downloads.template.php and find the code that displays the profilebox then change it to the same code that the karma mod is using.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline Empire

  • Member
  • *
  • Posts: 48
    • View Profile
Re: Karma Option update
« Reply #2 on: May 06, 2015, 12:05:23 am »
You would need to modify gallery.template.php and downloads.template.php and find the code that displays the profilebox then change it to the same code that the karma mod is using.
Found it alright and changed it, but The images does not show or it works.

I have not done the Download pro just Yet
Code: [Select]
// Is karma display enabled?  Total or +/-?
      if ($modSettings['karmaMode'] == '1')
         echo '
      <br />
      ', $modSettings['karmaLabel'], ' ', $memberContext[$memCommID]['karma']['good'] - $memberContext[$memCommID]['karma']['bad'], '<br />';
      elseif ($modSettings['karmaMode'] == '2')
         echo '
      <br />
      ', $modSettings['karmaLabel'], ' +', $memberContext[$memCommID]['karma']['good'], '/-', $memberContext[$memCommID]['karma']['bad'], '<br />';

      // Is this user allowed to modify this member's karma?
      if ($memberContext[$memCommID]['karma']['allow'])
         echo '
      <a href="', $scripturl, '?action=modifykarma;sa=applaud;uid=', $memberContext[$memCommID]['id'], ';sesc=', $context['session_id'], '">', $modSettings['karmaApplaudLabel'], '</a>
      <a href="', $scripturl, '?action=modifykarma;sa=smite;uid=', $memberContext[$memCommID]['id'],  ';sesc=', $context['session_id'], '">', $modSettings['karmaSmiteLabel'], '</a><br />';

And this is what I added.

Code: [Select]
// Is karma display enabled?  Total or +/-?

            $context['show_karmastat'] = allowedTo('karmalog_view') && empty($modsettings['karmapermiss']);

         if ($modSettings['karmaMode'] == '1')
            echo '
                        <li class="karma">', (!empty($modSettings['karmadescmod']) && !empty($modSettings['karmalabellink']) && $context['show_karmastat']) ? '<a href="'. $scripturl . '?action=ownkarma;u='. $message['member']['id'] .'">'. $modSettings['karmaLabel'] .'</a>' : $modSettings['karmaLabel'] ,' ', $message['member']['karma']['good'] - $message['member']['karma']['bad'], '</li>';

         elseif ($modSettings['karmaMode'] == '2')
            echo '
                        <li class="karma">', (!empty($modSettings['karmadescmod']) && !empty($modSettings['karmalabellink']) && $context['show_karmastat']) ? '<a href="'. $scripturl . '?action=ownkarma;u=' . $message['member']['id'] . '">'.$modSettings['karmaLabel'].'</a>' : $modSettings['karmaLabel'] ,  ' +', $message['member']['karma']['good'], '/-', $message['member']['karma']['bad'], '</li>';


         // Is this user allowed to modify this member's karma?
         if ($message['member']['karma']['allow'])
            echo '
                        <li class="karma_allow">
                           <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'], '">', $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'], '">', $modSettings['karmaSmiteLabel'], '</a>
                        </li>';

Offline Empire

  • Member
  • *
  • Posts: 48
    • View Profile
Re: Karma Option update
« Reply #3 on: May 06, 2015, 12:08:22 am »
Just an remainder that it needs to work with the Karma Statistic, so if anyone hit the up... I can see who like what image and so on. If that option works


Thanks

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16436
    • View Profile
Re: Karma Option update
« Reply #4 on: May 06, 2015, 08:14:53 am »
Replace all
Code: [Select]
$message['member']
With
Code: [Select]
$memberContext[$memCommID]
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline Empire

  • Member
  • *
  • Posts: 48
    • View Profile
Re: Karma Option update
« Reply #5 on: May 06, 2015, 08:14:55 pm »
Replace all
Code: [Select]
$message['member']
With
Code: [Select]
$memberContext[$memCommID]

All that did is added Dot points next to them

 

Related Topics

  Subject / Started by Replies Last post
1 Replies
5140 Views
Last post November 10, 2007, 10:05:25 pm
by SMFHacks
0 Replies
3965 Views
Last post November 19, 2007, 11:51:41 am
by jasonwatkins
1 Replies
4600 Views
Last post April 05, 2009, 08:56:50 am
by SMFHacks
9 Replies
9068 Views
Last post October 17, 2018, 11:17:16 pm
by SMFHacks
1 Replies
4033 Views
Last post March 09, 2013, 06:17:38 pm
by RC Storick

+- Recent Topics

No thumbnails on new uploads by SMFHacks
March 27, 2024, 02:10:41 pm

Display the Contact Page for guests by SMFHacks
March 27, 2024, 10:55:43 am

is it possible to add support for odysee.com by fvlog19
March 21, 2024, 08:47:51 am

Request for admin notification by davejo
March 10, 2024, 01:31:59 am

I need help with torrent upload by Ineedsmfhelp
March 09, 2024, 10:01:13 pm

an idea for new mod (( content type with different display )) by SMFHacks
February 27, 2024, 01:36:27 pm

[Mod] RSS Feed Poster by SMFHacks
February 27, 2024, 11:57:18 am

find duplicate pictures by fvlog19
February 14, 2024, 02:22:40 pm

Error uploading video. by SMFHacks
February 08, 2024, 02:04:16 pm

Gallery icon as last added image by fvlog19
February 01, 2024, 01:04:56 pm

Powered by EzPortal