
INO Photogallery
Posted on April 14, 2009 at 9:34 AM
// CODE FOR PHOTO VIEWS:
// DO NOT EDIT THIS PAGE
// URL path = photogallery
$pgpath = 'photogallery';
drupal_add_css(drupal_get_path('theme', 'ino6').'/photogallery.css');
if(isset($_GET['nid'])) {
$nodeid = $_GET['nid'];
if(isset($_GET['fid'])) {
$picid = $_GET['fid'];
$x = node_load($nodeid);
if(!$picid) {
$picid = $x->field_more_pics[0]['fid'];
}
$piccount = count($x->field_more_pics);
echo ‘
‘ . check_plain($x->title) . ‘
‘;
if ($_GET['large']) {
$GLOBALS['largegallery'] = $large = TRUE;
} else {
$large = FALSE;
}
echo ‘
‘;
$g = count($x->field_more_pics);
if($g) {
$i = 0;
foreach($x->field_more_pics AS $thing) {
$previtem = $i-1;
$nextitem = $i+1;
$finalpic = $g-1;
if($i == 0) {
$prevpic = $x->field_more_pics[$finalpic];
$nextpic = $x->field_more_pics[$nextitem];
} elseif($i == $finalpic) {
$prevpic = $x->field_more_pics[$previtem];
$nextpic = $x->field_more_pics[0];
} else {
$prevpic = $x->field_more_pics[$previtem];
$nextpic = $x->field_more_pics[$nextitem];
}
$thedesc = check_plain($thing['alt']);
if($thing['fid'] == $picid) {
$theanchor = ($large) ? NULL : ‘#photogallery-title’;
echo “
| “; if ($i == 0) { echo ‘ ’; } else { // echo l(”, $pgpath, array(), “nid=$nodeid&fid={$prevpic['fid']}”.($large?’&large=1′:”), ‘photogallery-title’); echo ““; } echo ‘ |
“; // echo “ // $thelink = ($large) ? $thing['filepath'] : $pgpath; $theargs = ($large) ? ” : ‘&large=1′; echo ““; echo $picstr; echo ‘‘; echo “
“; |
“; if ($i == $finalpic) { echo ‘ ’; } else { // echo l(”, $pgpath, array(), “nid=$nodeid&fid={$nextpic['fid']}”.($large?’&large=1′:”), ‘photogallery-title’); echo ““; } echo ‘ |
echo “
}
$i++;
}
// echo “
“;
$i = 0;
echo “
foreach($x->field_more_pics AS $thing) {
$thetitle = $thing['title'];
$alt = $node->title;
echo ““;
print theme(‘imagecache’, ‘thumbnail_pic’, $thing['filepath'], $alt, $thetitle);
echo ‘‘;
$i++;
// if($i % 5 == 0) { echo ‘
‘; }
}
echo “
“;
}
echo ‘
‘;
echo “
$farray = explode(‘/’, $pic);
$fcount = count($farray);
$fnid = $fcount-1;
$filename = $farray[$fnid];
$x = node_load($nodeid);
echo ‘
‘ . $x->title . ‘
‘;
// $thefid = $thepic['fid'];
$thetitle = $x->title;
$thedesc = $filename;
$thepath = $_GET['pic'];
echo “
| “; echo “ echo “
“; |
‘;
echo ‘
‘;
echo “
Leave a Reply
Must- See PHOtos!








One thought on “INO Photogallery”:
Hi, Neat post. There is a problem together with your site in internet explorer, would check this? IE still is the marketplace chief and a large part of people will miss your great writing because of this problem.