MOD Add-On: Latest Albums - updated v1.1 - Posted (4218 Views)
Junior Member
Davecl
Posts: 105
105
The code for mine & Helters latest albums add-on for Burtholds photo album mode is now available here.
http://www.snitzbitz.com/mods/details.asp?Version=All&mid=45

This add-on displays thumbnails of the latest uploaded pic in 20 albums, very easy to install and can be modified to display any number of albums.<
Dave
 Sort direction, for dates DESC means newest first  
 Page size 
Posted
Junior Member
rabufo
Posts: 328
328
Let me know if you need the code I've used to add the camera icon, Helter....<
Posted
Junior Member
Helterskelter
Posts: 331
331
welcome to post will save me 10 mins LOL<
Posted
Junior Member
rabufo
Posts: 328
328
here the related inc_photo_album_update2.asp

<%
'#################################################################################
'# Copyright (C) 2000-02 Wesley D. Brown
'# Photo Album v.05 for Snitz 3.3.05
'# This is include for default.asp it builds the small table needed for navigation
'#################################################################################
'################################################
'Latest Albums Add-On by Dave Clarke & Alan Dunne
'################################################

Response.Write " <tr>" & vbNewline & _
" <td bgcolor=""" & strCategoryCellColor & """ colspan=""" & sGetColspan(7,6) &_
"""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strCategoryFontColor & """ size=""+1""><b>Photo Albums - Last updates</b></font></td>" & vbNewline & _
" </tr>" & vbNewline & _
" <tr>" & vbNewline & _
" <td rowspan=""1"" bgcolor=""" & strForumCellColor & """><img src=""" & strImageUrl & "icon_palbum.gif""></td>"& vbNewline & _
" <td bgcolor=""" & strForumCellColor & """ colspan=""6"">" & vbNewline & _
" <TABLE border=0 width=""100%""><TR>" & vbNewline & _
" <TD width=""50%"">" & vbNewline
%>
<!--#INCLUDE FILE="inc_latestalbumthumb2.asp"-->
<%
Response.Write " </font></TD>" & vbNewline & _
" <TABLE border=0 width=""100%""><TR>" & vbNewline & _
" </TR>" & vbNewline & _
" <TR>" & vbNewline & _
" </TR>" & vbNewline & _
" </TABLE>" & vbNewline & _
" </td>" & vbNewline & _
" </tr>" & vbNewline


%>
<
Posted
Junior Member
Helterskelter
Posts: 331
331
Thanks m8<
Posted
Starting Member
Techrescue.net
Posts: 8
8
Does anyone know how to adjust the SQL so that only photo's marked as 'Visible' show up in the latest photos?
I have tried inserting 'AND FA1.Photo_Status = 1' to various places in the sql however I can't get it to work.
Thanks<
Posted
Junior Member
Davecl
Posts: 105
105
thought i'd updated the files in the mod to do this but obviously not, i'll do it later, in the meantime alter the sql to this

strSql= "SELECT FA1.Photo_id, FA1.Photo_Name, FAU1.Member_id, FAU1.M_NAME FROM FORUM_ALBUM_USERS AS FAU1 INNER JOIN FORUM_ALBUM AS FA1 ON FAU1.Member_id = FA1.Member_id WHERE (((FA1.Photo_id)=(SELECT MAX(FA01.Photo_id)FROM FORUM_ALBUM AS FA01 WHERE FA01.Member_id = FA1.Member_id GROUP BY FA01.Member_id)) AND ((FA1.Photo_Status)=1))ORDER BY FA1.Photo_id DESC;"<
Dave
Posted
Junior Member
Davecl
Posts: 105
105
updated the mod to include the new sql that only shows approved photos.
http://www.snitzbitz.com/mods/details.asp?mid=220

<
Dave
Posted
Starting Member
ian9001
Posts: 22
22
Nice Mod I've used on several forums using MS Access, thanks guys. Now trying to use it on a forum using MySql Ver 5 and keep getting:

#1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT MAX( FA01 . PHOTO_ID ) FROM FORUM_ALBUM AS FA01 WHERE FA

I've tested each part of this query using phpMyAdmin and it all works fine. Run it together and I get the above error. I'm afraid my knowledge of SQL is limited (I am trying!) and the various changes I made just got me deeper into the variety of error messages.
The Mod version I'm using is the latest one uploaded.
A pointer as to why this script keeps falling over would be cool..
Ian<
Posted
Junior Member
Helterskelter
Posts: 331
331
I know nothing... so one for Davecl<
You Must enter a message