Hi all,
Similar to what's discussed in this thread I've setup a simple mod_rewrite for displaying reviews on search engine friendly URLs except to aviod one long Review page for each link I'm trying to use the page set function Review_SpeedBar.
The htaccess line is:
RewriteRule ^reviews/([0-9]+)_([0-9]+).html?$ cgi-bin/review.cgi?ID=$1;nh=$2 [L]
so any calls to domain.com/reviews/[Link ID Number]_[Review Page Number].html
will pass to this URL:
domain.com/cgi-bin/review.cgi?ID=[Link ID Number];nh=[Review Page Number]
that all works fine, except I'm struggling to change the Review_SpeedBar to write the URLs to match the rewrite URLs.
The Perl that builds the SpeedBar is in /Links/User/Review.pm
my $toolbar;
if ($review_hits > $args->{mh}) {
my $url = $IN->url ( { query_string => 1 } );
$url =~ s/([;&?]?)nh=(\d+)/($1 and $1 eq '?') ? '?' : ''/eg;
$url =~ s/helpful=1//eg;
$toolbar = $DB->html($reviews, $args)->toolbar( $args->{nh} || 1, $args->{mh} || 25, $review_hits, $url);
}
else {
$toolbar = '';
}
Though I can't for the life of me see where I can change this so the URL returned is '[Link ID]_[Review Page Number].html' instead of 'review.cgi?ID=[Link ID];nh=[Review Page Number]
I'm guessing the $toolbar variable passes to a toolbar class in another PM file where the actual html is built?
Any suggestions?
Thanks for your help :)
Comedy Quotes - Glinks 3.3.0, PageBuilder, StaticURLtr, CAPTCHA, User_Edit_Profile
Similar to what's discussed in this thread I've setup a simple mod_rewrite for displaying reviews on search engine friendly URLs except to aviod one long Review page for each link I'm trying to use the page set function Review_SpeedBar.
The htaccess line is:
RewriteRule ^reviews/([0-9]+)_([0-9]+).html?$ cgi-bin/review.cgi?ID=$1;nh=$2 [L]
so any calls to domain.com/reviews/[Link ID Number]_[Review Page Number].html
will pass to this URL:
domain.com/cgi-bin/review.cgi?ID=[Link ID Number];nh=[Review Page Number]
that all works fine, except I'm struggling to change the Review_SpeedBar to write the URLs to match the rewrite URLs.
The Perl that builds the SpeedBar is in /Links/User/Review.pm
Code:
# Generate a toolbar if requested. my $toolbar;
if ($review_hits > $args->{mh}) {
my $url = $IN->url ( { query_string => 1 } );
$url =~ s/([;&?]?)nh=(\d+)/($1 and $1 eq '?') ? '?' : ''/eg;
$url =~ s/helpful=1//eg;
$toolbar = $DB->html($reviews, $args)->toolbar( $args->{nh} || 1, $args->{mh} || 25, $review_hits, $url);
}
else {
$toolbar = '';
}
Though I can't for the life of me see where I can change this so the URL returned is '[Link ID]_[Review Page Number].html' instead of 'review.cgi?ID=[Link ID];nh=[Review Page Number]
I'm guessing the $toolbar variable passes to a toolbar class in another PM file where the actual html is built?
Any suggestions?
Thanks for your help :)
Comedy Quotes - Glinks 3.3.0, PageBuilder, StaticURLtr, CAPTCHA, User_Edit_Profile