Gossamer Forum
Home : Products : Gossamer Links : Discussions :

payment tags

Quote Reply
payment tags
Hi All-

I would like to have some info appear only to linkowners/users with a paid link using the new payment mod. This is what I have but it doesn't seem to be working:


<%if paymentsEnabled and ExpiryDateFormatted and not isFree%>


Any suggestions? I imagine this could be useful for quite a few things. I'm using it in an account section to give paid users extra account features.

Thanks Much!!
Quote Reply
Re: [SSmeredith] payment tags In reply to
exactly the same question I was about to post! Smile

just to add to it - if you have options, 'gold,silver,bronze' paid options, how do you use tags in the link template to select between them?

Regan
Quote Reply
Re: [SSmeredith] payment tags In reply to
From the link.html template:

<%if isLinkOwner and isValidated eq 'Yes'%>
<a href="<%db_cgi_url%>/modify.cgi?LinkID=<%ID%>">Edit this link</a>
<%endif%>

<%if paymentsEnabled%>
<a href="<%db_cgi_url%>/modify.cgi?do=payment_linked;process_payment=1;modify=1;ID=<%ID%>">
<%if isUnpaid or isFree%>New Payment<%else%>Renewal Payment<%endif%></a>
<%endif%>

You could try something like:

<%if isLinkOwner and paymentsEnabled and isValidated eq 'Yes'%>
Click here for more options !
<%endif%>

Edit: I’m not sure how you are defining Gold, Bronze etc, I use LinkType as below.

<%if LinkType eq 'Gold' or LinkType eq ‘Silver' or LinkType eq 'Bronze'%>
Bronze, Gold and Silver details !
<%endif%>

Regards

minesite

Last edited by:

minesite: Jul 29, 2004, 9:50 PM
Quote Reply
Re: [minesite] payment tags In reply to
Grrrr- not working. I don't get any error tags or anything with either my tags or yours.
Quote Reply
Re: [SSmeredith] payment tags In reply to
Login as the link owner and try the basics first then go upwards:
<%if isLinkOwner%>
I own this link !
<%endif%>

You can also do a dump to see the variables on the page.
<%GT::Template::dump%>

Regards

minesite
Quote Reply
Re: [minesite] payment tags In reply to
Hmmmmm..... I did a <%GT::Template::dump%> and none of the individual link payment details are available by default.

The name of the payment description also doesn't appear to be stored in the database tables anywhere either - eg if you had "gold, silver and bronze" payment terms there doesn't seem to be a way to distinguish between them when displaying a link.

Hopefully someone from GT and pop their head in and shed some light on it!? Unsure

Regan
Quote Reply
Re: [ryel01] payment tags In reply to
Hi Regan.

The only way I've found around this (so far), is to add a new field (i.e "TypeofLink"), and then in the templates, just add some "if" statements;

Code:
<%if TypeOfLink eq "Silver"%>
...etc

Most people manually validate links; so it shouldn't be too hard to set this flag manually (you need to somehow include it as a hidden tag on the add form though).

Hope that makes sense Unsure

I'm going to work on a plugin (at some point), that will make this a whole lot easier :)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] payment tags In reply to
In Reply To:
Most people manually validate links; so it shouldn't be too hard to set this flag manually (you need to somehow include it as a hidden tag on the add form though).

Hi Andy

I'm in the process of changing my directory over so I be manually validating the links - it's not working for me... I'm over 1200 links behind and growing daily. Unimpressed

What I'm going to do is have them auto validate, but then "delete" those that are lemons - I think this will work better for me becuase the majority of links submitted seem to be ok anyway. I'll then just have the directory rebuild html every night.

So... that was the long way of saying I really need to figure out how to have the script know whether the link is a ceratain payment option.

I know that you can then also charge different rates for certain categories too which adds to the confusion.

But assuming all payment options have different names it should be possible you'd think... hopefully!

regan.
Quote Reply
Re: [ryel01] payment tags In reply to
Before I upgraded I was already doing the payment thing manually, so having another manual "step" kinda stinks.

I there really, really no tag for a paid link? Say it isn't so.Unsure I've been trying variations and no such luck.
Quote Reply
Re: [SSmeredith] payment tags In reply to
I've found the code that displays the link info so will have a play and see if I can get it to work.

Do you just want to distinguish if the link is free/paid (think this one will be pretty easy) or do you also want to know what 'type' of payment has been made? (which is what I'm after).

Regan.
Quote Reply
Re: [ryel01] payment tags In reply to
Heck, I'm easy, I'll take option #1 just a paid link...

Thx-
Quote Reply
Re: [SSmeredith] payment tags In reply to
Righto... figured out number 1...

Here's what to do....

1. MAKE A BACKUP OF SiteHTML.pm
2. MAKE SURE YOU BACKED UP SiteHTML.pm
3. Open SiteHTML.pm and go to line 74.

Comment out line 74 and add a new line beneath it so it looks like this...
Code:
# if ($rec{isLinkOwner} and $CFG->{payment}->{enabled} and $rec{ExpiryDate} != UNLIMITED) {
if ( $CFG->{payment}->{enabled} and $rec{ExpiryDate} != UNLIMITED) {

WARNING: Now ALL of the link tags will be displayed WHETHER YOU ARE THE LINK OWNER OR NOT.

So... what you now need to do is go into the link.html template and add the 'isLinkOwner' tag to all those items you don't want others to see - unless they're the link owner.

For example, the link that says "New Payment" and "Renewal Payment" etc was...

Code:
<%if paymentsEnabled%>
rest of code here to make up the link...
<%endif%>

but should now be changed to...

Code:
<%if isLinkOwner and paymentsEnabled%>
rest of code here to make up the link...
<%endif%>

so it only displays that information if the LINK OWNER is viewing it - ie. they have to be logged in.

So now you can also use the "isFree" tag to select which bits of information to hide/make visible.

Wink

Regan.
Quote Reply
Re: [ryel01] payment tags In reply to
Code:
if ( $CFG->{payment}->{enabled} and $rec{ExpiryDate} != UNLIMITED) {


Just a note - becuase "ExpiryDate != UNLIMITED" is included in the code above, this will NOT display all the information for links that have an unlimited or "lifetime" payment applied to them.

Regan.
Quote Reply
Re: [ryel01] payment tags In reply to
From what I'm told, you can only use the payments tags on link.html. I am waiting on a global from GT to be able to use the tags on other pages. I'll post it here.
Quote Reply
Re: [SSmeredith] payment tags In reply to
What I've posted above works fine - I'm using it on my site now.

r
Quote Reply
Re: [ryel01] payment tags In reply to
Are you still referring to the changes for the link.html placement?
I want to use this on detail pages, account pages, etc. I'm told those tags are only for link.html