[my SOLVED or Improvement] Error Phoca Gallery Plug

Phoca Gallery - image gallery extension
dr.archik
Phoca Member
Phoca Member
Posts: 23
Joined: 14 Aug 2009, 23:05

[my SOLVED or Improvement] Error Phoca Gallery Plug

Post by dr.archik »

The error arises in the module of news (inmod_news_pro_gk4), at processing com_content containing an insert (categories) Phoca Gallery Plug
Fatal error: Call to a member function get() on a non-object in X:\home\lulu\www\plugins\content\phocagallery.php on line 798

SOLVED:
file www\plugins\content\phocagallery.php

on line 797 and 812 this

Code: Select all

class="category'.$params->get( 'pageclass_sfx' ).'">
replace to

Code: Select all

class="category'.$pageclass.'">
on line 785 under //Output insert code

Code: Select all

$plg = JPluginHelper::getPlugin('content','phocagallery');
   $params = new JParameter($plg->params);
   $pageclass= $params->get('pageclass_sfx');
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49297
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: [my SOLVED or Improvement] Error Phoca Gallery Plug

Post by Jan »

Hi,

thank you for the improvement,

1) it is a little bit fun to call plugin parameters as "external" inside the plugin code but seems this is only one solution if the plugin then is run in other than content area :-(

2) maybe the

Code: Select all

$plg = JPluginHelper::getPlugin('content','phocagallery');
   $params = new JParameter($plg->params);
   $pageclass= $params->get('pageclass_sfx');
should be placed before the foreach (to not load it everytime the foreach item is loaded)

Anyway thank you for the solution.

Jan
If you find Phoca extensions useful, please support the project
Post Reply