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 - Personal Galery Images Mix With Public 
 
I am sorry if this has been asked before

Here is my problem

After installing FAP, on Index page I have

- Recent Public Pics
- Highest Rated Pictures
- Most Viewed Pictures
- Random Pictures

And works great, but it will only show on those the images from the PUBLIC galleries, not the PERSONAL

Now somewhere in the code there must be somehtign that tells it to ignore the personal galleries, I dont want that, ... how do I make it so the Personal gallery images are displayed within those 4 sections .. basically so it mixes Personal and Public when displaying

- Recent Public Pics
- Highest Rated Pictures
- Most Viewed Pictures
- Random Pictures

Any ideas ?
 



 
NullMindSend 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: Personal Galery Images Mix With Public 
 
Look in album_hierarchy_sql.php.

Find each of these functions:

  • album_build_highest_rated_pics
  • album_build_most_viewed_pics
  • album_build_random_pics



In each function

FIND
Code: [Download] [Hide] [Select]
WHERE p.pic_cat_id IN ($cats) AND ( p.pic_approval = 1 OR ct.cat_approval = 0 )



REPLACE WITH
Code: [Download] [Hide] [Select]
WHERE ( p.pic_approval = 1 OR ct.cat_approval = 0 )

 



 
ArtieSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Personal Galery Images Mix With Public 
 
Goodness ... THANK YOU !!!!

I knew it had to be that easy, I been looking for the answer everywhere for a week

 :sh_06:
 



 
NullMindSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Personal Galery Images Mix With Public 
 
You're welcome.

Don't ya know it's always the last place you look  
 



 
ArtieSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Personal Galery Images Mix With Public 
 
Ok, foudn out a small problem, let me see if anybody can help

Once I did this and replaced the

 WHERE p.pic_cat_id IN ($cats) AND ( p.pic_approval = 1 OR ct.cat_approval = 0 )

entries .. works great .. but I just noticed that when you go to a user "Personal gallery" .. in the block for the user's latest uploads also shows images from pubic images.

Any way around this ?
 



 
NullMindSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Personal Galery Images Mix With Public 
 
You are correct. Unfortunately when doing these type of modifications, you often break something else.

You can try this fix:

OPEN album_mod/album_hierarchy_sql.php

LOOK WITHIN
Code: [Download] [Hide] [Select]
function album_build_recent_pics

FIND
Code: [Download] [Hide] [Select]
if ( !empty($cats)  )

BEFORE ADD
Code: [Download] [Hide] [Select]
####################################################################    

$where = (!empty($_GET['user_id']))? "WHERE p.pic_cat_id IN ($cats) AND ( p.pic_approval = 1 OR ct.cat_approval = 0 )" : "WHERE ( p.pic_approval = 1 OR ct.cat_approval = 0 )";

##############################################################


FIND
Code: [Download] [Hide] [Select]
WHERE ( p.pic_approval = 1 OR ct.cat_approval = 0 )

REPLACE WITH
Code: [Download] [Hide] [Select]
".$where."


I did notice that after applying this that the Recent Pics block in users profile, only showed personal pics, but I think it may have been that way before....dunno
 



 
ArtieSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Personal Galery Images Mix With Public 
 
That worked great .. once again ., thanks
 



 
NullMindSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Personal Galery Images Mix With Public 
 
Wow Artie, you are getting into FAP more and more...

Now I remember why I made you admin.

Next step would be to code something on your own and join the FAP development team .


Thanks once again for these precious contributions.
 




____________
Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
 
Mighty GorgonSend private messageSend e-mail to userVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Personal Galery Images Mix With Public 
 
Mighty Gorgon wrote: [View Post]
...
Next step would be to code something on your own and join the FAP development team .


What a scary thought  
 



 
ArtieSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Personal Galery Images Mix With Public 
 
Please excuse my bad english, it is not my native language.

At first Thanks for the code. I have searched this changes for a long time. And it works very good.

But I have a new problem after the changes - I use the FAP 1.4.0:

I have some special private Usergroups, e.g. group1, group2 and so on.
In the public categories i have also some sub-categories in the album for this special privat groups, e.g. albumgroup1, albumgroup2 and so on.
These special categories are allowed only for the members of the special group.
It works fine, so that only the special privat group members have access to the pics in their categories and it works also fine with the albumimg-tag and the fullalbumimg-tag in the posting area.

I made the changes to see the pic-thums from the usergalleries on the album-index in the blocks for the newest, highest rated, most viewed and random pics. I works very good.

But now the problem:

If I restrict the access on the personal galeries and/or the access to some special sub-galleries in the public categorie to private usergroups, all users can see the thumbs of the pics in the restricted areas on the album-index-page in the blocks for the newest, highest rated, most viewed and random pics.

What can I do, to show the thumbs in the blocks for the newest, highest rated, most viewed and random pics on the album-index-page only for the users who are allowed to access to the categories where the pics are in?

I hope You have understand my problem, please excuse my bad english. Thank You very much.
 



 
DackelSend 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