コード例 #1
0
/**
 * @deprecated
 */
function getCommentTime($format = '%I:%M %p')
{
    deprecated_function_notify(gettext('Use getCommentDateTime().'));
    global $_zp_current_comment;
    return myts_date($format, $_zp_current_comment['date']);
}
コード例 #2
0
                if (extensionEnabled('zenpage')) {
                    $obj = getItemByID('pages', $comment['ownerid']);
                    if ($obj) {
                        $link = "<a href=\"" . $obj->getLink() . '#zp_comment_id_' . $id . '">[' . gettext("page") . '] ' . $obj->getTitle() . "</a>";
                    }
                }
                break;
            default:
                // all the image types
                $obj = getItemByID('images', $comment['ownerid']);
                if ($obj) {
                    $link = "<a href=\"" . $obj->getLink() . '#zp_comment_id_' . $id . '">[' . gettext('image') . '] ' . $obj->getTitle() . "</a>";
                }
                break;
        }
        $date = myts_date('%m/%d/%Y %I:%M %p', $comment['date']);
        $website = $comment['website'];
        $fullcomment = sanitize($comment['comment'], 2);
        $shortcomment = truncate_string(getBare($fullcomment), 123);
        $inmoderation = $comment['inmoderation'];
        $private = $comment['private'];
        $anon = $comment['anon'];
        ?>
					<tr class="newstr">
						<td><?php 
        echo $fulltext ? $fullcomment : $shortcomment;
        ?>
</td>
						<td><?php 
        echo date('Y-m-d H:i:s', strtotime($date));
        ?>
コード例 #3
0
/**
 * Returns a formatted date and time for the comment.
 * Uses the "date_format" option for the formatting unless
 * a format string is passed.
 *
 * @param string $format 'strftime' date/time format
 * @return string
 */
function getCommentDateTime($format = NULL)
{
    if (is_null($format)) {
        $format = DATE_FORMAT;
    }
    global $_zp_current_comment;
    return myts_date($format, $_zp_current_comment['date']);
}
コード例 #4
0
ファイル: NewsUtil.php プロジェクト: Imagenomad/Unsupported
 static function printNewsDateBlock()
 {
     global $_zp_current_comment;
     $d = $_zp_current_comment['date'];
     $x = myts_date('%m', $d);
     $mo = $x - 1;
     $mt = $mo * -30 + (3 - $x);
     $c = myts_date('%d', $d);
     $da = $c - ($c > 16 ? 17 : 1);
     $dc = $c > 16 ? '-100px' : '-50px';
     $dt = $da * -31;
     $ye = myts_date('%y', $d) - 6;
     $yt = $ye * -50 - 1;
     echo "<div class='date-wrapper'>" . "\t<div class='postdate'>" . "\t   <div class='month' style='background-position: 0 " . $mt . "px;'>" . strftime('%b', $d) . "</div>" . "\t   <div class='day' style='background-position: " . $dc . " " . $dt . "px;'>" . myts_date('%d', $d) . "</div>" . "\t   <div class='year' style='background-position: -150px " . $yt . "px;'>" . myts_date('%Y', $d) . "</div>" . "\t</div>" . "</div>";
 }
コード例 #5
0
/**
 * Retrieves the time of the current comment.
 * 
 * Deprecated--use getCommentDateTime()
 * 
 * Returns a formatted time
 * @param string $format how to format the result
 * @return string
 */
function getCommentTime($format = '%I:%M %p')
{
    trigger_error(gettext('getCommentTime is deprecated. Use getCommentDateTime().'), E_USER_NOTICE);
    global $_zp_current_comment;
    return myts_date($format, $_zp_current_comment['date']);
}