hi everybody
i know there's a issue with Youtube video descriptions, that are returned in simple text with all the html stripped out
is it the same for Vimeo? i would need at least the newlines in the description to be kept, any workaround?
cheers
Vimeo Video description no newlines [SOLVED]
Started by
e. p.
, Jun 07 2012 04:24 AM
2 replies to this topic
#1
Posted 07 June 2012 - 04:24 AM
#2
Posted 08 June 2012 - 12:41 AM
Hi,
Here is the official bug report for the "fancy" descriptions (other than plain text). In the meantime, here's a workaround to keep the line breaks. This method will also be upgrade proof - i.e. your changes will persist when you upgrade TubePress.
Here is the official bug report for the "fancy" descriptions (other than plain text). In the meantime, here's a workaround to keep the line breaks. This method will also be upgrade proof - i.e. your changes will persist when you upgrade TubePress.
- Find your "tubepress-content/plugins" directory. In standalone PHP TubePress installations, this would be at "tubepress_x_y_z/content/plugins". In WordPress, this directory is located at "wp-content/tubepress-content/plugins".
- Make a directory inside the "plugins" directory there called "newlinetobr". So in WordPress, for example, the full path of the directory would be "wp-content/tubepress-content/plugins/newlinetobr"
- Save the following PHP to a file inside this directory. Call it "newlinetobr.php". So the full path will be "wp-content/tubepress-content/plugins/newlinetobr/newlinetobr.php"
<?phpclass NewLine2Br{ function alter_video(org_tubepress_api_video_Video $video, $videoProviderName) { $description = $video->getDescription(); $description = nl2br($description); $video->setDescription($description); return $video; }}TubePress::registerFilter('video', new NewLine2Br());
#3
Posted 08 June 2012 - 05:03 AM
And it does!
thank you Eric
thank you Eric