https://www.icyphoenix.com/viewtopic.php?f=26&t=2212
-----------------------------------
sympatico
Mon 04 Jun, 2007 19:35

FAP CUSTOMIZATION - Member Galleries Pics Count
-----------------------------------
hi,

in the members personal galleries index page i would like a little change in the pics count.

i would like to display the [b]total[/b] number of pics a member has across [b]all[/b] categories, not only the ones in the personal gallery.

i beleive the code for that is in album_personal_index.php but i need some help to change the right code.

thank you for your help!


-----------------------------------
Artie
Mon 04 Jun, 2007 23:29

Re: Member Galleries Pics Count
-----------------------------------
I don't understand why you would want this, but it's your album.
You are talking about the [b]Pics[/b] column in the table that contains the list of all personal galleries, right ?

[size=10][color=red]Topic moved to proper forum -  FAP General Discussions And Customizations[/color][/size]


-----------------------------------
sympatico
Mon 04 Jun, 2007 23:37

Re: Member Galleries Pics Count
-----------------------------------
[quote]You are talking about the Pics column in the table that contains the list of all personal galleries, right ?[/quote]

yes exactly right!

i want this because i made some modifications to my album; i found it very important to be able to display all pictures from a specific user from all categories the user may have posted in.
so the best way i found to achieve this is to change the user link on the "all personal galleries" to "all pics from usex x" so now i need to display the overall pic count on that page...

so thank you for your help!


-----------------------------------
Artie
Tue 05 Jun, 2007 01:56

Re: Member Galleries Pics Count
-----------------------------------
The [b]Search[/b] by username does not work for you ?


-----------------------------------
sympatico
Tue 05 Jun, 2007 02:44

Re: Member Galleries Pics Count
-----------------------------------
well it would but i find it more convenient to have a members listing with a direct link to show all of that users pictures. as it is originally, it's only available from viewprofile in phpbb.

that's why i would like to change the pics count on personal galleries page.

can you give me directions?

i beleive it's somewhere over here, or is it?
[code linenumbers=false]
$sql = "SELECT u.username, u.user_id, u.user_regdate, COUNT(p.pic_id) AS pics, MAX(p.pic_id) AS last_pic, COUNT(c.cat_user_id) AS cats
		FROM ". USERS_TABLE ." AS u, " . ALBUM_TABLE . " AS p, " . ALBUM_CAT_TABLE . " AS c
		WHERE u.user_id <> ". ANONYMOUS ."
			AND c.cat_user_id = u.user_id
			AND c.cat_id = p.pic_cat_id
		GROUP BY user_id
		ORDER BY $order_by";[/code]

thank you for your help


