Skip to content

Commit 1979169

Browse files
committed
Added external videos support to view blog
1 parent 0a251ea commit 1979169

File tree

2 files changed

+5
-22
lines changed

2 files changed

+5
-22
lines changed

easyblog/components/com_easyblog/helpers/simpleschema.php

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,4 @@
11
<?php
2-
/**
3-
* @package EasyBlog
4-
* @copyright Copyright (C) 2011 Stack Ideas Private Limited. All rights reserved.
5-
* @license GNU/GPL, see LICENSE.php
6-
*
7-
* EasyBlog is free software. This version may have been modified pursuant
8-
* to the GNU General Public License, and as distributed it includes or
9-
* is derivative of works licensed under the GNU General Public License or
10-
* other free or open source software licenses.
11-
* See COPYRIGHT.php for copyright notices and details.
12-
*/
132

143
defined('_JEXEC') or die('Restricted access');
154
jimport( 'simpleschema.blog.post' );
@@ -34,17 +23,11 @@ public function mapPost($row, $strip_tags='', $text_length=0, $skip=array()) {
3423
$formatDate = false;
3524
}
3625
$blog->created = $created->toMySQL();
37-
38-
if( $config->get( 'main_rss_content' ) == 'introtext' )
39-
{
40-
$blog->text = ( !empty( $row->intro ) ) ? $row->intro : $row->content;
41-
}
42-
else
43-
{
44-
$blog->text = $row->intro . $row->content;
26+
$blog->text = $row->intro . $row->content;
4527

46-
}
47-
$blog->text = EasyBlogHelper::getHelper( 'Videos' )->strip( $blog->text );
28+
$config->set('max_video_width', 320);
29+
$config->set('max_video_width', 180);
30+
$blog->text = EasyBlogHelper::getHelper( 'Videos' )->processVideos( $blog->text );
4831
$blog->text = EasyBlogGoogleAdsense::stripAdsenseCode( $blog->text );
4932

5033
$category = EasyBlogHelper::getTable( 'Category', 'Table' );

easyblog/easyblog/blog.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function get() {
5858
return;
5959
}
6060

61-
$item = EasyBlogHelper::getHelper( 'SimpleSchema' )->mapPost($blog, '<p><br><pre><a><blockquote><strong><h2><h3><em><ul><ol><li>');
61+
$item = EasyBlogHelper::getHelper( 'SimpleSchema' )->mapPost($blog, '<p><br><pre><a><blockquote><strong><h2><h3><em><ul><ol><li><iframe>');
6262
$this->plugin->setResponse( $item );
6363
}
6464

0 commit comments

Comments
 (0)