mirror of
https://github.com/e107inc/e107.git
synced 2025-03-14 01:19:44 +01:00
Issue #4332 Carousel fixes. Newsfeed now uses json to store data.
This commit is contained in:
parent
e6ceafd496
commit
81634d5f5a
@ -650,7 +650,7 @@ class e_form
|
||||
$start ='
|
||||
<!-- Carousel -->
|
||||
|
||||
<div id="'.$name.'" class="carousel slide" data-ride="carousel" '.$interval.' '.$wrap.' '.$pause.'>';
|
||||
<div id="'.$name.'" class="carousel slide" data-ride="carousel" data-bs-ride="carousel" '.$interval.' '.$wrap.' '.$pause.'>';
|
||||
|
||||
if($indicate && (count($array) > 1))
|
||||
{
|
||||
@ -663,7 +663,7 @@ class e_form
|
||||
foreach($array as $key=>$tab)
|
||||
{
|
||||
$active = ($c == $act) ? ' class="active"' : '';
|
||||
$indicators .= '<li data-target="#'.$name.'" data-slide-to="'.$c.'" '.$active.'></li>';
|
||||
$indicators .= '<li data-target="#'.$name.'" data-slide-to="'.$c.'" data-bs-target="#'.$name.'" data-bs-slide-to="'.$c.'" '.$active.'></li>';
|
||||
$c++;
|
||||
}
|
||||
|
||||
@ -700,10 +700,10 @@ class e_form
|
||||
if($navigation && (count($array) > 1))
|
||||
{
|
||||
$controls = '
|
||||
<a class="left carousel-control carousel-left" href="#'.$name.'" role="button" data-slide="prev">
|
||||
<a class="left carousel-control carousel-left" href="#'.$name.'" role="button" data-slide="prev" data-bs-slide="prev">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span>
|
||||
</a>
|
||||
<a class="right carousel-control carousel-right" href="#'.$name.'" role="button" data-slide="next">
|
||||
<a class="right carousel-control carousel-right" href="#'.$name.'" role="button" data-slide="next" data-bs-slide="next">
|
||||
<span class="glyphicon glyphicon-chevron-right"></span>
|
||||
</a>';
|
||||
}
|
||||
|
@ -563,7 +563,7 @@ class MagpieRSS {
|
||||
if ( $php_errormsg ) {
|
||||
$errormsg .= " ({$php_errormsg})";
|
||||
}
|
||||
if ( MAGPIE_DEBUG ) {
|
||||
if ( defined('MAGPIE_DEBUG') && MAGPIE_DEBUG) {
|
||||
trigger_error( $errormsg, $lvl);
|
||||
}
|
||||
else {
|
||||
|
@ -1788,7 +1788,7 @@ class themeHandler
|
||||
foreach($slides as $key=>$v)
|
||||
{
|
||||
$id = $key + 1;
|
||||
$indicators .= '<li data-target="#myCarousel" data-slide-to="'.$id.'"></li>';
|
||||
$indicators .= '<li data-target="#myCarousel" data-slide-to="'.$id.'" data-bs-slide-to="'.$id.'"></li>';
|
||||
}
|
||||
|
||||
$indicators .= '</ol>';
|
||||
|
@ -22,7 +22,7 @@ if(!isset($BANNER_LOGIN_TABLE))
|
||||
<form method='post' action='".e_SELF."'>\n
|
||||
<table style='width:40%'>
|
||||
<tr>
|
||||
<td style='width:15%' class='defaulttext'>".BANNERLAN_16." </td>
|
||||
<td style='width:15%' class='defaulttext'>".LAN_USER." </td>
|
||||
<td>{BANNER_LOGIN_TABLE_LOGIN}\n</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -35,7 +35,7 @@ class banner_menu
|
||||
$fields['banner_campaign'] = array('title'=> BNRLAN_39, 'type'=>'method');
|
||||
$fields['banner_amount'] = array('title'=> BNRLAN_41, 'type'=>'text', 'writeParms'=>array('pattern'=>'[0-9]*'));
|
||||
$fields['banner_width'] = array('title'=> LAN_WIDTH, 'type'=>'text', 'help'=>"In pixels", 'writeParms'=>array('pattern'=>'[0-9]*'));
|
||||
$fields['banner_rendertype'] = array('title'=> BNRLAN_43, 'type'=>'dropdown', 'writeParms'=>array('optArray'=>$renderTypes));
|
||||
$fields['banner_rendertype'] = array('title'=> BNRLAN_43, 'type'=>'dropdown', 'writeParms'=>array('optArray'=>$renderTypes, 'size'=>'xxlarge'));
|
||||
|
||||
return $fields;
|
||||
|
||||
@ -56,9 +56,14 @@ class banner_menu_form extends e_form
|
||||
|
||||
$text = '';
|
||||
|
||||
if(empty($curVal))
|
||||
{
|
||||
$curVal = array();
|
||||
}
|
||||
|
||||
while ($row = $sql -> fetch())
|
||||
{
|
||||
$checked = in_array($row['banner_campaign'],$curVal);
|
||||
$checked = in_array($row['banner_campaign'], $curVal);
|
||||
$text .= $this->checkbox('banner_campaign[]',$row['banner_campaign'],$checked, array('label'=> $row['banner_campaign'],'class'=>'e-save')); // e-save class is required.
|
||||
}
|
||||
|
||||
|
@ -166,8 +166,8 @@ if(false === $cached)
|
||||
|
||||
if(deftrue('BOOTSTRAP')) // v2.x
|
||||
{
|
||||
$month_selector = '<span class="btn-group pull-right float-right"><a class="btn btn-mini btn-default btn-secondary btn-sm btn-xs " href="#blogCalendar" data-slide="prev">‹</a>
|
||||
<a class="btn btn-mini btn-default btn-secondary btn-sm btn-xs" href="#blogCalendar" data-slide="next">›</a></span>';
|
||||
$month_selector = '<span class="btn-group pull-right float-right"><a class="btn btn-mini btn-default btn-secondary btn-sm btn-xs " href="#blogCalendar" data-slide="prev" data-bs-slide="prev">‹</a>
|
||||
<a class="btn btn-mini btn-default btn-secondary btn-sm btn-xs" href="#blogCalendar" data-slide="next" data-bs-slide="next">›</a></span>';
|
||||
|
||||
$caption = "<span class='inline-text'>".BLOGCAL_L1." ".$month_selector."</span>";
|
||||
|
||||
|
@ -12,7 +12,7 @@ $FEATUREBOX_CATEGORY_TEMPLATE = array();
|
||||
|
||||
|
||||
$FEATUREBOX_CATEGORY_TEMPLATE['bootstrap3_carousel']['list_start'] = '
|
||||
<div id="carousel-example-generic" class="featurebox carousel slide" data-ride="carousel">
|
||||
<div id="carousel-example-generic" class="featurebox carousel slide" data-ride="carousel" data-bs-ride="carousel">
|
||||
{FEATUREBOX_NAVIGATION|bootstrap3_carousel=loop&uselimit=1}
|
||||
<!-- Wrapper for slides -->
|
||||
<div class="carousel-inner">
|
||||
@ -23,10 +23,10 @@ $FEATUREBOX_CATEGORY_TEMPLATE['bootstrap3_carousel']['list_end'] = '
|
||||
</div>
|
||||
|
||||
<!-- Controls -->
|
||||
<a class="left carousel-control" href="#carousel-example-generic" data-slide="prev">
|
||||
<a class="left carousel-control" href="#carousel-example-generic" data-slide="prev" data-bs-slide="prev">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span>
|
||||
</a>
|
||||
<a class="right carousel-control" href="#carousel-example-generic" data-slide="next">
|
||||
<a class="right carousel-control" href="#carousel-example-generic" data-slide="next" data-bs-slide="next">
|
||||
<span class="glyphicon glyphicon-chevron-right"></span>
|
||||
</a>
|
||||
|
||||
@ -69,8 +69,8 @@ $FEATUREBOX_CATEGORY_TEMPLATE['bootstrap_carousel']['list_end'] = '
|
||||
</div>
|
||||
|
||||
<!-- Carousel nav -->
|
||||
<a class="carousel-control left" href="#myCarousel" data-slide="prev">‹</a>
|
||||
<a class="carousel-control right" href="#myCarousel" data-slide="next">›</a>
|
||||
<a class="carousel-control left" href="#myCarousel" data-slide="prev" data-bs-slide="prev">‹</a>
|
||||
<a class="carousel-control right" href="#myCarousel" data-slide="next" data-bs-slide="next">›</a>
|
||||
|
||||
</div><!-- end myCarousel -->
|
||||
</div><!-- end span12 -->
|
||||
|
@ -67,7 +67,7 @@ class plugin_hero_hero_shortcodes extends e_shortcode
|
||||
{
|
||||
$active = ($c == 0) ? 'active' : '';
|
||||
|
||||
$text .= '<li data-target="#'.$target.'" data-slide-to="'.$c.'" class="'.$active.'"></li>';
|
||||
$text .= '<li data-target="#'.$target.'" data-slide-to="'.$c.'" data-bs-slide-to="'.$c.'" class="'.$active.'"></li>';
|
||||
$text .= "\n";
|
||||
}
|
||||
|
||||
|
@ -8,26 +8,23 @@ if (!defined('e107_INIT')) { exit; }
|
||||
$HERO_TEMPLATE = array();
|
||||
|
||||
$HERO_TEMPLATE['default']['header'] = '<!-- Hero Menu: header -->{SETIMAGE: w=400&h=400}
|
||||
<div id="carousel-hero" class="carousel carousel-fade slide" data-ride="carousel" data-interval="{HERO_SLIDE_INTERVAL}">
|
||||
<div id="carousel-hero" class="carousel carousel-fade slide" data-bs-ride="carousel" data-ride="carousel" data-interval="{HERO_SLIDE_INTERVAL}" data-bs-interval="{HERO_SLIDE_INTERVAL}">
|
||||
<div class="carousel-inner" role="listbox">';
|
||||
|
||||
|
||||
$HERO_TEMPLATE['default']['footer'] = '</div><div class="carousel-controls">
|
||||
<!-- Controls -->
|
||||
<a class="left carousel-left carousel-control animated zoomIn animation-delay-30" href="#carousel-hero" role="button" data-slide="prev">
|
||||
<a class="left carousel-left carousel-control animated zoomIn animation-delay-30" href="#carousel-hero" role="button" data-slide="prev" data-bs-slide="prev">
|
||||
<i class="fa fa-chevron-left fa-fw"></i>
|
||||
<span class="sr-only">Previous</span>
|
||||
</a>
|
||||
<a class="right carousel-right carousel-control animated zoomIn animation-delay-30" href="#carousel-hero" role="button" data-slide="next">
|
||||
<a class="right carousel-right carousel-control animated zoomIn animation-delay-30" href="#carousel-hero" role="button" data-slide="next" data-bs-slide="next">
|
||||
<i class="fa fa-chevron-right fa-fw"></i>
|
||||
<span class="sr-only">Next</span>
|
||||
</a>
|
||||
<!-- Indicators -->
|
||||
{HERO_CAROUSEL_INDICATORS: target=carousel-hero&class=animated fadeInUpBig}
|
||||
<!-- <ol class="carousel-indicators">
|
||||
<li data-target="#carousel-hero" data-slide-to="0" class="animated fadeInUpBig animation-delay-27 active"></li>
|
||||
<li data-target="#carousel-hero" data-slide-to="1" class="animated fadeInUpBig animation-delay-28"></li>
|
||||
<li data-target="#carousel-hero" data-slide-to="2" class="animated fadeInUpBig animation-delay-29"></li>
|
||||
|
||||
</ol>-->
|
||||
</div>
|
||||
</div>';
|
||||
|
@ -1,7 +1,11 @@
|
||||
<?php
|
||||
|
||||
if(!is_array($parm))
|
||||
{
|
||||
$parm = array();
|
||||
}
|
||||
|
||||
$parm['type'] = !empty($parm['type']) ? $parm['type'] : 'main';
|
||||
$parm['type'] = !empty($parm['type']) ? $parm['type'] : 'side';
|
||||
$parm['layout'] = !empty($parm['layout']) ? $parm['layout'] : $parm['type'];
|
||||
|
||||
require_once(e_CORE."shortcodes/single/navigation.php");
|
||||
|
@ -57,8 +57,8 @@ if(!$OTHERNEWS_STYLE)
|
||||
}
|
||||
$template = e107::getTemplate('news', 'news_menu', 'other', true, true);
|
||||
|
||||
$item_selector = '<div class="btn-group pull-right float-right"><a class="btn btn-mini btn-xs btn-default btn-secondary" href="#otherNews" data-slide="prev">‹</a>
|
||||
<a class="btn btn-mini btn-xs btn-default btn-secondary" href="#otherNews" data-slide="next">›</a></div>';
|
||||
$item_selector = '<div class="btn-group pull-right float-right"><a class="btn btn-mini btn-xs btn-default btn-secondary" href="#otherNews" data-slide="prev" data-bs-slide="prev">‹</a>
|
||||
<a class="btn btn-mini btn-xs btn-default btn-secondary" href="#otherNews" data-slide="next" data-bs-slide="next">›</a></div>';
|
||||
|
||||
if(!empty($parms['caption']))
|
||||
{
|
||||
|
@ -52,10 +52,10 @@ $NEWS_MENU_TEMPLATE['latest']['item'] = '<li><a class="e-menu-link newsmo
|
||||
|
||||
// Other News Menu.
|
||||
$NEWS_MENU_TEMPLATE['other']['caption'] = TD_MENU_L1;
|
||||
$NEWS_MENU_TEMPLATE['other']['start'] = "<div id='otherNews' data-interval='false' class='carousel slide othernews-block'>
|
||||
$NEWS_MENU_TEMPLATE['other']['start'] = "<div id='otherNews' data-interval='false' data-bs-interval='false' class='carousel slide othernews-block'>
|
||||
<div class='carousel-inner'>
|
||||
{SETIMAGE: w=400&h=200&crop=1}"; // set the {NEWSIMAGE} dimensions.
|
||||
$NEWS_MENU_TEMPLATE['other']['item'] = '<div class="item {ACTIVE}">
|
||||
$NEWS_MENU_TEMPLATE['other']['item'] = '<div class="carousel-item item {ACTIVE}">
|
||||
{NEWSTHUMBNAIL=placeholder}
|
||||
<h3>{NEWSTITLE}</h3>
|
||||
<p>{NEWSSUMMARY}</p>
|
||||
@ -96,7 +96,7 @@ $NEWS_MENU_TEMPLATE['other2']['end'] = "</ul>";
|
||||
/* Carousel Menu */
|
||||
|
||||
$NEWS_MENU_TEMPLATE['carousel']['start'] = '
|
||||
<div id="news-carousel" class="carousel slide" data-ride="carousel">
|
||||
<div id="news-carousel" class="carousel slide" data-ride="carousel" data-bs-ride="carousel">
|
||||
<div class="row">
|
||||
<!-- Wrapper for slides -->
|
||||
<div id="news-carousel-images" class="col-md-8">
|
||||
@ -116,7 +116,7 @@ $NEWS_MENU_TEMPLATE['carousel']['end'] = '
|
||||
|
||||
|
||||
$NEWS_MENU_TEMPLATE['carousel']['item'] = '<!-- Start Item -->
|
||||
<div class="item {ACTIVE}">{SETIMAGE: w=800&h=370&crop=1}
|
||||
<div class="carousel-item item {ACTIVE}">{SETIMAGE: w=800&h=370&crop=1}
|
||||
{NEWS_IMAGE: class=img-responsive img-fluid}
|
||||
<div class="carousel-caption">
|
||||
<small>{NEWS_DATE=dd MM, yyyy}</small>
|
||||
@ -127,7 +127,7 @@ $NEWS_MENU_TEMPLATE['carousel']['item'] = '<!-- Start Item -->
|
||||
|
||||
|
||||
|
||||
$NEWS_MENU_TEMPLATE['carousel']['nav'] = '<li data-target="#news-carousel" data-slide-to="{COUNT}" class="{ACTIVE}"><a href="#">{NEWS_SUMMARY}</a></li>';
|
||||
$NEWS_MENU_TEMPLATE['carousel']['nav'] = '<li data-target="#news-carousel" data-slide-to="{COUNT}" data-bs-slide-to="{COUNT}" class="{ACTIVE}"><a href="#">{NEWS_SUMMARY}</a></li>';
|
||||
|
||||
|
||||
|
||||
|
@ -216,7 +216,7 @@ class newsfeedClass
|
||||
$temp['newsfeed_image_link'] = !empty($newsfeed_image) ? "<img src='".$newsfeed_image."' alt='' />" : '';
|
||||
}
|
||||
|
||||
$serializedArray = e107::serialize($temp, false);
|
||||
$serializedArray = e107::serialize($temp, 'json');
|
||||
|
||||
$now = time();
|
||||
$this->newsList[$feedID]['newsfeed_data'] = $serializedArray;
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<e107Plugin name="Newsfeeds" lan="LAN_PLUGIN_NEWSFEEDS_NAME" version="2.0" date="2012-08-01" compatibility="2.0" installRequired="true">
|
||||
<author name="e107 Inc." url="http://e107.org" email="jalist@e107.org" />
|
||||
<e107Plugin name="Newsfeeds" lan="LAN_PLUGIN_NEWSFEEDS_NAME" version="2.1" date="2021-01-01" compatibility="2.0" installRequired="true">
|
||||
<author name="e107 Inc." url="http://e107.org" email="noreply@e107.org" />
|
||||
<description lan="LAN_PLUGIN_NEWSFEEDS_DESCRIPTION">This plugin will retrieve rss feeds from other websites and display them according to your preferences.</description>
|
||||
<category>content</category>
|
||||
<copyright>Copyright e107 Inc e107.org, Licensed under GPL (http://www.gnu.org/licenses/gpl.txt)</copyright>
|
||||
|
@ -7,7 +7,7 @@
|
||||
<link url='admin_config.php' description='LAN_CONFIGURE' icon='images/pvt_message_32.png' iconSmall='images/pvt_message_16.png' primary='true' />
|
||||
</adminLinks>
|
||||
<pluginPrefs>
|
||||
<pref name="title">LAN_PM</pref>
|
||||
<pref name="title">LAN_PLUGIN_PM_NAME</pref>
|
||||
<pref name="animate">1</pref>
|
||||
<pref name="dropdown">0</pref>
|
||||
<pref name="read_timeout">0</pref>
|
||||
|
@ -21,6 +21,8 @@ if(!check_class($pm_prefs['pm_class']))
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
if (!e107::isInstalled('pm')) { return ''; }
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Function to show a popup (if enabled) when new PMs arrive.
|
||||
*
|
||||
@ -58,7 +60,7 @@ if(!function_exists('pm_show_popup'))
|
||||
</html> ";
|
||||
$popuptext = str_replace("\n", '', $popuptext);
|
||||
$popuptext = str_replace("\t", '', $popuptext);
|
||||
$text .= "
|
||||
$text = "
|
||||
<script type='text/javascript'>
|
||||
winl=(screen.width-200)/2;
|
||||
wint = (screen.height-100)/2;
|
||||
@ -147,4 +149,5 @@ if($pm_inbox['inbox']['new'] > 0 && $pm_prefs['popup'] && strpos(e_SELF, 'pm.php
|
||||
|
||||
//$ns->tablerender(LAN_PM, $txt, 'pm');
|
||||
$caption = varset($pm_prefs['title'], LAN_PM);
|
||||
$caption = defset($caption, $caption);
|
||||
$ns->tablerender($caption, $txt, 'pm');
|
Loading…
x
Reference in New Issue
Block a user