Page 1 of 1

Having some troubles customizing default.php

Posted: 07 Mar 2012, 10:14
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.

Re: Having some troubles customizing default.php

Posted: 07 Mar 2012, 13:21
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.

Re: Having some troubles customizing default.php

Posted: 07 Mar 2012, 20:58
by Jan
Hi, Phoca Gallery uses standard MVC pattern, so overwriting default.php is chaning the output, the same like in template overriding.

Jan

Re: Having some troubles customizing default.php

Posted: 08 Mar 2012, 21:53
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?

Re: Having some troubles customizing default.php

Posted: 12 Mar 2012, 23:19
by Jan
Hi, in case of plugin, it needs to be done in the plugin itself :-(

Jan

Re: Having some troubles customizing default.php

Posted: 13 Mar 2012, 09:32
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?

Re: Having some troubles customizing default.php

Posted: 15 Mar 2012, 23:43
by Jan
Hi, I think, it can be interesting for users to get information about such customization.

Jan

Re: Having some troubles customizing default.php

Posted: 20 Mar 2012, 15:49
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.