This hack adds a less/more link for long video descriptions on the video view page:
open:
/application/modules/Video/views/scripts/index/view.tpl
find:
replace by:
Done!
open:
/application/modules/Video/views/scripts/index/view.tpl
find:
HTML Code:
<div class="video_desc"> <?php echo $this->video->description;?> </div>
HTML Code:
<div class="video_desc" id="video_desc_show_more" style="overflow:hidden; max-height:50px;"> <?php echo $this->video->description;?> </div> <a href="javascript:;" id ="show_more_link" onclick="showMore()"><?php echo $this->translate('more');?></a> <a href="javascript:;" id ="show_less_link" style="display:none;" onclick="showLess()"><?php echo $this->translate('less');?></a> <script type="text/javascript"> var desc_scrol_height = $('video_desc_show_more').getScrollHeight() if(desc_scrol_height<=50) { $('show_more_link').toggle(); } function showMore() { new Fx.Tween($('video_desc_show_more'), { duration: 1000 }).start('max-height', $('video_desc_show_more').getScrollHeight()); $('show_less_link').toggle(); $('show_more_link').toggle(); } function showLess() { new Fx.Tween($('video_desc_show_more'), { duration: 1000 }).start('max-height', 50); $('show_less_link').toggle(); $('show_more_link').toggle(); } </script>