Skip to content

Instantly share code, notes, and snippets.

@Stanton
Created September 7, 2011 14:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Stanton/1200781 to your computer and use it in GitHub Desktop.
Save Stanton/1200781 to your computer and use it in GitHub Desktop.
imageGenerator usage
<?php
/* HEADLINE ARTICLE */
if (isset($headline)) :
?>
<div id="headline" class="search_result">
<a href="http://<?php print $DOMAIN . buildNewsArticleURL($headline[0]->id);?>">
<?php
if ($headline[0]->imageURL != "") {
print imageGenerator('http://' . $DOMAIN . '/images/'. $headline[0]->imageURL, array(
'alt' => getImageProperty($headline[0]->imageURL, 'altText'),
'class' => 'contentimage',
'width' => 340,
'upscale' => true
)
);
}
?>
</a>
<h2>
<a href="http://<?php print $DOMAIN . buildNewsArticleURL($headline[0]->id);?>"><?php print $headline[0]->title;?></a>
</h2>
<p><span class="date entry-meta"><?php print date("jS F Y", $headline[0]->newsDate);?></span> - <?php print $headline[0]->summary;?></p>
<a href="http://<?php print $DOMAIN . buildNewsArticleURL($headline[0]->id);?>" class="article-full">Read more</a>
</div>
<?php
endif;
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment