Index: lib/tools.sh
===================================================================
RCS file: /cvsroot/nanoblogger/nanoblogger/lib/tools.sh,v
retrieving revision 1.40
diff -u -3 -p -r1.40 tools.sh
--- lib/tools.sh	5 Aug 2006 21:08:33 -0000	1.40
+++ lib/tools.sh	30 Aug 2006 16:16:42 -0000
@@ -223,15 +223,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
@@ -326,16 +327,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"
@@ -365,14 +366,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
 }
 

Index: plugins/recent_entries.sh
===================================================================
RCS file: /cvsroot/nanoblogger/nanoblogger/plugins/recent_entries.sh,v
retrieving revision 1.18
diff -u -3 -p -r1.18 recent_entries.sh
--- plugins/recent_entries.sh	1 Aug 2006 19:08:18 -0000	1.18
+++ plugins/recent_entries.sh	30 Aug 2006 16:16:42 -0000
@@ -41,7 +41,13 @@ for entry in ${DB_RESULTS[*]}; do
 	link_title="$METADATA"
 	NB_EntryID=`set_entryid $entry`
 	[ -z "$link_title" ] && link_title="$notitle"
-	set_entrylink "$entry"
+#	set_entrylink "$entry"
+    # Nijel: support for named permalinks
+	entrylink_var=`echo $entry |sed -e '/[-]/ s//\//g'`
+	entry_dir=`echo "$entrylink_var" |cut -d"." -f 1 |cut -c1-10`
+	entry_linkname=`set_title2link "$link_title"`
+	permalink_file="$entry_dir/$entry_linkname/$NB_INDEXFILE"
+	NB_EntryPermalink="$entry_dir/$entry_linkname/$NB_INDEX"
 	echo '<a href="'${ARCHIVES_PATH}$NB_EntryPermalink'">'$link_title'</a><br />'
 done
 }
