Icy Phoenix


Archived phpBB Topics (Styles, Mods, Support) - FAP CUSTOMIZATION - Able To Set Image From Spesific Category As Avatar?



Pete_Z [ Sun 18 May, 2008 08:00 ]
Post subject: FAP CUSTOMIZATION - Able To Set Image From Spesific Category As Avatar?
Hello, Members have requested if they could be able to set an image as avatar from the public categories... I thought about it. I know the old way of FAP worked this way and I sort of miss that feature. so my request is could I have this option on a spesific category only?

That would be great.


Artie [ Sun 18 May, 2008 15:16 ]
Post subject: Re: Able To Set Image From Spesific Category As Avatar?
This will remove the set avatar option from the personal galleries and place it in a specific category, but it is hard coded so you will need to enter the cat id in the code.
... also the user must own the pic

OPEN album_mod/album_hierarchy_sql.php

FIND:
Code: [Hide] [Select]
'AVATAR_PIC' => ( ($album_config['personal_allow_avatar_gallery'] == 1) && ($userdata['user_id'] == $picrow[$j]['pic_user_id']) && ($picrow[$j]['cat_user_id'] != 0) ) ? '<br /><a href="'. append_sid('album_avatar.' . $phpEx . '?pic_id=' . $picrow[$j]['pic_id']) . '">' . $lang['Avatar_Set'] . '</a>' : '',



REPLACE WITH - (inline in code below replace YOUR_CAT_ID_HERE with your cat id number):
Code: [Hide] [Select]
'AVATAR_PIC' => ( ($album_config['personal_allow_avatar_gallery'] == 1) && ($userdata['user_id'] == $picrow[$j]['pic_user_id']) && ($picrow[$j]['cat_id'] == YOUR_CAT_ID_HERE) ) ? '<br /><a href="'. append_sid('album_avatar.' . $phpEx . '?pic_id=' . $picrow[$j]['pic_id']) . '">' . $lang['Avatar_Set'] . '</a>' : '',


Note: You will still need the ACP switch set to allow avatars from Personal Galleries, but the actually link will only appear in the specific category that you choose.


Pete_Z [ Mon 19 May, 2008 05:53 ]
Post subject: Re: Able To Set Image From Spesific Category As Avatar?
Okay, nice! thank you once agian, Artie.
that seems to work nicely... but there is no way not to remove it from members personal gallery?

I tried adding things like && ($picrow[$j]['cat_user_id'] != 0) into the code, but it's a no go..

:edit" alright, I guess I can use the old code that is commented out because that is what Im basicly asking for. What I wanted to do though, is let members use a spesific category for everyone to be able to set an image as avatar not mattering who uploaded the image.. ( without loosing it in personal album too )
that's was what I was wondering if it were at all possible.


Artie [ Mon 19 May, 2008 15:12 ]
Post subject: Re: Able To Set Image From Spesific Category As Avatar?
Pete_Z wrote: [View Post]

:edit" alright, I guess I can use the old code that is commented out because that is what Im basicly asking for. What I wanted to do though, is let members use a spesific category for everyone to be able to set an image as avatar not mattering who uploaded the image.. ( without loosing it in personal album too )
that's was what I was wondering if it were at all possible.


Yes, that will allow all a user's pics to be available for avatar. .... if you want only a specific cat and the personal gallery for avatoar setting, use this line of code

Code: [Hide] [Select]
'AVATAR_PIC' => ( ($album_config['personal_allow_avatar_gallery'] == 1) && ($userdata['user_id'] == $picrow[$j]['pic_user_id']) && ( ($picrow[$j]['cat_id'] == 9) || ($picrow[$j]['cat_user_id'] != 0) ) ) ? '<br /><a href="'. append_sid('album_avatar.' . $phpEx . '?pic_id=' . $picrow[$j]['pic_id']) . '">' . $lang['Avatar_Set'] . '</a>' : '',




Powered by Icy Phoenix