예제 #1
0
파일: wakaHelper.php 프로젝트: Tschaul/waka
function renderedContent($item)
{
    $renderedContent = stripslashes($item['content']);
    $renderedContent = parseLatexBBCode($renderedContent);
    $icount = count($item['images']);
    for ($i = 0; $i < $icount; $i++) {
        //print_r($item['sections'][$s]['images'][$i]);
        $html = '<img src="' . getMidsizeUrl($item['images'][$i]['url']) . '">';
        $code = '[image_' . $item['images'][$i]['id'] . ']';
        $renderedContent = str_replace($code, $html, $renderedContent);
    }
    $renderedContent = parseBBCode2HTML($renderedContent);
    return $renderedContent;
}
예제 #2
0
    $post = mysql_fetch_array($posts_query);
    $postTime = $post[0];
    $postText = $post[1];
    // Kommentare
    $SQL_Query = "SELECT post_time, post_text FROM io_Board_posts WHERE topic_id = " . $topID . " AND post_id != " . $topFirstPost . " ORDER By post_time ASC";
    $comment_query = mysql_query($SQL_Query);
    $commentCount = mysql_num_rows($comment_query);
    // Text Cleaning / Formatting
    $topTitle = utf8_encode($topTitle);
    $topPosterName = utf8_encode($topPosterName);
    $postText = utf8_encode($postText);
    //$postText = str_replace("\n", "<br>\n", $postText);
    $postText = str_replace("{SMILIES_PATH}", "../../brd/images/smilies", $postText);
    echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"430\">\n";
    echo "<tr><td colspan=\"3\" class=\"newsHeader\"> {$topTitle} </td></tr>\n";
    echo "<tr><td colspan=\"3\" class=\"newsText\">" . parseBBCode2HTML($postText) . "<br><br> </td></tr>\n";
    echo "<tr><td width=\"135\" class=\"newsFooter\">" . date("d.M.Y", $postTime) . "</td><td width=\"135\" class=\"newsFooter\"> von {$topPosterName} </td><td width=\"150\" class=\"newsFooter\"> {$commentCount} Kommentare </td></tr>\n";
    echo "</table>\n<br><br><br><br>";
}
?>
    <!-- News End -->
      </div></td>
    <td width="320" align="center">
    <img src="images/side_element_long.png" alt="FC Inter Olpe Last Match" height="180" width="300"  /><br /><br />
    <img src="images/blitztabelle_txt.png" alt="FC Inter Olpe Tabelle" height="40" width="150" align="left" />
    <?php 
//<iframe src="http://www.facebook.com/plugins/likebox.php?id=105939672794136&amp;width=300&amp;connections=20&amp;stream=false&amp;header=false&amp;height=410" scrolling="no" frameborder="0" style="border:none; width:300px; height:385px; background:#E5E5E5; overflow:hidden" allowTransparency="false"></iframe>
$SQLResult = mysql_query("SELECT position, teamName, points FROM `io_Tabelle` WHERE spieltagid = 0 order by position asc");
echo "<br><br><table width=\"300\" >\n";
echo "<tr style=\"font-weight:bold; background:#200;\">\n";
echo "<td width=\"50\" align=\"center\">Platz</td>\n";
예제 #3
0
function renderItemComments($item, $user, $location)
{
    $email = $user['email'];
    $str = '';
    $ccount = count($item['comments']);
    $item['comments'] = sortItemsAsc($item['comments'], 'dateCreated');
    for ($c = 0; $c < $ccount; $c++) {
        $str .= '<div class="post_comment"><img src="http://www.gravatar.com/avatar/' . hash('md5', $item['comments'][$c]['user']) . '.gif?s=32&default=identicon&r=PG" class="commentavatar">';
        if ($email == $item['comments'][$c]['user']) {
            $str .= '<a href="javascript:queryDeleteComment(\'' . $_REQUEST['w'] . '\',\'' . $_REQUEST['u'] . '\',\'' . $item['id'] . '\',\'' . $item['comments'][$c]['id'] . '\')">';
            $str .= '<img src="img/Actions-edit-delete-icon.png" style="float:right;">';
            $str .= '</a>';
        }
        $str .= '<div class="post_comment_content"><small><span class="time" utctime="' . convert_datetime($item['comments'][$c]['dateCreated']) . '">' . $item['comments'][$c]['dateCreated'] . ' (UTC)</span> ' . $item['comments'][$c]['user'] . ': </small><p>' . parseBBCode2HTML(parseLatexBBCode(htmlspecialchars(stripslashes($item['comments'][$c]['content'])))) . '</div></div>';
        $str .= '<div style="clear: both;"></div>';
    }
    $str .= '<div class="post_comment_adder"><img src="http://www.gravatar.com/avatar/' . hash('md5', $email) . '.gif?s=32&default=identicon&r=PG" class="commentavatar">';
    $str .= '<div class="post_comment_form"><form action="query.php" method="post" name="editpost" class="comment_add_form" autocomplete="off">
			<input type="hidden" name="w" value="' . $_REQUEST['w'] . '">
			<input type="hidden" name="u" value="' . $_REQUEST['u'] . '">
			<input type="hidden" name="id" value="' . $item['id'] . '">
			<input type="hidden" name="action" value="comment_add">';
    $str .= '<small>' . $email . ': </small>';
    $str .= '<p><textarea name="content" style="width:500px; height:40px;"></textarea></p>';
    $str .= '<p><input type="submit" value="comment"></p>';
    $str .= '</form></div></div>';
    return $str;
}