https://www.icyphoenix.com/viewtopic.php?f=26&t=4209 ----------------------------------- Pete_Z Sun 18 May, 2008 08:00 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 [u]only[/u]? That would be great. ----------------------------------- Artie Sun 18 May, 2008 15:16 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 [b]album_mod/album_hierarchy_sql.php[/b] FIND: [code linenumbers=false]'AVATAR_PIC' => ( ($album_config['personal_allow_avatar_gallery'] == 1) && ($userdata['user_id'] == $picrow[$j]['pic_user_id']) && ($picrow[$j]['cat_user_id'] != 0) ) ? '
' . $lang['Avatar_Set'] . '' : '',[/code] REPLACE WITH - (inline in code below replace YOUR_CAT_ID_HERE with your cat id number): [code linenumbers=false]'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) ) ? '
' . $lang['Avatar_Set'] . '' : '',[/code] 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 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 Re: Able To Set Image From Spesific Category As Avatar? ----------------------------------- [quote user="Pete_Z" post="28579"] :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.[/quote] Yes, that will allow all a user's pics to be available for avatar. .... if you want [b]only[/b] a specific cat [b]and[/b] the personal gallery for avatoar setting, use this line of code [code linenumbers=false]'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) ) ) ? '
' . $lang['Avatar_Set'] . '' : '',[/code]