Skip to content

Instantly share code, notes, and snippets.

@JosephLenton
Created May 31, 2012 18:29
Show Gist options
  • Save JosephLenton/2845268 to your computer and use it in GitHub Desktop.
Save JosephLenton/2845268 to your computer and use it in GitHub Desktop.
example view
<?php
/**
* @param title Large text topic title.
* @param content Text content.
* @param displayTime Display time text such as 'last week'
* @param cssClass CSS class for the post.
* @param id An id for the comment container
* @param options link such as "click to expand"
*/
params( $title, $content, $displayTime, $cssClass, $id, $options );
if ( !$cssClass ) {
$cssClass = "playCategory";
}
if ( $id ) {
$theId = 'id="' . $id . '"';
}
?>
<div class="commentContainer <?=$cssClass?>" <?=$theId?>>
<?php if( $title ) { ?>
<h3><?=$title?></h3>
<?php } ?>
<p class="comment<?php
if ( ! $title ) {
echo " noTitle";
}
?>"><?= $content ?></p>
<div class="userCommentTail"></div>
<div class="commentMeta">
<p class="time"><?=$displayTime?></p>
<p class="options"><?=$options?></p>
</div>
<div class="clear"></div>
</div>
<div class="clear"></div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment