[How to] Enabling signature only for members over a certain reputation points

Started by Xhanch Studio, March 28, 2011, 08:56:00 AM

previous topic - next topic
Go Down

Xhanch Studio

To prevent fake members who only want to leave certain links to their websites without giving any contribution to your forum, you may want to disable their signature from being displayed below their posts/topics and on their profile page unless they must reach a certain amount of reputation points.

This hack is applied to and tested on SMF 2.0 RC 5.

In this example, I would like to enable signature for members with over 500 reputation points.

First, we will apply this rule to the profile page. To do this, we need to edit Themes/default/Profile.template.php

Around line 304, find this code

Code Select
if ($context['signature_enabled'] && !empty($context['member']['signature']))

change it to

Code Select
if ($context['signature_enabled'] && !empty($context['member']['signature']) && $context['member']['karma']['total'] > 500)


Then, we will apply this rule to the post/topic/reply/message. To do this, we need to edit Themes/default/Display.template.php

Around line 649, find this code

Code Select
if (!empty($message['member']['signature']) && empty($options['show_no_signatures']) && $context['signature_enabled'])

change it to

Code Select
if (!empty($message['member']['signature']) && empty($options['show_no_signatures']) && $context['signature_enabled'] && $message['member']['karma']['total'] > 500)

That's all.

Best Regards,
Susanto B.Sc
----------------------------------------------------------------------------
Web development services, WordPress plugin and theme development, PSD to XHTML conversion - http://xhanch.com
Read free manga online - http://authrone.com

Go Up