Example #1
0
function getProject($project)
{
    $content = '<p class="topNotification">This page is for a single project. You can go back to view all of my <a href="/projects">Projects</a>.</p>';
    $content .= "<div class='contentBlock'>";
    $content .= "<img class='projectLogo' src='" . $project['image_location'] . "' />";
    $content .= '<h1 class="headerLink" onClick="javascript:' . "window.location.assign('/projects/" . $project['id'] . "');" . '">' . $project['name'] . '</h1>';
    $content .= '<p>' . $project['intro_content'] . '</p>';
    $content .= $project['main_content'] . "</div>";
    global $postsToShow;
    $posts = fetchTagPostsLimit($project['tag_id'], $postsToShow);
    if (sizeof($posts) > 0) {
        $content .= '<h2>Blog Posts</h2><p>Below is a listing of the most recent blog posts relating to this project. Click <a href="/blog/tags/' . $project['tag_id'] . '">here</a> to view all posts related to this project.';
        $content .= getPostSummaries($posts, "h3");
    }
    $content .= '<p class="topNotification">Go back to all of my <a href="/projects">Projects</a>...</p>';
    return $content;
}
Example #2
0
function getTag($tagId)
{
    $posts = fetchTagPosts($tagId);
    $projectText = "";
    $project = fetchProjectIdByTag($tagId);
    if ($project != null) {
        $projectText = "You can view the project related to this tag <a href='/projects/" . $project['id'] . "'>here</a>.";
    }
    $content = '<p class="topNotification">You are viewing posts tagged with <b>' . fetchTagName($tagId) . '</b>. ' . $projectText . '</p>';
    $content .= getPostSummaries(fetchTagPosts($tagId), "h1");
    return $content;
}