From: <be...@us...> - 2012-01-21 16:10:34
|
Revision: 8770 http://xoops.svn.sourceforge.net/xoops/?rev=8770&view=rev Author: beckmi Date: 2012-01-21 16:10:28 +0000 (Sat, 21 Jan 2012) Log Message: ----------- Moving ModuleInfo to Index Tab Modified Paths: -------------- XoopsModules/smallworld/trunk/smallworld/admin/index.php XoopsModules/smallworld/trunk/smallworld/admin/menu.php XoopsModules/smallworld/trunk/smallworld/class/adminclass.php XoopsModules/smallworld/trunk/smallworld/language/english/admin.php Modified: XoopsModules/smallworld/trunk/smallworld/admin/index.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/admin/index.php 2012-01-21 15:02:26 UTC (rev 8769) +++ XoopsModules/smallworld/trunk/smallworld/admin/index.php 2012-01-21 16:10:28 UTC (rev 8770) @@ -35,7 +35,7 @@ $admin = new SmallworldAdmin(); // Find oldest message and apply to template -$dateoffirstmessage = date('d-m-Y H:i:s',$admin->oldestMsg()); +$dateoffirstmessage = date(_SHORTDATESTRING, $admin->oldestMsg()); // Get days number $totaldays = $admin->CountDays(); @@ -132,12 +132,41 @@ } + +//----------------------- +// Smallworld version number +$installversion = $admin->ModuleInstallVersion (); +// Smallworld install date +$installdate = $admin->ModuleInstallDate (); + +//check current version of Smallworld, return desc,link,version if new available +$installCheck = $admin->doCheckUpdate (); + +// template assignments + $xoopsTpl->assign('lang_moduleinfo', _AM_SMALLWORLD_MODULEINFO); + $xoopsTpl->assign('lang_installversion', _AM_SMALLWORLD_MODULEINSTALL); + $xoopsTpl->assign('lang_installversion_status', _AM_SMALLWORLD_UPDATE_STATUS); + $xoopsTpl->assign('lang_installdate', _AM_SMALLWORLD_INSTALLDATE); + + //$xoopsTpl->assign('installversion', $installversion); + //$xoopsTpl->assign('installdate', $installdate); + //$xoopsTpl->assign('installversion_status',$installCheck); + //$xoopsTpl->display(XOOPS_ROOT_PATH .'/modules/smallworld/templates/admin_moduleinfo.html'); + +//----------------------- + +$indexAdmin->addInfoBox(_AM_SMALLWORLD_MODULEINFO); +$indexAdmin->addInfoBoxLine(_AM_SMALLWORLD_MODULEINFO, "<class='smallworldadmin'>"._AM_SMALLWORLD_MODULEINSTALL." : %s</br>",$installversion,'Green','default'); +$indexAdmin->addInfoBoxLine(_AM_SMALLWORLD_MODULEINFO, "<class='smallworldadmin'>"._AM_SMALLWORLD_INSTALLDATE.": %s",$installdate,'Green','default'); +$indexAdmin->addInfoBoxLine(_AM_SMALLWORLD_MODULEINFO, "<class='smallworldadmin'>"."%s",$installCheck,'Green','default'); + + $indexAdmin->addInfoBox(_AM_SMALLWORLD_USERSTATS); -$indexAdmin->addInfoBoxLine( _AM_SMALLWORLD_USERSTATS, "<p class='smallworldadmin'>"._AM_SMALLWORLD_DATEOFFIRSTMESSAGE." : %s</p>",$dateoffirstmessage,'Green','default'); -$indexAdmin->addInfoBoxLine( _AM_SMALLWORLD_USERSTATS, "<p class='smallworldadmin'>"._AM_SMALLWORLD_TOTALUSERS." : %s</p>",$sumallusers, 'Red','default'); +$indexAdmin->addInfoBoxLine( _AM_SMALLWORLD_USERSTATS, "<class='smallworldadmin'>"._AM_SMALLWORLD_DATEOFFIRSTMESSAGE." : %s</br>",$dateoffirstmessage,'Green','default'); +$indexAdmin->addInfoBoxLine( _AM_SMALLWORLD_USERSTATS, "<class='smallworldadmin'>"._AM_SMALLWORLD_TOTALUSERS." : %s</br>",$sumallusers, 'Red','default'); if ($avgperday > 0) { - $indexAdmin->addInfoBoxLine( _AM_SMALLWORLD_USERSTATS, "<p class='smallworldadmin'>"._AM_SMALLWORLD_AVERAGEMSGPERDAY." : %s</p>", $avgperday, 'Red','default'); + $indexAdmin->addInfoBoxLine( _AM_SMALLWORLD_USERSTATS, "<class='smallworldadmin'>"._AM_SMALLWORLD_AVERAGEMSGPERDAY." : %s</br>", $avgperday, 'Red','default'); } if ($mat_cnt != 0 ) { Modified: XoopsModules/smallworld/trunk/smallworld/admin/menu.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/admin/menu.php 2012-01-21 15:02:26 UTC (rev 8769) +++ XoopsModules/smallworld/trunk/smallworld/admin/menu.php 2012-01-21 16:10:28 UTC (rev 8770) @@ -29,10 +29,10 @@ $adminmenu[$i]['link'] = 'admin/index.php'; $adminmenu[$i]['icon'] = $pathIcon32."/home.png"; -$i++; -$adminmenu[$i]['title'] = _MI_SMALLWORLD_ADMENU; -$adminmenu[$i]['link'] = 'admin/moduleinfo.php'; -$adminmenu[$i]['icon'] = $pathIcon32."/update.png"; +//$i++; +//$adminmenu[$i]['title'] = _MI_SMALLWORLD_ADMENU; +//$adminmenu[$i]['link'] = 'admin/moduleinfo.php'; +//$adminmenu[$i]['icon'] = $pathIcon32."/update.png"; $i++; $adminmenu[$i]['title'] = _MI_SMALLWORLDMENU_USERADMIN; Modified: XoopsModules/smallworld/trunk/smallworld/class/adminclass.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/class/adminclass.php 2012-01-21 15:02:26 UTC (rev 8769) +++ XoopsModules/smallworld/trunk/smallworld/class/adminclass.php 2012-01-21 16:10:28 UTC (rev 8770) @@ -223,6 +223,7 @@ // Variable $version = current xim version number // return csv file with (version, description, status, downloadUrl) function doCheckUpdate () { + global $pathIcon16; $version = $this->ModuleInstallVersion (); $critical = FALSE; $update = FALSE; @@ -231,25 +232,27 @@ $url = "http://www.culex.dk/updates/smallworld_version.csv"; $fileC = file_get_contents($url); $read = explode(";", $fileC); - $upd_img = '../images/upd_ok.png'; + + $upd_img = $pathIcon16.'/on.png'; + if ($read[0] > $version && $read[2] == "1") { $critical = TRUE; - $upd_img = '../images/upd_critical.png'; + $upd_img = $pathIcon16.'/off.png'; } if ($read[0] > $version && $read[2] != "1") { $update = TRUE; $upd_img = '../images/upd_normal.png'; } if ($critical) { - $rt = "<div class='smallworld_update'><span class='smallworld_update_header'><img class='smallworld_upd_img' src='".$upd_img."' />"._AM_SMALLWORLD_UPDATE_CRITICAL_UPD."</span></div></p>"; + $rt = "<div class='smallworld_update'><img src='".$upd_img."' />"._AM_SMALLWORLD_UPDATE_CRITICAL_UPD."</div></p>"; $rt .="<textarea class='xim_update_changelog'>".$read[1]."</textarea><br /><br />"; - $rt .=_AM_SMALLWORLD_UPDATE_SERVER_FILE."<br /><a href='".$read[3]."'>".$read[3]."</a></div><br/>"; + $rt .=_AM_SMALLWORLD_UPDATE_SERVER_FILE."<br /><a href='".$read[3]."'>".$read[3]."</a></div>"; } else if ($update) { - $rt = "<div class='smallworld_update'><span class='smallworld_update_header'><img class='smallworld_upd_img' src='".$upd_img."' />"._AM_SMALLWORLD_UPDATE_NORMAL_UPD."</span></div></p>"; + $rt = "<div class='smallworld_update'><img src='".$upd_img."' />"._AM_SMALLWORLD_UPDATE_NORMAL_UPD."</div></p>"; $rt .= "<textarea class='smallworld_update_changelog'>".$read[1]."</textarea><br /><br />"; $rt .="<p>". _AM_SMALLWORLD_UPDATE_SERVER_FILE."<br /><a href='".$read[3]."'>".$read[3]."</a>"; } else { - $rt = "<div class='smallworld_update'><span class='smallworld_update_header'><img class='smallworld_upd_img' src='".$upd_img."' />"._AM_SMALLWORLD_UPDATE_YOUHAVENEWESTVERSION."</span></div><br />"; + $rt = "<div class='smallworld_update'><br/><img src='".$upd_img."' />"._AM_SMALLWORLD_UPDATE_YOUHAVENEWESTVERSION."</div>"; } return $rt; } Modified: XoopsModules/smallworld/trunk/smallworld/language/english/admin.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/language/english/admin.php 2012-01-21 15:02:26 UTC (rev 8769) +++ XoopsModules/smallworld/trunk/smallworld/language/english/admin.php 2012-01-21 16:10:28 UTC (rev 8770) @@ -63,12 +63,12 @@ define('_AM_SMALLWORLD_ADDTIMEDROPDOWN_NOCHANGE','No change'); // various others -define('_AM_SMALLWORLD_UPDATE_CRITICAL_UPD','There is a critical update ready!!'); -define('_AM_SMALLWORLD_UPDATE_NORMAL_UPD','There is a newer version ready for download'); +define('_AM_SMALLWORLD_UPDATE_CRITICAL_UPD',' There is a critical update ready!!'); +define('_AM_SMALLWORLD_UPDATE_NORMAL_UPD',' There is a newer version ready for download'); define('_AM_SMALLWORLD_UPDATE_SERVER_ERROR','Server seems to be down or update is in progress.<br/>Try again later.'); define('_AM_SMALLWORLD_UPDATE_FILE_DESC','Description of newest version'); define('_AM_SMALLWORLD_UPDATE_SERVER_FILE','You can download the new version from here'); -define('_AM_SMALLWORLD_UPDATE_YOUHAVENEWESTVERSION','You have the newest version of Smallworld'); +define('_AM_SMALLWORLD_UPDATE_YOUHAVENEWESTVERSION',' You have the newest version of Smallworld'); define('_AM_SMALLWORLD_HELP','Help'); define('_AM_SMALLWORLD_ADMIN_USERDELETEDALERT',' and associated folders, files and table rows has been deleted'); define('_AM_SMALLWORLD_STATS_POS','#'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |