Fossil SCM

Omit pointless "* Post:" text from each /timeline entry when y=h.

drh 2026-10-19 10:54 UTC trunk
Commit 2cfc398ed0776de240ec322db9e7810ade2c504b62cf9b0f778da01f3ebe0994
1 file changed +13 -1
+13 -1
--- src/timeline.c
+++ src/timeline.c
@@ -128,10 +128,11 @@
128128
#define TIMELINE_NOTKT 0x2000000 /* Omit extra ticket classes */
129129
#define TIMELINE_FORUMTXT 0x4000000 /* Render all forum messages */
130130
#define TIMELINE_REFS 0x8000000 /* Output intended for References tab */
131131
#define TIMELINE_DELTA 0x10000000 /* Background color shows delta manifests */
132132
#define TIMELINE_NOCOLOR 0x20000000 /* No colors except for highlights */
133
+#define TIMELINE_NOPOST 0x40000000 /* Omit bullet and "Post:" on forum posts */
133134
#endif
134135
135136
/*
136137
** Return a new timelineTable id.
137138
*/
@@ -674,11 +675,12 @@
674675
@ <td class="timeline%s(zStyle)Cell%s(zExtraClass)" id='mc%d(gidx)'>
675676
}
676677
if( pGraph ){
677678
if( zType[0]=='e' ){
678679
@ <b>Note:</b>
679
- }else if( zType[0]!='c' ){
680
+ }else if( zType[0]!='c'
681
+ && (zType[0]!='f' || (tmFlags & TIMELINE_NOPOST)==0) ){
680682
@ &bull;
681683
}
682684
}
683685
if( modPending ){
684686
@ <span class="modpending">(Awaiting Moderator Approval)</span>
@@ -754,10 +756,19 @@
754756
** will simply be rendered in the older format. */
755757
wiki_convert(&comment, 0, WIKI_INLINE);
756758
}
757759
wiki_hyperlink_override(0);
758760
}else{
761
+ if( zType[0]=='f' && (tmFlags & TIMELINE_NOPOST)!=0
762
+ && strncmp(blob_str(&comment), "Post: ", 6)==0
763
+ ){
764
+ Blob x;
765
+ blob_init(&x, 0, 0);
766
+ blob_append(&x, blob_str(&comment)+6, -1);
767
+ blob_reset(&comment);
768
+ comment = x;
769
+ }
759770
if( mxWikiLen>0 && blob_size(&comment)>mxWikiLen ){
760771
blob_truncate_utf8(&comment, mxWikiLen);
761772
blob_append(&comment, "...", 3);
762773
}
763774
wiki_convert(&comment, 0, WIKI_INLINE);
@@ -3048,10 +3059,11 @@
30483059
zEType = "tag";
30493060
}else if( zType[0]=='f' ){
30503061
zEType = "forum post";
30513062
}else if( zType[0]=='h' ){
30523063
zEType = "new forum thread";
3064
+ tmFlags |= TIMELINE_NOPOST;
30533065
}
30543066
if( (zType[0]=='f' || zType[0]=='h')
30553067
&& forum_status_match_setup(P("status"))
30563068
){
30573069
zStatus = P("status");
30583070
--- src/timeline.c
+++ src/timeline.c
@@ -128,10 +128,11 @@
128 #define TIMELINE_NOTKT 0x2000000 /* Omit extra ticket classes */
129 #define TIMELINE_FORUMTXT 0x4000000 /* Render all forum messages */
130 #define TIMELINE_REFS 0x8000000 /* Output intended for References tab */
131 #define TIMELINE_DELTA 0x10000000 /* Background color shows delta manifests */
132 #define TIMELINE_NOCOLOR 0x20000000 /* No colors except for highlights */
 
133 #endif
134
135 /*
136 ** Return a new timelineTable id.
137 */
@@ -674,11 +675,12 @@
674 @ <td class="timeline%s(zStyle)Cell%s(zExtraClass)" id='mc%d(gidx)'>
675 }
676 if( pGraph ){
677 if( zType[0]=='e' ){
678 @ <b>Note:</b>
679 }else if( zType[0]!='c' ){
 
680 @ &bull;
681 }
682 }
683 if( modPending ){
684 @ <span class="modpending">(Awaiting Moderator Approval)</span>
@@ -754,10 +756,19 @@
754 ** will simply be rendered in the older format. */
755 wiki_convert(&comment, 0, WIKI_INLINE);
756 }
757 wiki_hyperlink_override(0);
758 }else{
 
 
 
 
 
 
 
 
 
759 if( mxWikiLen>0 && blob_size(&comment)>mxWikiLen ){
760 blob_truncate_utf8(&comment, mxWikiLen);
761 blob_append(&comment, "...", 3);
762 }
763 wiki_convert(&comment, 0, WIKI_INLINE);
@@ -3048,10 +3059,11 @@
3048 zEType = "tag";
3049 }else if( zType[0]=='f' ){
3050 zEType = "forum post";
3051 }else if( zType[0]=='h' ){
3052 zEType = "new forum thread";
 
3053 }
3054 if( (zType[0]=='f' || zType[0]=='h')
3055 && forum_status_match_setup(P("status"))
3056 ){
3057 zStatus = P("status");
3058
--- src/timeline.c
+++ src/timeline.c
@@ -128,10 +128,11 @@
128 #define TIMELINE_NOTKT 0x2000000 /* Omit extra ticket classes */
129 #define TIMELINE_FORUMTXT 0x4000000 /* Render all forum messages */
130 #define TIMELINE_REFS 0x8000000 /* Output intended for References tab */
131 #define TIMELINE_DELTA 0x10000000 /* Background color shows delta manifests */
132 #define TIMELINE_NOCOLOR 0x20000000 /* No colors except for highlights */
133 #define TIMELINE_NOPOST 0x40000000 /* Omit bullet and "Post:" on forum posts */
134 #endif
135
136 /*
137 ** Return a new timelineTable id.
138 */
@@ -674,11 +675,12 @@
675 @ <td class="timeline%s(zStyle)Cell%s(zExtraClass)" id='mc%d(gidx)'>
676 }
677 if( pGraph ){
678 if( zType[0]=='e' ){
679 @ <b>Note:</b>
680 }else if( zType[0]!='c'
681 && (zType[0]!='f' || (tmFlags & TIMELINE_NOPOST)==0) ){
682 @ &bull;
683 }
684 }
685 if( modPending ){
686 @ <span class="modpending">(Awaiting Moderator Approval)</span>
@@ -754,10 +756,19 @@
756 ** will simply be rendered in the older format. */
757 wiki_convert(&comment, 0, WIKI_INLINE);
758 }
759 wiki_hyperlink_override(0);
760 }else{
761 if( zType[0]=='f' && (tmFlags & TIMELINE_NOPOST)!=0
762 && strncmp(blob_str(&comment), "Post: ", 6)==0
763 ){
764 Blob x;
765 blob_init(&x, 0, 0);
766 blob_append(&x, blob_str(&comment)+6, -1);
767 blob_reset(&comment);
768 comment = x;
769 }
770 if( mxWikiLen>0 && blob_size(&comment)>mxWikiLen ){
771 blob_truncate_utf8(&comment, mxWikiLen);
772 blob_append(&comment, "...", 3);
773 }
774 wiki_convert(&comment, 0, WIKI_INLINE);
@@ -3048,10 +3059,11 @@
3059 zEType = "tag";
3060 }else if( zType[0]=='f' ){
3061 zEType = "forum post";
3062 }else if( zType[0]=='h' ){
3063 zEType = "new forum thread";
3064 tmFlags |= TIMELINE_NOPOST;
3065 }
3066 if( (zType[0]=='f' || zType[0]=='h')
3067 && forum_status_match_setup(P("status"))
3068 ){
3069 zStatus = P("status");
3070

Keyboard Shortcuts

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