FAP CUSTOMIZATION - Personal Galery Images Mix With Public »  Show posts from    to     

Icy Phoenix


Archived phpBB Topics (Styles, Mods, Support) - FAP CUSTOMIZATION - Personal Galery Images Mix With Public



NullMind [ Fri 09 Feb, 2007 00:10 ]
Post subject: 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 ?


Artie [ Fri 09 Feb, 2007 01:02 ]
Post subject: 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: [Hide] [Select]
WHERE p.pic_cat_id IN ($cats) AND ( p.pic_approval = 1 OR ct.cat_approval = 0 )



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


NullMind [ Fri 09 Feb, 2007 01:19 ]
Post subject: 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:


Artie [ Fri 09 Feb, 2007 02:28 ]
Post subject: Re: Personal Galery Images Mix With Public
You're welcome.

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


NullMind [ Thu 01 Mar, 2007 18:12 ]
Post subject: 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 ?


Artie [ Thu 01 Mar, 2007 23:38 ]
Post subject: 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: [Hide] [Select]
function album_build_recent_pics

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

BEFORE ADD
Code: [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: [Hide] [Select]
WHERE ( p.pic_approval = 1 OR ct.cat_approval = 0 )

REPLACE WITH
Code: [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


NullMind [ Thu 01 Mar, 2007 23:43 ]
Post subject: Re: Personal Galery Images Mix With Public
That worked great .. once again ., thanks :)


Mighty Gorgon [ Sun 04 Mar, 2007 13:43 ]
Post subject: Re: Personal Galery Images Mix With Public
Wow Artie, you are getting into FAP more and more... :mri:

Now I remember why I made you admin. :wink:

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


Thanks once again for these precious contributions.


Artie [ Sun 04 Mar, 2007 15:20 ]
Post subject: 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 :wink: .


What a scary thought :shock:


Dackel [ Fri 22 Jun, 2007 13:51 ]
Post subject: 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.




Powered by Icy Phoenix