// $family = schedule_GetFamilyByIds( [55,69] ); // print_r( $family ); echo " -->"; ?> <?php if ($this_node['type'] === 'root') { ?> <div id="content"> <?php $items = node_GetNodesByIds(node_GetPublishedNodeIdsByTypes(['post', 'game'])); $author_ids = []; foreach ($items as $item) { $author_ids[] = $item['author']; } $author_ids = array_unique($author_ids); $authors = node_GetNodesByIds($author_ids); foreach ($items as $item) { echo '<div class="item item-' . $item['type'] . '" id="item-' . $item['id'] . '">'; if ($item['type'] === 'post') { echo '<div class="header">'; echo '<h1>' . $item['name'] . '</h1>'; echo '<small>[Local time goes here] (' . date('l, d F Y H:i:s T', $item['time_published']) . ')</small>'; if (!empty($item['author'])) { echo "<h3>by <a href='/user/" . $authors[$item['author']]['slug'] . "'>" . $authors[$item['author']]['name'] . "</a></h3>"; } echo "</div>\n"; echo '<div class="body">'; // TODO: replace all the textarea related code with a function call for generating one. JS and PHP. // TODO: Add TAB support (and ESC to de-focus the textbox, since otherwise keyboard can't de-focus) // TODO: Emoji Autocompletion // TODO: Image Autocompletion (once uploaded)
* @api {GET} /a/node/get/:nodeid /a/node/get * @apiName GetNode * @apiGroup Node * @apiPermission Member * @apiVersion 0.1.0 */ if ($action === 'get') { if ($arg_count === 1) { $node_id = intval($arg[0]); if ($node_id <= 0) { json_EmitError(); } $node = node_GetNodeById($node_id); if (!empty($node)) { $response[] = $node; } } else { if ($arg_count === 0) { $nodes = explode(' ', $_GET['ids']); foreach ($nodes as &$node) { $node = intval($node); } //var_dump( $nodes ); $response = node_GetNodesByIds($nodes); } } } else { json_EmitError(); } // Done. Output the response. json_Emit($response);