FAP CUSTOMIZATION - Able To Set Image From Spesific Category As Avatar?


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.

Profile PM  
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: [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.

Profile PM  
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.

Profile PM  
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: [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>' : '',

Profile PM  

Page 1 of 1


  
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

   

This is a "Lo-Fi" version of our main content. To view the full version with more information, formatting and images, please click here.

Powered by Icy Phoenix based on phpBB
Generation Time: 0.2803s (PHP: 6% SQL: 94%)
SQL queries: 13 - Debug Off - GZIP Enabled