mirror of
https://github.com/e107inc/e107.git
synced 2025-07-28 02:10:46 +02:00
Fixes #1379 - Check for social plugin in news.php
This commit is contained in:
6
news.php
6
news.php
@@ -889,11 +889,16 @@ else
|
|||||||
}
|
}
|
||||||
|
|
||||||
$i= 1;
|
$i= 1;
|
||||||
|
|
||||||
|
$socialInstalled = e107::isInstalled('social');
|
||||||
|
|
||||||
while(isset($newsAr[$i]) && $i <= $interval)
|
while(isset($newsAr[$i]) && $i <= $interval)
|
||||||
{
|
{
|
||||||
$news = $newsAr[$i];
|
$news = $newsAr[$i];
|
||||||
|
|
||||||
// Set the Values for the social shortcode usage.
|
// Set the Values for the social shortcode usage.
|
||||||
|
if($socialInstalled == true)
|
||||||
|
{
|
||||||
$socialArray = array('url'=>e107::getUrl()->create('news/view/item', $news, 'full=1'), 'title'=>$tp->toText($news['news_title']), 'tags'=>$news['news_meta_keywords']);
|
$socialArray = array('url'=>e107::getUrl()->create('news/view/item', $news, 'full=1'), 'title'=>$tp->toText($news['news_title']), 'tags'=>$news['news_meta_keywords']);
|
||||||
$socialObj = e107::getScBatch('social');
|
$socialObj = e107::getScBatch('social');
|
||||||
|
|
||||||
@@ -901,6 +906,7 @@ else
|
|||||||
{
|
{
|
||||||
$socialObj->setVars($socialArray);
|
$socialObj->setVars($socialArray);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(function_exists("news_style")) // BC
|
if(function_exists("news_style")) // BC
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user