Pictureframe is shown in an Empty Category

Phoca Gallery - image gallery extension
ixman2000
Phoca Newbie
Phoca Newbie
Posts: 9
Joined: 03 May 2010, 21:24

Re: Pictureframe is shown in an Empty Category

Post by ixman2000 »

Hi,

I only replaced the code in the file
\components\com_phocagallery\views\category\tmp\default.php lin line 112
I also have no files in the template html directory.
Here is mail-adress for the file
ixman2000@gmx.de
GenkaiNashi
Phoca Enthusiast
Phoca Enthusiast
Posts: 84
Joined: 12 Jul 2009, 22:03

Re: Pictureframe is shown in an Empty Category

Post by GenkaiNashi »

Hey Ixman, sorry about tossing you around. =)

I actually just realized that the code I gave you will be problematic when you have a structure like this

1 Category with Images --> 2 Sub-category with Images.

it works fine if you have only:

1 Empty Category --> 2 Subcategory with Images.

The first category will not display the images at all, so that's not good.

There is another way to prevent the picture frame from displaying, but it too has a limitation.

Replace the same line:

Code: Select all

if (!empty($this->items)) {
with:

Code: Select all

if (count($this->items)>1) {
The problem you will have is that if you have only ONE image in the gallery, that one image will not display, but if you have more than one image (which, I'm assuming if you have a photogallery - the purpose is to have more than one image) it should be fine.

Let me know if it works out? If it does, then you can also use the same method to get rid of the pagination on empty categories.
ixman2000
Phoca Newbie
Phoca Newbie
Posts: 9
Joined: 03 May 2010, 21:24

Re: Pictureframe is shown in an Empty Category

Post by ixman2000 »

Hi

I've tested something
1.
I've delete the hole directory in the folder components (not in the admin)
and copy it fresh on the server - no change
2.
I've made a lokal Installation on a xamp-server.
Here is all okay
This is very crazy
GenkaiNashi
Phoca Enthusiast
Phoca Enthusiast
Posts: 84
Joined: 12 Jul 2009, 22:03

Re: Pictureframe is shown in an Empty Category

Post by GenkaiNashi »

Can you test the code I just gave you?

If you want your website on your local server just use something like Akeeba Backup: http://extensions.joomla.org/extensions ... ackup/1606

It'll copy your entire website and let you load it up on Xampp.
ixman2000
Phoca Newbie
Phoca Newbie
Posts: 9
Joined: 03 May 2010, 21:24

Re: Pictureframe is shown in an Empty Category

Post by ixman2000 »

now i've made you last change an the result is allways the same
and doesn't work - crazy, crazy!
Bevor I've update from the Version 2.6.2 it all works fine
Is there something else I can check or is a new installtion
a better way?
Can the problem comes from the file-structure on the server
images/phocagallery/ebene1/ebene2
and this folder is selected in the category
Can an entry in the database create this problem, because
I had phoca since version before version 2
GenkaiNashi
Phoca Enthusiast
Phoca Enthusiast
Posts: 84
Joined: 12 Jul 2009, 22:03

Re: Pictureframe is shown in an Empty Category

Post by GenkaiNashi »

Please check your email....

Try a new installation of PG 2.7.0 and then use a template override with the default.php file I sent you via email. I don't know why its not working for you. :(

I also sent you a link to my gallery via email.
ixman2000
Phoca Newbie
Phoca Newbie
Posts: 9
Joined: 03 May 2010, 21:24

Re: Pictureframe is shown in an Empty Category

Post by ixman2000 »

Hi,
so I've made a copy-installation on my xamp server. I tested your file and ta...da it works.
Now I compare your file with my one and I see some diffent lines in the code.
I have the suspicion the not all files are overwritten during the installation.

Now I'm happy that it works and I must thank you very much for your perfekt support. :twisted:

Dears Carsten
GenkaiNashi
Phoca Enthusiast
Phoca Enthusiast
Posts: 84
Joined: 12 Jul 2009, 22:03

Re: Pictureframe is shown in an Empty Category

Post by GenkaiNashi »

The only time it won't work is if there is only one image in the category, so make sure you have more than one image in each category.

Not a problem, glad I could help and I hope it works on your real website. I like your astronomy photos! :D
Post Reply