Jump to content


addon : latest pics


1 reply to this topic

#1 Mukke

    Etomite Forum Newbie

  • Member
  • 47 posts

Posted 24 June 2007 - 03:36 PM

hi all
i'm very tankfull for this snippet cause it has all i ever wished for except latest pics
so i wrote a seperate snippet for it:

$out="";

if(!isset($num))   $num=4;
$pics=$etomite->getIntTableRows("*", "etogal", "1", "date", "DESC",$num);

foreach($pics as $pic) {

	$title = (empty($pic['title'])) ? "Picture ".$pic['id'] : $pic['title'];

	$out.='<span class="latest_pic"><a href="index.php?id='.$pic['gal_id'].'&pic='.$pic['id'].'" class="latest_pic">
	'.$title.'</a></span><br />'."\n";
}

return $out;

just putting it only in case some1 might need it too an not have the ability to wite his/her own snippets
EDIT:
oh ja the only parameter is 'num' and tat is the number of pics you want to show, it's 4 by default

Edited by Mukke, 24 June 2007 - 03:45 PM.


#2 Mukke

    Etomite Forum Newbie

  • Member
  • 47 posts

Posted 24 June 2007 - 03:44 PM

Made an edit cause if no title it was showing up empty





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users