[SOLVED]How to display youtube in a category description?

Phoca Gallery - image gallery extension
borus
Phoca Enthusiast
Phoca Enthusiast
Posts: 65
Joined: 29 Jan 2012, 14:43
Contact:

[SOLVED]How to display youtube in a category description?

Post by borus »

Hello.

Trying to embed youtube code in phoca category description, but it doesn't appears in a category view. Simple text description can be displayed, but youtube cann't. Text filters are switched off in global configuration parameters.

What can it be?
Last edited by borus on 12 Apr 2012, 09:56, edited 2 times in total.
xonder
Phoca Member
Phoca Member
Posts: 10
Joined: 21 Nov 2009, 21:07

Re: How to display youtube in a category description?

Post by xonder »

Hi

Think it's the same as here Phoca Download Topic

lg Christian
borus
Phoca Enthusiast
Phoca Enthusiast
Posts: 65
Joined: 29 Jan 2012, 14:43
Contact:

Re: How to display youtube in a category description?

Post by borus »

xonder wrote:Hi

Think it's the same as here Phoca Download Topic

lg Christian
thank you, i don't know German and it's difficult to understand even with Chrome translator :)
xonder
Phoca Member
Phoca Member
Posts: 10
Joined: 21 Nov 2009, 21:07

Re: How to display youtube in a category description?

Post by xonder »

Hi

Sorry ... my english is also very bad :D
Jan wrote:Hallo, jetzt versehe ich, man muss die Beschreibung Code für Phoca Download modifizieren, so es Conten Plugins akzeptiert.
https://www.phoca.cz/documents/16-joomla ... t-articles
Jan
ok ... in phoca gallery you can open this file (FTP)

/components/com_phocagallery/views/category/tmpl/default.php

Change this code ....

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 $this->category->description.'</div>'. "\n";
}
... to this code

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);
	echo '</div>';
}
Now you can display Youtube videos with the phoca download plugin code

e.g.

Code: Select all

{phocadownload view=youtube|youtubewidth=500|youtubeheight=306|url=http://www.youtube.com/watch?v=xxxxxxxxxxx}
I hope ... jan make a update of the JHTML::_ code in the next release 8)

lg christian
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48752
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: How to display youtube in a category description?

Post by Jan »

Hi, thank you for the guide, will be added to next release.

Jan
If you find Phoca extensions useful, please support the project
borus
Phoca Enthusiast
Phoca Enthusiast
Posts: 65
Joined: 29 Jan 2012, 14:43
Contact:

Re: How to display youtube in a category description?

Post by borus »

xonder wrote:Hi...
Thank you, xonder.

I did as you said. It doesn't work. Why?
Here is my code for PG category description:

Code: Select all

{phocadownload view=youtube|youtubewidth=560|youtubeheight=315|url=http://www.youtube.com/watch?v=WJ1ur7Ce5hU}
Do I have to create something in Phoca Download Component also?
borus
Phoca Enthusiast
Phoca Enthusiast
Posts: 65
Joined: 29 Jan 2012, 14:43
Contact:

Re: How to display youtube in a category description?

Post by borus »

I've found that in my template folder was unchanged copy of that default.php which was blocking all changes made in original file :)
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48752
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: [SOLVED]How to display youtube in a category description

Post by Jan »

Will be set in 3.2.1

Jan
If you find Phoca extensions useful, please support the project
jeroenkl
Phoca Newbie
Phoca Newbie
Posts: 9
Joined: 09 Aug 2011, 17:39
Contact:

Re: [SOLVED]How to display youtube in a category description

Post by jeroenkl »

Hello,

This sollution works also great with version 2.8.1. (Joomla 1.5). I used this method to combine the power of Phocagallery with the beauty of Joomlashines Imageshow. Exacmple: http://www.bestemmingonbekend.nl/index. ... porto-2012


/components/com_phocagallery/views/category/tmpl/default.php

Change this code ....

Code: Select all

// Image, description
echo '<div class="contentpane'.$this->params->get( 'pageclass_sfx' ).'">';
if ( @$this->tmpl['image'] || @$this->category->description ) {
	echo '<div class="contentdescription'.$this->params->get( 'pageclass_sfx' ).'">';
	if ( isset($this->tmpl['image']) ) {
		echo $this->tmpl['image'];
	}
	echo $this->category->description.'</div>'. "\n";
}
echo '</div>';
into

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);
   echo '</div>';
} 
Regards,

Jeroen Kleiberg
http://www.bestemmingonbekend.nl
Post Reply