mirror of
https://github.com/e107inc/e107.git
synced 2025-07-25 17:01:43 +02:00
RSS template upgraded to v2.x spec. Bootstrap 5 styling fixes.
This commit is contained in:
@@ -26,7 +26,7 @@ if(!empty($pref['signup_option_class']))
|
||||
$text .= "<div class='input-group'>";
|
||||
$text .= $frm->text('email','', null, array('placeholder'=> NLLAN_73));
|
||||
$text .= "<span class='input-group-btn'>";
|
||||
$text .= $frm->button('subscribe', 1, 'submit', NLLAN_52, array('class'=>'btn-default'));
|
||||
$text .= $frm->button('subscribe', 1, 'submit', NLLAN_52, array('class'=>'btn-primary'));
|
||||
$text .= "</span>";
|
||||
$text .= "</div>";
|
||||
$text .= $frm->close();
|
||||
|
@@ -603,7 +603,7 @@ class poll
|
||||
return '
|
||||
<div class="progress">
|
||||
<div class="bar progress-bar" role="progressbar" aria-valuenow="'.$val.'" aria-valuemin="0" aria-valuemax="100" style="width: '.$val.'%;">
|
||||
<span class="sr-only">'.$val.'%</span>
|
||||
<span class="sr-only visually-hidden">'.$val.'%</span>
|
||||
</div>
|
||||
</div>';
|
||||
|
||||
@@ -1006,7 +1006,7 @@ class poll_shortcodes extends e_shortcode
|
||||
return '
|
||||
<div class="progress">
|
||||
<div class="bar progress-bar" role="progressbar" aria-valuenow="'.$val.'" aria-valuemin="0" aria-valuemax="100" style="width: '.$val.'%;">
|
||||
<span class="sr-only">'.$val.'%</span>
|
||||
<span class="sr-only visually-hidden">'.$val.'%</span>
|
||||
</div>
|
||||
</div>';
|
||||
|
||||
|
@@ -103,8 +103,8 @@ $POLL_DISALLOWED_END = "
|
||||
";
|
||||
|
||||
|
||||
/* ################################# */
|
||||
/* template for forum polls when user HASN'T voted*/
|
||||
|
||||
// template for forum polls when user HASN'T voted
|
||||
|
||||
$POLL_FORUM_NOTVOTED_START = "
|
||||
<div style='text-align:center; margin-left: auto; margin-right: auto;'>
|
||||
@@ -216,7 +216,7 @@ $POLL_TEMPLATE['results']['start'] = "
|
||||
";
|
||||
|
||||
$POLL_TEMPLATE['results']['item'] = "
|
||||
<strong>{OPTION}</strong><small class='pull-right float-right'><a href='#' class='e-tip' title=\"{VOTES}\">{PERCENTAGE}</a></small>
|
||||
<strong>{OPTION}</strong><small class='pull-right float-right float-end'><a href='#' class='e-tip' title=\"{VOTES}\">{PERCENTAGE}</a></small>
|
||||
{BAR}
|
||||
";
|
||||
|
||||
|
@@ -34,7 +34,7 @@ if (!e107::isInstalled('rss_menu'))
|
||||
|
||||
$tp = e107::getParser();
|
||||
|
||||
require_once(e_PLUGIN.'rss_menu/rss_shortcodes.php');
|
||||
//require_once(e_PLUGIN.'rss_menu/rss_shortcodes.php');
|
||||
require_once(e_HANDLER.'userclass_class.php');
|
||||
|
||||
/*
|
||||
@@ -49,15 +49,7 @@ if (!is_object($tp->e_bb))
|
||||
// Get language file
|
||||
e107::includeLan(e_PLUGIN.'rss_menu/languages/'.e_LANGUAGE.'_admin_rss_menu.php');
|
||||
|
||||
// Get template
|
||||
if (is_readable(THEME.'rss_template.php'))
|
||||
{
|
||||
require_once(THEME.'rss_template.php');
|
||||
}
|
||||
else
|
||||
{
|
||||
require_once(e_PLUGIN.'rss_menu/rss_template.php');
|
||||
}
|
||||
|
||||
|
||||
// Query handler
|
||||
if(!empty($_GET['type']))
|
||||
@@ -87,7 +79,9 @@ if (empty($rss_type))
|
||||
// Display list of all feeds
|
||||
require_once(HEADERF);
|
||||
|
||||
// require_once(e_PLUGIN.'rss_menu/rss_template.php'); Already loaded
|
||||
require_once(e_PLUGIN.'rss_menu/rss_shortcodes.php');
|
||||
$sc = e107::getScBatch('rss_menu', true);
|
||||
$sc->wrapper('rss/page');
|
||||
|
||||
if(!$sql->select('rss', '*', "`rss_class` = 0 AND `rss_limit` > 0 AND `rss_topicid` NOT REGEXP ('\\\*') ORDER BY `rss_name`"))
|
||||
{
|
||||
@@ -95,12 +89,34 @@ if (empty($rss_type))
|
||||
}
|
||||
else
|
||||
{
|
||||
$text = $RSS_LIST_HEADER;
|
||||
if($template = e107::getTemplate('rss_menu', 'rss', 'page'))
|
||||
{
|
||||
$RSS_LIST_HEADER = $template['start'];
|
||||
$RSS_LIST_TABLE = $template['item'];
|
||||
$RSS_LIST_FOOTER = $template['end'];
|
||||
}
|
||||
else
|
||||
{
|
||||
// Get Legacy template
|
||||
if (is_readable(THEME.'rss_template.php'))
|
||||
{
|
||||
require_once(THEME.'rss_template.php');
|
||||
}
|
||||
else
|
||||
{
|
||||
require_once(e_PLUGIN.'rss_menu/rss_template.php');
|
||||
}
|
||||
}
|
||||
|
||||
$text = $tp->parseTemplate($RSS_LIST_HEADER);
|
||||
|
||||
while($row = $sql->fetch())
|
||||
{
|
||||
$text .= $tp->parseTemplate($RSS_LIST_TABLE, FALSE, $rss_shortcodes);
|
||||
$text .= $tp->parseTemplate($RSS_LIST_TABLE, false, $sc);
|
||||
}
|
||||
$text .= $RSS_LIST_FOOTER;
|
||||
|
||||
$text .= $tp->parseTemplate($RSS_LIST_FOOTER);
|
||||
|
||||
$ns->tablerender(RSS_MENU_L2, $text);
|
||||
}
|
||||
|
||||
|
@@ -288,4 +288,4 @@ class rss_menu_shortcodes extends e_shortcode
|
||||
|
||||
}
|
||||
|
||||
$rss_shortcodes = new rss_menu_shortcodes;
|
||||
// $rss_shortcodes = new rss_menu_shortcodes;
|
||||
|
@@ -1,31 +0,0 @@
|
||||
<?php
|
||||
|
||||
if(!defined("USER_WIDTH")){ define("USER_WIDTH","width:100%"); }
|
||||
|
||||
// Rss listing
|
||||
if(!isset($RSS_LIST_HEADER))
|
||||
{
|
||||
$RSS_LIST_HEADER = "<table class='table table-striped table-bordered fborder' style='".USER_WIDTH."'>
|
||||
<tr>
|
||||
<th class='fcaption' style='width:70%'> </th>
|
||||
<th class='fcaption' style='text-align:right'>".RSS_PLUGIN_LAN_6."</th>
|
||||
</tr>";
|
||||
}
|
||||
if(!isset($RSS_LIST_TABLE))
|
||||
{
|
||||
$RSS_LIST_TABLE = "
|
||||
<tr>
|
||||
<td class='forumheader3'>{RSS_FEED}<br />
|
||||
<span class='smalltext' ><small>{RSS_TEXT}</small></span>
|
||||
</td>
|
||||
<td class='forumheader3' style='text-align:right'>
|
||||
{RSS_TYPES}
|
||||
</td>
|
||||
</tr>";
|
||||
}
|
||||
if(!isset($RSS_LIST_FOOTER))
|
||||
{
|
||||
$RSS_LIST_FOOTER = "</table>";
|
||||
}
|
||||
|
||||
|
32
e107_plugins/rss_menu/templates/rss_template.php
Normal file
32
e107_plugins/rss_menu/templates/rss_template.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
|
||||
|
||||
$RSS_TEMPLATE = [];
|
||||
|
||||
//$RSS_WRAPPER['page']['RSS_TEXT'] = '(pre){---}(post)';
|
||||
|
||||
|
||||
$RSS_TEMPLATE['page']['start'] = "<!-- RSS Template -->
|
||||
<table class='table table-striped table-bordered fborder'>
|
||||
<tr>
|
||||
<th class='fcaption' style='width:70%'> </th>
|
||||
<th class='fcaption' style='text-align:right'>{LAN=RSS_PLUGIN_LAN_6}</th>
|
||||
</tr>";
|
||||
|
||||
$RSS_TEMPLATE['page']['item'] = "
|
||||
<tr>
|
||||
<td class='forumheader3'>{RSS_FEED}<br />
|
||||
<span class='smalltext' ><small>{RSS_TEXT}</small></span>
|
||||
</td>
|
||||
<td class='forumheader3' style='text-align:right'>
|
||||
{RSS_TYPES}
|
||||
</td>
|
||||
</tr>";
|
||||
|
||||
|
||||
$RSS_TEMPLATE['page']['end'] = "</table>";
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user