# THIS PATCH IS OBSOLETE diff -ruNp nanoblogger-3.3-rc4/default/templates/category_inc_archive.htm nanoblogger-3.3-rc4-categories/default/templates/category_inc_archive.htm --- nanoblogger-3.3-rc4/default/templates/category_inc_archive.htm 1970-01-01 01:00:00.000000000 +0100 +++ nanoblogger-3.3-rc4-categories/default/templates/category_inc_archive.htm 2006-05-01 10:44:42.000000000 +0200 @@ -0,0 +1,50 @@ + + + + + + +$NB_ArchiveTitle $template_archives | $BLOG_TITLE + + + + + +$NB_AtomAltLink +$NB_RSS2AltLink +$NB_RSSAltLink + + + + +
+ +
+ +

$NB_ArchiveTitle $template_archives

+ +
+ $NB_MetaBody +
+ +
+
+ + + + + diff -ruNp nanoblogger-3.3-rc4/default/templates/category_inc_entry.htm nanoblogger-3.3-rc4-categories/default/templates/category_inc_entry.htm --- nanoblogger-3.3-rc4/default/templates/category_inc_entry.htm 1970-01-01 01:00:00.000000000 +0100 +++ nanoblogger-3.3-rc4-categories/default/templates/category_inc_entry.htm 2006-05-01 15:58:43.000000000 +0200 @@ -0,0 +1 @@ +
  • $NB_EntryTitle
    $NB_EntryDate
  • diff -ruNp nanoblogger-3.3-rc4/lib/config.sh nanoblogger-3.3-rc4-categories/lib/config.sh --- nanoblogger-3.3-rc4/lib/config.sh 2006-01-10 07:37:12.000000000 +0100 +++ nanoblogger-3.3-rc4-categories/lib/config.sh 2006-05-03 13:54:56.000000000 +0200 @@ -24,7 +24,7 @@ load_config(){ # set deprecated BASE_DIR for temporary compatibility BASE_DIR="$NB_BASE_DIR" load_globals -# allow user specified weblog directories +# allow user specified weblog directories [ ! -z "$USR_BLOGDIR" ] && BLOG_DIR="$USR_BLOGDIR" # auto-detect blog.conf from our CWD [ -f "$PWD/blog.conf" ] && BLOG_DIR="$PWD" @@ -115,8 +115,10 @@ x_id="$BLOG_ENTRYID_TAG" : ${MAX_ENTRIES:=10} : ${MAX_PAGE_ENTRIES:=$MAX_ENTRIES} : ${MAX_CATPAGE_ENTRIES:=$MAX_PAGE_ENTRIES} +: ${MAX_CATPAGE_INC_ENTRIES:=$MAX_PAGE_ENTRIES} # defaults for index file name : ${NB_INDEXFILE:=index.$NB_FILETYPE} +: ${NB_INC_INDEXFILE:=index-include.$NB_FILETYPE} # default for page navigation symbols (HTML entities) : ${NB_NextPage:=[>>]} # [>>] : ${NB_PrevPage:=[<<]} # [<<] diff -ruNp nanoblogger-3.3-rc4/lib/tools.sh nanoblogger-3.3-rc4-categories/lib/tools.sh --- nanoblogger-3.3-rc4/lib/tools.sh 2006-01-21 23:54:42.000000000 +0100 +++ nanoblogger-3.3-rc4-categories/lib/tools.sh 2006-05-01 10:25:34.000000000 +0200 @@ -206,15 +206,16 @@ fi set_catlink(){ catlink_var="$1" # default -category_dir=${catlink_var%%\.*} -category_file="$category_dir/$NB_INDEXFILE" -category_link="$category_dir/$NB_INDEX" - -# experimental title-based links -#category_title=`sed 1q "$NB_DATA_DIR/$catlink_var"` -#category_dir=`set_title2link "$category_title"` +#category_dir=${catlink_var%%\.*} #category_file="$category_dir/$NB_INDEXFILE" #category_link="$category_dir/$NB_INDEX" + +# experimental title-based links +category_title=`sed 1q "$NB_DATA_DIR/$catlink_var"` +category_dir=`set_title2link "$category_title"` +category_file="$category_dir/$NB_INDEXFILE" +category_inc_file="$category_dir/$NB_INC_INDEXFILE" +category_link="$category_dir/$NB_INDEX" } # set link/file for given month @@ -265,16 +266,16 @@ link_type="$2" if [ "$ENTRY_ARCHIVES" = 1 ] && [ "$link_type" != altlink ]; then # default entrylink_mod=`echo $entrylink_var |sed -e '/[-]/ s//\//g'` - entry_dir=`echo "${entrylink_mod%%\.*}" |sed -e '/\T/ s//\/T/g'` - permalink_file="$entry_dir/$NB_INDEXFILE" - NB_EntryPermalink="$entry_dir/$NB_INDEX" + #entry_dir=`echo "${entrylink_mod%%\.*}" |sed -e '/\T/ s//\/T/g'` + #permalink_file="$entry_dir/$NB_INDEXFILE" + #NB_EntryPermalink="$entry_dir/$NB_INDEX" # experimental title-based links - #entrylink_var=`echo $entrylink_var |sed -e '/[-]/ s//\//g'` - #entry_dir=`echo "$entrylink_var" |cut -d"." -f 1 |cut -c1-10` - #entry_linkname=`set_title2link "$NB_EntryTitle"` - #permalink_file="$entry_dir/$entry_linkname/$NB_INDEXFILE" - #NB_EntryPermalink="$entry_dir/$entry_linkname/$NB_INDEX" + entrylink_var=`echo $entrylink_var |sed -e '/[-]/ s//\//g'` + entry_dir=`echo "$entrylink_var" |cut -d"." -f 1 |cut -c1-10` + entry_linkname=`set_title2link "$NB_EntryTitle"` + permalink_file="$entry_dir/$entry_linkname/$NB_INDEXFILE" + NB_EntryPermalink="$entry_dir/$entry_linkname/$NB_INDEX" month=`echo "$entrylink_mod" |cut -c1-7` set_monthlink "$month" @@ -300,14 +301,28 @@ if [ "$entrynavlinks_type" = next ]; the next_entry="$entrynavlinks_entry" fi if [ ! -z "$prev_entry" ]; then - prev_entry_dir=`echo "$prev_entry" |cut -d "." -f 1 |sed -e '/[\-]/ s//\//g; /\T/ s//\/T/g'` - prev_permalink_file="$prev_entry_dir/$NB_INDEXFILE" - NB_PrevEntryPermalink="$prev_entry_dir/$NB_INDEX" +# prev_entry_dir=`echo "$prev_entry" |cut -d "." -f 1 |sed -e '/[\-]/ s//\//g; /\T/ s//\/T/g'` +# prev_permalink_file="$prev_entry_dir/$NB_INDEXFILE" +# NB_PrevEntryPermalink="$prev_entry_dir/$NB_INDEX" + # Nijel: support for named permalinks + read_metadata TITLE "$NB_DATA_DIR/$prev_entry"; NB_PrevEntryTitle="$METADATA" + prev_entrylink_var=`echo $prev_entry |sed -e '/[-]/ s//\//g'` + prev_entry_dir=`echo "$prev_entrylink_var" |cut -d"." -f 1 |cut -c1-10` + prev_entry_linkname=`set_title2link "$NB_PrevEntryTitle"` + prev_permalink_file="$prev_entry_dir/$prev_entry_linkname/$NB_INDEXFILE" + NB_PrevEntryPermalink="$prev_entry_dir/$prev_entry_linkname/$NB_INDEX" fi if [ ! -z "$next_entry" ]; then - next_entry_dir=`echo "$next_entry" |cut -d "." -f 1 |sed -e '/[\-]/ s//\//g; /\T/ s//\/T/g'` - next_permalink_file="$next_entry_dir/$NB_INDEXFILE" - NB_NextEntryPermalink="$next_entry_dir/$NB_INDEX" +# next_entry_dir=`echo "$next_entry" |cut -d "." -f 1 |sed -e '/[\-]/ s//\//g; /\T/ s//\/T/g'` +# next_permalink_file="$next_entry_dir/$NB_INDEXFILE" +# NB_NextEntryPermalink="$next_entry_dir/$NB_INDEX" + # Nijel: support for named permalinks + read_metadata TITLE "$NB_DATA_DIR/$next_entry"; NB_NextEntryTitle="$METADATA" + next_entrylink_var=`echo $next_entry |sed -e '/[-]/ s//\//g'` + next_entry_dir=`echo "$next_entrylink_var" |cut -d"." -f 1 |cut -c1-10` + next_entry_linkname=`set_title2link "$NB_NextEntryTitle"` + next_permalink_file="$next_entry_dir/$next_entry_linkname/$NB_INDEXFILE" + NB_NextEntryPermalink="$next_entry_dir/$next_entry_linkname/$NB_INDEX" fi } diff -ruNp nanoblogger-3.3-rc4/nb nanoblogger-3.3-rc4-categories/nb --- nanoblogger-3.3-rc4/nb 2006-01-27 23:37:09.000000000 +0100 +++ nanoblogger-3.3-rc4-categories/nb 2006-05-03 13:55:23.000000000 +0200 @@ -317,6 +317,9 @@ if [ ! -z "${CAT_LIST[*]}" ]; then ARCH_DATATYPE="$CATARCH_DATATYPE" paginate all "$cat_arch" "$MAX_CATPAGE_ENTRIES" "$CATEGORY_TEMPLATE" \ "$CATENTRY_TEMPLATE" "$BLOG_DIR/$ARCHIVES_DIR/" "$category_file" + # Nijel: generate simple listing + paginate all "$cat_arch" "$MAX_CATPAGE_INC_ENTRIES" "$CATEGORY_INC_TEMPLATE" \ + "$CATENTRY_INC_TEMPLATE" "$BLOG_DIR/$ARCHIVES_DIR/" "$category_inc_file" fi done fi diff -ruNp nanoblogger-3.3-rc4/nb.conf nanoblogger-3.3-rc4-categories/nb.conf --- nanoblogger-3.3-rc4/nb.conf 2005-12-13 23:12:03.000000000 +0100 +++ nanoblogger-3.3-rc4-categories/nb.conf 2006-05-01 10:25:27.000000000 +0200 @@ -24,3 +24,5 @@ PERMALINKENTRY_TEMPLATE="permalink_entry METADATAFILE_TEMPLATE="file.metadata" METADATAENTRY_TEMPLATE="entry.metadata" +CATENTRY_INC_TEMPLATE="category_inc_entry.htm" +CATEGORY_INC_TEMPLATE="category_inc_archive.htm" diff -ruNp nanoblogger-3.3-rc4/plugins/page/page_links.off nanoblogger-3.3-rc4-categories/plugins/page/page_links.off --- nanoblogger-3.3-rc4/plugins/page/page_links.off 2005-06-13 06:13:58.000000000 +0200 +++ nanoblogger-3.3-rc4-categories/plugins/page/page_links.off 2006-04-29 13:56:06.000000000 +0200 @@ -40,6 +40,13 @@ if [ ! -z "$NB_CategoryLinks" ]; then NB_CategoryLinks="$RLOAD_DATA" fi +# Nijel: feeds list +# reload NB_CategoryFeeds +if [ ! -z "$NB_CategoryFeeds" ]; then + RLOAD_DATA=`sed -e "$baseurl_sedscript" "$BLOG_DIR/$PARTS_DIR/category_feeds.$NB_FILETYPE"` + NB_CategoryFeeds="$RLOAD_DATA" +fi + # reload NB_MonthLinks if [ ! -z "$NB_MonthLinks" ]; then #NB_MonthLinks=$(< "$BLOG_DIR/$PARTS_DIR/month_links.$NB_FILETYPE") diff -ruNp nanoblogger-3.3-rc4/plugins/weblog_links.sh nanoblogger-3.3-rc4-categories/plugins/weblog_links.sh --- nanoblogger-3.3-rc4/plugins/weblog_links.sh 2006-01-04 23:33:56.000000000 +0100 +++ nanoblogger-3.3-rc4-categories/plugins/weblog_links.sh 2006-04-29 14:02:29.000000000 +0200 @@ -110,6 +110,10 @@ done build_catlinks |$CATLINKS_FILTERCMD |sed -e 's///' > "$BLOG_DIR/$PARTS_DIR/category_links.$NB_FILETYPE" NB_CategoryLinks=$(< "$BLOG_DIR/$PARTS_DIR/category_links.$NB_FILETYPE") +# Nijel: feeds list +sed 's@\([^<]*\).*@\2 (RSS, Atom)
    @' "$BLOG_DIR/$PARTS_DIR/category_links.$NB_FILETYPE" > "$BLOG_DIR/$PARTS_DIR/category_feeds.$NB_FILETYPE" +NB_CategoryFeeds=$(< "$BLOG_DIR/$PARTS_DIR/category_feeds.$NB_FILETYPE") + # tool to create yearly archive links make_yearlink(){ NB_YearTitle="$yearlink"