Text breaks not working in description in category view

Phoca Gallery - image gallery extension
hopekiah
Phoca Member
Phoca Member
Posts: 38
Joined: 05 Apr 2010, 19:19
Location: Santa Fe, NM
Contact:

Text breaks not working in description in category view

Post by hopekiah »

HI,
I searched for text breaks, text wrap and break tag in the forum and the manual to no avail, so here's my issue. Check out this page http://66.147.244.165/~burnini2/index.p ... &Itemid=58. The text breaks or paragraph tags which I added to the description in the back-end don't translate in the front-end description.
Thanks,
Hope
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49297
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Text breaks not working in description in category view

Post by Jan »

Hi, the description is without html tags below the thumbnails, e.g. because it can be cut by parameters (then e.g. the tags will be not closed)

you can modify it here:

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

cca line 519

remove the strip_tags function.

Jan
If you find Phoca extensions useful, please support the project
hopekiah
Phoca Member
Phoca Member
Posts: 38
Joined: 05 Apr 2010, 19:19
Location: Santa Fe, NM
Contact:

Re: Text breaks not working in description in category view

Post by hopekiah »

Thanks Jan,
my file shows this on line 505:

505 echo '<div class="phocaimgdesc" style="font-size:'.$this->tmpl['fontsizeimgdesc'].'px">'. strip_tags(PhocaGalleryText::wordDelete($value->description, $this->tmpl['charlengthimgdesc'], '...')).'</div>';

Could you please STRIKE THROUGH everything I should delete?

thanks,
Hope
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49297
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Text breaks not working in description in category view

Post by Jan »

echo '<div class="phocaimgdesc" style="font-size:'.$this->tmpl['fontsizeimgdesc'].'px">'. PhocaGalleryText::wordDelete($value->description, $this->tmpl['charlengthimgdesc'], '...').'</div>';
But then you can have problem, that the code will be cut and end tag could by missing, so maybe you should not use the cut function:
echo '<div class="phocaimgdesc" style="font-size:'.$this->tmpl['fontsizeimgdesc'].'px">'. $value->description.'</div>';
Jan
If you find Phoca extensions useful, please support the project
hopekiah
Phoca Member
Phoca Member
Posts: 38
Joined: 05 Apr 2010, 19:19
Location: Santa Fe, NM
Contact:

Re: Text breaks not working in description in category view

Post by hopekiah »

The second choice worked beautifully. Thank you Jan!!
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49297
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Text breaks not working in description in category view

Post by Jan »

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