In Reply To:
Numbers next to category links and search results, that continue on the next spanned page in order.
I can help you with the
Category pages...yet I cannot help you with the
Search Result pages....
Okay...this is NOT an easy code hack to install for novice programmers, so make sure that you make a back-up of your
nph-build.cgi before attempting this hack.
1) Add the following codes in the
sub build_category_pages routine in the
nph-build.cgi file:
Code:
my $links_count = '0'; BEFORE the following text:
Code:
# Go through each category and build the appropriate page. 2) In the same sub-routine and file, add the following codes:
before the following text:
Code:
# Store all the category html info in $category. 3) Then in the same sub-routine in the same file, add the following codes:
Code:
$links_count= $links_count+1;
$tmp{'links_count'}= $links_count; BEFORE the following codes:
Code:
$links .= &site_html_link (%tmp); Note: There are two occurrences of these codes...and you have to add the codes I provided BEFORE each of them in order for the number to continue on each spanning page.
4) Then add the following codes in the same sub and file:
Code:
$links_count= $links_count+1;
$tmp{'links_count'}= $links_count; BEFORE the following codes:
Code:
last LINK if ($tmp{$db_key} eq ""); 5) Then in your
sub site_html_link in the
site_html_templates.pl file, add the following codes in the tag definition area:
Code:
links_count => $links_count, 6) Then in your
link.html file, add the following tag:
<%links_count%>
7) Then copy your
sub site_html_link routine in the
site_html_templates.pl and call the new sub-routine,
sub site_html_searchlink. This should load
searchlink.html RATHER than
link.html file.
To do this...you will need to replace the following codes:
Code:
return &load_template ('link.html', { with the following codes:
Code:
return &load_template ('searchlink.html', { 8) Then create this new template file,
searchlink.html. This SHOULD NOT INCLUDE the
links_count tag!!
9) Then in your
search.cgi script, REPLACE all occurrences of
&site_html_link with
&site_html_searchlink.
Note: If you do NOT follow steps 7-9, then you will GET an UNKNOWN TAG ERROR (links_count) in your search result pages.
In Reply To:
Having the real url of a website show up in link results and category pages.
Replace the
jump.cgi link in the
link.html (and in the
searchlink.html) with <%URL%>.
Hope this helps.
Regards,
Eliot Lee