comparison s4-blog.sh @ 960:0d9caeab3d81 draft

Instant notify by "@all" sign at the beginning of article.
author HIROSE Yuuji <yuuji@gentei.org>
date Sat, 29 Jan 2022 10:41:41 +0900
parents b8ce08814228
children b327b5691b59
comparison
equal deleted inserted replaced
959:193d9d2ed9c9 960:0d9caeab3d81
41 blogid="${1%%[!A-Z0-9a-z_]*}" 41 blogid="${1%%[!A-Z0-9a-z_]*}"
42 blogowner=`getvalbyid blog owner "$blogid"` 42 blogowner=`getvalbyid blog owner "$blogid"`
43 blogtitle=`getvalbyid blog title "$blogid"` 43 blogtitle=`getvalbyid blog title "$blogid"`
44 blogurl="$urlbase?replyblog+$blogid" 44 blogurl="$urlbase?replyblog+$blogid"
45 action=${4:-書き込み} 45 action=${4:-書き込み}
46 mode=`getvalbyid blog notify "$blogid"` 46 case "$3" in
47 @all*) mode=all ;;
48 *) mode=`getvalbyid blog notify "$blogid"` ;;
49 esac
47 isgroup "$blogowner" && _isgroup=true || _isgroup=false 50 isgroup "$blogowner" && _isgroup=true || _isgroup=false
48 ### EXCEPT=`sqlquote "$user"` ## User should receive to feal some annoyance 51 ### EXCEPT=`sqlquote "$user"` ## User should receive to feal some annoyance
49 case $mode in 52 case $mode in
50 admin) 53 admin)
51 if $_isgroup; then 54 if $_isgroup; then
92 done 95 done
93 action="${whom}への返信" 96 action="${whom}への返信"
94 fi 97 fi
95 elif echo "$firstline" | grep -q "^## "; then 98 elif echo "$firstline" | grep -q "^## "; then
96 subject=${firstline#\#\# } 99 subject=${firstline#\#\# }
100 elif echo "$firstline" | grep -q "^@all "; then
101 subject=${firstline#@all }
97 fi 102 fi
98 else 103 else
99 # This else block is not symmetry, check later(2020-1209) 104 # This else block is not symmetry, check later(2020-1209)
100 [ x"$2" = x"$blogowner" ] && return # If author=blogowner, unnecessary 105 [ x"$2" = x"$blogowner" ] && return # If author=blogowner, unnecessary
101 fi 106 fi
607 filehelp="《添付の注意》 612 filehelp="《添付の注意》
608 $file_accept_help" 613 $file_accept_help"
609 ntmode="通知モード=$blog_notify${blog_team:+ (team=$blog_team)} 614 ntmode="通知モード=$blog_notify${blog_team:+ (team=$blog_team)}
610 記事の1行目を「## 」(半角シャープシャープ空白=大見出し) 615 記事の1行目を「## 」(半角シャープシャープ空白=大見出し)
611 にするとそれより後ろの部分がSubject(件名)になります。 616 にするとそれより後ろの部分がSubject(件名)になります。
612 If the first line begins with &quot;## &quot;, sent it as Subject of email." 617 記事先頭に @all で全員(チーム所有の場合はチーム全体)通知になります。
618 If the first line begins with &quot;## &quot;, sent it as Subject of email.
619 If begins with &quot;@all&quot;, notify to all group(or team) members."
613 textform=$(cat<<-EOF 620 textform=$(cat<<-EOF
614 <div class="fold"> 621 <div class="fold">
615 <input type="checkbox" id="cmt" checked><label 622 <input type="checkbox" id="cmt" checked><label
616 accesskey="c" title="C" for="cmt">コメントする</label><div> 623 accesskey="c" title="C" for="cmt">コメントする</label><div>
617 <table class="b"> 624 <table class="b">

yatex.org