Hi all, I read here in the admin help edit templates thingy that you could:-
By default you can use the following codes:
You can also use the following fields for this template: detailed.html
When I try and add <%grand_total%> in my detail.html template, nothing prints out, no bad tag nothing.
Here are my globals
%globals = (
date => &get_date,
time => &get_time,
db_cgi_url => $db_cgi_url,
build_root_url => $build_root_url,
site_title => $build_site_title,
css => $build_css_url,
category_name => $category_name,
build_image_url => $build_image_url,
dead_total => $deadtotal,
topsites => &top_ten,
banner => ''
);
also my detail sub
return &load_template ('detailed.html', {
total => $total,
grand_total => $grand_total,
title_unlinked => $title_unlinked,
title_linked => $title_linked,
category_name => $category_name,
category_name_escaped => $category_name_escaped,
category_clean => $category_clean,
thiscat => $thiscat,
flag => $langimg,
new_update => $new_mod_img,
rate_img => $rate_img,
%rec,
%globals
} );
}
and my nph build.cgi
sub build_detailed_view {
# --------------------------------------------------------
# This routine build a single page for every link.
#
my (@values, $id, %rec, $count);
if ($build_detail_path =~ m,^$build_root_path/(.*)$,) {
&build_dir ($1);
}
print "\t";
open (DB, "<$db_file_name") or &cgierr("unable to open database: $db_file_name. Reason: $!");
LINE: while (<DB>) {
/^#/ and next LINE; # Skip comment Lines.
/^\s*$/ and next LINE; # Skip blank lines.
chomp;
@values = &split_decode ($_);
$id = $values[$db_key_pos];
%rec = &array_to_hash (0, @values);
$title_linked = &build_linked_title ("$rec{'Category'}/$rec{'Title'}");
open (DETAIL, ">$build_detail_path/$id$build_extension") or &cgierr ("Unable to build detail page: $build_detail_path/$id$build_extension. Reason: $!");
print DETAIL &site_html_detailed (%rec);
close DETAIL;
$use_html ?
print qq~<a href="$build_detail_url/$id$build_extension" target="_blank">$id</a> ~ :
print qq~$id ~;
(++$count % 10) or print "\n\t";
}
close DB;
print "\n";
}
###############################
Is it just me or can this not be done even though it says it can. I even tried using the orignal links 2.0.
Please help a damsel in distress, my weee puppies life depends on it.
By default you can use the following codes:
- <%date%> - Current date.
- <%time%> - Current time.
- <%db_cgi_url%> - URL to your user cgi directory.
- <%build_root_url%> - URL to your user home directory.
- <%site_title%> - Title of your Links directory.
- <%css%> - URL to your links.css file.
You can also use the following fields for this template: detailed.html
- <%grand_total%> - Total number of links in your database.
- <%title_linked%> - A linked title bar.
When I try and add <%grand_total%> in my detail.html template, nothing prints out, no bad tag nothing.
Here are my globals
%globals = (
date => &get_date,
time => &get_time,
db_cgi_url => $db_cgi_url,
build_root_url => $build_root_url,
site_title => $build_site_title,
css => $build_css_url,
category_name => $category_name,
build_image_url => $build_image_url,
dead_total => $deadtotal,
topsites => &top_ten,
banner => ''
);
also my detail sub
return &load_template ('detailed.html', {
total => $total,
grand_total => $grand_total,
title_unlinked => $title_unlinked,
title_linked => $title_linked,
category_name => $category_name,
category_name_escaped => $category_name_escaped,
category_clean => $category_clean,
thiscat => $thiscat,
flag => $langimg,
new_update => $new_mod_img,
rate_img => $rate_img,
%rec,
%globals
} );
}
and my nph build.cgi
sub build_detailed_view {
# --------------------------------------------------------
# This routine build a single page for every link.
#
my (@values, $id, %rec, $count);
if ($build_detail_path =~ m,^$build_root_path/(.*)$,) {
&build_dir ($1);
}
print "\t";
open (DB, "<$db_file_name") or &cgierr("unable to open database: $db_file_name. Reason: $!");
LINE: while (<DB>) {
/^#/ and next LINE; # Skip comment Lines.
/^\s*$/ and next LINE; # Skip blank lines.
chomp;
@values = &split_decode ($_);
$id = $values[$db_key_pos];
%rec = &array_to_hash (0, @values);
$title_linked = &build_linked_title ("$rec{'Category'}/$rec{'Title'}");
open (DETAIL, ">$build_detail_path/$id$build_extension") or &cgierr ("Unable to build detail page: $build_detail_path/$id$build_extension. Reason: $!");
print DETAIL &site_html_detailed (%rec);
close DETAIL;
$use_html ?
print qq~<a href="$build_detail_url/$id$build_extension" target="_blank">$id</a> ~ :
print qq~$id ~;
(++$count % 10) or print "\n\t";
}
close DB;
print "\n";
}
###############################
Is it just me or can this not be done even though it says it can. I even tried using the orignal links 2.0.
Please help a damsel in distress, my weee puppies life depends on it.