WikiNebula:AccessLog.json

提供:WikiNebula
2025年9月16日 (火) 09:03時点におけるHiratatomotaka (トーク | 投稿記録)による版
ナビゲーションに移動 検索に移動
  <!-- AccessLog -->
  {
    "queries": {
      "last_viewed" : [
        {"params": {
          "before": ["9999-12-31 23:59:59"],
          "n": ["3"]
        }},
        "WITH last_access AS (                     ",
        "  SELECT title, MAX(datetime) as datetime ",
        "  FROM AccessLog                          ",
        "  GROUP BY title                          ",
        ")                                         ",
        "SELECT                                    ",
        "  title, datetime,                        ",
        "  'case0' as result_type                  ",
        "FROM last_access                          ",
        "WHERE datetime <= '{$before}'             ",
        "ORDER BY datetime DESC                    ",
        "LIMIT {$n}                                "
      ]
    },
    "outputs": {
      "last_viewed" : {
        "case0": {
          "head": [
            "{| class=\"wikitable\" style=\"margin:auto\"          ",
            "|-                                                    ",
            "!     記事     !! 最終アクセス日時                    "
          ],
          "record": [
            "|-                                                    ",
            "| [[{$title}]] || [[{$datetime}]]                     "
          ],
          "foot": [
            "|}                                                    "
          ]
        }
      }
    }
  }
  <!-- /AccessLog -->