Having some troubles customizing default.php

Phoca Gallery - image gallery extension
el_diablo
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 07 Mar 2012, 10:06

Having some troubles customizing default.php

Post by el_diablo »

Through searching the forums I have found out that to customize the category display I need to change the default.php in the components\com_phocagallery\views\category\tmpl\.

I am trying to achieve output suited to processing by galleria javascript lib which seems simple enough at the first look. However I cant seem to find the code that outputs the gallery when in the switch image mode. For example where is the code that generates this:

Code: Select all

<div class="phocagallery">
<div><center style="margin:0px;padding:7px 5px 7px 5px;margin-bottom:15px;" class="main-switch-image"><table cellspacing="5" cellpadding="5" border="0" style=""><tbody><tr><td align="center" valign="middle" style="text-align:center;width:640px;height:485px; background: url('http://localhost/components/com_phocagallery/assets/images/icon-switch.gif') 302px 222px no-repeat;margin:0px;padding:0px;"><img width="640" border="0" height="480" id="PhocaGalleryobjectPicture" alt="" src="/images/phocagallery/thumbs/phoca_thumb_l_app1 some.jpg"></td></tr></tbody></table></center></div></div>
from this in the article:

Code: Select all

{phocagallery view=switchimage|basicimageid=1}
I found the part that should be it at line 73 in default.php but its not the same and changing it doesnt seem to effect the former output.

Any help is welcome.
el_diablo
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 07 Mar 2012, 10:06

Re: Having some troubles customizing default.php

Post by el_diablo »

Does Phoca use anything in the components\com_phocagallery\views\ folder at all? Anything I change in the code doesn't change the output... Is there a caching issue I am not aware of? Is there duplicates of the templates somewhere?

EDIT: I just found out that templates are ignored and phoca uses code from the plugins folder to display everything...jeez.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49150
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Having some troubles customizing default.php

Post by Jan »

Hi, Phoca Gallery uses standard MVC pattern, so overwriting default.php is chaning the output, the same like in template overriding.

Jan
If you find Phoca extensions useful, please support the project
el_diablo
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 07 Mar 2012, 10:06

Re: Having some troubles customizing default.php

Post by el_diablo »

Doesn't seem to apply when using it in an article and the shortcode is being processed by the gallery plugin? Seems all the rendering code is in the plugin itself?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49150
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Having some troubles customizing default.php

Post by Jan »

Hi, in case of plugin, it needs to be done in the plugin itself :-(

Jan
If you find Phoca extensions useful, please support the project
el_diablo
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 07 Mar 2012, 10:06

Re: Having some troubles customizing default.php

Post by el_diablo »

Thanks for the replies, do you think anyone would benefit from me posting the changed plugin after I'am done? I just made a new view type 'galleria' that renders a category to html galleria script can process. If yes, where should i post it?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49150
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Having some troubles customizing default.php

Post by Jan »

Hi, I think, it can be interesting for users to get information about such customization.

Jan
If you find Phoca extensions useful, please support the project
amityweb
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 20 Mar 2012, 15:46

Re: Having some troubles customizing default.php

Post by amityweb »

I am also having this issue. I am editing components/com_phocagallery/views/default.php and nothing changes.

In fact I edited every default.php and default_xxx.php file in front and admin and nothing changes.

Which file do I need to edit to make the category title go below the image?

Thanks
Doh! Scrap that, re-read about overrides above and I have a overrides file in the Joomla template! Spent ages looking into this.
Post Reply