-
-
Save whyisjake/2402240 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Removed the bogus stuff in place of strip_tags | |
$att = "value"; | |
foreach ($results as $item) { | |
$image = $item->xpath(".//DataObject[@type='cse_image']/Attribute"); | |
if ( !empty($image)) { | |
echo '<div class="row result"><div class="result">'; | |
echo '<div class="span2">'; | |
echo '<img class="thumbnail" src="'; | |
echo $image[0]->attributes()->$att; | |
echo '?w=100" width="100" />'; | |
echo '</div>'; | |
echo '<div class="span8"><h3><a href="'.$item->U.'">'; | |
echo $item->T; | |
echo '</a></h3>'; | |
echo '<a href="'.$item->U.'"</a>'.$item->UE.'</a>'; | |
echo '<p>'.strip_tags($item->S).'</p></div></div><div class="clear:both"></div></div><div class="clear:both"></div>'; | |
} else { | |
echo '<div class="row result"><div class="result">'; | |
echo '<div class="span10"><h3><a href="'.$item->U.'">'; | |
//namify($item); | |
echo $item->T; | |
echo '</a></h3>'; | |
echo '<a href="'.$item->U.'"</a>'.$item->UE.'</a>'; | |
echo '<p>'.strip_tags($item->S).'</p></div></div></div> '; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment