![]() |
Restrict access to vB files to users with x referals!
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Function referalcheck hack, by Link14716. -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ This is a very simple, but useful little hack. By adding a little line into a file, it will automatically restrict access to that file for anyone who has less than $n referals. $n is a variable that may be set to whatever you want for whatever file you want. I plan on adding admin CP functions to just enter a filename and how many referals you want to require for access to it later, but for now, here it is! Enjoy. :) :banana: |
Here is a screen when a user does not have enough referals to access a page (for the purpose of this screen, I restricted access to proarcade.php to users with 4 referals or more.)
|
what would be great is having a custom title/avatar based on a numbr of referrals, but great hack nonetheless :)
|
I think there are hacks that will do that, but this hack is meant for whole files. Useful for hacks such as the arcade and the custom postbit hacks. :) Thanks for the compliment. :)
|
Perhaps checking if the referred members have more than X posts too? Coz some people refer members just to boost referrals, they don't care whether they post or not [how stupid]
Nice hack though :) |
Sure, change:
Code:
$referals = $DB_site->query_first("SELECT COUNT(*) AS referals FROM user WHERE referrerid='$bbuserinfo[userid]'"); Code:
$referals = $DB_site->query_first("SELECT COUNT(*) AS referals FROM user WHERE referrerid='$bbuserinfo[userid]' AND posts>'Y'"); |
Cool - I'm sure I'll have some use for it =)
|
Nice hack buddy :)
- miSt |
Nice idea;)
Satan |
Nice one Link! :)
I'm suprised that more people aren't using the referral system or referral hacks. I think its a neat way to get more members, and it works! Check the attachment. Quote:
|
All times are GMT. The time now is 11:21 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|