I have managed to successfully add a couple of subs to page.cgi, but I'm confused on one thing. Around line 59 is this section:
my ($new_match) = $LINKS{build_new_url} =~ m,^$LINKS{build_root_url}/(.+),o;
my ($cool_match) = $LINKS{build_cool_url} =~ m,^$LINKS{build_root_url}/(.+),o;
my ($priority_match) = $LINKS{build_root_url} =~ m,^$LINKS{build_root_url}/(.+),o;
my ($rate_match) = $LINKS{build_ratings_url} =~ m,^$LINKS{build_root_url}/(.+),o;
my ($detail_match) = $LINKS{build_detail_url} =~ m,^$LINKS{build_root_url}/(.+),o;
CASE: {
($page =~ /^$new_match/o) and do { &generate_new_page ($in); last CASE; };
($page =~ /^$cool_match/o) and do { &generate_cool_page ($in); last CASE; };
($page =~ /^$priority_match/o) and do { &generate_priority_page ($in); last CASE; };
($page =~ /^$rate_match/o) and do { &generate_rate_page ($in); last CASE; };
($page =~ /^$detail_match/o) and do { &generate_detailed_page ($in); last CASE; };
($page =~ /^\s*$/) and do { &generate_home_page ($in); last CASE; };The $priority_match lines are the part I added in for this example. As far as I can tell, I followed the format for the other subs, but something's not right. I have tried this for the two different subs I have added to page.cgi, and in both cases, going to the "home" page.cgi page goes directly to the added sub:
http://run-down.com/...unlinks/page.cgi?d=1
This is low urgency, seeing as how I only use page.cgi for occasional testing, but it would be nice to understand what I'm doing wrong.
Thanks,
Dan
p.s. If anyone's interested, I could post the Priority Links/Page stuff as either a resource center mod or to the forum for the FAQ. The Priority Page turned out to be quite easy. In fact, I got it to work on my very first try! I'll be working it into the regular site navigation shortly.
------------------
Run-Down -> Links SQL
http://run-down.com/
Code:
# Figure out what to look for. my ($new_match) = $LINKS{build_new_url} =~ m,^$LINKS{build_root_url}/(.+),o;
my ($cool_match) = $LINKS{build_cool_url} =~ m,^$LINKS{build_root_url}/(.+),o;
my ($priority_match) = $LINKS{build_root_url} =~ m,^$LINKS{build_root_url}/(.+),o;
my ($rate_match) = $LINKS{build_ratings_url} =~ m,^$LINKS{build_root_url}/(.+),o;
my ($detail_match) = $LINKS{build_detail_url} =~ m,^$LINKS{build_root_url}/(.+),o;
CASE: {
($page =~ /^$new_match/o) and do { &generate_new_page ($in); last CASE; };
($page =~ /^$cool_match/o) and do { &generate_cool_page ($in); last CASE; };
($page =~ /^$priority_match/o) and do { &generate_priority_page ($in); last CASE; };
($page =~ /^$rate_match/o) and do { &generate_rate_page ($in); last CASE; };
($page =~ /^$detail_match/o) and do { &generate_detailed_page ($in); last CASE; };
($page =~ /^\s*$/) and do { &generate_home_page ($in); last CASE; };
http://run-down.com/...unlinks/page.cgi?d=1
This is low urgency, seeing as how I only use page.cgi for occasional testing, but it would be nice to understand what I'm doing wrong.
Thanks,
Dan
p.s. If anyone's interested, I could post the Priority Links/Page stuff as either a resource center mod or to the forum for the FAQ. The Priority Page turned out to be quite easy. In fact, I got it to work on my very first try! I'll be working it into the regular site navigation shortly.
------------------
Run-Down -> Links SQL
http://run-down.com/