Fossil SCM

In the forum, link post timestamps to /timeline?c=timestamp. Inspired by recent repo archeology.

stephan 2025-03-01 04:27 trunk
Commit 2dc9f676ce0c3e6f254c0f5069a4a21a820db449c494babc6c34424f588ac57a
1 file changed +9 -5
+9 -5
--- src/forum.c
+++ src/forum.c
@@ -789,23 +789,26 @@
789789
zEditorName = forum_post_display_name(p, pManifest);
790790
zHist = bHist ? "" : zQuery[0]==0 ? "?hist" : "&hist";
791791
@ <h3 class='forumPostHdr'>(%d(p->sid)\
792792
@ .%0*d(fossil_num_digits(p->nEdit))(p->rev))
793793
if( fossil_strcmp(zPosterName, zEditorName)==0 ){
794
- @ By %s(zPosterName) on %h(zDate) edited from \
794
+ @ By %s(zPosterName) on
795
+ @ <a href="%R/timeline?y=all&c=%h(zDate)">%h(zDate)</a> \
796
+ @ edited from \
795797
@ %z(href("%R/forumpost/%S%s%s",p->pEditPrev->zUuid,zQuery,zHist))\
796798
@ %d(p->sid).%0*d(fossil_num_digits(p->nEdit))(p->pEditPrev->rev)</a>
797799
}else{
798800
@ Originally by %s(zPosterName) \
799
- @ with edits by %s(zEditorName) on %h(zDate) from \
801
+ @ with edits by %s(zEditorName) on \
802
+ @ <a href="%R/timeline?y=all&c=%h(zDate)">%h(zDate)</a> from \
800803
@ %z(href("%R/forumpost/%S%s%s",p->pEditPrev->zUuid,zQuery,zHist))\
801804
@ %d(p->sid).%0*d(fossil_num_digits(p->nEdit))(p->pEditPrev->rev)</a>
802805
}
803806
}else{
804807
zPosterName = forum_post_display_name(p, pManifest);
805808
@ <h3 class='forumPostHdr'>(%d(p->sid))
806
- @ By %s(zPosterName) on %h(zDate)
809
+ @ By %s(zPosterName) on <a href="%R/timeline?y=all&c=%h(zDate)">%h(zDate)</a>
807810
}
808811
fossil_free(zDate);
809812
810813
811814
/* If debugging is enabled, link to the artifact page. */
@@ -1730,11 +1733,12 @@
17301733
@ <span class="forumPostReplyTitle">%h(pRootPost->zThreadTitle)</span>
17311734
}
17321735
@ </h2>
17331736
zDate = db_text(0, "SELECT datetime(%.17g,toLocal())", pPost->rDate);
17341737
zDisplayName = display_name_from_login(pPost->zUser);
1735
- @ <h3 class='forumPostHdr'>By %s(zDisplayName) on %h(zDate)</h3>
1738
+ @ <h3 class='forumPostHdr'>By %s(zDisplayName) on
1739
+ @ <a href='%R/timeline?y=all&c=%h(zDate)'>%h(zDate)</a></h3>
17361740
fossil_free(zDisplayName);
17371741
fossil_free(zDate);
17381742
forum_render(0, pPost->zMimetype, pPost->zWiki, "forumEdit", 1);
17391743
if( bPreview && !whitespace_only(zContent) ){
17401744
@ <h2>Preview:</h2>
@@ -1934,11 +1938,11 @@
19341938
login_needed(g.anon.RdForum);
19351939
return;
19361940
}
19371941
cgi_check_for_malice();
19381942
style_set_current_feature("forum");
1939
- style_header("%s%s", db_get("forum-title","Forum"),
1943
+ style_header("%s%s", db_get("forum-title","Forum"),
19401944
isSearch ? " Search Results" : "");
19411945
style_submenu_element("Timeline", "%R/timeline?ss=v&y=f&vfx");
19421946
if( g.perm.WrForum ){
19431947
style_submenu_element("New Thread","%R/forumnew");
19441948
}else{
19451949
--- src/forum.c
+++ src/forum.c
@@ -789,23 +789,26 @@
789 zEditorName = forum_post_display_name(p, pManifest);
790 zHist = bHist ? "" : zQuery[0]==0 ? "?hist" : "&hist";
791 @ <h3 class='forumPostHdr'>(%d(p->sid)\
792 @ .%0*d(fossil_num_digits(p->nEdit))(p->rev))
793 if( fossil_strcmp(zPosterName, zEditorName)==0 ){
794 @ By %s(zPosterName) on %h(zDate) edited from \
 
 
795 @ %z(href("%R/forumpost/%S%s%s",p->pEditPrev->zUuid,zQuery,zHist))\
796 @ %d(p->sid).%0*d(fossil_num_digits(p->nEdit))(p->pEditPrev->rev)</a>
797 }else{
798 @ Originally by %s(zPosterName) \
799 @ with edits by %s(zEditorName) on %h(zDate) from \
 
800 @ %z(href("%R/forumpost/%S%s%s",p->pEditPrev->zUuid,zQuery,zHist))\
801 @ %d(p->sid).%0*d(fossil_num_digits(p->nEdit))(p->pEditPrev->rev)</a>
802 }
803 }else{
804 zPosterName = forum_post_display_name(p, pManifest);
805 @ <h3 class='forumPostHdr'>(%d(p->sid))
806 @ By %s(zPosterName) on %h(zDate)
807 }
808 fossil_free(zDate);
809
810
811 /* If debugging is enabled, link to the artifact page. */
@@ -1730,11 +1733,12 @@
1730 @ <span class="forumPostReplyTitle">%h(pRootPost->zThreadTitle)</span>
1731 }
1732 @ </h2>
1733 zDate = db_text(0, "SELECT datetime(%.17g,toLocal())", pPost->rDate);
1734 zDisplayName = display_name_from_login(pPost->zUser);
1735 @ <h3 class='forumPostHdr'>By %s(zDisplayName) on %h(zDate)</h3>
 
