added a rudamentary affiliate tracking program
This commit is contained in:
parent
781526066f
commit
ac102923ce
5 changed files with 37 additions and 3 deletions
|
|
@ -139,4 +139,7 @@ INSERT INTO template VALUES (1,'Default HTTP Proxy','<tmpl_if displayTitle>\r\n
|
|||
UPDATE international set message = 'The HTTP Proxy wobject is a very powerful tool. It enables you to embed external sites and applications into your site. For example, if you have a web mail system that you wish your staff could access through the intranet, then you could use the HTTP Proxy to accomplish that.\r\n\r\n<p>\r\n\r\n<b>URL</b><br>\r\nThe starting URL for the proxy.\r\n<p>\r\n\r\n<b>Follow redirects?</b><br>\r\nSometimes the URL to a page, is actually a redirection to another page. Do you wish to follow those redirections when they occur?\r\n<p>\r\n\r\n<b>Rewrite urls?</b><br>\r\nSwitch this to No if you want to deeplink an external page.\r\n<p>\r\n\r\n<b>Timeout</b><br>\r\nThe amount of time (in seconds) that WebGUI should wait for a connection before giving up on an external page.\r\n<p>\r\n\r\n<b>Remove style?</b><br>\r\nDo you wish to remove the stylesheet from the proxied content in favor of the stylesheet from your site?\r\n<p>\r\n\r\n<b>Filter Content</b><br>\r\nChoose the level of HTML filtering you wish to apply to the proxied content.\r\n<p>\r\n\r\n<b>Search for</b><br>\r\nA search string used as starting point. Use this when you want to display only a part of the proxied content. Content before this point is not displayed\r\n<p>\r\n\r\n<b>Stop at</b><br>\r\nA search string used as ending point. Content after this point is not displayed.\r\n<p>\r\n<i>Note: The <b>Search for</b> and <b>Stop at</b> strings are included in the content. You can change this by editing the template for HttpProxy.</i>\r\n<p>\r\n\r\n<b>Allow proxying of other domains?</b><br>\r\nIf you proxy a site like Yahoo! that links to other domains, do you wish to allow the user to follow the links to those other domains, or should the proxy stop them as they try to leave the original site you specified?\r\n<p>\r\n' where internationalId = 11 and namespace = 'HttpProxy' and languageId = 1;
|
||||
update international set internationalId=1014, namespace='WebGUI' where internationalId='17' and namespace='MessageBoard';
|
||||
update international set internationalId=1015, namespace='WebGUI' where internationalId='11' and namespace='MessageBoard';
|
||||
alter table users add column referringAffiliate int not null default 0;
|
||||
update users set referringAffiliate=1 where userId<>1;
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ our $VERSION = "5.5.0";
|
|||
|
||||
use strict qw(vars subs);
|
||||
use Tie::CPHash;
|
||||
use WebGUI::Affiliate;
|
||||
use WebGUI::Cache;
|
||||
use WebGUI::ErrorHandler;
|
||||
use WebGUI::Icon;
|
||||
|
|
@ -77,8 +78,7 @@ sub _generatePage {
|
|||
}
|
||||
|
||||
if(!WebGUI::Privilege::canViewWobject($wobject->{wobjectId})){ next; }
|
||||
|
||||
if (${$wobject}{namespace} eq "WobjectProxy") {
|
||||
if (${$wobject}{namespace} eq "WobjectProxy") {
|
||||
$originalWobject = $wobject;
|
||||
my ($wobjectProxy) = WebGUI::SQL->quickHashRef("select * from WobjectProxy where wobjectId=".${$wobject}{wobjectId});
|
||||
$wobject = WebGUI::SQL->quickHashRef("select * from wobject where wobject.wobjectId=".$wobjectProxy->{proxiedWobjectId});
|
||||
|
|
@ -225,6 +225,7 @@ sub page {
|
|||
$content = $cache->get;
|
||||
}
|
||||
$operationOutput = _processOperations();
|
||||
WebGUI::Affiliate::grabReferral();
|
||||
$wobjectOutput = _processFunctions();
|
||||
if ($operationOutput eq "" && $wobjectOutput eq "" && $session{form}{action2} ne "") {
|
||||
_processAction($session{form}{action2});
|
||||
|
|
|
|||
|
|
@ -198,7 +198,7 @@ sub www_createAccountSave {
|
|||
$u->profileField($fieldName,${$profile}{$fieldName});
|
||||
}
|
||||
WebGUI::Authentication::registrationFormSave($u->userId);
|
||||
WebGUI::Session::start($u->userId);
|
||||
WebGUI::Session::convertVisitorToUser($session{var}{sessionId},$u->userId);
|
||||
_logLogin($u->userId,"success");
|
||||
system(WebGUI::Macro::process($session{setting}{runOnRegistration})) if ($session{setting}{runOnRegistration} ne "");
|
||||
WebGUI::MessageLog::addInternationalizedEntry('',$session{setting}{onNewUserAlertGroup},'',536) if ($session{setting}{alertOnNewUser});
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@ TIP: The $session variable is a case-insensitive hash. The contents of the has v
|
|||
use WebGUI::Session;
|
||||
WebGUI::Session::close();
|
||||
WebGUI::Session::convertVisitorToUser($sessionId,$userId);
|
||||
WebGUI::Session::deleteScratch($name);
|
||||
WebGUI::Session::end($sessionId);
|
||||
$header = WebGUI::Session::httpHeader();
|
||||
$header = WebGUI::Session::httpRedirect($url);
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ This package provides an object-oriented way of managing WebGUI users as well as
|
|||
$karma = $u->karma;
|
||||
$lastUpdated = $u->lastUpdated;
|
||||
$languagePreference = $u->profileField("language",1);
|
||||
$referringAffiliate = $u->referringAffiliate;
|
||||
$status = $u->status("somestatus");
|
||||
$username = $u->username("jonboy");
|
||||
|
||||
|
|
@ -305,6 +306,34 @@ sub profileField {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 referringAffiliate ( [ value ] )
|
||||
|
||||
Returns the unique identifier of the affiliate the referred this user to the site.
|
||||
|
||||
=over
|
||||
|
||||
=item value
|
||||
|
||||
An integer containing the unique identifier of the affiliate.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub referringAffiliate {
|
||||
my ($class, $value);
|
||||
$class = shift;
|
||||
$value = shift;
|
||||
if (defined $value) {
|
||||
$class->{_user}{"referringAffiliate"} = $value;
|
||||
WebGUI::SQL->write("update users set referringAffiliate=".$value.",
|
||||
lastUpdated=".time()." where userId=$class->{_userId}");
|
||||
}
|
||||
return $class->{_user}{"referringAffiliate"};
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 status ( [ value ] )
|
||||
|
||||
Returns the status of the user.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue