Is there a way to override the isValidated in the Detailed-page and show the page even if the isValidated is set to "No"?
Apr 18, 2007, 6:58 AM
Veteran / Moderator (18441 posts)
Apr 18, 2007, 6:58 AM
Post #2 of 7
Views: 3185
Hi,
Static detailed page, or via page.cgi ?
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!
Static detailed page, or via page.cgi ?
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!
Apr 18, 2007, 7:15 AM
Veteran / Moderator (18441 posts)
Apr 18, 2007, 7:15 AM
Post #4 of 7
Views: 3181
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:
print $IN->header();
print Links::SiteHTML::display('error', { error => Links::language('PAGE_INVALIDDETAIL', $page) });
return;
}
...however, this is grabbed from:
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
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!
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
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!
Apr 18, 2007, 11:49 PM
User (339 posts)
Apr 18, 2007, 11:49 PM
Post #6 of 7
Views: 3145
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;
}
Cheers,
Boris
Facebook, Twitter and Google+ Auth for GLinks and GCommunity | reCAPTCHA for GLinks | Free GLinks Plugins
Apr 18, 2007, 11:56 PM
Veteran / Moderator (18441 posts)
Apr 18, 2007, 11:56 PM
Post #7 of 7
Views: 3137
Hi,
Ah, cool - didn't see that =)
In that case, you could edit (in /admin/Links.pm) it to:
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
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!
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
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!