Fossil SCM

The "New Thread" button in /forum is no longer ristricted to those with forum write capability: if you lack it, we now send you to the login page instead. Without this, users without the capability to post are left looking in through the window of a building without obvious doors. This change pairs especially nicely with the self-registration feature, but it doesn't require it, since /login also allows anonymous login, which should be enabled for Fossil forums on sites where non-users are expected to visit.

wyoung 2018-11-09 18:52 trunk
Commit cdb7f3b988da4624979ae5e56a509f33d38bd0493bf75919b859a5f718f6b950
1 file changed +3 -3
+3 -3
--- src/forum.c
+++ src/forum.c
@@ -971,13 +971,13 @@
971971
if( !g.perm.RdForum ){
972972
login_needed(g.anon.RdForum);
973973
return;
974974
}
975975
style_header("Forum");
976
- if( g.perm.WrForum ){
977
- style_submenu_element("New Thread","%R/forumnew");
978
- }
976
+ style_submenu_element("New Thread", g.perm.WrForum ?
977
+ "%R/forumnew" :
978
+ "%R/login");
979979
if( g.perm.ModForum && moderation_needed() ){
980980
style_submenu_element("Moderation Requests", "%R/modreq");
981981
}
982982
if( (srchFlags & SRCH_FORUM)!=0 ){
983983
if( search_screen(SRCH_FORUM, 0) ){
984984
--- src/forum.c
+++ src/forum.c
@@ -971,13 +971,13 @@
971 if( !g.perm.RdForum ){
972 login_needed(g.anon.RdForum);
973 return;
974 }
975 style_header("Forum");
976 if( g.perm.WrForum ){
977 style_submenu_element("New Thread","%R/forumnew");
978 }
979 if( g.perm.ModForum && moderation_needed() ){
980 style_submenu_element("Moderation Requests", "%R/modreq");
981 }
982 if( (srchFlags & SRCH_FORUM)!=0 ){
983 if( search_screen(SRCH_FORUM, 0) ){
984
--- src/forum.c
+++ src/forum.c
@@ -971,13 +971,13 @@
971 if( !g.perm.RdForum ){
972 login_needed(g.anon.RdForum);
973 return;
974 }
975 style_header("Forum");
976 style_submenu_element("New Thread", g.perm.WrForum ?
977 "%R/forumnew" :
978 "%R/login");
979 if( g.perm.ModForum && moderation_needed() ){
980 style_submenu_element("Moderation Requests", "%R/modreq");
981 }
982 if( (srchFlags & SRCH_FORUM)!=0 ){
983 if( search_screen(SRCH_FORUM, 0) ){
984

Keyboard Shortcuts

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