Page 2 of 2
Re: Number of Columns in Category View?
Posted: 06 Mar 2016, 17:41
by jimbrooking
Thanks, Christine,
All code (your items c.A. c.B) are exactly as you quoted them.
I couldn't see how to view the screen shot you mentioned.
I wonder if I need to uninstall PG and reinstall it. It will take a fair amount of work to re-define and re-link all my categories (one category about 25 categories corresponding to a month I spent in Aix-en-Provence, France in 2013).
Thanks again,
Jim
Re: Number of Columns in Category View?
Posted: 06 Mar 2016, 23:19
by jimbrooking
I copied my site (using Akeeba backup) to my development area, uninstalled PG and all its files, then reinstalled PG 4.2.2. I also copied the tables __phocagallery, __phocagallery_categories, __phocagallery_styles and __phocagallery_user from the www site database to the dev site database. The pages in question render exactly the same, one thumbnail image per row.

Re: Number of Columns in Category View?
Posted: 06 Mar 2016, 23:42
by christine
Hi,
still required CSS missing.
Please check your index.php of the template. Do you have these lines?
Code: Select all
// Add JavaScript Frameworks
JHtml::_('bootstrap.framework');
$doc->addScript($this->baseurl . '/templates/' . $this->template . '/js/template.js');
// Add Stylesheets
$doc->addStyleSheet($this->baseurl . '/templates/' . $this->template . '/css/template.css');
// Load optional RTL Bootstrap CSS
JHtml::_('bootstrap.loadCss', false, $this->direction);
templateDetails.xml (not full)
Code: Select all
<extension version="3.1" type="template" client="site">
<name>protostar</name>
<version>1.0</version>
<creationDate>4/30/2012</creationDate>
<author>Kyle Ledbetter</author>
<authorEmail>admin@joomla.org</authorEmail>
<copyright>Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.</copyright>
<description>TPL_PROTOSTAR_XML_DESCRIPTION</description>
<files>
<filename>component.php</filename>
<filename>error.php</filename>
<filename>favicon.ico</filename>
<filename>index.php</filename>
<filename>templateDetails.xml</filename>
<filename>template_preview.png</filename>
<filename>template_thumbnail.png</filename>
<folder>css</folder>
<folder>html</folder>
<folder>images</folder>
<folder>img</folder>
<folder>js</folder>
<folder>language</folder>
<folder>less</folder>
</files>
Kind regards, Christine
Re: Number of Columns in Category View?
Posted: 07 Mar 2016, 01:02
by jimbrooking
From my template's index.php:
Code: Select all
else
{
$fullWidth = 0;
}
// Add JavaScript Frameworks
JHtml::_('bootstrap.framework');
$doc->addScript($this->baseurl . '/templates/' . $this->template . '/js/template.js');
// Add Stylesheets
$doc->addStyleSheet($this->baseurl . '/templates/' . $this->template . '/css/template.css');
// Load optional RTL Bootstrap CSS
JHtml::_('bootstrap.loadCss', false, $this->direction);
// Adjusting content width
if ($this->countModules('position-7') && $this->countModules('position-8'))
{
$span = "span6";
From templateDetails.xml:
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE install PUBLIC "-//Joomla! 2.5//DTD template 1.0//EN" "http://www.joomla.org/xml/dtd/2.5/template-install.dtd">
<extension version="3.1" type="template" client="site">
<name>protostar</name>
<version>1.0</version>
<creationDate>4/30/2012</creationDate>
<author>Kyle Ledbetter</author>
<authorEmail>admin@joomla.org</authorEmail>
<copyright>Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.</copyright>
<description>TPL_PROTOSTAR_XML_DESCRIPTION</description>
<files>
<filename>component.php</filename>
<filename>error.php</filename>
<filename>favicon.ico</filename>
<filename>index.php</filename>
<filename>templateDetails.xml</filename>
Sorry - My file snippets look exactly like your posted code.
Jim
Re: Number of Columns in Category View?
Posted: 08 Mar 2016, 20:43
by Jan
Do you run some specific plugins, etc? The problem on the site is defined. There are not loaded CSS files for Phoca Gallery, but the problem is why?
The only one place where you can set, if the styles will be loaded or not, is in Phoca Gallery - administration - Styles, and this seems to be OK.
What about cache settings? (I don't expect this can be a cache problem but you should test). Is cache enabled? If yes, try to disable it.
The styles are here, as they are listed in administration Styles list, so this should be Ok, but why they are not loaded, really hard to say

Re: Number of Columns in Category View?
Posted: 08 Mar 2016, 22:54
by jimbrooking
Jan & Christine,
We have been going around with this thing for long enough, so I think I will just implement what looks liks a work-around in the form of a couple of additional line of CSS I'd cited in an earlier post:
jimbrooking wrote:Well, I am using the Joomla Prostar template, unmodified. I changed to Beez5 and the same effect happened: one thumbnail per line.
I did try playing with the CSS in Firefox/Firebug. I added to the CSS for class pg-cv-box:
Code: Select all
display: inline-block;
overflow: hidden;
and the thumbnails are placed side-by-side as they should be. I don't really want to start modifying CSS if I can get the proper CSS to load. But I wonder if the CSS is getting loaded inline - I see on line 38 of this page
http://www.jimbrooking.net/index.php/ph ... 2013-05-08
that there is some apparent Phoca CSS - maybe Phoca Gallery is putting CSS inline instead of using
as recommended here:
https://docs.joomla.org/J3.x:Adding_Jav ... o_the_page
I have added these lines where the CSS in question are generated in ROOT/components/com_phocagallery/views/category/view.html.php after line 1960:
Code: Select all
$s .= ' display: inline-block;' . "\n";
$s .= ' overflow: hidden;' . "\n";
and the category view shows as expected.
I very much appreciate the time and effort you have spent on this problem, and I am sure you have other duties demanding your time, so I will just live with this solution, and reapply the same code if I ever need to update PG.
Thanks again,
Jim
Re: Number of Columns in Category View?
Posted: 09 Mar 2016, 15:34
by christine
Hi Jim,
jimbrooking wrote:I did try playing with the CSS in Firefox/Firebug. I added to the CSS for class pg-cv-box:
Code: Select all
display: inline-block;
overflow: hidden;
and the thumbnails are placed side-by-side as they should be. I don't really want to start modifying CSS if I can get the proper CSS to load ....
In some cases, there is a need to put to the CSS: display: inline-block; or display: inline-flex; etc. (for other Templates).
Sometimes (other Templates) will need changing in backend to: bootstrap: 0. Mostly after updates. Again: for other Templates.
But this has nothing to do with your NOT loaded Phocagallery CSS.
But: As I told you, I took the (missing) stylesheets temporary to your site & it worked. [screenshot previous post]
As Protostar will show on that page span 9 & sorted the columns accordingly.
... so I will just live with this solution, and reapply the same code if I ever need to update PG.
I'm sure, Jan will agree with me, that this will be not the solution, what we want
So, whenever, we will find the reason for (I hope so) we will inform you.
In addition a question:
Sorry - My file snippets look exactly like your posted code.
I'm missing:
Code: Select all
<filename>template_preview.png</filename>
<filename>template_thumbnail.png</filename>
<folder>css</folder>
<folder>html</folder>
<folder>images</folder>
<folder>img</folder>
<folder>js</folder>
<folder>language</folder>
<folder>less</folder>
</files>
Especially: <folder>images</folder> (?)
Or do you have an override somewhere? But I don't think so, because you are using still the origin Protostar.
Kind regards, Christine
Re: Number of Columns in Category View?
Posted: 09 Mar 2016, 17:09
by jimbrooking
Thanks, Christine.
The <folder>images</folder> is at line 21 on the screen shot at
http://www.jimbrooking.net/Protostar.xml.jpg.
Jim
Re: Number of Columns in Category View?
Posted: 10 Mar 2016, 17:07
by Jan
If you are able, please send me super admin login to PM, so I can take a look at it - really not sure if I will find something as don't have experiences with this but I can take a look at it (and e.g. to see if the styles are not loaded for Phoca Gallery or for whole site, etc.

)
Jan
Re: Number of Columns in Category View?
Posted: 10 Mar 2016, 18:02
by Jan
Hi, now everything should be OK:
http://www.jimbrooking.net/index.php/photo-albums except design issue (small thumbnails should be large or medium thumbnails should be used for the categories view) and one small database issue which do not have influence of the code now as I have customized it on your site to work)
The problem:
seems like there was a problem when upgrading, or when doing similar action. The table in database: #__phocagallery_styles does not include all the requried fields, so one filed could not be found and this is why the styles were not loaded.
For now, on your site it is working because I have customized, but it will be good (e.g. when you will upgrade to some next version) to correct the columns in database for the table: #__phocagallery_styles
The columns are listed here:
administrator\components\com_phocagallery\install\sql\mysql\install.utf8.sql
Code: Select all
CREATE TABLE IF NOT EXISTS `#__phocagallery_styles` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(255) NOT NULL DEFAULT '',
`alias` varchar(255) NOT NULL DEFAULT '',
`filename` varchar(255) NOT NULL DEFAULT '',
`menulink` text,
`type` tinyint(1) NOT NULL DEFAULT '0',
`published` tinyint(1) NOT NULL DEFAULT '0',
`checked_out` int(11) unsigned NOT NULL DEFAULT '0',
`checked_out_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`ordering` int(11) NOT NULL DEFAULT '0',
`params` text,
`language` char(7) NOT NULL DEFAULT '',
PRIMARY KEY (`id`)
) DEFAULT CHARSET=utf8 ;
I have no access to your database, so I think, there is a problem as I got error messages in administration which indicates it
Jan