Categories | small folder icon

Phoca Gallery - image gallery extension
Elividon
Phoca Newbie
Phoca Newbie
Posts: 5
Joined: 30 Nov 2015, 15:50

Categories | small folder icon

Post by Elividon »

Hee Guys,

I feel stupid asking this question, because I feel like I am missing something. But I searched everywhere in the settings of Phoca Gallery, Google and this forum.

I upgraded my website from Joomla 2.5 with Phoca Gallery 3.2.1 to Joomla 3.x with Phoca Gallery 4.2.1.

In the old one I have small folder icons:
http://www.fotoclubsliedrecht.nl/index. ... van-leden2

But I can't find a setting like it in Phoca Gallery 4.2.1.
http://joomla3.fotoclubsliedrecht.nl/in ... -van-leden

What do I need do to to get it like I had in Phoca Gallery 3.2.1?

Thanks in advance!
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Categories | small folder icon

Post by Jan »

Hi, in 4.2.1, you should disable displaying image instead of folder icon in Options :idea:

Jan
If you find Phoca extensions useful, please support the project
Elividon
Phoca Newbie
Phoca Newbie
Posts: 5
Joined: 30 Nov 2015, 15:50

Re: Categories | small folder icon

Post by Elividon »

Jan wrote:Hi, in 4.2.1, you should disable displaying image instead of folder icon in Options :idea:
Hi Jan,

Thanks for you response. "Display Image Instead Of Folder Icon" was already on "No". That is under the tab "Category View". Description: Display image instead of folder icon. Subcategory folder can be displayed as Folder Icon or as Image from current subcategory So I think this is for subcategories. But I can't find an option like that under the tab "CategoriesView". :cry: Let me know if you need some screenshots, login or anything.

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

Re: Categories | small folder icon

Post by Jan »

Hi, seems like this was removed when upgrading.

Please test this quick fix, if successful, then I will implement it into the next version:

Edit: administrator\components\com_phocagallery\config.xml line cca 28

FROM:

Code: Select all

<field name="image_categories_size" type="list" default="1" label="COM_PHOCAGALLERY_FIELD_IMAGE_CATEGORIES_SIZE_LABEL" description="COM_PHOCAGALLERY_FIELD_IMAGE_CATEGORIES_SIZE_DESC">
	<option value="0">COM_PHOCAGALLERY_SMALL</option>
	<option value="1">COM_PHOCAGALLERY_MEDIUM</option>
</field>
TO:

Code: Select all

<field name="image_categories_size" type="list" default="1" label="COM_PHOCAGALLERY_FIELD_IMAGE_CATEGORIES_SIZE_LABEL" description="COM_PHOCAGALLERY_FIELD_IMAGE_CATEGORIES_SIZE_DESC">
	<option value="0">COM_PHOCAGALLERY_SMALL</option>
	<option value="1">COM_PHOCAGALLERY_MEDIUM</option>
	<option value="2">COM_PHOCAGALLERY_SMALL_FOLDER_ICON</option>
	<option value="3">COM_PHOCAGALLERY_MEDIUM_FOLDER_ICON</option>
</field>
... will continue in next post
If you find Phoca extensions useful, please support the project
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Categories | small folder icon

Post by Jan »

and components\com_phocagallery\views\categories\view.html.php line cca 83

FROM:

Code: Select all

switch($this->tmpl['image_categories_size']) {
			// medium
			case 1:
				$this->tmpl['picasa_correct_width']		= (int)$this->params->get( 'medium_image_width', 100 );	
				$this->tmpl['picasa_correct_height']	= (int)$this->params->get( 'medium_image_height', 100 );
				$this->tmpl['imagewidth']				= (int)$this->params->get( 'medium_image_width', 100 );	
				$this->tmpl['imageheight']				= (int)$this->params->get( 'medium_image_height', 100 );
				$this->tmpl['class_suffix']				= 'medium';
				
				if ($this->tmpl['categories_mosaic_images'] == 1) {
					$this->tmpl['imagewidth']				= (int)$this->params->get( 'medium_image_width', 100 ) * 3;	
					$this->tmpl['imageheight']				= (int)$this->params->get( 'medium_image_height', 100 ) * 2;
				}
			break;
			
			// small
			case 0:
			default:
				$this->tmpl['picasa_correct_width']		= (int)$this->params->get( 'small_image_width', 50 );	
				$this->tmpl['picasa_correct_height']	= (int)$this->params->get( 'small_image_height', 50 );
				$this->tmpl['imagewidth']				= (int)$this->params->get( 'small_image_width', 50 );
				$this->tmpl['imageheight'] 				= (int)$this->params->get( 'small_image_height', 50 );
				$this->tmpl['class_suffix']				= 'small';
				
				if ($this->tmpl['categories_mosaic_images'] == 1) {
					$this->tmpl['imagewidth']				= (int)$this->params->get( 'small_image_width', 50 ) * 3;	
					$this->tmpl['imageheight']				= (int)$this->params->get( 'small_image_height', 50 ) * 2;
				}
			break;
		}
