mirror of
https://github.com/e107inc/e107.git
synced 2025-04-20 04:32:01 +02:00
Added {ADMIN_UPDATE} shortcode. Checks Sourceforge RSS feed for a newer version of e107, once a day.
This commit is contained in:
parent
a09a079d87
commit
7f2312621d
53
e107_files/shortcode/admin_update.sc
Normal file
53
e107_files/shortcode/admin_update.sc
Normal file
@ -0,0 +1,53 @@
|
||||
// $Id: admin_update.sc,v 1.1 2006-12-08 08:10:25 e107coders Exp $
|
||||
|
||||
global $e107cache,$ns;
|
||||
if (is_readable(e_ADMIN."ver.php"))
|
||||
{
|
||||
include(e_ADMIN."ver.php");
|
||||
}
|
||||
|
||||
$feed = "http://sourceforge.net/export/rss2_projfiles.php?group_id=63748";
|
||||
$e107cache->CachePageMD5 = md5($e107info['e107_version']);
|
||||
|
||||
if($cacheData = $e107cache->retrieve("xfeed",3600, TRUE))
|
||||
{
|
||||
return $cacheData;
|
||||
}
|
||||
|
||||
require_once(e_HANDLER."xml_class.php");
|
||||
$xml = new parseXml;
|
||||
require_once(e_HANDLER."magpie_rss.php");
|
||||
|
||||
$ftext = "";
|
||||
if($rawData = $xml -> getRemoteXmlFile($feed))
|
||||
{
|
||||
$rss = new MagpieRSS( $rawData );
|
||||
}
|
||||
|
||||
$current_vrs = floatval(str_replace(".","",$e107info['e107_version']));
|
||||
foreach($rss->items as $val)
|
||||
{
|
||||
|
||||
$search = array((strstr($val['title'],"(")),"e107","released"," v");
|
||||
$version = trim(str_replace($search,"",$val['title']));
|
||||
$numb = str_replace(".","",$version);
|
||||
$vrs = floatval($numb);
|
||||
|
||||
if(($vrs > $current_vrs) && $vrs < 400)
|
||||
{
|
||||
$ftext .= "<a rel='external' href='".$val['link']."' >e107 v".$version."</a><br />\n";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if($ftext){
|
||||
$text = $ftext;
|
||||
}
|
||||
|
||||
$e107cache->set("xfeed", $text, TRUE);
|
||||
if($text)
|
||||
{
|
||||
return $ns -> tablerender(LAN_NEWVERSION, $text);
|
||||
}
|
||||
|
||||
|
@ -4,9 +4,9 @@
|
||||
| e107 website system - Language File.
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_languages/English/admin/lan_admin.php,v $
|
||||
| $Revision: 1.1.1.1 $
|
||||
| $Date: 2006-12-02 04:34:40 $
|
||||
| $Author: mcfly_e107 $
|
||||
| $Revision: 1.2 $
|
||||
| $Date: 2006-12-08 08:10:25 $
|
||||
| $Author: e107coders $
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
define("ADLAN_0", "News");
|
||||
@ -268,5 +268,7 @@ define("LAN_CONFIGURE", "Configure");
|
||||
define("LAN_BACK","Back");
|
||||
|
||||
define("LAN_CREDITS","Credits");
|
||||
define("LAN_NEWVERSION","New Version Available");
|
||||
|
||||
|
||||
?>
|
||||
|
@ -11,9 +11,9 @@
|
||||
| GNU General Public License (http://gnu.org).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_themes/jayya/admin_template.php,v $
|
||||
| $Revision: 1.1.1.1 $
|
||||
| $Date: 2006-12-02 04:35:51 $
|
||||
| $Author: mcfly_e107 $
|
||||
| $Revision: 1.2 $
|
||||
| $Date: 2006-12-08 08:10:25 $
|
||||
| $Author: e107coders $
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
@ -100,7 +100,7 @@ if (!ADMIN) {
|
||||
if ($prehelp!='') {
|
||||
$ADMIN_HEADER .= $prehelp;
|
||||
} else {
|
||||
$ADMIN_HEADER .= "{ADMIN_SITEINFO}";
|
||||
$ADMIN_HEADER .= "{ADMIN_UPDATE} {ADMIN_SITEINFO}";
|
||||
}
|
||||
|
||||
$ADMIN_HEADER .= "<br />
|
||||
@ -146,12 +146,12 @@ $ADMIN_FOOTER .= "</tr>
|
||||
$BUTTONS_START = "<table class='fborder' style='width: 100%'>";
|
||||
|
||||
$BUTTON = "<tr><td class='link_button'><div class='emenuBar link_button'>
|
||||
<div class='menuButton link_button' onmouseover=\"eover(this, 'menuButton_over link_button')\" onmouseout=\"eover(this, 'menuButton link_button')\" {ONCLICK}
|
||||
<div class='menuButton link_button' onmouseover=\"eover(this, 'menuButton_over link_button')\" onmouseout=\"eover(this, 'menuButton link_button')\" {ONCLICK}
|
||||
style='width: 98% !important; width: 100%; padding: 0px 0px 0px 2px; border-right: 0px'>
|
||||
<img src='".E_16_NAV_ARROW."' style='width: 16px; height: 16px; vertical-align: middle' alt='' /> {LINK_TEXT}</div></div></td></tr>";
|
||||
|
||||
$BUTTON_OVER = "<tr><td class='link_button'><div class='emenuBar link_button'>
|
||||
<div class='menuButton link_button' onmouseover=\"eover(this, 'menuButton_over link_button')\" onmouseout=\"eover(this, 'menuButton link_button')\" {ONCLICK}
|
||||
<div class='menuButton link_button' onmouseover=\"eover(this, 'menuButton_over link_button')\" onmouseout=\"eover(this, 'menuButton link_button')\" {ONCLICK}
|
||||
style='width: 98% !important; width: 100%; padding: 0px 0px 0px 2px; border-right: 0px'>
|
||||
<img src='".E_16_NAV_ARROW_OVER."' style='width: 16px; height: 16px; vertical-align: middle' alt='' /> {LINK_TEXT}</div></div></td></tr>";
|
||||
|
||||
@ -159,7 +159,7 @@ $BUTTONS_END = "</table>";
|
||||
|
||||
$SUB_BUTTONS_START = "<table class='fborder' style='width:100%;'>
|
||||
<tr><td style='border-bottom: 1px solid #000'><div class='emenuBar'>
|
||||
<div class='menuButton' onmouseover=\"eover(this, 'menuButton_over')\" onmouseout=\"eover(this, 'menuButton')\" onclick=\"expandit('{SUB_HEAD_ID}');\"
|
||||
<div class='menuButton' onmouseover=\"eover(this, 'menuButton_over')\" onmouseout=\"eover(this, 'menuButton')\" onclick=\"expandit('{SUB_HEAD_ID}');\"
|
||||
style='width: 98% !important; width: 100%; padding: 0px 0px 0px 2px; border-right: 0px'>
|
||||
<img src='".E_16_NAV_ARROW."' style='width: 16px; height: 16px; vertical-align: middle' alt='' /> {SUB_HEAD}</div></div></td></tr>
|
||||
<tr id='{SUB_HEAD_ID}' style='display: none' ><td class='forumheader3' style='text-align:left;'>";
|
||||
@ -170,4 +170,4 @@ $SUB_BUTTON_OVER = "<b> « <a style='text-decoration:none;' href='{LINK_URL
|
||||
|
||||
$SUB_BUTTONS_END = "</td></tr></table>";
|
||||
|
||||
?>
|
||||
?>
|
||||
|
@ -11,9 +11,9 @@
|
||||
| GNU General Public License (http://gnu.org).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_themes/templates/admin_template.php,v $
|
||||
| $Revision: 1.1.1.1 $
|
||||
| $Date: 2006-12-02 04:36:12 $
|
||||
| $Author: mcfly_e107 $
|
||||
| $Revision: 1.2 $
|
||||
| $Date: 2006-12-08 08:10:25 $
|
||||
| $Author: e107coders $
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
@ -46,6 +46,7 @@ $ADMIN_FOOTER = "</td>
|
||||
<td style='width:17%; vertical-align:top'>
|
||||
{ADMIN_MENU}
|
||||
{ADMIN_PRESET}
|
||||
{ADMIN_UPDATE}
|
||||
{ADMIN_SITEINFO}
|
||||
{ADMIN_DOCS}
|
||||
</td>
|
||||
@ -54,4 +55,4 @@ $ADMIN_FOOTER = "</td>
|
||||
{ADMIN_CREDITS}
|
||||
";
|
||||
|
||||
?>
|
||||
?>
|
||||
|
Loading…
x
Reference in New Issue
Block a user