• Welcome to Simple Machines Community Forum. Please login or sign up.
January 17, 2022, 09:59:57 PM

News:

Want to get involved in developing SMF, then why not lend a hand on our github!


Karma Smite Disable

Started by xPandax, July 31, 2013, 03:48:47 PM

Previous topic - Next topic

xPandax

July 31, 2013, 03:48:47 PM Last Edit: March 13, 2014, 07:57:00 AM by xPandax


Karma Smite Disable
(For SMF 2.0.x)
Mod by xPandax | Other Mods by xPandax




Features
This mod disables 'Karma Smite' option. In other words, users can see & use only the 'Applaud Karma' option.


How-To
NA.


Supported Themes
Works on all the themes without any custom edits!


Supported SMF Versions
Tested on fresh installation of 2.0.x.


Supported Languages
NA.


Support
If you need support with this mod, please use the Support Thread for this Mod.


Changelog
v1.1 (13 March 2014)
  • Disabled the users to add "-ve" value to karma using the applaud function. Thanks to androgyn3 for the tip.
v1.0
  • v1.0 - Initial release.



License

This is free and unencumbered mod released into the public domain. For more information, see http://unlicense.org/ or the accompanying UNLICENSE file.
[/list]

Colin

"If everybody is thinking alike, then somebody is not thinking." - Gen. George S. Patton Jr.

Colin

Burke ♞ Knight

Yes indeed.
This may become very popular. :)


androgyn3

Hi xPandax,

cool to do this mod, i've hardcoded Karma Smite Disable since long time because there are no mod for this before.

I advice you to add to the mod :

In Source/karma.php

search :

   // Applauding or smiting?
   $dir = $_REQUEST['sa'] != 'applaud' ? -1 : 1;

remplace :
//modif ->Applauding  - no smiting allowed!
   $dir = 1;

Because the "applaud" function accept -1 in argument and some stupid users use this for smite other despite smite restriction

like this (there are rewrite, i use simplesef mod)

http://forum.smf/modifykarma/sa.applaud-1/uidxxxxxxxet

Neo_TE

Thanks for the code. Ill add it asap.

Bob Perry of Web Presence Consulting

If anyone is interested, I have done some minor tweaking to the SMF Statistics Page that incorporates Karma, I'd be happy to share the code...
Best Regards,
Bob Perry



"The world is moving so fast these days that the man who says it can't be done is generally interrupted by someone doing it." Elbert Hubbard

Neo_TE

Quote from: Bob Perry on November 13, 2013, 12:06:29 AM
If anyone is interested, I have done some minor tweaking to the SMF Statistics Page that incorporates Karma, I'd be happy to share the code...

You can post it in the tips & tricks board, http://www.simplemachines.org/community/index.php?board=72.0.

jawad96

After installing mod, you can still see +0/-0?

Shouldn't it remove it since since negative isn't an option anymore? And display the number as is '24' for instance no + behind it either?

Bob Perry of Web Presence Consulting

Quote from: xPandax on November 14, 2013, 07:59:16 AM
Quote from: Bob Perry on November 13, 2013, 12:06:29 AM
If anyone is interested, I have done some minor tweaking to the SMF Statistics Page that incorporates Karma, I'd be happy to share the code...

You can post it in the tips & tricks board, http://www.simplemachines.org/community/index.php?board=72.0.

Since the system won't allow me to post a new topic in that board, I've attached the necessary files here and the moderators can move it later if need be... this hack will work only if there are no other customizations of the bare bones Statistics Page, just replace the corresponding files in the correct directories with these and you should see instant results...

Don't forget to keep a copy of the original files in case there is trouble, these are SMF 2.0.7 files...

Best Regards,
Bob Perry



"The world is moving so fast these days that the man who says it can't be done is generally interrupted by someone doing it." Elbert Hubbard

Neo_TE

You can create a thread in that section. The thread has to be approved my some mod before it appears to the public.

Bob Perry of Web Presence Consulting

Quote from: xPandax on March 04, 2014, 04:36:35 AM
You can create a thread in that section. The thread has to be approved my some mod before it appears to the public.

No, I can't create a thread in that section, the only buttons available to me is NOTIFY and MARK READ...
Best Regards,
Bob Perry



"The world is moving so fast these days that the man who says it can't be done is generally interrupted by someone doing it." Elbert Hubbard

Neo_TE

Quote from: Bob Perry on March 04, 2014, 02:33:21 PM
No, I can't create a thread in that section, the only buttons available to me is NOTIFY and MARK READ...

I don't know why you are not able to create a thread in that section.

I'm able to create a thread in that section and I don't belong to any official team. Maybe try sending a PM to some mod. :)

Or even better option is to submit it to the mod site. I can help you packing it into a mod if you're interested. :p

Colin

I wonder if you have to be a part of the community customizer group to create a new topic there.
"If everybody is thinking alike, then somebody is not thinking." - Gen. George S. Patton Jr.

Colin

Bob Perry of Web Presence Consulting

Quote from: Colin on March 06, 2014, 03:48:55 AM
I wonder if you have to be a part of the community customizer group to create a new topic there.

Could be?? I've got several customized additions to the statistics page for various mods and member data...
Best Regards,
Bob Perry



"The world is moving so fast these days that the man who says it can't be done is generally interrupted by someone doing it." Elbert Hubbard

Neo_TE

Mod updated to v1.1.


Changelog
v1.1 (13 March 2014)
  • Disabled the users to add "-ve" value to karma using the applaud function. Thanks to androgyn3 for the tip.




Quote from: androgyn3 on October 19, 2013, 07:55:20 AM
Hi xPandax,

cool to do this mod, i've hardcoded Karma Smite Disable since long time because there are no mod for this before.

I advice you to add to the mod :

In Source/karma.php

search :

   // Applauding or smiting?
   $dir = $_REQUEST['sa'] != 'applaud' ? -1 : 1;

remplace :
//modif ->Applauding  - no smiting allowed!
   $dir = 1;

Because the "applaud" function accept -1 in argument and some stupid users use this for smite other despite smite restriction

like this (there are rewrite, i use simplesef mod)

http://forum.smf/modifykarma/sa.applaud-1/uidxxxxxxxet

Thank you very much for this info. I totally forgot about this post. Sorry for the delay.

Advertisement: