Simple Machines Community Forum

Customizing SMF => Tips and Tricks => Topic started by: Deaks on June 13, 2020, 01:57:56 PM

Title: Funny Post Count
Post by: Deaks on June 13, 2020, 01:57:56 PM
So this is one that used to be  really popular and can bring some fun into your forum, Simply say when a user hits a certain post count they will get a custom phrase.  For example the most common is when someone hits 1337 they get the word leet.  A really easy way to do this is by editing one file and that is Load.php in your sources directory.

Look for:

'posts' => $profile['posts'] > 500000 ? $txt['geek'] : comma_format($profile['posts']),

all you have to do is change it to this
'posts' => $profile['posts'] > 500000 ? $txt['geek'] : ($profile['posts'] == 1337 ? 'leet' : comma_format($profile['posts']))

Whats really fun is you can continue the trend

'posts' => $profile['posts'] > 500000 ? $txt['geek'] : ($profile['posts'] == 1337 ? 'leet' : $profile['posts'] == 69 ? 'Oh Yeah' : $profile['posts'] == 666 ? 'ALL HAIL SATAN' : $profile['posts'] == 11 ? 'Legs 11' : $profile['posts'] == 50 ? 'Bullseye' : $profile['posts'] == 3141 ? '3.14159' : $profile['posts'] == 42 ? 'Answer is' : comma_format($profile['posts'])),

Please remember BACK UP YOUR FILE BEFORE DOING THIS

However it is a good way to customise your forum a bit!
Title: Re: Funny Post Count
Post by: shadav on June 13, 2020, 09:45:36 PM
 :laugh: this could be fun.... now to figure out how to work this into my forum...

Quote from: Deaks on June 13, 2020, 01:57:56 PM
'posts' => $profile['posts'] > 500000 ? $txt['geek'] : ($profile['posts'] == 1337 ? 'leet' : comma_format($profile['posts']))

looks like you forgot the , at the end
Title: Re: Funny Post Count
Post by: Antechinus on June 13, 2020, 10:21:06 PM
'posts' => $profile['posts'] > 500000 ? $txt['geek'] : ($profile['posts'] == 22407 ? 'Daft bastard' : comma_format($profile['posts']))
Title: Re: Funny Post Count
Post by: Deaks on June 14, 2020, 05:48:25 AM
Oops so I did thanks shadav.

One I just thought of is 1701 = USS Enterprise
Title: Re: Funny Post Count
Post by: d3vcho on June 14, 2020, 06:21:41 AM
I registered in a forum about 10 years ago and they had something similar. Apart of displaying a special message when reaching a certain amount of posts, you'd even get a fancy badge. Numbers like 666, 1313 (community lore) or 1337. It was fun to see.