Search Results: "Matt Hope"

16 October 2005

Matt Hope: Limit

--- blosxom.cgi    2003-02-18 03:17:28.000000000 +1100
+++ blosxom.cgi 2003-02-18 03:22:09.000000000 +1100
@@ -190,4 +190,5 @@
   my $curdate = '';
   my $ne = $num_entries;
+  if ( defined( param('limit') ) && ( param('limit') < $num_entries ) )   $ne = param('limit');  
 
   my %f;
Set a ?limit=number.
Reason? I only want 10 entries for my RSS summary, but more than that on my main index.

Matt Hope: Search engine?

Add a search engine?
Use $url/?search=$term .. and only seach that category.

Matt Hope: Layered Directory?

If I made my whole site blosxom (dynamic), then I'd not be able to serve robots.txt, and possibly other similar files. If there was an option to "overlay" with the $static_dir, and serve pages from $static_dir if they are explicitly refered to, that'd solve my problem.

Matt Hope: Filedate patch..

Got blosxom to derive the date from the filename. Thanks Gus for the mktime() tip.
--- blosxom.cgi	Sun Feb 16 11:16:00 2003
+++ blosxom.cgi	Sun Feb 16 12:38:24 2003
@@ -59,4 +59,5 @@
 use File::stat;
 use Time::localtime;
+use POSIX qw/mktime/;
 use CGI qw/:standard :netscape/;
 
@@ -105,4 +106,9 @@
                   and $static_entries and $indexes  ($1 ? "$1/" : '') . "$2.$file_extension"   = 1;
 
+    if ( $files $File::Find::name  and $File::Find::name =~ m/.*\/(\d 4 )(\d 2 )(\d 2 )-(\d 2 )(\d 2 )/ )  
+      $files $File::Find::name  = POSIX::mktime( 0, $5, $4, $3, $2-1, $1-1900 );
+     
+
+
    , 
   $datadir
@@ -206,5 +212,5 @@
 
     # Date fiddling for by- year,month,day  archive views
-    my ($dw,$mo,$mo_num,$da,$ti,$yr) = nice_date(stat("$path_file")->mtime);
+    my ($dw,$mo,$mo_num,$da,$ti,$yr) = nice_date( $files $path_file  );
     my ($hr,$min) = split /:/, $ti;
(The output above may be skewed in html - [txt version] )

.. now, onto non-indexed categories..