Fossil SCM

In a forum thread display use an <h3> tag for the header on each post.

drh 2020-03-14 13:50 trunk
Commit c29d69ea7a942ce9b4b10d1d5fbd2e3cc63e4535926accde7ac09ea86a842cca
1 file changed +4 -2
+4 -2
--- src/forum.c
+++ src/forum.c
@@ -362,11 +362,11 @@
362362
}
363363
if( pPost->zThreadTitle ){
364364
@ <h1>%h(pPost->zThreadTitle)</h1>
365365
}
366366
zDate = db_text(0, "SELECT datetime(%.17g)", pPost->rDate);
367
- @ <p>(%d(p->sid)) By %h(pPost->zUser) on %h(zDate)
367
+ @ <h3>(%d(p->sid)) By %h(pPost->zUser) on %h(zDate)
368368
fossil_free(zDate);
369369
if( p->pEdit ){
370370
@ edit of %z(href("%R/forumpost/%S?t=c",p->pEdit->zUuid))\
371371
@ %d(p->pEdit->sid)</a>
372372
}
@@ -392,10 +392,11 @@
392392
if( fossil_strcmp(pPost->zMimetype,"text/plain")!=0 ){
393393
@ %z(href("%R/forumpost/%S?raw",p->zUuid))[source]</a>
394394
}
395395
isPrivate = content_is_private(p->fpid);
396396
sameUser = notAnon && fossil_strcmp(pPost->zUser, g.zLogin)==0;
397
+ @ </h3>
397398
if( isPrivate && !g.perm.ModForum && !sameUser ){
398399
@ <p><span class="modpending">Awaiting Moderator Approval</span></p>
399400
}else{
400401
forum_render(0, pPost->zMimetype, pPost->zWiki, 0);
401402
}
@@ -480,11 +481,11 @@
480481
if( pPost==0 ) continue;
481482
if( pPost->zThreadTitle ){
482483
@ <h1>%h(pPost->zThreadTitle)</h1>
483484
}
484485
zDate = db_text(0, "SELECT datetime(%.17g)", pOPost->rDate);
485
- @ <p>(%d(p->pLeaf?p->pLeaf->sid:p->sid)) By %h(pOPost->zUser) on %h(zDate)
486
+ @ <h3>(%d(p->pLeaf?p->pLeaf->sid:p->sid)) By %h(pOPost->zUser) on %h(zDate)
486487
fossil_free(zDate);
487488
if( g.perm.Debug ){
488489
@ <span class="debug">\
489490
@ <a href="%R/artifact/%h(p->zUuid)">(artifact)</a></span>
490491
}
@@ -514,10 +515,11 @@
514515
if( pIrt ){
515516
@ in reply to %z(href("%R/forumpost/%S?t=h",pIrt->zUuid))\
516517
@ %d(pIrt->sid)</a>
517518
}
518519
}
520
+ @ </h3>
519521
isPrivate = content_is_private(fpid);
520522
sameUser = notAnon && fossil_strcmp(pPost->zUser, g.zLogin)==0;
521523
if( isPrivate && !g.perm.ModForum && !sameUser ){
522524
@ <p><span class="modpending">Awaiting Moderator Approval</span></p>
523525
}else{
524526
--- src/forum.c
+++ src/forum.c
@@ -362,11 +362,11 @@
362 }
363 if( pPost->zThreadTitle ){
364 @ <h1>%h(pPost->zThreadTitle)</h1>
365 }
366 zDate = db_text(0, "SELECT datetime(%.17g)", pPost->rDate);
367 @ <p>(%d(p->sid)) By %h(pPost->zUser) on %h(zDate)
368 fossil_free(zDate);
369 if( p->pEdit ){
370 @ edit of %z(href("%R/forumpost/%S?t=c",p->pEdit->zUuid))\
371 @ %d(p->pEdit->sid)</a>
372 }
@@ -392,10 +392,11 @@
392 if( fossil_strcmp(pPost->zMimetype,"text/plain")!=0 ){
393 @ %z(href("%R/forumpost/%S?raw",p->zUuid))[source]</a>
394 }
395 isPrivate = content_is_private(p->fpid);
396 sameUser = notAnon && fossil_strcmp(pPost->zUser, g.zLogin)==0;
 
