Fossil SCM
Omit pointless "* Post:" text from each /timeline entry when y=h.
Commit
2cfc398ed0776de240ec322db9e7810ade2c504b62cf9b0f778da01f3ebe0994
Parent
d6dcee660e8e12f…
1 file changed
+13
-1
+13
-1
| --- src/timeline.c | ||
| +++ src/timeline.c | ||
| @@ -128,10 +128,11 @@ | ||
| 128 | 128 | #define TIMELINE_NOTKT 0x2000000 /* Omit extra ticket classes */ |
| 129 | 129 | #define TIMELINE_FORUMTXT 0x4000000 /* Render all forum messages */ |
| 130 | 130 | #define TIMELINE_REFS 0x8000000 /* Output intended for References tab */ |
| 131 | 131 | #define TIMELINE_DELTA 0x10000000 /* Background color shows delta manifests */ |
| 132 | 132 | #define TIMELINE_NOCOLOR 0x20000000 /* No colors except for highlights */ |
| 133 | +#define TIMELINE_NOPOST 0x40000000 /* Omit bullet and "Post:" on forum posts */ | |
| 133 | 134 | #endif |
| 134 | 135 | |
| 135 | 136 | /* |
| 136 | 137 | ** Return a new timelineTable id. |
| 137 | 138 | */ |
| @@ -674,11 +675,12 @@ | ||
| 674 | 675 | @ <td class="timeline%s(zStyle)Cell%s(zExtraClass)" id='mc%d(gidx)'> |
| 675 | 676 | } |
| 676 | 677 | if( pGraph ){ |
| 677 | 678 | if( zType[0]=='e' ){ |
| 678 | 679 | @ <b>Note:</b> |
| 679 | - }else if( zType[0]!='c' ){ | |
| 680 | + }else if( zType[0]!='c' | |
| 681 | + && (zType[0]!='f' || (tmFlags & TIMELINE_NOPOST)==0) ){ | |
| 680 | 682 | @ • |
| 681 | 683 | } |
| 682 | 684 | } |
| 683 | 685 | if( modPending ){ |
| 684 | 686 | @ <span class="modpending">(Awaiting Moderator Approval)</span> |
| @@ -754,10 +756,19 @@ | ||
| 754 | 756 | ** will simply be rendered in the older format. */ |
| 755 | 757 | wiki_convert(&comment, 0, WIKI_INLINE); |
| 756 | 758 | } |
| 757 | 759 | wiki_hyperlink_override(0); |
| 758 | 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 | + } | |
| 759 | 770 | if( mxWikiLen>0 && blob_size(&comment)>mxWikiLen ){ |
| 760 | 771 | blob_truncate_utf8(&comment, mxWikiLen); |
| 761 | 772 | blob_append(&comment, "...", 3); |
| 762 | 773 | } |
| 763 | 774 | wiki_convert(&comment, 0, WIKI_INLINE); |
| @@ -3048,10 +3059,11 @@ | ||
| 3048 | 3059 | zEType = "tag"; |
| 3049 | 3060 | }else if( zType[0]=='f' ){ |
| 3050 | 3061 | zEType = "forum post"; |
| 3051 | 3062 | }else if( zType[0]=='h' ){ |
| 3052 | 3063 | zEType = "new forum thread"; |
| 3064 | + tmFlags |= TIMELINE_NOPOST; | |
| 3053 | 3065 | } |
| 3054 | 3066 | if( (zType[0]=='f' || zType[0]=='h') |
| 3055 | 3067 | && forum_status_match_setup(P("status")) |
| 3056 | 3068 | ){ |
| 3057 | 3069 | zStatus = P("status"); |
| 3058 | 3070 |
| --- 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 | @ • |
| 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 | @ • |
| 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 |