On my login sucess page, I want to show a link "to another page" for paid linkowners and an upgrade link for free and expired LinkOwners.
Jul 20, 2009, 4:18 PM
Enthusiast (974 posts)
Jul 20, 2009, 4:18 PM
Post #2 of 14
Views: 1108
Hi Sies,
Below if/elseif should work.
Not sure what settings you have, however if you have field like paiduser and settings as Yes/No, you can use below. However if you are using different settings, than just change the required info:
<%if paidluser eq 'Yes'%>
Content for users with paid links.
<%else%>
Content for users without paid link.
<%endif%>
Vishal
-------------------------------------------------------
Web Hosting Kit: A to Z of Web Hosting! http://www.webhostingkit.com/
Software Devil: Software Search Made Easy! http://www.softwaredevil.com/
-------------------------------------------------------
Below if/elseif should work.
Not sure what settings you have, however if you have field like paiduser and settings as Yes/No, you can use below. However if you are using different settings, than just change the required info:
<%if paidluser eq 'Yes'%>
Content for users with paid links.
<%else%>
Content for users without paid link.
<%endif%>
Vishal
-------------------------------------------------------
Web Hosting Kit: A to Z of Web Hosting! http://www.webhostingkit.com/
Software Devil: Software Search Made Easy! http://www.softwaredevil.com/
-------------------------------------------------------
Jul 21, 2009, 12:16 AM
Veteran / Moderator (17298 posts)
Jul 21, 2009, 12:16 AM
Post #3 of 14
Views: 1109
Hi,
So what you wanna see, is if they have any paid links - and if they do, show different stuff compared to someone who doesn't?
Not as simple as a condition if thats the case, as it would need a global to work out if they own a link thats been paid for. Won't bother writing it until I know that's what your trying to do =)
Cheers
Andy (mod)
andy@ultranerds.co.uk
IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
So what you wanna see, is if they have any paid links - and if they do, show different stuff compared to someone who doesn't?
Not as simple as a condition if thats the case, as it would need a global to work out if they own a link thats been paid for. Won't bother writing it until I know that's what your trying to do =)
Cheers
Andy (mod)
andy@ultranerds.co.uk
IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
I created a resource site that I only want made available to paid users
You have to log into this site with a usename and password that I change every month
On the login_sucess page, I want the paid users to see the link to the resource site and the necessary login info.
I want the free and expired listing users to see an upgrade/renewal link.
You have to log into this site with a usename and password that I change every month
On the login_sucess page, I want the paid users to see the link to the resource site and the necessary login info.
I want the free and expired listing users to see an upgrade/renewal link.
Jul 21, 2009, 7:05 AM
Veteran / Moderator (17298 posts)
Jul 21, 2009, 7:05 AM
Post #5 of 14
Views: 1095
Ok, and how does your system know if they are paid, or non-paid/expired? Do you have a tag that you use for it?
Cheers
Andy (mod)
andy@ultranerds.co.uk
IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Cheers
Andy (mod)
andy@ultranerds.co.uk
IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Jul 21, 2009, 7:38 AM
Veteran / Moderator (17298 posts)
Jul 21, 2009, 7:38 AM
Post #7 of 14
Views: 1090
Hi,
Erm, its your site LOL
What are you using for your payment system? How do you know if someone is a paid user?
Cheers
Andy (mod)
andy@ultranerds.co.uk
IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Erm, its your site LOL
What are you using for your payment system? How do you know if someone is a paid user?
Cheers
Andy (mod)
andy@ultranerds.co.uk
IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Jul 21, 2009, 7:56 AM
Veteran / Moderator (17298 posts)
Jul 21, 2009, 7:56 AM
Post #9 of 14
Views: 1085
LOL = Laugh out loud =)
I tell if a listing is paid by ExpiryDate
Ok, so the way you tell if someone is a "member" is if they have at least one paid link that is active, yes?
Cheers
Andy (mod)
andy@ultranerds.co.uk
IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Code:
I use Authorize.net and paypal I tell if a listing is paid by ExpiryDate
Ok, so the way you tell if someone is a "member" is if they have at least one paid link that is active, yes?
Cheers
Andy (mod)
andy@ultranerds.co.uk
IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Jul 21, 2009, 8:14 AM
Veteran / Moderator (17298 posts)
Jul 21, 2009, 8:14 AM
Post #11 of 14
Views: 1082
Ok, well this is totally untested - but try:
check_if_user_has_paid
my $cond = new GT::SQL::Condition;
$cond->add('isValidated','=','Yes');
$cond->add('LinkOwner','=',$USER->{Username});
$cond->add('ExpiryDate','<','2147483647');
$cond->add('ExpiryDate','>',GT::Date::timelocal());
$cond->bool('AND');
if ($DB->table('Links')->count($cond) > 0) {
# they have a paid link, that is active
return { has_active_paid_link => 1 };
} else {
# they dont have a paid link thats active
return { has_active_paid_link => 0 };
}
}
Then call with:
<%if has_active_paid_link%>
they have at least one link , that is validated and still active
<%else%>
they dont have any paid links (that are validated, or active)
<%endif%>
Cheers
Andy (mod)
andy@ultranerds.co.uk
IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
check_if_user_has_paid
Code:
sub { my $cond = new GT::SQL::Condition;
$cond->add('isValidated','=','Yes');
$cond->add('LinkOwner','=',$USER->{Username});
$cond->add('ExpiryDate','<','2147483647');
$cond->add('ExpiryDate','>',GT::Date::timelocal());
$cond->bool('AND');
if ($DB->table('Links')->count($cond) > 0) {
# they have a paid link, that is active
return { has_active_paid_link => 1 };
} else {
# they dont have a paid link thats active
return { has_active_paid_link => 0 };
}
}
Then call with:
Code:
<%check_if_user_has_paid%> <%if has_active_paid_link%>
they have at least one link , that is validated and still active
<%else%>
they dont have any paid links (that are validated, or active)
<%endif%>
Cheers
Andy (mod)
andy@ultranerds.co.uk
IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Jul 21, 2009, 9:25 AM
User (59 posts)
Jul 21, 2009, 9:25 AM
Post #12 of 14
Views: 1072
Thanks that work fine.
and to link back to the login-sucess page
http://www.db_cgi_url/page.cgi?p=login_success
I hasd to use your plugin to take the user straight to the upgrade page
<%Plugins::ULTRAGlobals::Users_Listings($LinkOwner)%>
<%if user_links.length%>
<%loop user_links%>
<%include link3.html%>
<%endloop%>
<%endif%>
Link3.html
Listing ID# <%ID%> - <%Title%><br/>
<a href="<%config.db_cgi_url%>/modify.cgi?do=payment_linked;process_payment=1;modify=1;ID=<%ID%>">
<br></a>
and to link back to the login-sucess page
http://www.db_cgi_url/page.cgi?p=login_success
I hasd to use your plugin to take the user straight to the upgrade page
<%Plugins::ULTRAGlobals::Users_Listings($LinkOwner)%>
<%if user_links.length%>
<%loop user_links%>
<%include link3.html%>
<%endloop%>
<%endif%>
Link3.html
Listing ID# <%ID%> - <%Title%><br/>
<a href="<%config.db_cgi_url%>/modify.cgi?do=payment_linked;process_payment=1;modify=1;ID=<%ID%>">
<br></a>
Jul 21, 2009, 9:37 AM
Veteran / Moderator (17298 posts)
Jul 21, 2009, 9:37 AM
Post #13 of 14
Views: 1071
Cool, glad it worked :)
Cheers
Andy (mod)
andy@ultranerds.co.uk
IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Cheers
Andy (mod)
andy@ultranerds.co.uk
IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates

