I dont see the category images when unauthorised

Phoca Gallery - image gallery extension
BazeMKD
Phoca Member
Phoca Member
Posts: 11
Joined: 19 Dec 2015, 22:49

I dont see the category images when unauthorised

Post by BazeMKD »

Hi guys,

I'm using Joomla 3.4.5 and Phoca Gallery 4.2.2 (i had same behavior with 4.2.1) and the structure of my albums is:

2008 (just 4 images unauthorised)
-- Motorcycle events (1 image unauthorised)
---- Album 1 (many images)
---- Album 2 (many images)
---- Album 3....
-- Motorcycle races (1 image unauthorised)
---- Album 1 (many images)
---- Album 2 (many images)
---- Album 3....

I'm using the mosaic preview to replicate the demo on your site, which works fine (btw i've pulled a lot of hair of my head before i figured out how to), but the problem is that i see the images in the category only if they are published and authorised, if they are published and unauthorised i don't see the images in the mosaic preview for the main category, it's blank and the label is: 2008 (4)

Any idea what might be the problem?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: I dont see the category images when unauthorised

Post by Jan »

Hi, this is right, unauthorized images cannot be seen by public, so first they need to be authorized. Authorizing means, e.g. admin approved them for displaying (they could be uploaded in frontend by public so admin needs to approve them before displaying).

Jan
If you find Phoca extensions useful, please support the project
BazeMKD
Phoca Member
Phoca Member
Posts: 11
Joined: 19 Dec 2015, 22:49

Re: I dont see the category images when unauthorised

Post by BazeMKD »

I don't get it...probably i misunderstood something, but hopefully you can help me out.

This is the link to the gallery.

The years are categories which contain no images but each of them contains subcategories with images (click on 2009 for example).

I want to have the mosaic effect on the front page. How can i achieve it if the categories don't have any images inside? I have put 4 images in the 2008 album to get the effect, but i don't want the users to see them when they click on the category. As much as i understood from the manual, if i enable them but leave them unauthorized the images will be parsed by the component but won't be visible to the front-end users. I've tried this but in this case i don't see the images at all on front-end.

Please let me know what should i do?

Thanks,
Baze
BazeMKD
Phoca Member
Phoca Member
Posts: 11
Joined: 19 Dec 2015, 22:49

Re: I dont see the category images when unauthorised

Post by BazeMKD »

Sorry to bother you, but i can't publish my new website for two weeks just because of this. Can you please let me know what am i doing wrong??
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: I dont see the category images when unauthorised

Post by Jan »

Hi, to display the images there, you need to publish and authorize them. When they are unpublished or unauthorized, such then cannot be displayed in mosaic feature :idea: (except the code will be customized so they categories view loads not authorized or not published images) :idea:

Jan
If you find Phoca extensions useful, please support the project
BazeMKD
Phoca Member
Phoca Member
Posts: 11
Joined: 19 Dec 2015, 22:49

Re: I dont see the category images when unauthorised

Post by BazeMKD »

Ok, so what is the procedure to get mosaic view (or is it possible at all) if my category structure is like this:

1st level category (no images)
---2nd level category (no images)
------3rd level category (with images)

My main menu points to categories view (all 1st level categories) and i see the structure of the mosaic feature but no images. When i click on the 1st level category i see 2nd level categories with preview (one image) from the 3rd level categories which contain images.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: I dont see the category images when unauthorised

Post by Jan »

Hi, the mosaic effect itself is demanding on memory - as a lot of categories need to be searched for the images. This is why in mosaic effect, the scanning of subcategories does not work - to search in category, then in subcategory and then in subsubcategory - in such case, the system will slow down dramatically. Mosaic effect in fact should be used in case, you have the images in categories (main categories include images)

To display images as category, you need to use standard view (only one image will be displayed as category cover - there the searching of subcategories is working.

Or other way is to load not authorized images to the mosaic feature when customizing the code:


administrator\components\com_phocagallery\libraries\phocagallery\image\imagefront.php

line cca 382
public static function getCategoryImages( ...)

Change the SQL query and remove/comment/change the line:

Code: Select all

' AND a.approved = 1'.
Jan
If you find Phoca extensions useful, please support the project
BazeMKD
Phoca Member
Phoca Member
Posts: 11
Joined: 19 Dec 2015, 22:49

Re: I dont see the category images when unauthorised

Post by BazeMKD »

Hi Jan,

first of all thank you for the explanation and the effort, it means a lot.
The solution with commenting the line works like a charm, thanks a million!

Cheers
Baze
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: I dont see the category images when unauthorised

Post by Jan »

Ok, great to hear it.

Jan
If you find Phoca extensions useful, please support the project
Post Reply