" . $this->get_parent_thumbnail_html($image) . "
";
+ if (Relationships::has_siblings($image->id)) {
+ $visible_siblings = Relationships::get_siblings($image->id);
+ if (!empty($visible_siblings)) {
+ $parent_summary_html .= " and has " .count($visible_siblings) . (count($visible_siblings) > 1 ? " siblings" : " sibling");
+ $parent_summary_html .= " (";
+ foreach ($visible_siblings as $sibling) {
+ $parent_summary_html .= "
id) . "'>#$sibling->id" . (count($visible_siblings) > 1 ? ", " : "");
+ }
+ $parent_summary_html = trim($parent_summary_html, ', ');
+ $parent_summary_html .= ")";
+ $parent_thumb_html .= "
" . $this->get_sibling_thumbnail_html($image) . "
";
+ }
+ }
+ $parent_summary_html .= ".";
+ $parent_summary_html .= "
« hide";
+ $parent_thumb_html .= "
";
+ $html = $parent_summary_html . $parent_thumb_html;
+ $page->add_block(new Block(null, $html, "main", 5, "PostRelationships"));
}
if (bool_escape($image['has_children'])) {
- $ids = $database->get_col("SELECT id FROM images WHERE parent_id = :iid", ["iid" => $image->id]);
-
- $html = "This post has