Displaying content plugin outside content articles

Phoca Gallery - image gallery extension
vikont72
Phoca Member
Phoca Member
Posts: 28
Joined: 03 Jan 2011, 02:11

Re: Displaying content plugin outside content articles

Post by vikont72 »

I'm sorry. Straightened. My niece is studying the Czech language.
vikont72
Phoca Member
Phoca Member
Posts: 28
Joined: 03 Jan 2011, 02:11

Re: Displaying content plugin outside content articles

Post by vikont72 »

Thanks for your help.
Here are the results:
Image

How do I remove it: {phocadownload view=category|id=1|target=s}

Image
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49133
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Displaying content plugin outside content articles

Post by Jan »

Hi, just use reverse way you have added the code - delete it in description.

Jan
If you find Phoca extensions useful, please support the project
lundnick
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 13 Aug 2012, 22:46

Re: Displaying content plugin outside content articles

Post by lundnick »

I've replaced the code on line 38, but I'm still not able to see the plugin work in the phocagallery description. It works fine in articles so I assume the plugin is correctly functioning.

The site is joomla 2.5 running local on MAMP. I have phocagallery 3.2.0 and phocadownload 2.1.6 (comp/plug/button plug) installed and functioning.

Any thoughts on what to try? or Alternate ways to easily link to a pdf to download from the phocagallery description area?

Code: Select all

// Category Description
if (isset($this->category->description) && $this->category->description != '' ) {
	echo '<div class="pg-category-view-desc'.$this->params->get( 'pageclass_sfx' ).'">';
	    echo JHTML::_('content.prepare', $this->category->description).'</div>'. "\n";
       //echo $this->category->description.'</div>'. "\n";
}
thanks
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49133
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Displaying content plugin outside content articles

Post by Jan »

Hmmm, really no idea what can be wrong there, this:

Code: Select all

echo JHTML::_('content.prepare', $this->category->description)
should do the trick, maybe try to check the code if there is no protection e.g. to run in only in content, etc. :idea:

Jan
If you find Phoca extensions useful, please support the project
lundnick
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 13 Aug 2012, 22:46

Re: Displaying content plugin outside content articles

Post by lundnick »

Could it not be working due to some other javascript on the page?

I've now placed the site on a remote test server and I'm stil having the problem with the plug-in working in the phocagallery description.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49133
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Displaying content plugin outside content articles

Post by Jan »

Hi, not this is only php/server feature - this has nothing to do with javascript :idea: :-( The description field is standard Joomla! description field and the code is standard Joomla! code to accept content plugins, so the only idea I have, is, maybe the plugin checks the area where it is called and maybe it only allows to be called in conent :idea:

Jan
If you find Phoca extensions useful, please support the project
EmediaAssoc
Phoca Newbie
Phoca Newbie
Posts: 9
Joined: 26 Mar 2013, 21:08

Re: Displaying content plugin outside content articles

Post by EmediaAssoc »

I'm having this issue as well. I found the link to the documentation explaining the fix, but it's still unclear to me what to do.

My specific issue:

I want to link to Phoca Downloads from the component 'Workforce'. When I link from Joomla articles (using the Phocadownloads button plugin in JCE), they behave as they should, which leads me to believe I have everything installed correctly. However, when I try to link from Workforce component, the code doesn't render.

However, I'm unclear on exactly WHERE I should be applying this fix that is mentioned in this article I found on your site: Displaying content plugin outside content articles:

echo JHTML::_('content.prepare', $this->category->description);

While I have a phocadownloads issue, the fix mentions phocagallery a few times, so I'm confused as to whether I need to install PhocaGallery and apply the fix there, or whether that reference is correct. I feel I'm missing something basic and, unfortunately, I still can't figure out what it is.

Thanks,

Gene Crawford
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49133
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Displaying content plugin outside content articles

Post by Jan »

Hi, first, it is not a fix, it is a modify.

The guide describers Phoca Gallery as example - such can be used for every component inside Joomla! ... Content plugins are made for articles only but components can expand this feature for themselves - if they do not include it, you can modify it - it means - find the place in component where the input field (textarea/description/...) is rendered and modify it the way, it will accept content plugins.

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