s4

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 diff
     1.1 --- a/examples/common/default/home.m4.html	Mon Nov 30 09:30:53 2015 +0859
     1.2 +++ b/examples/common/default/home.m4.html	Mon Nov 30 09:48:08 2015 +0859
     1.3 @@ -5,7 +5,7 @@
     1.4  </div>
     1.5  
     1.6  <div class="fold">
     1.7 -<input type="checkbox" id="sd"><label for="sd">日記一覧を見る</label>
     1.8 +<input type="checkbox" id="sd"><label for="sd">日記一覧を見る(_NBLOG_)</label>
     1.9  <div><!-- in home.m4 -->_BLOGS_</div><!-- in home.m4 -->
    1.10  </div>
    1.11  
     2.1 --- a/s4-funcs.sh	Mon Nov 30 09:30:53 2015 +0859
     2.2 +++ b/s4-funcs.sh	Mon Nov 30 09:48:08 2015 +0859
     2.3 @@ -1371,12 +1371,15 @@
     2.4        echo '"'
     2.5      } > $imf
     2.6    fi
     2.7 +  nblog=`query "SELECT count(id) FROM blog_s WHERE key='owner' AND \
     2.8 +		val='$uname';"`
     2.9    listblog $uname			> $bf
    2.10    listgroupbytable $formdir/grp.def $cond \
    2.11        | m4 -D_BODYCLASS_=home -D_TITLE_="spaste(\`$tf')" \
    2.12  	   -D_PROFILE_="spaste(\`$pf')$conflink" \
    2.13  	   -D_PROFIMG_="spaste(\`$imf')" \
    2.14  	   -D_BLOGS_="spaste(\`$bf')" \
    2.15 +	   -D_NBLOG_="$nblog" \
    2.16  	   -D_GROUPS_="syscmd(\`cat')" \
    2.17  	   $layout/html.m4.html $layout/home.m4.html
    2.18