Fossil SCM

The new vfx query parameter on /timeline shows the formatted text of forum messages directly in the timeline.

drh 2020-03-14 18:29 trunk
Commit c7a536ffa8abc8d17c7081fc9a1e822ecb9a74a99c205f5aef8aa51e88772e20
1 file changed +17 -1
+17 -1
--- src/timeline.c
+++ src/timeline.c
@@ -115,10 +115,11 @@
115115
#define TIMELINE_FILEDIFF 0x0200000 /* Show File differences, not ckin diffs */
116116
#define TIMELINE_CHPICK 0x0400000 /* Show cherrypick merges */
117117
#define TIMELINE_FILLGAPS 0x0800000 /* Dotted lines for missing nodes */
118118
#define TIMELINE_XMERGE 0x1000000 /* Omit merges from off-graph nodes */
119119
#define TIMELINE_NOTKT 0x2000000 /* Omit extra ticket classes */
120
+#define TIMELINE_FORUMTXT 0x4000000 /* Render all forum messages */
120121
#endif
121122
122123
/*
123124
** Hash a string and use the hash to determine a background color.
124125
*/
@@ -233,11 +234,11 @@
233234
** 2. Date/Time
234235
** 3. Comment string
235236
** 4. User
236237
** 5. True if is a leaf
237238
** 6. background color
238
-** 7. type ("ci", "w", "t", "e", "g", "div")
239
+** 7. type ("ci", "w", "t", "e", "g", "f", "div")
239240
** 8. list of symbolic tags.
240241
** 9. tagid for ticket or wiki or event
241242
** 10. Short comment to user for repeated tickets and wiki
242243
*/
243244
void www_print_timeline(
@@ -785,10 +786,21 @@
785786
db_reset(&fchngQuery);
786787
if( inUl ){
787788
@ </ul>
788789
}
789790
}
791
+
792
+ /* Show the complete text of forum messages */
793
+ if( (tmFlags & (TIMELINE_FORUMTXT))!=0
794
+ && zType[0]=='f' && g.perm.Hyperlink
795
+ ){
796
+ Manifest *pPost = manifest_get(rid, CFTYPE_FORUM, 0);
797
+ if( pPost ){
798
+ forum_render(0, pPost->zMimetype, pPost->zWiki, "forumEdit");
799
+ manifest_destroy(pPost);
800
+ }
801
+ }
790802
}
791803
if( suppressCnt ){
792804
@ <span class="timelineDisabled">... %d(suppressCnt) similar
793805
@ event%s(suppressCnt>1?"s":"") omitted.</span>
794806
suppressCnt = 0;
@@ -1566,10 +1578,11 @@
15661578
** advm Use the "Advanced" or "Busy" menu design.
15671579
** ng No Graph.
15681580
** ncp Omit cherrypick merges
15691581
** nd Do not highlight the focus check-in
15701582
** v Show details of files changed
1583
+** vfx Show complete text of forum messages
15711584
** f=CHECKIN Show family (immediate parents and children) of CHECKIN
15721585
** from=CHECKIN Path from...
15731586
** to=CHECKIN ... to this
15741587
** shortest ... show only the shortest path
15751588
** rel ... also show related checkins
@@ -1874,10 +1887,13 @@
18741887
blob_append(&sql, "INSERT OR IGNORE INTO timeline ", -1);
18751888
blob_append(&sql, timeline_query_for_www(), -1);
18761889
if( PB("fc") || PB("v") || PB("detail") ){
18771890
tmFlags |= TIMELINE_FCHANGES;
18781891
}
1892
+ if( PB("vfx") ){
1893
+ tmFlags |= TIMELINE_FORUMTXT;
1894
+ }
18791895
if( (tmFlags & TIMELINE_UNHIDE)==0 ){
18801896
blob_append_sql(&sql,
18811897
" AND NOT EXISTS(SELECT 1 FROM tagxref"
18821898
" WHERE tagid=%d AND tagtype>0 AND rid=blob.rid)\n",
18831899
TAG_HIDDEN
18841900
--- src/timeline.c
+++ src/timeline.c
@@ -115,10 +115,11 @@
115 #define TIMELINE_FILEDIFF 0x0200000 /* Show File differences, not ckin diffs */
116 #define TIMELINE_CHPICK 0x0400000 /* Show cherrypick merges */
117 #define TIMELINE_FILLGAPS 0x0800000 /* Dotted lines for missing nodes */
118 #define TIMELINE_XMERGE 0x1000000 /* Omit merges from off-graph nodes */
119 #define TIMELINE_NOTKT 0x2000000 /* Omit extra ticket classes */
 
120 #endif
121
122 /*
123 ** Hash a string and use the hash to determine a background color.
124 */
@@ -233,11 +234,11 @@
233 ** 2. Date/Time
234 ** 3. Comment string
235 ** 4. User
236 ** 5. True if is a leaf
237 ** 6. background color
238 ** 7. type ("ci", "w", "t", "e", "g", "div")
239 ** 8. list of symbolic tags.
240 ** 9. tagid for ticket or wiki or event
241 ** 10. Short comment to user for repeated tickets and wiki
242 */
243 void www_print_timeline(
@@ -785,10 +786,21 @@
785 db_reset(&fchngQuery);
786 if( inUl ){
787 @ </ul>
788 }
789 }
 
 
 
 
 
 
 
 
 
 
 
790 }
791 if( suppressCnt ){
792 @ <span class="timelineDisabled">... %d(suppressCnt) similar
793 @ event%s(suppressCnt>1?"s":"") omitted.</span>
794 suppressCnt = 0;
@@ -1566,10 +1578,11 @@
1566 ** advm Use the "Advanced" or "Busy" menu design.
1567 ** ng No Graph.
1568 ** ncp Omit cherrypick merges
1569 ** nd Do not highlight the focus check-in
1570 ** v Show details of files changed
 
1571 ** f=CHECKIN Show family (immediate parents and children) of CHECKIN
1572 ** from=CHECKIN Path from...
1573 ** to=CHECKIN ... to this
1574 ** shortest ... show only the shortest path
1575 ** rel ... also show related checkins
@@ -1874,10 +1887,13 @@
1874 blob_append(&sql, "INSERT OR IGNORE INTO timeline ", -1);
1875 blob_append(&sql, timeline_query_for_www(), -1);
1876 if( PB("fc") || PB("v") || PB("detail") ){
1877 tmFlags |= TIMELINE_FCHANGES;
1878 }
 
 
 
1879 if( (tmFlags & TIMELINE_UNHIDE)==0 ){
1880 blob_append_sql(&sql,
1881 " AND NOT EXISTS(SELECT 1 FROM tagxref"
1882 " WHERE tagid=%d AND tagtype>0 AND rid=blob.rid)\n",
1883 TAG_HIDDEN
1884
--- src/timeline.c
+++ src/timeline.c
@@ -115,10 +115,11 @@
115 #define TIMELINE_FILEDIFF 0x0200000 /* Show File differences, not ckin diffs */
116 #define TIMELINE_CHPICK 0x0400000 /* Show cherrypick merges */
117 #define TIMELINE_FILLGAPS 0x0800000 /* Dotted lines for missing nodes */
118 #define TIMELINE_XMERGE 0x1000000 /* Omit merges from off-graph nodes */
119 #define TIMELINE_NOTKT 0x2000000 /* Omit extra ticket classes */
120 #define TIMELINE_FORUMTXT 0x4000000 /* Render all forum messages */
121 #endif
122
123 /*
124 ** Hash a string and use the hash to determine a background color.
125 */
@@ -233,11 +234,11 @@
234 ** 2. Date/Time
235 ** 3. Comment string
236 ** 4. User
237 ** 5. True if is a leaf
238 ** 6. background color
239 ** 7. type ("ci", "w", "t", "e", "g", "f", "div")
240 ** 8. list of symbolic tags.
241 ** 9. tagid for ticket or wiki or event
242 ** 10. Short comment to user for repeated tickets and wiki
243 */
244 void www_print_timeline(
@@ -785,10 +786,21 @@
786 db_reset(&fchngQuery);
787 if( inUl ){
788 @ </ul>
789 }
790 }
791
792 /* Show the complete text of forum messages */
793 if( (tmFlags & (TIMELINE_FORUMTXT))!=0
794 && zType[0]=='f' && g.perm.Hyperlink
795 ){
796 Manifest *pPost = manifest_get(rid, CFTYPE_FORUM, 0);
797 if( pPost ){
798 forum_render(0, pPost->zMimetype, pPost->zWiki, "forumEdit");
799 manifest_destroy(pPost);
800 }
801 }
802 }
803 if( suppressCnt ){
804 @ <span class="timelineDisabled">... %d(suppressCnt) similar
805 @ event%s(suppressCnt>1?"s":"") omitted.</span>
806 suppressCnt = 0;
@@ -1566,10 +1578,11 @@
1578 ** advm Use the "Advanced" or "Busy" menu design.
1579 ** ng No Graph.
1580 ** ncp Omit cherrypick merges
1581 ** nd Do not highlight the focus check-in
1582 ** v Show details of files changed
1583 ** vfx Show complete text of forum messages
1584 ** f=CHECKIN Show family (immediate parents and children) of CHECKIN
1585 ** from=CHECKIN Path from...
1586 ** to=CHECKIN ... to this
1587 ** shortest ... show only the shortest path
1588 ** rel ... also show related checkins
@@ -1874,10 +1887,13 @@
1887 blob_append(&sql, "INSERT OR IGNORE INTO timeline ", -1);
1888 blob_append(&sql, timeline_query_for_www(), -1);
1889 if( PB("fc") || PB("v") || PB("detail") ){
1890 tmFlags |= TIMELINE_FCHANGES;
1891 }
1892 if( PB("vfx") ){
1893 tmFlags |= TIMELINE_FORUMTXT;
1894 }
1895 if( (tmFlags & TIMELINE_UNHIDE)==0 ){
1896 blob_append_sql(&sql,
1897 " AND NOT EXISTS(SELECT 1 FROM tagxref"
1898 " WHERE tagid=%d AND tagtype>0 AND rid=blob.rid)\n",
1899 TAG_HIDDEN
1900

Keyboard Shortcuts

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