The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Make 'Referrer' field in registration UNeditable if from 'referrerid' in URL Details »» | |||||||||||||||||||||||||||
Make 'Referrer' field in registration UNeditable if from 'referrerid' in URL
Developer Last Online: Mar 2007
Hello.
If you'd like to make the 'Referrer' field username UNEDITABLE if a link is followed in a referral URL, here is a solution WITHOUT hacking the 'register.php' file. (ref: http://www.vbulletin.com/forum/showthread.php?t=132386) STEP 1: In 'Plugin Manager', assign this new plugin a 'Hook Location' of 'register_form_complete' and give it a 'Title'. You'll then create an arbitrary variable and the conditional statements in which its value will be assigned by doing the following: Add in the 'Plugin PHP Code' text area this code: PHP Code:
STEP 2: In the 'register' template, Find this code: Code:
<if condition="$show['referrer']"> Code:
<if condition="$show['referrer'] && $ref_var == 0"> Code:
</if> Add this code: Code:
<else /> <input type="hidden" name="referrername" value="$referrername" /> In summary, if there is no referrerid on the URL OR if it is but it doesn't match a username in the database, the $referrername var will be empty and therefore, the $ref_var will be assigned the value of '0' whereby the 'Referrer' field in the Registration Form will be visible for manual entry. If the username is found in the database, the 'Referrer' field will not be shown but its data in the form of the username found will be sent to the server upon form submission so that username gets the credit for the new member. ENJOY! P.S. Note: My assessment is, once the referrerid is accepted by the software after locating the username in the database, the information is saved in a cookie even if registration is not completed in that session. Therefore, even when all browser windows are closed and PC is turned off, the next time the Registration Form is loaded, that field will be 'hidden' from the form and 'UNeditable'. Once the form is submitted, that credit will be given to that 'username'. Bottom line: IF YOU'RE USING A SHARED COMPUTER, you may need to remove that 'bbreferrerid' cookie from your computer manually or the credit to that username will be coming from someone else who's registering and who may not have used a 'referred' URL. I'll leave those cookie-removal steps to others to explain. Show Your Support
|
Comments |
#2
|
||||
|
||||
Thanks for this. Really useful for my forums.
|
#3
|
|||
|
|||
I'm glad to hear it.
The whole premise is to put into place, more ways to make the referrer stats more 'tamper-proof.' Kinda a Part II to this is that which was mentioned in the 'Bottom Line' of the post for SHARED COMPUTER users. That's why I created another thread (https://vborg.vbsupport.ru/showthread.php?t=101027) to begin trying to address the 'bbreferrerid' cookie feature. Currently, I'm not sure if/how this should be addressed. I hope to get some feedback. In the meantime, I am using this code mod regardless since it addresses the majority of the concern mentioned in the thread referenced at the beginning of the code mod. The rest I'll worry more about as time goes on... If the 'bbreferrerid' cookie has an expiration, then this would be essentially a non-issue. But the flip side of this is, if a person couldn't finish their registration in that period in which the cookie is 'active', they may not necessarily use the initial URL with referrerid and it becomes a wash, anyway... :squareeyed: In essence, this whole cookie concern may be a non-issue -- for some, 'so what if the stats are off 2 out of 200'... I hope to get more feedback about the code mod as well as from those who know more about the infamous 'vb referrer cookie', because I don't know enough about it. :lick: Take care. |
#4
|
||||
|
||||
Thank you for this!!
|
#5
|
|||
|
|||
it can be done without plugins as well (this mod hides the referer field instead of disabling it):
https://vborg.vbsupport.ru/showthread.php?t=98592 |
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|