accludetuner |
11-02-2009 11:35 PM |
Quote:
Originally Posted by accludetuner
(Post 1827382)
I've been trying that myself without much luck. Here's what I have but it's not working.
in OpenInviter/config.php
PHP Code:
<?php
require_once('/path/to/my/forum/global.php');
$url = "index.php?referrerid=" . $vbulletin->userinfo['userid'];
$openinviter_settings=array(
"username"=>"blah",
"private_key"=>"11111111111111111111111111111111",
"cookie_path"=>'/mycookiepath',
"message_body"=>"You are invited to blah.com! Please use the following link to visit the site: $url", // www.blah.com is the website on your account. If wrong, please update your account at OpenInviter.com
"message_subject"=>" is inviting you to www.blah.com", // www.blah.com is the website on your account. If wrong, please update your account at OpenInviter.com
"transport"=>"curl", //Replace "curl" with "wget" if you would like to use wget instead
"local_debug"=>"on_error", //Available options: on_error => log only requests containing errors; always => log all requests; false => don`t log anything
"remote_debug"=>FALSE //When set to TRUE OpenInviter sends debug information to our servers. Set it to FALSE to disable this feature
);
?>
In the invite email it will show:
but 'userid' is not getting passed :(
Awesome mod BTW, even with the openinvitaion quarks and issues. ;)
|
I forgot all about this thread! I ment to update it a while ago. Checked and it appears that no one has posted the solution to including the referral ID in the URL so here's how I got them to work.
Almost the same as above but a little subtle change.
In OpenInviter/config.php
PHP Code:
<?php
require_once('/home/dir/to/my/site/forum/global.php');
$ref_id = $vbulletin->userinfo[userid];
$ref_url = "http://www.mysitename.com/index.php?referrerid=" . $ref_id;
$openinviter_settings=array(
'username'=>'myusername',
'private_key'=>'1111111111111111111111111111111111',
'filter_emails'=>'',
'transport'=>'curl',
'local_debug'=>'on_error',
'remote_debug'=>'',
'message_subject'=>' is inviting you to www.mysite.com',
"message_body"=>"You are invited to MySiteName! Please use the following link to visit the site:
$ref_url",
'cookie_path'=>'/mytempdir'
);
The only real change is that I had to pass userinfo[userid] to $ref_id and then insert $ref_id as the id to be used in the URL. It didn't like being inserted straight into the URL. ALso, note the message_body and text are in double quotes ". It did not work with single quotes there. Other than that, change all the appropriate info to your site and it should work just fine.
Hint: if you change the config.php file and upload to your site, then go into the OpenInviter settings in adminCP (or refresh the page), it should show the proper URL with YOUR userid. That's how you know it works ;)
|