Fossil SCM

Add a notice to the forum post editor politely requesting that users refrain from making multiple posts or edits in rapid succession to avoid spamming subscribers. Prompted by recent sqlite forum activity. A more complete solution would include a toggle to hide this notice and remember that preference via sessionStorage.

stephan 2026-03-24 15:23 trunk
Commit 6eeeed8b9f64dc54f61e9fbd0136acbc69a69f42d6bff4b08ad37ecda59fbb07
1 file changed +13
+13
--- src/forum.c
+++ src/forum.c
@@ -1554,10 +1554,21 @@
15541554
@ <br><label><input type="checkbox" name="fpsilent" %s(PCK("fpsilent"))> \
15551555
@ Do not send notification emails</label>
15561556
@ </div>
15571557
}
15581558
}
1559
+
1560
+static void forum_render_notification_reminder(void){
1561
+ if( alert_tables_exist() ){
1562
+ @ <div class='debug'>Creating and editing forum posts may send notifications
1563
+ @ to an arbitrary number of subscribers. To reduce subscriber annoyance and
1564
+ @ the risk of this forum's messages being flagged as spam by mail providers,
1565
+ @ <em>please refrain from making multiple new posts or edits in rapid
1566
+ @ succession</em>.
1567
+ @ </div>
1568
+ }
1569
+}
15591570
15601571
/*
15611572
** WEBPAGE: forume1
15621573
**
15631574
** Start a new forum thread.
@@ -1584,10 +1595,11 @@
15841595
style_header("New Forum Thread");
15851596
@ <form action="%R/forume1" method="POST">
15861597
@ <h1>New Thread:</h1>
15871598
forum_from_line();
15881599
forum_post_widget(zTitle, zMimetype, zContent);
1600
+ forum_render_notification_reminder();
15891601
@ <input type="submit" name="preview" value="Preview">
15901602
if( P("preview") && !whitespace_only(zContent) ){
15911603
@ <input type="submit" name="submit" value="Submit">
15921604
}else{
15931605
@ <input type="submit" name="submit" value="Submit" disabled>
@@ -1775,10 +1787,11 @@
17751787
@ <input type="hidden" name="reply" value="1">
17761788
forum_from_line();
17771789
forum_post_widget(0, zMimetype, zContent);
17781790
}
17791791
if( !isDelete ){
1792
+ forum_render_notification_reminder();
17801793
@ <input type="submit" name="preview" value="Preview">
17811794
}
17821795
@ <input type="submit" name="cancel" value="Cancel">
17831796
if( (bPreview && !whitespace_only(zContent)) || isDelete ){
17841797
if( !iClosed || g.perm.Admin ) {
17851798
--- src/forum.c
+++ src/forum.c
@@ -1554,10 +1554,21 @@
1554 @ <br><label><input type="checkbox" name="fpsilent" %s(PCK("fpsilent"))> \
1555 @ Do not send notification emails</label>
1556 @ </div>
1557 }
1558 }
 
 
 
 
 
 
 
 
 
 
 
1559
1560 /*
1561 ** WEBPAGE: forume1
1562 **
1563 ** Start a new forum thread.
@@ -1584,10 +1595,11 @@
1584 style_header("New Forum Thread");
1585 @ <form action="%R/forume1" method="POST">
1586 @ <h1>New Thread:</h1>
1587 forum_from_line();
1588 forum_post_widget(zTitle, zMimetype, zContent);
 
1589 @ <input type="submit" name="preview" value="Preview">
1590 if( P("preview") && !whitespace_only(zContent) ){
1591 @ <input type="submit" name="submit" value="Submit">
1592 }else{
1593 @ <input type="submit" name="submit" value="Submit" disabled>
@@ -1775,10 +1787,11 @@
1775 @ <input type="hidden" name="reply" value="1">
1776 forum_from_line();
1777 forum_post_widget(0, zMimetype, zContent);
1778 }
1779 if( !isDelete ){
 
1780 @ <input type="submit" name="preview" value="Preview">
1781 }
1782 @ <input type="submit" name="cancel" value="Cancel">
1783 if( (bPreview && !whitespace_only(zContent)) || isDelete ){
1784 if( !iClosed || g.perm.Admin ) {
1785
--- src/forum.c
+++ src/forum.c
@@ -1554,10 +1554,21 @@
1554 @ <br><label><input type="checkbox" name="fpsilent" %s(PCK("fpsilent"))> \
1555 @ Do not send notification emails</label>
1556 @ </div>
1557 }
1558 }
1559
1560 static void forum_render_notification_reminder(void){
1561 if( alert_tables_exist() ){
1562 @ <div class='debug'>Creating and editing forum posts may send notifications
1563 @ to an arbitrary number of subscribers. To reduce subscriber annoyance and
1564 @ the risk of this forum's messages being flagged as spam by mail providers,
1565 @ <em>please refrain from making multiple new posts or edits in rapid
1566 @ succession</em>.
1567 @ </div>
1568 }
1569 }
1570
1571 /*
1572 ** WEBPAGE: forume1
1573 **
1574 ** Start a new forum thread.
@@ -1584,10 +1595,11 @@
1595 style_header("New Forum Thread");
1596 @ <form action="%R/forume1" method="POST">
1597 @ <h1>New Thread:</h1>
1598 forum_from_line();
1599 forum_post_widget(zTitle, zMimetype, zContent);
1600 forum_render_notification_reminder();
1601 @ <input type="submit" name="preview" value="Preview">
1602 if( P("preview") && !whitespace_only(zContent) ){
1603 @ <input type="submit" name="submit" value="Submit">
1604 }else{
1605 @ <input type="submit" name="submit" value="Submit" disabled>
@@ -1775,10 +1787,11 @@
1787 @ <input type="hidden" name="reply" value="1">
1788 forum_from_line();
1789 forum_post_widget(0, zMimetype, zContent);
1790 }
1791 if( !isDelete ){
1792 forum_render_notification_reminder();
1793 @ <input type="submit" name="preview" value="Preview">
1794 }
1795 @ <input type="submit" name="cancel" value="Cancel">
1796 if( (bPreview && !whitespace_only(zContent)) || isDelete ){
1797 if( !iClosed || g.perm.Admin ) {
1798

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button