Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Override the isValidated in the Detailed - how?

Quote Reply
Override the isValidated in the Detailed - how?
Is there a way to override the isValidated in the Detailed-page and show the page even if the isValidated is set to "No"?
Quote Reply
Re: [index] Override the isValidated in the Detailed - how? In reply to
Hi,

Static detailed page, or via page.cgi ?

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
Quote Reply
Re: [Andy] Override the isValidated in the Detailed - how? In reply to
via page.cgi

Quote Reply
Re: [index] Override the isValidated in the Detailed - how? In reply to
Hi,

Mmm.. I just tried a couple of things (in /admin/GT/User/Page.cgi, generate_detailed_page() ), but couldn't get it to work. The error ( i.e detailed page not found) is related to:

Code:
if (!$link) {
print $IN->header();
print Links::SiteHTML::display('error', { error => Links::language('PAGE_INVALIDDETAIL', $page) });
return;
}

...however, this is grabbed from:

Code:
my $cat_id = $IN->param('CategoryID');
if ($cat_id and $DB->table('CatLinks')->count({ LinkID => $id, CategoryID => $cat_id })) {
$link = $DB->table(qw/Links CatLinks Category/)->select({ LinkID => $id, CategoryID => $cat_id })->fetchrow_hashref;
}
else {
$link = $DB->table('Links')->get($id, 'HASH');
}

I'm afraid I can't see where isValidated => Yes is defined - so can't really offer a solution - sorry :(

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
Quote Reply
Re: [Andy] Override the isValidated in the Detailed - how? In reply to
OK - thanks for trying Andy Smile
Quote Reply
Re: [Andy] Override the isValidated in the Detailed - how? In reply to
In Reply To:
I'm afraid I can't see where isValidated => Yes is defined - so can't really offer a solution - sorry :(

Here: Links.pm line 79

Code:
sub VIEWABLE() {
require GT::SQL::Condition;
my $cond = GT::SQL::Condition->new(isValidated => '=' => 'Yes');
$cond->add(ExpiryDate => '>=' => time) if $CFG->{payment}->{enabled};
$cond;
}

rgrdz
Boris

Facebook Login for GLinks | reCAPTCHA for GLinks | Free GLinks Plugins
Quote Reply
Re: [eupos] Override the isValidated in the Detailed - how? In reply to
Hi,

Ah, cool - didn't see that =)

In that case, you could edit (in /admin/Links.pm) it to:

Code:
sub VIEWABLE() {
require GT::SQL::Condition;
my $cond;
if($IN->param('preview_page')) {
$cond = GT::SQL::Condition->new(isValidated => '=' => 'Yes');
} else {
$cond = GT::SQL::Condition->new(isValidated => '=' => 'Yes');
}

$cond->add(ExpiryDate => '>=' => time) if $CFG->{payment}->{enabled};
$cond;
}

Then call the detailed page via:

page.cgi?g=Detailed/ID.html;preview_page=1

Hope that helps :)

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