So, will paid links in "optional" payment categories be downgraded to free links when they expire?
I am a little confused because in Payment Setup, I still have...
Quote:
Change expired links to free: This option allows you to define how Gossamer Links treats expired links in optional categories - the links can either automatically become free links, in which case they will still show up in the free listing of optional-payment categories, or they can be left as expired and consequently will not show up in optional payment categories.
Note: After changing this option, you must run the Repair Tables code (located in the Database admin menu)
Also, when performing Repair Tables, it still performs this check:
Quote:
Checking for optional, expired links to update to free...
I used to have to hack core code (3.0.1) it order to display expired links.
I have not re-applied the hack to 3.1 because it appears that the Payment Option above
is working without these old hacks. I am trying to determin If I have to keep making these
following changes in core code specific to my use which is to simply display all links
rgardless of the payment status.
Code:
============================================================================
Search.pm
Build.pm
============================================================================
Description:
This mod displays ALL links regardless of the payment status.
File: links/admin/Links/User/Search.pm
------------------------
Find:
$IN->param('ExpiryDate', '>=' . time) if $CFG->{payment}->{enabled};
Make it a comment.
File: links/admin/Links/Build.pm
sub: build_category
------------------------
Comment out the following.
if ($CFG->{payment}->{enabled}) {
require Links::Payment;
my $payment_info = Links::Payment::cat_payment_info($opts->{id});
if ($payment_info->{mode} == OPTIONAL) {
my $paycond = GT::SQL::Condition->new($cond);
$paycond->add(ExpiryDate => '>=' => time, ExpiryDate => '<=' => UNLIMITED);
my $offset = ($opts->{nh} - 1) * $opts->{mh};
$catlink_db->select_options(@select_options);
$catlink_db->select_options("LIMIT $opts->{mh} OFFSET $offset");
$optional_sth = $catlink_db->select('Links.*', $paycond);
$cond->add(ExpiryDate => '=' => FREE);
}
else {
$cond->add(ExpiryDate => '>=' => time);
}
}
============================================================================
SiteHTML.pm
============================================================================
Description:
This mod shows all payment tags when viewing links.
File: links/admin/SiteHTML.pm
sub: site_tags_link
------------------------
Find:
if ($rec{isLinkOwner} and $CFG->{payment}->{enabled} and $rec{ExpiryDate} != UNLIMITED and $catp->{payment_mode} != NOT_ACCEPTED) {
Replace with this:
if ($CFG->{payment}->{enabled} and $rec{ExpiryDate} != UNLIMITED and $catp->{payment_mode} != NOT_ACCEPTED) {
------------------------
You then have to change stuff in link.html:
<%if paymentsEnabled%>
rest of code here to make up the link...
<%endif%>
To this:
<%if isLinkOwner and paymentsEnabled%>
rest of code here to make up the link...
<%endif%>
Posters Note - because "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.
Chris - Actually I find that links marked UNLIMITED or "Never Expire" return "false"
when asked <%if paymentsEnabled%>. This required some fancy if/else statements in
link.html to allow UNLIMITED files to display the "Play It" button.
I would obviously prefer to not have to apply these edits.
So will a link that was paid and expires become a free link?
My payment global option is "Not Accepted", and I have 1 category that
is payment mode "Optional"
Thanks for some clarification
Chris
RGB World, Inc. - Software & Web Development.
rgbworld.com