changeset 150:6ee08d8b0f5f

Display the number of blogs of the user.
author HIROSE Yuuji <yuuji@gentei.org>
date Mon, 30 Nov 2015 09:48:08 +0859
parents 0e28561bf73a
children 7bb7086ea0d0
files examples/common/default/home.m4.html s4-funcs.sh
diffstat 2 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/examples/common/default/home.m4.html	Mon Nov 30 09:30:53 2015 +0859
+++ b/examples/common/default/home.m4.html	Mon Nov 30 09:48:08 2015 +0859
@@ -5,7 +5,7 @@
 </div>
 
 <div class="fold">
-<input type="checkbox" id="sd"><label for="sd">日記一覧を見る</label>
+<input type="checkbox" id="sd"><label for="sd">日記一覧を見る(_NBLOG_)</label>
 <div><!-- in home.m4 -->_BLOGS_</div><!-- in home.m4 -->
 </div>
 
--- a/s4-funcs.sh	Mon Nov 30 09:30:53 2015 +0859
+++ b/s4-funcs.sh	Mon Nov 30 09:48:08 2015 +0859
@@ -1371,12 +1371,15 @@
       echo '"'
     } > $imf
   fi
+  nblog=`query "SELECT count(id) FROM blog_s WHERE key='owner' AND \
+		val='$uname';"`
   listblog $uname			> $bf
   listgroupbytable $formdir/grp.def $cond \
       | m4 -D_BODYCLASS_=home -D_TITLE_="spaste(\`$tf')" \
 	   -D_PROFILE_="spaste(\`$pf')$conflink" \
 	   -D_PROFIMG_="spaste(\`$imf')" \
 	   -D_BLOGS_="spaste(\`$bf')" \
+	   -D_NBLOG_="$nblog" \
 	   -D_GROUPS_="syscmd(\`cat')" \
 	   $layout/html.m4.html $layout/home.m4.html
   

yatex.org