//
// ------------------------------------------------------------------------- //
// Copyright (C) 2002,2003 Grégory DEMAR <gdemar> //
// http://www.chezgreg.net/coppermine/ //
// ------------------------------------------------------------------------- //
// Updated by the Coppermine Dev Team //
// (http://coppermine.sf.net/team/) //
// see /docs/credits.html for details //
// ------------------------------------------------------------------------- //
// New Port by GoldenTroll //
// http://coppermine.findhere.org/ //
// Based on coppermine 1.1d by Surf http://www.surf4all.net/ //
// ------------------------------------------------------------------------- //
// This program is free software; you can redistribute it and/or modify //
// it under the terms of the GNU General Public License as published by //
// the Free Software Foundation; either version 2 of the License, or //
// (at your option) any later version. //
// ------------------------------------------------------------------------- //
if (eregi("block-CPG", $_SERVER['PHP_SELF'])) {
Header("Location: index.php");
die();
}
define('NO_HEADER', true);
global $prefix, $db, $CONFIG, $Version_Num, $cpg_dir;
$cpg_dir = "coppermine";
$cpg_block = true;
require("modules/" . $cpg_dir . "/include/load.inc");
$cpg_block = false;
// $length=$CONFIG['thumbcols']; //number of thumbs
$length = 50; //number of thumbs
$maxlength = 20; // maximum length of name in block
// marquee info at http://www.faqs.org/docs/htmltut/_MARQUEE.html
$result = $db->sql_query("SELECT pid, filepath, filename, p.aid, p.title FROM ".$cpg_prefix."pictures AS p INNER JOIN ".$cpg_prefix."albums AS a ON (p.aid = a.aid AND ".VIS_GROUPS.") WHERE approved='YES' GROUP BY pid ORDER BY pid DESC LIMIT $length");
$content .= '<table><tr>';
$pic = 0;
while ($row = $db->sql_fetchrow($result)) {
if ($CONFIG['seo_alts'] == 0) {
$thumb_title = $row['filename'];
} else {
if ($row['title'] != '') {
$thumb_title = $row['title'];
} else {
$thumb_title = substr($row['filename'], 0, -4);
}
}
stripslashes($thumb_title);
$content .= '<td><a href="' . $CPG_M_URL . '&file=displayimage&m e t a=lastup&cat=0&pos=' . $pic . '"><img src="' . get_pic_url($row, 'thumb') . '" border="0" alt="' . $thumb_title . '" title="' . $thumb_title . '"></a> </td>';
$pic++;
}
$content .= '</tr></table></MARQUEE><table><tr><td></center></td></tr></table>';
?>
arkadaşlar bu bloğu kullanıyorum ancak sürekli aynı resimler geçiyor bunu rastgele resimeler olarak değiştirme imkanımız var.böyle bir blok var ama kullandığım bu blok farklı (film şeridi)ancak aynı resimler yerine rastgele resimler olsun istiyorum nerde değişiklik yapmam lazım.
Kayıt: Nov 04, 2003 Mesajlar: 737 Konum: Amsterdam Hollanda
Tarih: 2009-12-23, 21:19:34 Mesaj konusu:
Bul:
Kod:
$result = $db->sql_query("SELECT pid, filepath, filename, p.aid, p.title FROM ".$cpg_prefix."pictures AS p INNER JOIN ".$cpg_prefix."albums AS a ON (p.aid = a.aid AND ".VIS_GROUPS.") WHERE approved='YES' GROUP BY pid ORDER BY pid DESC LIMIT $length");
Bu forumda yeni başlıklar açamazsınız Bu forumdaki başlıklara cevap veremezsiniz Bu forumdaki mesajlarınızı değiştiremezsiniz Bu forumdaki mesajlarınızı silemezsiniz Bu forumdaki anketlerde oy kullanamazsınız