Fossil SCM

Rename the sticky CSS class to pinned.

stephan 2026-05-25 16:04 UTC pinned-forum-posts
Commit 0f145235ff4fe018c9e5e90500cd9ff8036770e229410c9dea0bda52145484c8
2 files changed +1 -1 +4 -4
+1 -1
--- src/default.css
+++ src/default.css
@@ -1114,11 +1114,11 @@
11141114
div.setup_forum-column {
11151115
display: flex;
11161116
flex-direction: column;
11171117
}
11181118
1119
-body.forum div.forumPosts table tr.sticky > td:nth-child(1):before {
1119
+body.forum div.forumPosts table tr.pinned > td:nth-child(1):before {
11201120
padding-right: 0.25em;
11211121
content: "📌";
11221122
}
11231123
11241124
body.cpage-setup_forum > .content table {
11251125
--- src/default.css
+++ src/default.css
@@ -1114,11 +1114,11 @@
1114 div.setup_forum-column {
1115 display: flex;
1116 flex-direction: column;
1117 }
1118
1119 body.forum div.forumPosts table tr.sticky > td:nth-child(1):before {
1120 padding-right: 0.25em;
1121 content: "📌";
1122 }
1123
1124 body.cpage-setup_forum > .content table {
1125
--- src/default.css
+++ src/default.css
@@ -1114,11 +1114,11 @@
1114 div.setup_forum-column {
1115 display: flex;
1116 flex-direction: column;
1117 }
1118
1119 body.forum div.forumPosts table tr.pinned > td:nth-child(1):before {
1120 padding-right: 0.25em;
1121 content: "📌";
1122 }
1123
1124 body.cpage-setup_forum > .content table {
1125
+4 -4
--- src/forum.c
+++ src/forum.c
@@ -2223,11 +2223,11 @@
22232223
style_submenu_entry("n","Max:",4,0);
22242224
iOfst = atoi(PD("x","0"));
22252225
iCnt = 0;
22262226
if( db_table_exists("repository","forumpost") ){
22272227
db_prepare(&q,
2228
- "WITH thread(age,duration,cnt,root,last,sticky) AS ("
2228
+ "WITH thread(age,duration,cnt,root,last,pinned) AS ("
22292229
" SELECT"
22302230
" julianday('now') - max(fmtime),"
22312231
" max(fmtime) - min(fmtime),"
22322232
" sum(fprev IS NULL),"
22332233
" froot,"
@@ -2253,11 +2253,11 @@
22532253
" thread.duration," /* 1 */
22542254
" thread.cnt," /* 2 */
22552255
" blob.uuid," /* 3 */
22562256
" substr(event.comment,instr(event.comment,':')+1)," /* 4 */
22572257
" thread.last," /* 5 */
2258
- " thread.sticky" /* 6 */
2258
+ " thread.pinned" /* 6 */
22592259
" FROM thread, blob, event"
22602260
" WHERE blob.rid=thread.last"
22612261
" AND event.objid=thread.last"
22622262
" ORDER BY 7 DESC, 1;",
22632263
g.perm.ModForum ? "" : "AND y.fpid NOT IN private" /*safe-for-%s*/,
@@ -2265,11 +2265,11 @@
22652265
iLimit+1, iOfst
22662266
);
22672267
while( db_step(&q)==SQLITE_ROW ){
22682268
char *zAge = human_readable_age(db_column_double(&q,0));
22692269
int nMsg = db_column_int(&q, 2);
2270
- int bSticky = db_column_int(&q, 6);
2270
+ int bPinned = db_column_int(&q, 6);
22712271
const char *zUuid = db_column_text(&q, 3);
22722272
const char *zTitle = db_column_text(&q, 4);
22732273
if( iCnt==0 ){
22742274
if( iOfst>0 ){
22752275
@ <h1>Threads at least %s(zAge) old</h1>
@@ -2294,11 +2294,11 @@
22942294
@ %z(href("%R/forum?x=%d&n=%d",iOfst+iLimit,iLimit))\
22952295
@ &darr; Older...</a></td></tr>
22962296
fossil_free(zAge);
22972297
break;
22982298
}
2299
- @ <tr%s(bSticky ? " class='sticky'" : "")><td>%h(zAge) ago</td>
2299
+ @ <tr%s(bPinned ? " class='pinned'" : "")><td>%h(zAge) ago</td>
23002300
@ <td>%z(href("%R/forumpost/%S",zUuid))%h(zTitle)</a></td>
23012301
@ <td>\
23022302
if( g.perm.ModForum && moderation_pending(db_column_int(&q,5)) ){
23032303
@ <span class="modpending">\
23042304
@ Awaiting Moderator Approval</span><br>
23052305
--- src/forum.c
+++ src/forum.c
@@ -2223,11 +2223,11 @@
2223 style_submenu_entry("n","Max:",4,0);
2224 iOfst = atoi(PD("x","0"));
2225 iCnt = 0;
2226 if( db_table_exists("repository","forumpost") ){
2227 db_prepare(&q,
2228 "WITH thread(age,duration,cnt,root,last,sticky) AS ("
2229 " SELECT"
2230 " julianday('now') - max(fmtime),"
2231 " max(fmtime) - min(fmtime),"
2232 " sum(fprev IS NULL),"
2233 " froot,"
@@ -2253,11 +2253,11 @@
2253 " thread.duration," /* 1 */
2254 " thread.cnt," /* 2 */
2255 " blob.uuid," /* 3 */
2256 " substr(event.comment,instr(event.comment,':')+1)," /* 4 */
2257 " thread.last," /* 5 */
2258 " thread.sticky" /* 6 */
2259 " FROM thread, blob, event"
2260 " WHERE blob.rid=thread.last"
2261 " AND event.objid=thread.last"
2262 " ORDER BY 7 DESC, 1;",
2263 g.perm.ModForum ? "" : "AND y.fpid NOT IN private" /*safe-for-%s*/,
@@ -2265,11 +2265,11 @@
2265 iLimit+1, iOfst
2266 );
2267 while( db_step(&q)==SQLITE_ROW ){
2268 char *zAge = human_readable_age(db_column_double(&q,0));
2269 int nMsg = db_column_int(&q, 2);
2270 int bSticky = db_column_int(&q, 6);
2271 const char *zUuid = db_column_text(&q, 3);
2272 const char *zTitle = db_column_text(&q, 4);
2273 if( iCnt==0 ){
2274 if( iOfst>0 ){
2275 @ <h1>Threads at least %s(zAge) old</h1>
@@ -2294,11 +2294,11 @@
2294 @ %z(href("%R/forum?x=%d&n=%d",iOfst+iLimit,iLimit))\
2295 @ &darr; Older...</a></td></tr>
2296 fossil_free(zAge);
2297 break;
2298 }
2299 @ <tr%s(bSticky ? " class='sticky'" : "")><td>%h(zAge) ago</td>
2300 @ <td>%z(href("%R/forumpost/%S",zUuid))%h(zTitle)</a></td>
2301 @ <td>\
2302 if( g.perm.ModForum && moderation_pending(db_column_int(&q,5)) ){
2303 @ <span class="modpending">\
2304 @ Awaiting Moderator Approval</span><br>
2305
--- src/forum.c
+++ src/forum.c
@@ -2223,11 +2223,11 @@
2223 style_submenu_entry("n","Max:",4,0);
2224 iOfst = atoi(PD("x","0"));
2225 iCnt = 0;
2226 if( db_table_exists("repository","forumpost") ){
2227 db_prepare(&q,
2228 "WITH thread(age,duration,cnt,root,last,pinned) AS ("
2229 " SELECT"
2230 " julianday('now') - max(fmtime),"
2231 " max(fmtime) - min(fmtime),"
2232 " sum(fprev IS NULL),"
2233 " froot,"
@@ -2253,11 +2253,11 @@
2253 " thread.duration," /* 1 */
2254 " thread.cnt," /* 2 */
2255 " blob.uuid," /* 3 */
2256 " substr(event.comment,instr(event.comment,':')+1)," /* 4 */
2257 " thread.last," /* 5 */
2258 " thread.pinned" /* 6 */
2259 " FROM thread, blob, event"
2260 " WHERE blob.rid=thread.last"
2261 " AND event.objid=thread.last"
2262 " ORDER BY 7 DESC, 1;",
2263 g.perm.ModForum ? "" : "AND y.fpid NOT IN private" /*safe-for-%s*/,
@@ -2265,11 +2265,11 @@
2265 iLimit+1, iOfst
2266 );
2267 while( db_step(&q)==SQLITE_ROW ){
2268 char *zAge = human_readable_age(db_column_double(&q,0));
2269 int nMsg = db_column_int(&q, 2);
2270 int bPinned = db_column_int(&q, 6);
2271 const char *zUuid = db_column_text(&q, 3);
2272 const char *zTitle = db_column_text(&q, 4);
2273 if( iCnt==0 ){
2274 if( iOfst>0 ){
2275 @ <h1>Threads at least %s(zAge) old</h1>
@@ -2294,11 +2294,11 @@
2294 @ %z(href("%R/forum?x=%d&n=%d",iOfst+iLimit,iLimit))\
2295 @ &darr; Older...</a></td></tr>
2296 fossil_free(zAge);
2297 break;
2298 }
2299 @ <tr%s(bPinned ? " class='pinned'" : "")><td>%h(zAge) ago</td>
2300 @ <td>%z(href("%R/forumpost/%S",zUuid))%h(zTitle)</a></td>
2301 @ <td>\
2302 if( g.perm.ModForum && moderation_pending(db_column_int(&q,5)) ){
2303 @ <span class="modpending">\
2304 @ Awaiting Moderator Approval</span><br>
2305

Keyboard Shortcuts

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