Fossil SCM
In the forum, link post timestamps to /timeline?c=timestamp. Inspired by recent repo archeology.
Commit
2dc9f676ce0c3e6f254c0f5069a4a21a820db449c494babc6c34424f588ac57a
Parent
a2db4285da55f51…
1 file changed
+9
-5
+9
-5
| --- src/forum.c | ||
| +++ src/forum.c | ||
| @@ -789,23 +789,26 @@ | ||
| 789 | 789 | zEditorName = forum_post_display_name(p, pManifest); |
| 790 | 790 | zHist = bHist ? "" : zQuery[0]==0 ? "?hist" : "&hist"; |
| 791 | 791 | @ <h3 class='forumPostHdr'>(%d(p->sid)\ |
| 792 | 792 | @ .%0*d(fossil_num_digits(p->nEdit))(p->rev)) |
| 793 | 793 | 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 \ | |
| 795 | 797 | @ %z(href("%R/forumpost/%S%s%s",p->pEditPrev->zUuid,zQuery,zHist))\ |
| 796 | 798 | @ %d(p->sid).%0*d(fossil_num_digits(p->nEdit))(p->pEditPrev->rev)</a> |
| 797 | 799 | }else{ |
| 798 | 800 | @ 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 \ | |
| 800 | 803 | @ %z(href("%R/forumpost/%S%s%s",p->pEditPrev->zUuid,zQuery,zHist))\ |
| 801 | 804 | @ %d(p->sid).%0*d(fossil_num_digits(p->nEdit))(p->pEditPrev->rev)</a> |
| 802 | 805 | } |
| 803 | 806 | }else{ |
| 804 | 807 | zPosterName = forum_post_display_name(p, pManifest); |
| 805 | 808 | @ <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> | |
| 807 | 810 | } |
| 808 | 811 | fossil_free(zDate); |
| 809 | 812 | |
| 810 | 813 | |
| 811 | 814 | /* If debugging is enabled, link to the artifact page. */ |
| @@ -1730,11 +1733,12 @@ | ||
| 1730 | 1733 | @ <span class="forumPostReplyTitle">%h(pRootPost->zThreadTitle)</span> |
| 1731 | 1734 | } |
| 1732 | 1735 | @ </h2> |
| 1733 | 1736 | zDate = db_text(0, "SELECT datetime(%.17g,toLocal())", pPost->rDate); |
| 1734 | 1737 | 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> | |
| 1736 | 1740 | fossil_free(zDisplayName); |
| 1737 | 1741 | fossil_free(zDate); |
| 1738 | 1742 | forum_render(0, pPost->zMimetype, pPost->zWiki, "forumEdit", 1); |
| 1739 | 1743 | if( bPreview && !whitespace_only(zContent) ){ |
| 1740 | 1744 | @ <h2>Preview:</h2> |
| @@ -1934,11 +1938,11 @@ | ||
| 1934 | 1938 | login_needed(g.anon.RdForum); |
| 1935 | 1939 | return; |
| 1936 | 1940 | } |
| 1937 | 1941 | cgi_check_for_malice(); |
| 1938 | 1942 | 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"), | |
| 1940 | 1944 | isSearch ? " Search Results" : ""); |
| 1941 | 1945 | style_submenu_element("Timeline", "%R/timeline?ss=v&y=f&vfx"); |
| 1942 | 1946 | if( g.perm.WrForum ){ |
| 1943 | 1947 | style_submenu_element("New Thread","%R/forumnew"); |
| 1944 | 1948 | }else{ |
| 1945 | 1949 |
| --- 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 |