1736 fossil_free(zDisplayName);
1737 fossil_free(zDate);
1738 forum_render(0, pPost->zMimetype, pPost->zWiki, "forumEdit", 1);
1739 if( bPreview && !whitespace_only(zContent) ){
1740 @ <h2>Preview:</h2>
@@ -1934,11 +1938,11 @@
1934 login_needed(g.anon.RdForum);
1935 return;
1936 }
1937 cgi_check_for_malice();
1938 style_set_current_feature("forum");
1939 style_header("%s%s", db_get("forum-title","Forum"),
1940 isSearch ? " Search Results" : "");
1941 style_submenu_element("Timeline", "%R/timeline?ss=v&y=f&vfx");
1942 if( g.perm.WrForum ){
1943 style_submenu_element("New Thread","%R/forumnew");
1944 }else{
1945
--- src/forum.c
+++ src/forum.c
@@ -789,23 +789,26 @@
789 zEditorName = forum_post_display_name(p, pManifest);
790 zHist = bHist ? "" : zQuery[0]==0 ? "?hist" : "&hist";
791 @ <h3 class='forumPostHdr'>(%d(p->sid)\
792 @ .%0*d(fossil_num_digits(p->nEdit))(p->rev))
793 if( fossil_strcmp(zPosterName, zEditorName)==0 ){
794 @ By %s(zPosterName) on
795 @ <a href="%R/timeline?y=all&c=%h(zDate)">%h(zDate)</a> \
796 @ edited from \
797 @ %z(href("%R/forumpost/%S%s%s",p->pEditPrev->zUuid,zQuery,zHist))\
798 @ %d(p->sid).%0*d(fossil_num_digits(p->nEdit))(p->pEditPrev->rev)</a>
799 }else{
800 @ Originally by %s(zPosterName) \
801 @ with edits by %s(zEditorName) on \
802 @ <a href="%R/timeline?y=all&c=%h(zDate)">%h(zDate)</a> from \
803 @ %z(href("%R/forumpost/%S%s%s",p->pEditPrev->zUuid,zQuery,zHist))\
804 @ %d(p->sid).%0*d(fossil_num_digits(p->nEdit))(p->pEditPrev->rev)</a>
805 }
806 }else{
807 zPosterName = forum_post_display_name(p, pManifest);
808 @ <h3 class='forumPostHdr'>(%d(p->sid))
809 @ By %s(zPosterName) on <a href="%R/timeline?y=all&c=%h(zDate)">%h(zDate)</a>
810 }
811 fossil_free(zDate);
812
813
814 /* If debugging is enabled, link to the artifact page. */
@@ -1730,11 +1733,12 @@
1733 @ <span class="forumPostReplyTitle">%h(pRootPost->zThreadTitle)</span>
1734 }
1735 @ </h2>
1736 zDate = db_text(0, "SELECT datetime(%.17g,toLocal())", pPost->rDate);
1737 zDisplayName = display_name_from_login(pPost->zUser);
1738 @ <h3 class='forumPostHdr'>By %s(zDisplayName) on
1739 @ <a href='%R/timeline?y=all&c=%h(zDate)'>%h(zDate)</a></h3>
1740 fossil_free(zDisplayName);
1741 fossil_free(zDate);
1742 forum_render(0, pPost->zMimetype, pPost->zWiki, "forumEdit", 1);
1743 if( bPreview && !whitespace_only(zContent) ){
1744 @ <h2>Preview:</h2>
@@ -1934,11 +1938,11 @@
1938 login_needed(g.anon.RdForum);
1939 return;
1940 }
1941 cgi_check_for_malice();
1942 style_set_current_feature("forum");
1943 style_header("%s%s", db_get("forum-title","Forum"),
1944 isSearch ? " Search Results" : "");
1945 style_submenu_element("Timeline", "%R/timeline?ss=v&y=f&vfx");
1946 if( g.perm.WrForum ){
1947 style_submenu_element("New Thread","%R/forumnew");
1948 }else{
1949

Keyboard Shortcuts

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