IsError()) $userLogin = strval($data["author_id"]); else $userLogin = $userReqResp->GetData()["login"]; if (!is_string($data["created_at"])) $timestamp = strval($data["created_at"]); else $timestamp = $data["created_at"]; $placeholderString = "ID: " . strval($data["id"]); $placeholderString .= " | AUTHOR: $userLogin"; $placeholderString .= " | TIMESTAMP: $timestamp"; $placeholderString .= " | TAGS: " . $data["tags"]; $result = "\n"; // TODO: href $result .= "\"$placeholderString\"\n"; $result .= "
\n"; $result .= "

+" . strval($data["votes_up"]); $result .= " -" . strval($data["votes_down"]); $result .= " V " . strval($data["views"]); /* if ($data["comments_enabled"]) { $result .= " C " . null; // TODO: resolve comment section by id and count comments amount } */ $result .= "

\n"; $result .= "
\n"; $result .= "
\n"; return $result; } ?>