We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Locked Topic
[ C ] Member Referrals
Topic Started: Aug 6 2015, 12:40 AM (200 Views)
Tyler Dream
Member Avatar
Member
[ *  *  *  * ]
ZB
URL in profile

I'm looking for a member referral code that'll add a profile field in the registration and it'll dump all entries into a hidden topic. I know a code like this already exists but that code sends a PM to one member, I need one that will dump it in a hidden topic :)
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Admin CP Posted Image Themes Posted Image Board Template Posted Image Below the Board
Code:
 
<script type="text/javascript">
//<![CDATA[
$(function() {
var fID = 'FORUM_ID';
var tID = 'TOPIC_ID';

$('table.register tr.postbtn').before('<tr><td class="c_desc">Member Referral</td><td colspan="2"><input type="text" size="32" name="referral" /></td></tr>');

$('table.register').closest('form').submit(function() {
var referral = $('input[name="referral"]').val();
$.zb.set('referredBy', referral);
});

if ($.zb.get('referredBy') !== '' && $.zb.logged_in === true) {
$.get(main_url + 'post/?mode=2&type=1&f=' + fID + '&t=' + tID + '&force_ads', function(data) {
var ast = $('input[name="ast"]', data).val();
var xc = $('input[name="xc"]', data).val();
var qhash = $('input[name="qhash"]', data).val();
$.post(main_url + 'post/?force_ads', {
mode: '2',
type: '1',
ast: ast,
f: fID,
xc: xc,
t: tID,
qhash: qhash,
p: '0',
sd: '1',
post: 'I was referred to this board by: ' + $.zb.get('referredBy'),
success: function() {
$.zb.del('referredBy');
}
});
});
}
});
//]]>
</script>
Edit the capitalized text as necessary.
Offline Profile Goto Top
 
Tyler Dream
Member Avatar
Member
[ *  *  *  * ]
Thank you Cory!
Offline Profile Goto Top
 
Moonface
Member Avatar


Completed!

Your request has been completed. If you have any questions or concerns regarding the state of your request, please feel free to contact me via PM.
Offline Profile Goto Top
 
0 users reading this topic
« Previous Topic · Closed Requests · Next Topic »
Locked Topic