Scriptlog Docs

Scriptlog Documentation

Code reference for the Scriptlog codebase

User Tools

Site Tools


scriptlog:public:functions-post

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

scriptlog:public:functions-post [2026/09/26 09:09] – admin adminscriptlog:public:functions-post [2026/09/26 09:17] (current) – admin admin
Line 16: Line 16:
 ======= Functions (41) ======= ======= Functions (41) =======
  
-  ^ Function ^ Line ^ Params ^ Returns ^ Summary ^ +^ Function ^ Line ^ Params ^ Returns ^ Summary ^ 
-  | ''previous_post'' | 22 | 1 |  | previous_post() - Get previous post link | +| ''previous_post'' | 22 | 1 |  | previous_post() - Get previous post link | 
-  | ''next_post'' | 50 | 1 |  | next_post() - Get next post link | +| ''next_post'' | 50 | 1 |  | next_post() - Get next post link | 
-  | ''initialize_page'' | 78 | 0 |  | initialize_page() | +| ''initialize_page'' | 78 | 0 |  | initialize_page() | 
-  | ''initialize_post'' | 88 | 0 |  | initialize_post() | +| ''initialize_post'' | 88 | 0 |  | initialize_post() | 
-  | ''initialize_comment'' | 98 | 0 |  | initialize_comment() | +| ''initialize_comment'' | 98 | 0 |  | initialize_comment() | 
-  | ''initialize_archive'' | 108 | 0 |  | initialize_archive() | +| ''initialize_archive'' | 108 | 0 |  | initialize_archive() | 
-  | ''initialize_topic'' | 118 | 0 |  | initialize_topic() | +| ''initialize_topic'' | 118 | 0 |  | initialize_topic() | 
-  | ''initialize_tag'' | 128 | 0 |  | initialize_tag() | +| ''initialize_tag'' | 128 | 0 |  | initialize_tag() | 
-  | ''initialize_gallery'' | 138 | 0 |  | initialize_gallery() | +| ''initialize_gallery'' | 138 | 0 |  | initialize_gallery() | 
-  | ''featured_post'' | 148 | 0 |  | featured_post() - Get random headline posts | +| ''featured_post'' | 148 | 0 |  | featured_post() - Get random headline posts | 
-  | ''sticky_page'' | 159 | 0 |  | sticky_page() - Get random sticky page | +| ''sticky_page'' | 159 | 0 |  | sticky_page() - Get random sticky page | 
-  | ''random_posts'' | 170 | 2 |  | random_posts() - Get random posts | +| ''random_posts'' | 170 | 2 |  | random_posts() - Get random posts | 
-  | ''latest_posts'' | 181 | 2 |  | latest_posts() - Get latest posts | +| ''latest_posts'' | 181 | 2 |  | latest_posts() - Get latest posts | 
-  | ''prepare_post_card'' | 203 | 1 | ''\Scriptlog\Core\Theme\PostViewModel'' | prepare_post_card() - Normalize a raw post row into a display-ready card. | +| ''prepare_post_card'' | 203 | 1 | ''\Scriptlog\Core\Theme\PostViewModel'' | prepare_post_card() - Normalize a raw post row into a display-ready card. | 
-  | ''theme_post_url'' | 260 | 1 | ''string'' | theme_post_url() - Build a post URL without a per-row database round-trip. | +| ''theme_post_url'' | 260 | 1 | ''string'' | theme_post_url() - Build a post URL without a per-row database round-trip. | 
-  | ''theme_topic_url'' | 297 | 1 | ''string'' | theme_topic_url() - Build a category URL without a per-row DB round-trip. | +| ''theme_topic_url'' | 297 | 1 | ''string'' | theme_topic_url() - Build a category URL without a per-row DB round-trip. | 
-  | ''theme_page_url'' | 335 | 1 | ''string'' | theme_page_url() - Build a static page URL without a per-row DB round-trip. | +| ''theme_page_url'' | 335 | 1 | ''string'' | theme_page_url() - Build a static page URL without a per-row DB round-trip. | 
-  | ''theme_search_url'' | 373 | 0 | ''string'' | theme_search_url() - Build the front-end search URL honoring the permalink setting. | +| ''theme_search_url'' | 373 | 0 | ''string'' | theme_search_url() - Build the front-end search URL honoring the permalink setting. | 
-  | ''theme_tag_url'' | 399 | 1 | ''string'' | theme_tag_url() - Build a tag archive URL without a per-row DB round-trip. | +| ''theme_tag_url'' | 399 | 1 | ''string'' | theme_tag_url() - Build a tag archive URL without a per-row DB round-trip. | 
-  | ''theme_month_name'' | 424 | 1 | ''string'' | theme_month_name() - Localized month number to English month name. | +| ''theme_month_name'' | 424 | 1 | ''string'' | theme_month_name() - Localized month number to English month name. | 
-  | ''theme_archive_url'' | 451 | 2 | ''string'' | theme_archive_url() - Build a monthly archive URL without a per-row DB | +| ''theme_archive_url'' | 451 | 2 | ''string'' | theme_archive_url() - Build a monthly archive URL without a per-row DB | 
-  | ''prepare_page'' | 484 | 1 |  | prepare_page() - Normalize a raw page row into a display-ready PageViewModel. | +| ''prepare_page'' | 484 | 1 |  | prepare_page() - Normalize a raw page row into a display-ready PageViewModel. | 
-  | ''prepare_archive'' | 528 | 1 |  | prepare_archive() - Normalize a raw archive row into a display-ready | +| ''prepare_archive'' | 528 | 1 |  | prepare_archive() - Normalize a raw archive row into a display-ready | 
-  | ''prepare_sidebar'' | 555 | 0 |  | prepare_sidebar() - Normalize raw sidebar aggregates into a display-ready | +| ''prepare_sidebar'' | 555 | 0 |  | prepare_sidebar() - Normalize raw sidebar aggregates into a display-ready | 
-  | ''format_topics'' | 639 | 1 |  | Format topics data into HTML category links | +| ''format_topics'' | 639 | 1 |  | Format topics data into HTML category links | 
-  | ''retrieves_topic_simple'' | 688 | 1 |  | retrieves_topic_simple() - Get topic links for post | +| ''retrieves_topic_simple'' | 688 | 1 |  | retrieves_topic_simple() - Get topic links for post | 
-  | ''retrieves_topic_prepared'' | 717 | 1 |  | retrieves_topic_prepared() - Get topic links with status check | +| ''retrieves_topic_prepared'' | 717 | 1 |  | retrieves_topic_prepared() - Get topic links with status check | 
-  | ''sidebar_topics'' | 741 | 0 |  | sidebar_topics() - Get topics for sidebar | +| ''sidebar_topics'' | 741 | 0 |  | sidebar_topics() - Get topics for sidebar | 
-  | ''retrieve_tags'' | 752 | 0 |  | retrieve_tags() - Get tags for sidebar | +| ''retrieve_tags'' | 752 | 0 |  | retrieve_tags() - Get tags for sidebar | 
-  | ''link_tag'' | 762 | 1 |  | link_tag() - Generate tag links | +| ''link_tag'' | 762 | 1 |  | link_tag() - Generate tag links | 
-  | ''link_topic'' | 778 | 1 | ''string'' | link_topic() - Generate topic link | +| ''link_topic'' | 778 | 1 | ''string'' | link_topic() - Generate topic link | 
-  | ''retrieve_blog_posts'' | 799 | 0 |  | retrieve_blog_posts() - Get all blog posts | +| ''retrieve_blog_posts'' | 799 | 0 |  | retrieve_blog_posts() - Get all blog posts | 
-  | ''retrieve_detail_post'' | 810 | 1 |  | retrieve_detail_post() - Get single post by ID | +| ''retrieve_detail_post'' | 810 | 1 |  | retrieve_detail_post() - Get single post by ID | 
-  | ''posts_by_archive'' | 836 | 1 |  | posts_by_archive() - Get posts by archive | +| ''posts_by_archive'' | 836 | 1 |  | posts_by_archive() - Get posts by archive | 
-  | ''archive_index'' | 847 | 0 |  | archive_index() - Get all archives for index | +| ''archive_index'' | 847 | 0 |  | archive_index() - Get all archives for index | 
-  | ''posts_by_tag'' | 858 | 1 |  | posts_by_tag() - Get posts by tag | +| ''posts_by_tag'' | 858 | 1 |  | posts_by_tag() - Get posts by tag | 
-  | ''searching_by_tag'' | 869 | 1 |  | searching_by_tag() - Full-text tag search | +| ''searching_by_tag'' | 869 | 1 |  | searching_by_tag() - Full-text tag search | 
-  | ''posts_by_category'' | 881 | 1 |  | posts_by_category() - Get posts by category | +| ''posts_by_category'' | 881 | 1 |  | posts_by_category() - Get posts by category | 
-  | ''retrieve_archives'' | 894 | 0 |  | retrieve_archives() - Get archives for sidebar | +| ''retrieve_archives'' | 894 | 0 |  | retrieve_archives() - Get archives for sidebar | 
-  | ''retrieve_page'' | 905 | 2 |  | retrieve_page() - Get page by ID or slug | +| ''retrieve_page'' | 905 | 2 |  | retrieve_page() - Get page by ID or slug | 
-  | ''nothing_found'' | 921 | 0 |  | nothing_found() - Display "no posts" message |+| ''nothing_found'' | 921 | 0 |  | nothing_found() - Display "no posts" message |
  
  
Line 70: Line 70:
 previous_post() - Get previous post link previous_post() - Get previous post link
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$id'' | ''(untyped)'' | //required// |  |+|  ''$id'' |  ''(untyped)'' |  //required// |   |
  
  
Line 84: Line 84:
 next_post() - Get next post link next_post() - Get next post link
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$id'' | ''(untyped)'' | //required// |  |+|  ''$id'' |  ''(untyped)'' |  //required// |   |
  
  
Line 197: Line 197:
 random_posts() - Get random posts random_posts() - Get random posts
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$start'' | ''(untyped)'' | //required// |  | +|  ''$start'' |  ''(untyped)'' |  //required// |   | 
-  | ''$end'' | ''(untyped)'' | //required// |  |+|  ''$end'' |  ''(untyped)'' |  //required// |   |
  
  
Line 212: Line 212:
 latest_posts() - Get latest posts latest_posts() - Get latest posts
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$limit'' | ''(untyped)'' | //required// |  | +|  ''$limit'' |  ''(untyped)'' |  //required// |   | 
-  | ''$position'' | ''(untyped)'' | ''null'' |  |+|  ''$position'' |  ''(untyped)'' |  ''null'' |   |
  
  
Line 227: Line 227:
 prepare_post_card() - Normalize a raw post row into a display-ready card. prepare_post_card() - Normalize a raw post row into a display-ready card.
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$entry'' | ''array'' | //required// |  |+|  ''$entry'' |  ''array'' |  //required// |   |
  
  
Line 241: Line 241:
 theme_post_url() - Build a post URL without a per-row database round-trip. theme_post_url() - Build a post URL without a per-row database round-trip.
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$row'' | ''array'' | //required// |  |+|  ''$row'' |  ''array'' |  //required// |   |
  
  
Line 255: Line 255:
 theme_topic_url() - Build a category URL without a per-row DB round-trip. theme_topic_url() - Build a category URL without a per-row DB round-trip.
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$row'' | ''array'' | //required// |  |+|  ''$row'' |  ''array'' |  //required// |   |
  
  
Line 269: Line 269:
 theme_page_url() - Build a static page URL without a per-row DB round-trip. theme_page_url() - Build a static page URL without a per-row DB round-trip.
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$row'' | ''array'' | //required// |  |+|  ''$row'' |  ''array'' |  //required// |   |
  
  
Line 294: Line 294:
 theme_tag_url() - Build a tag archive URL without a per-row DB round-trip. theme_tag_url() - Build a tag archive URL without a per-row DB round-trip.
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$tag'' | ''string'' | //required// | Raw tag value (display form) |+|  ''$tag'' |  ''string'' |  //required// |  Raw tag value (display form) |
  
  
Line 308: Line 308:
 theme_month_name() - Localized month number to English month name. theme_month_name() - Localized month number to English month name.
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$month'' | ''string'' | //required// | Month as number (1 or 2 digits, e.g. "3" or "03") |+|  ''$month'' |  ''string'' |  //required// |  Month as number (1 or 2 digits, e.g. "3" or "03") |
  
  
Line 322: Line 322:
 theme_archive_url() - Build a monthly archive URL without a per-row DB theme_archive_url() - Build a monthly archive URL without a per-row DB
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$month'' | ''string'' | //required// | Archive month (1 or 2 digits) | +|  ''$month'' |  ''string'' |  //required// |  Archive month (1 or 2 digits) | 
-  | ''$year'' | ''string'' | //required// | Archive year (4 digits) |+|  ''$year'' |  ''string'' |  //required// |  Archive year (4 digits) |
  
  
Line 337: Line 337:
 prepare_page() - Normalize a raw page row into a display-ready PageViewModel. prepare_page() - Normalize a raw page row into a display-ready PageViewModel.
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$entry'' | ''array'' | //required// |  |+|  ''$entry'' |  ''array'' |  //required// |   |
  
  
Line 351: Line 351:
 prepare_archive() - Normalize a raw archive row into a display-ready prepare_archive() - Normalize a raw archive row into a display-ready
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$entry'' | ''array'' | //required// |  |+|  ''$entry'' |  ''array'' |  //required// |   |
  
  
Line 376: Line 376:
 Format topics data into HTML category links Format topics data into HTML category links
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$topics_data'' | ''(untyped)'' | //required// | Pipe-delimited topic data from GROUP_CONCAT |+|  ''$topics_data'' |  ''(untyped)'' |  //required// |  Pipe-delimited topic data from GROUP_CONCAT |
  
  
Line 390: Line 390:
 retrieves_topic_simple() - Get topic links for post retrieves_topic_simple() - Get topic links for post
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$id'' | ''(untyped)'' | //required// |  |+|  ''$id'' |  ''(untyped)'' |  //required// |   |
  
  
Line 404: Line 404:
 retrieves_topic_prepared() - Get topic links with status check retrieves_topic_prepared() - Get topic links with status check
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$id'' | ''(untyped)'' | //required// |  |+|  ''$id'' |  ''(untyped)'' |  //required// |   |
  
  
Line 440: Line 440:
 link_tag() - Generate tag links link_tag() - Generate tag links
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$id'' | ''(untyped)'' | //required// |  |+|  ''$id'' |  ''(untyped)'' |  //required// |   |
  
  
Line 454: Line 454:
 link_topic() - Generate topic link link_topic() - Generate topic link
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$id'' | ''(untyped)'' | //required// |  |+|  ''$id'' |  ''(untyped)'' |  //required// |   |
  
  
Line 479: Line 479:
 retrieve_detail_post() - Get single post by ID retrieve_detail_post() - Get single post by ID
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$id'' | ''(untyped)'' | //required// |  |+|  ''$id'' |  ''(untyped)'' |  //required// |   |
  
  
Line 493: Line 493:
 posts_by_archive() - Get posts by archive posts_by_archive() - Get posts by archive
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$values'' | ''array'' | //required// |  |+|  ''$values'' |  ''array'' |  //required// |   |
  
  
Line 518: Line 518:
 posts_by_tag() - Get posts by tag posts_by_tag() - Get posts by tag
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$tag'' | ''(untyped)'' | //required// |  |+|  ''$tag'' |  ''(untyped)'' |  //required// |   |
  
  
Line 532: Line 532:
 searching_by_tag() - Full-text tag search searching_by_tag() - Full-text tag search
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$tag'' | ''(untyped)'' | //required// |  |+|  ''$tag'' |  ''(untyped)'' |  //required// |   |
  
  
Line 546: Line 546:
 posts_by_category() - Get posts by category posts_by_category() - Get posts by category
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$topicId'' | ''(untyped)'' | //required// |  |+|  ''$topicId'' |  ''(untyped)'' |  //required// |   |
  
  
Line 571: Line 571:
 retrieve_page() - Get page by ID or slug retrieve_page() - Get page by ID or slug
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$arg'' | ''(untyped)'' | //required// |  | +|  ''$arg'' |  ''(untyped)'' |  //required// |   | 
-  | ''$rewrite'' | ''(untyped)'' | //required// |  |+|  ''$rewrite'' |  ''(untyped)'' |  //required// |   |
  
  
scriptlog/public/functions-post.1790413764.txt.gz · Last modified: by admin