TO:

Code: Select all

switch($this->tmpl['image_categories_size']) {
			// medium
			case 1:
                        case 3:
				$this->tmpl['picasa_correct_width']		= (int)$this->params->get( 'medium_image_width', 100 );	
				$this->tmpl['picasa_correct_height']	= (int)$this->params->get( 'medium_image_height', 100 );
				$this->tmpl['imagewidth']				= (int)$this->params->get( 'medium_image_width', 100 );	
				$this->tmpl['imageheight']				= (int)$this->params->get( 'medium_image_height', 100 );
				$this->tmpl['class_suffix']				= 'medium';
				
				if ($this->tmpl['categories_mosaic_images'] == 1) {
					$this->tmpl['imagewidth']				= (int)$this->params->get( 'medium_image_width', 100 ) * 3;	
					$this->tmpl['imageheight']				= (int)$this->params->get( 'medium_image_height', 100 ) * 2;
				}
			break;
			
			// small
			case 0:
			case 2:
			default:
				$this->tmpl['picasa_correct_width']		= (int)$this->params->get( 'small_image_width', 50 );	
				$this->tmpl['picasa_correct_height']	= (int)$this->params->get( 'small_image_height', 50 );
				$this->tmpl['imagewidth']				= (int)$this->params->get( 'small_image_width', 50 );
				$this->tmpl['imageheight'] 				= (int)$this->params->get( 'small_image_height', 50 );
				$this->tmpl['class_suffix']				= 'small';
				
				if ($this->tmpl['categories_mosaic_images'] == 1) {
					$this->tmpl['imagewidth']				= (int)$this->params->get( 'small_image_width', 50 ) * 3;	
					$this->tmpl['imageheight']				= (int)$this->params->get( 'small_image_height', 50 ) * 2;
				}
			break;
		}

In administration, in Phoca Gallery Options, set the parameter in Categories view - Image Size to medium folder icon.

Jan
If you find Phoca extensions useful, please support the project
Elividon
Phoca Newbie
Phoca Newbie
Posts: 5
Joined: 30 Nov 2015, 15:50

Re: Categories | small folder icon

Post by Elividon »

Yes that works! You're awesome! :twisted:

One other question. I try to take the "Display Number of Files/Folders (Categories View) out, but I can't find a option for that any more. Here it's says it's under General, but that probably changed. https://www.phoca.cz/documents/17-phoca- ... parameters
I can't do it in the CSS either since there is no separate div/class around it.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Categories | small folder icon

Post by Jan »

Hi, if you use legacy views, the only way is to directly hide it in output code, all views are stored here:

components\com_phocagallery\views\categories\tmpl\

e.g. components\com_phocagallery\views\categories\tmpl\default_obs_catimgdetail.php (depends which legacy view you will use)

You can hide it per css e.g. with: .pg-legend .span { display:none} so you can use parent class to define it.

The changes I have added it will be set in 4.2.2

Jan
If you find Phoca extensions useful, please support the project
Elividon
Phoca Newbie
Phoca Newbie
Posts: 5
Joined: 30 Nov 2015, 15:50

Re: Categories | small folder icon

Post by Elividon »

Thanks! It all worked out! You can mark this topic as solved.
christine
Phoca Hero
Phoca Hero
Posts: 2938
Joined: 28 Nov 2010, 17:20

Re: Categories | small folder icon

Post by christine »

Thank you for your information!

Kind regards, Christine
Post Reply