https://www.icyphoenix.com/viewtopic.php?f=26&t=962
-----------------------------------
krisbfunk
Fri 19 Jan, 2007 07:35

FAP SUPPORT - SOLVED - Personal Gallery Pictures Block On Index
-----------------------------------
Hey, 

I followed the sweet mod found here: http://www.mightygorgon.com/viewtopic.php?p=31007#31007

to place a personal galleries block on the index (along with the public photos on index) and both blocks work perfectly after a slight change of the lang on index.php to correct the title bar. Now I'm wondering now where to specify how many photos to display in each block, as I would like to display 2 public photos beside 2 personal gallery photos.

[b]nevermind,  :oops: just realized there's an option to do this in the ACP[/b]


-----------------------------------
Artie
Fri 19 Jan, 2007 17:44

Re: SOLVED - Personal Gallery Pictures Block On Index
-----------------------------------
Thanks for the link kris*
I intend to repost that here, but my internet connection is very slugish recently.

This is my 2nd attempt at this reply ..... time for a new ISP  :evil:


-----------------------------------
krisbfunk
Fri 27 Apr, 2007 16:26

Re: Personal Gallery Pictures Block On Index
-----------------------------------
[quote user="Artie" post="7752"]Thanks for the link kris*
I intend to repost that here, but my internet connection is very slugish recently.

This is my 2nd attempt at this reply ..... time for a new ISP  :evil:[/quote]

I have the 'unrelated in personal gallery' mod installed, and I'm wondering if there's a way to stop the unrelated subcat from appearing in the recent personal gallery block?


-----------------------------------
Artie
Sun 29 Apr, 2007 01:38

Re: Personal Gallery Pictures Block On Index
-----------------------------------
kris*, I'll check on this and get back to ya.  :wink:


-----------------------------------
Artie
Sun 29 Apr, 2007 18:05

Re: Personal Gallery Pictures Block On Index
-----------------------------------
kris*, try this code change in the personal pic block mod.

OPEN [b]album_mod/album_hierarchy_sql.php[/b]

FIND
[codeblock] $sql = "SELECT p.*, u.user_id, u.username, r.rate_pic_id, AVG(r.rate_point) AS rating, COUNT(DISTINCT c.comment_id) AS comments
                FROM ". ALBUM_TABLE ." AS p
                    LEFT JOIN ". USERS_TABLE ." AS u ON p.pic_user_id = u.user_id
                    LEFT JOIN ". ALBUM_CAT_TABLE ." AS ct ON p.pic_cat_id = ct.cat_id
                    LEFT JOIN ". ALBUM_RATE_TABLE ." AS r ON p.pic_id = r.rate_pic_id
                    LEFT JOIN ". ALBUM_COMMENT_TABLE ." AS c ON p.pic_id = c.comment_pic_id
                WHERE ct.cat_user_id > 0 AND  p.pic_approval = 1 " .$view_level. "
                GROUP BY p.pic_id
                ORDER BY pic_time DESC
                LIMIT $limit_sql"; [/codeblock]
REPLACE WITH
[codeblock] $sql = "SELECT p.*, u.user_id, u.username, r.rate_pic_id, ct.cat_title, AVG(r.rate_point) AS rating, COUNT(DISTINCT c.comment_id) AS comments
                FROM ". ALBUM_TABLE ." AS p
                    LEFT JOIN ". USERS_TABLE ." AS u ON p.pic_user_id = u.user_id
                    LEFT JOIN ". ALBUM_CAT_TABLE ." AS ct ON p.pic_cat_id = ct.cat_id
                    LEFT JOIN ". ALBUM_RATE_TABLE ." AS r ON p.pic_id = r.rate_pic_id
                    LEFT JOIN ". ALBUM_COMMENT_TABLE ." AS c ON p.pic_id = c.comment_pic_id
                    WHERE ct.cat_user_id > 0 AND  p.pic_approval = 1 " .$view_level. " AND ct.cat_title <> '".AUTO_CREATE_SUB_CAT_TITLE."'
                    GROUP BY p.pic_id
                    ORDER BY pic_time DESC
                    LIMIT $limit_sql";[/codeblock]


-----------------------------------
krisbfunk
Sun 29 Apr, 2007 20:21

Re: Personal Gallery Pictures Block On Index
-----------------------------------
Thanks artie, that worked like a charm!


