Facebook 

SMFHacks.com

+-

SMFHacks.com

+- User Information

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

+- Forum Stats

Members
Total Members: 4282
Latest: Eric87
New This Month: 7
New This Week: 1
New Today: 1
Stats
Total Posts: 43660
Total Topics: 7574
Most Online Today: 89
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 44
Total: 44

Author Topic: Karma Option update  (Read 6191 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: 16617
    • 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: 16617
    • 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
5250 Views
Last post November 10, 2007, 10:05:25 pm
by SMFHacks
0 Replies
4083 Views
Last post November 19, 2007, 11:51:41 am
by jasonwatkins
1 Replies
4768 Views
Last post April 05, 2009, 08:56:50 am
by SMFHacks
9 Replies
9626 Views
Last post October 17, 2018, 11:17:16 pm
by SMFHacks
1 Replies
4143 Views
Last post March 09, 2013, 06:17:38 pm
by RC Storick

+- Recent Topics

Do you offer paid assistance with the SMFBlog mod? by Grammy
February 11, 2025, 02:58:04 pm

SMFBlog Mod by Grammy
February 10, 2025, 07:33:32 pm

[Mod]Bluesky Auto Embed by SMFHacks
January 30, 2025, 01:47:36 pm

Delete a Picture from Trash - Error by SMFHacks
January 29, 2025, 09:06:38 pm

RESOLVED: Store Not Logging Transactions or Sending Emails by SMFHacks
January 23, 2025, 06:24:27 pm

Ability to exclude categories from ezPortal SMF Gallery random image ezblock by Alistair
January 22, 2025, 08:20:13 am

How to move SMF to new server by SMFHacks
January 21, 2025, 08:45:53 pm

Figuring out settings by SMFHacks
January 12, 2025, 04:56:14 pm

Filesizes incorrect by SMFHacks
January 12, 2025, 02:02:47 pm

December 2024 Sale! by SMFHacks
December 02, 2024, 10:30:38 pm

Powered by EzPortal