Icy Phoenix

     
 


This forum is locked: you cannot post, reply or edit topics.  This topic is locked: you cannot edit posts or make replies. 
Page 1 of 1
 
 
Reply with quote Download Post 
Post FAP SUPPORT - Smartor Album Version Raised To 2.0.56a Included In FAB? 
 
I saw on http://smartor.is-root.com/ that Smartor Album version raised to 2.0.56a. I'm using FAB 1.4.1 on my testsite and was wondering if the fix is included or has to be included in FAB 1.4.1

Link

Code: [Download] [Hide] [Select]
#
#-----[ OPEN ]------------------------------------------
#
album_page.php

#
#-----[ FIND ]------------------------------------------
#
/*
+----------------------------------------------------------
| Main work here...
+----------------------------------------------------------
*/

#
#-----[ BEFORE, ADD ]------------------------------------------
#
// Next
$sql = "SELECT new.pic_id, new.pic_time
      FROM ". ALBUM_TABLE ." AS new, ". ALBUM_TABLE ." AS cur
      WHERE cur.pic_id = $pic_id
         AND new.pic_id <> cur.pic_id
         AND new.pic_cat_id = cur.pic_cat_id
         AND new.pic_time >= cur.pic_time";

$sql .= ($thispic['pic_cat_id'] == PERSONAL_GALLERY) ? " AND new.pic_user_id = cur.pic_user_id" : "";
$sql .= " ORDER BY pic_time ASC LIMIT 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) )
{
   $u_next = "";
   $l_next = "";
}
else
{
   $new_pic_id = $row['pic_id'];
   $u_next = append_sid("album_page.$phpEx?pic_id=$new_pic_id");
   $l_next = $lang['Next'] . "&nbsp;&raquo;";
}

// Prev
$sql = "SELECT new.pic_id, new.pic_time
      FROM ". ALBUM_TABLE ." AS new, ". ALBUM_TABLE ." AS cur
      WHERE cur.pic_id = $pic_id
         AND new.pic_id <> cur.pic_id
         AND new.pic_cat_id = cur.pic_cat_id
         AND new.pic_time <= cur.pic_time";

$sql .= ($thispic['pic_cat_id'] == PERSONAL_GALLERY) ? " AND new.pic_user_id = cur.pic_user_id" : "";
$sql .= " ORDER BY pic_time DESC LIMIT 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) )
{
   $u_prev = "";
   $l_prev = "";
}
else
{
   $new_pic_id = $row['pic_id'];
   $u_prev = append_sid("album_page.$phpEx?pic_id=$new_pic_id");
   $l_prev = "&laquo;&nbsp;" . $lang['Previous'];
}
// end

#
#-----[ FIND ]------------------------------------------
#
   'U_NEXT' => append_sid("album_page.$phpEx?pic_id=$pic_id&amp;mode=next"),
   'U_PREVIOUS' => append_sid("album_page.$phpEx?pic_id=$pic_id&amp;mode=previous"),

   'L_NEXT' => $lang['Next'],
   'L_PREVIOUS' => $lang['Previous'],

#
#-----[ REPLACE WITH ]------------------------------------------
#
   'U_NEXT' => $u_next,
   'U_PREVIOUS' => $u_prev,

   'L_NEXT' => $l_next,
   'L_PREVIOUS' => $l_prev,

#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/album_page_body.tpl

#
#-----[ FIND ]------------------------------------------
#
         <span class="cattitle">&laquo;&nbsp;<a href="{U_PREVIOUS}" class="cattitle">{L_PREVIOUS}</a>&nbsp;-&nbsp;<a href="{U_NEXT}" class="cattitle">{L_NEXT}</a>&nbsp;&raquo;</span>

#
#-----[ REPLACE WITH ]------------------------------------------
#
         <span class="cattitle"><a href="{U_PREVIOUS}" class="cattitle">{L_PREVIOUS}</a>&nbsp;-&nbsp;<a href="{U_NEXT}" class="cattitle">{L_NEXT}</a></span>

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#

# EoM

 



 
GoldbergSend private message  
Back to topPage bottom
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.

Support us
 
Reply with quote Download Post 
Post Re: Smartor Album Version Raised To 2.0.56a Included In FAB? 
 
No fix needed.
That problem should not exist in FAP 1.4.1
 



 
ArtieSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Smartor Album Version Raised To 2.0.56a Included In FAB? 
 
That's great, thanks for the quick reply.
 



 
GoldbergSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Smartor Album Version Raised To 2.0.56a Included In FAB? 
 
You're welcome.....you caught me in good mood  
 



 
ArtieSend private message  
Back to topPage bottom
This forum is locked: you cannot post, reply or edit topics.  This topic is locked: you cannot edit posts or make replies.  Page 1 of 1
 


Display posts from previous:    

HideWas this topic useful?

Link this topic
URL
BBCode
HTML




 
Permissions List
You cannot post new topics
You cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events