397 if( isPrivate && !g.perm.ModForum && !sameUser ){
398 @ <p><span class="modpending">Awaiting Moderator Approval</span></p>
399 }else{
400 forum_render(0, pPost->zMimetype, pPost->zWiki, 0);
401 }
@@ -480,11 +481,11 @@
480 if( pPost==0 ) continue;
481 if( pPost->zThreadTitle ){
482 @ <h1>%h(pPost->zThreadTitle)</h1>
483 }
484 zDate = db_text(0, "SELECT datetime(%.17g)", pOPost->rDate);
485 @ <p>(%d(p->pLeaf?p->pLeaf->sid:p->sid)) By %h(pOPost->zUser) on %h(zDate)
486 fossil_free(zDate);
487 if( g.perm.Debug ){
488 @ <span class="debug">\
489 @ <a href="%R/artifact/%h(p->zUuid)">(artifact)</a></span>
490 }
@@ -514,10 +515,11 @@
514 if( pIrt ){
515 @ in reply to %z(href("%R/forumpost/%S?t=h",pIrt->zUuid))\
516 @ %d(pIrt->sid)</a>
517 }
518 }
 
519 isPrivate = content_is_private(fpid);
520 sameUser = notAnon && fossil_strcmp(pPost->zUser, g.zLogin)==0;
521 if( isPrivate && !g.perm.ModForum && !sameUser ){
522 @ <p><span class="modpending">Awaiting Moderator Approval</span></p>
523 }else{
524
--- src/forum.c
+++ src/forum.c
@@ -362,11 +362,11 @@
362 }
363 if( pPost->zThreadTitle ){
364 @ <h1>%h(pPost->zThreadTitle)</h1>
365 }
366 zDate = db_text(0, "SELECT datetime(%.17g)", pPost->rDate);
367 @ <h3>(%d(p->sid)) By %h(pPost->zUser) on %h(zDate)
368 fossil_free(zDate);
369 if( p->pEdit ){
370 @ edit of %z(href("%R/forumpost/%S?t=c",p->pEdit->zUuid))\
371 @ %d(p->pEdit->sid)</a>
372 }
@@ -392,10 +392,11 @@
392 if( fossil_strcmp(pPost->zMimetype,"text/plain")!=0 ){
393 @ %z(href("%R/forumpost/%S?raw",p->zUuid))[source]</a>
394 }
395 isPrivate = content_is_private(p->fpid);
396 sameUser = notAnon && fossil_strcmp(pPost->zUser, g.zLogin)==0;
397 @ </h3>
398 if( isPrivate && !g.perm.ModForum && !sameUser ){
399 @ <p><span class="modpending">Awaiting Moderator Approval</span></p>
400 }else{
401 forum_render(0, pPost->zMimetype, pPost->zWiki, 0);
402 }
@@ -480,11 +481,11 @@
481 if( pPost==0 ) continue;
482 if( pPost->zThreadTitle ){
483 @ <h1>%h(pPost->zThreadTitle)</h1>
484 }
485 zDate = db_text(0, "SELECT datetime(%.17g)", pOPost->rDate);
486 @ <h3>(%d(p->pLeaf?p->pLeaf->sid:p->sid)) By %h(pOPost->zUser) on %h(zDate)
487 fossil_free(zDate);
488 if( g.perm.Debug ){
489 @ <span class="debug">\
490 @ <a href="%R/artifact/%h(p->zUuid)">(artifact)</a></span>
491 }
@@ -514,10 +515,11 @@
515 if( pIrt ){
516 @ in reply to %z(href("%R/forumpost/%S?t=h",pIrt->zUuid))\
517 @ %d(pIrt->sid)</a>
518 }
519 }
520 @ </h3>
521 isPrivate = content_is_private(fpid);
522 sameUser = notAnon && fossil_strcmp(pPost->zUser, g.zLogin)==0;
523 if( isPrivate && !g.perm.ModForum && !sameUser ){
524 @ <p><span class="modpending">Awaiting Moderator Approval</span></p>
525 }else{
526

Keyboard Shortcuts

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