Seite 1 von 1
Mods für Smartor Photo Album
Verfasst: 24.05.2006 20:30
von siebenschlaefer
1. Mit den zurück- und weiterbuttons in einer galerie ohne stop durchblättern können, also im prinzip diese dämliche "dieses bild existiert nicht" meldung dadurch ersetzten dass man wieder am ende bzw anfang der galerie landet.
2. Im user profil ist ein kleiner link unter "alle beiträge des useres" der zur persönlichen gallery führt, diesen würde ich gern entfernen und dafür einen gallery button auf der linken seite zu stehen haben (unter email, pn, icq, usw....) dieser sollte aber nur angezeigt werden wenn auch eine persönliche gallerie angelegt wurde bzw. sich wenigstens ein bild darin befindet.
Verfasst: 24.05.2006 21:35
von siebenschlaefer
für nummer 1 hab ich eine lösung gefunden die zu funktionieren scheint
Code: Alles auswählen
Posted: Mon 14 Apr, 2003 Post subject: [alpha] loop slideshow (no more *pic does not exist*)
--------------------------------------------------------------------------------
I personally prefer to have a picture rotation instead of :
"Picture does not exist" message when you are through with viewing.
So i came up with this code.
BUT:
I wrote it (copy and pasted it) in 15 minutes... so its not very elegant and could have some bugs...
i'd appreciate if someone could eventually correct some errors (if they exist)
....
here we go:
in album_page.php find:
Code:
if( empty($row) )
{
message_die(GENERAL_ERROR, 'Bad pic_id');
}
below add:
Code:
$pic_cat_id_temp = $row['pic_cat_id'];
$pic_id_temp = $row['pic_id'];
$user_id_temp = $row['pic_user_id'];
then find:
Code:
message_die(GENERAL_ERROR, $lang['Pic_not_exist']);
replace with:
Code:
$sql = "SELECT new.pic_id, new.pic_time
FROM ". ALBUM_TABLE ." AS new, ". ALBUM_TABLE ." AS cur
WHERE cur.pic_id = $pic_id_temp
AND new.pic_id <> $pic_id_temp
AND new.pic_cat_id = $pic_cat_id_temp ";
$sql .= ($pic_cat_id_temp == PERSONAL_GALLERY) ? " AND new.pic_user_id = cur.pic_user_id" : "";
$sql .= ($HTTP_GET_VARS['mode'] == 'next') ? " ORDER BY pic_time ASC LIMIT 0,1" : " ORDER BY pic_time DESC LIMIT 0,1";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not query pic information', '', __LINE__, __FILE__, $sql);
}
$row = $db->sql_fetchrow($result);
if( empty($row) )
{
redirect(append_sid("album_personal.$phpEx?user_id=".$user_id_temp));
// message_die(GENERAL_ERROR, $lang['Pic_not_exist']);
}