Icy Phoenix

     
 


This forum is locked: you cannot post, reply or edit topics.  This topic is locked: you cannot edit posts or make replies. 
Page 1 of 1
 
 
Reply with quote Download Post 
Post 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.
 



 
Pete_ZSend private message  
Back to topPage bottom
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.

Support us
 
Reply with quote Download Post 
Post 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: [Download] [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: [Download] [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.
 



 
ArtieSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post 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.
 



 
Pete_ZSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post 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: [Download] [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>' : '',

 



 
ArtieSend private message  
Back to topPage bottom
This forum is locked: you cannot post, reply or edit topics.  This topic is locked: you cannot edit posts or make replies.  Page 1 of 1
 


Display posts from previous:    

HideWas this topic useful?

Link this topic
URL
BBCode
HTML




 
Permissions List
You cannot post new topics
You cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events


  

 

  cron