
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:
'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):
'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.