Fossil

Check-in [29141af7]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Update the /stat page to show forum statistics.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 29141af7af66b7e8f0489e8fae462d02289c53f9c95a93c2c15a0b6a3f60d488
User & Date: drh 2019-08-09 21:08:46.049
Context
2019-08-13
12:32
Improvements to the hyperlink description in /md_rules. ... (check-in: b8fac035 user: drh tags: trunk)
2019-08-10
23:04
Added "Forum Posts" choice to the "Activity Reports" sub section of /stat. ... (Closed-Leaf check-in: f39e47a1 user: wyoung tags: forum-post-activity-report)
15:34
Merge in from trunk. ... (check-in: 0f9f2e40 user: andybradford tags: test-updates)
03:23
Inserted %USERPROFILE% between %FOSSIL_HOME% and %LOCALAPPDATA% in the code that chooses where the user's account-wide _fossil file lives on Windows. (This is the Windows analog to the ~/.fossil file on POSIX systems.) Also updated the docs to match. ... (check-in: 15176c8a user: wyoung tags: windows-env-usage)
2019-08-09
21:08
Update the /stat page to show forum statistics. ... (check-in: 29141af7 user: drh tags: trunk)
20:56
Fixes to the new markdown hyperlink logic to handle the case there the target URL is not defined. ... (check-in: 44545eef user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/stat.c.
215
216
217
218
219
220
221
222
223
224

225







226


227
228
229
230
231
232
233
    @ %,d(n)
    @ </td></tr>
    @ <tr><th>Number&nbsp;Of&nbsp;Wiki&nbsp;Pages:</th><td>
    n = db_int(0, "SELECT count(*) FROM tag  /*scan*/"
                  " WHERE +tagname GLOB 'wiki-*'");
    @ %,d(n)
    @ </td></tr>
    @ <tr><th>Number&nbsp;Of&nbsp;Tickets:</th><td>
    n = db_int(0, "SELECT count(*) FROM tag  /*scan*/"
                  " WHERE +tagname GLOB 'tkt-*'");

    @ %,d(n)







    @ </td></tr>


  }
  @ <tr><th>Duration&nbsp;Of&nbsp;Project:</th><td>
  n = db_int(0, "SELECT julianday('now') - (SELECT min(mtime) FROM event)"
                " + 0.99");
  @ %,d(n) days or approximately %.2f(n/365.2425) years.
  @ </td></tr>
  p = db_get("project-code", 0);







<


>
|
>
>
>
>
>
>
>
|
>
>







215
216
217
218
219
220
221

222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
    @ %,d(n)
    @ </td></tr>
    @ <tr><th>Number&nbsp;Of&nbsp;Wiki&nbsp;Pages:</th><td>
    n = db_int(0, "SELECT count(*) FROM tag  /*scan*/"
                  " WHERE +tagname GLOB 'wiki-*'");
    @ %,d(n)
    @ </td></tr>

    n = db_int(0, "SELECT count(*) FROM tag  /*scan*/"
                  " WHERE +tagname GLOB 'tkt-*'");
    if( n>0 ){
      @ <tr><th>Number&nbsp;Of&nbsp;Tickets:</th><td>%,d(n)</td></tr>
    }
    if( db_table_exists("repository","forumpost") ){
      n = db_int(0, "SELECT count(*) FROM forumpost/*scan*/");
      if( n>0 ){
        int nThread = db_int(0, "SELECT count(*) FROM forumpost"
                                " WHERE froot=fpid");
        @ <tr><th>Number&nbsp;Of&nbsp;Forum&nbsp;Posts:</th>
        @ <td>%,d(n) on %d(nThread) threads</td></tr>
      }
    }
  }
  @ <tr><th>Duration&nbsp;Of&nbsp;Project:</th><td>
  n = db_int(0, "SELECT julianday('now') - (SELECT min(mtime) FROM event)"
                " + 0.99");
  @ %,d(n) days or approximately %.2f(n/365.2425) years.
  @ </td></tr>
  p = db_get("project-code", 0);