Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | On the forum post reply page, add a link back to the original post and its source view, as discussed in forum post cf716a7ff8. Changed the forum post link/source links to use %!S instead of %S to determine the links' hash lengths. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
62f0ce8374f8a0b254ceab2f1c2700d3 |
User & Date: | stephan 2021-06-11 09:27:21 |
Context
2021-06-11
| ||
15:32 | Update the built-in pikchr.c to the latest version that supports alternative spellings for "<-", "->", and "<->" tokens. ... (check-in: 76e421bb user: drh tags: trunk) | |
09:27 | On the forum post reply page, add a link back to the original post and its source view, as discussed in forum post cf716a7ff8. Changed the forum post link/source links to use %!S instead of %S to determine the links' hash lengths. ... (check-in: 62f0ce83 user: stephan tags: trunk) | |
2021-06-10
| ||
12:17 | Extracted point 5 of the whyallinone doc, moving it out of the list of "good reasons why bundling other project management features with the DVCS might be useful" to the end of the doc, since it is not one of those "good reasons". It just explains that no one's forcing you to accept all of these benefits. ... (check-in: ba9e50de user: wyoung tags: trunk) | |
Changes
Changes to src/forum.c.
︙ | ︙ | |||
544 545 546 547 548 549 550 | @ updated by %z(href("%R/forumpost/%S?%s",p->pEditNext->zUuid,zQuery))\ @ %d(p->pEditNext->sid)\ @ .%0*d(fossil_num_digits(p->nEdit))(p->pEditNext->rev)</a> } /* Provide a link to select the individual post. */ if( !bSelect ){ | | | | 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 | @ updated by %z(href("%R/forumpost/%S?%s",p->pEditNext->zUuid,zQuery))\ @ %d(p->pEditNext->sid)\ @ .%0*d(fossil_num_digits(p->nEdit))(p->pEditNext->rev)</a> } /* Provide a link to select the individual post. */ if( !bSelect ){ @ %z(href("%R/forumpost/%!S?%s",p->zUuid,zQuery))[link]</a> } /* Provide a link to the raw source code. */ if( !bUnf ){ @ %z(href("%R/forumpost/%!S?raw",p->zUuid))[source]</a> } @ </h3> } /* Check if this post is approved, also if it's by the current user. */ bPrivate = content_is_private(p->fpid); bSameUser = login_is_individual() |
︙ | ︙ | |||
1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 | int froot; Manifest *pPost = 0; Manifest *pRootPost = 0; const char *zMimetype = 0; const char *zContent = 0; const char *zTitle = 0; char *zDate = 0; int isCsrfSafe; int isDelete = 0; login_check_credentials(); if( !g.perm.WrForum ){ login_needed(g.anon.WrForum); return; } | > | | 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 | int froot; Manifest *pPost = 0; Manifest *pRootPost = 0; const char *zMimetype = 0; const char *zContent = 0; const char *zTitle = 0; char *zDate = 0; const char *zFpid = PD("fpid",""); int isCsrfSafe; int isDelete = 0; login_check_credentials(); if( !g.perm.WrForum ){ login_needed(g.anon.WrForum); return; } fpid = symbolic_name_to_rid(zFpid, "f"); if( fpid<=0 || (pPost = manifest_get(fpid, CFTYPE_FORUM, 0))==0 ){ webpage_error("Missing or invalid fpid query parameter"); } froot = db_int(0, "SELECT froot FROM forumpost WHERE fpid=%d", fpid); if( froot==0 || (pRootPost = manifest_get(froot, CFTYPE_FORUM, 0))==0 ){ webpage_error("fpid does not appear to be a forum post: \"%d\"", fpid); } |
︙ | ︙ | |||
1294 1295 1296 1297 1298 1299 1300 | char *zDisplayName; zMimetype = PD("mimetype",DEFAULT_FORUM_MIMETYPE); zContent = PDT("content",""); style_header("Reply"); if( pRootPost->zThreadTitle ){ @ <h1>Thread: %h(pRootPost->zThreadTitle)</h1> } | | > > > | 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 | char *zDisplayName; zMimetype = PD("mimetype",DEFAULT_FORUM_MIMETYPE); zContent = PDT("content",""); style_header("Reply"); if( pRootPost->zThreadTitle ){ @ <h1>Thread: %h(pRootPost->zThreadTitle)</h1> } @ <h2>Replying To: @ <a href="%R/forumpost/%!S(zFpid)" target="_blank">%S(zFpid)</a> @ <a href="%R/forumpost/%!S(zFpid)?raw" target="_blank">[source]</a> @ </h2> zDate = db_text(0, "SELECT datetime(%.17g,toLocal())", pPost->rDate); zDisplayName = display_name_from_login(pPost->zUser); @ <h3 class='forumPostHdr'>By %s(zDisplayName) on %h(zDate)</h3> fossil_free(zDisplayName); fossil_free(zDate); forum_render(0, pPost->zMimetype, pPost->zWiki, "forumEdit", 1); if( P("preview") && !whitespace_only(zContent) ){ |
︙ | ︙ |