# HG changeset patch # User HIROSE Yuuji # Date 1461483540 -32399 # Node ID b1847cc3912a1b2c8977caa9dc3f8568a16c99a7 # Parent 5d83ff0bbd40e644ec3c6db6e5fee6ddf1a4644e Display Most Recent Entry of user's diff -r 5d83ff0bbd40 -r b1847cc3912a s4-funcs.sh --- a/s4-funcs.sh Sat Apr 23 23:10:23 2016 +0859 +++ b/s4-funcs.sh Sun Apr 24 16:38:59 2016 +0859 @@ -1449,6 +1449,26 @@ $layout/html.m4.html $layout/home.m4.html if [ x"$user" = x"$uname" ]; then + # Display Most Recent Entry + DT_SQL="SELECT b.rowid, ctime, + (SELECT val FROM blog_s WHERE key='title' AND id=b.id) title, + (SELECT val FROM blog_s WHERE key='owner' AND id=b.id) owner + FROM blog b + JOIN + (SELECT distinct blogid, max(val) ctime + FROM article a, article_s s + ON a.id=s.id AND a.author='$user' AND s.key='ctime' + GROUP BY blogid ORDER BY val DESC LIMIT 5 + ) m + ON b.id=m.blogid;" + cat<<-EOF +
+ `cgi_checkbox mrd yes id="mre"` + `DT_VIEW=replyblog dumptable html blog` +
+ EOF + unset DT_SQL # Display NEWS if false; then cond="where 新着 > 0 order by 新着 desc,ctime desc limit 10"