From: <be...@us...> - 2012-01-18 05:24:22
|
Revision: 8750 http://xoops.svn.sourceforge.net/xoops/?rev=8750&view=rev Author: beckmi Date: 2012-01-18 05:24:13 +0000 (Wed, 18 Jan 2012) Log Message: ----------- - converting to ModuleAdmin - removing hard-coded links - fixing translations Modified Paths: -------------- XoopsModules/smallworld/trunk/smallworld/admin/admin_header.php XoopsModules/smallworld/trunk/smallworld/admin/index.php XoopsModules/smallworld/trunk/smallworld/admin/menu.php XoopsModules/smallworld/trunk/smallworld/admin/statistics.php XoopsModules/smallworld/trunk/smallworld/language/english/admin.php XoopsModules/smallworld/trunk/smallworld/language/english/modinfo.php XoopsModules/smallworld/trunk/smallworld/templates/getlastcom.html XoopsModules/smallworld/trunk/smallworld/templates/getlastmsg.html XoopsModules/smallworld/trunk/smallworld/templates/getmore.html XoopsModules/smallworld/trunk/smallworld/templates/smallworld_friends_template.html XoopsModules/smallworld/trunk/smallworld/templates/smallworld_index.html XoopsModules/smallworld/trunk/smallworld/templates/smallworld_permalink.html XoopsModules/smallworld/trunk/smallworld/templates/smallworld_share.html XoopsModules/smallworld/trunk/smallworld/templates/smallworld_userprofile_template.html XoopsModules/smallworld/trunk/smallworld/xoops_version.php Added Paths: ----------- XoopsModules/smallworld/trunk/smallworld/admin/about.php XoopsModules/smallworld/trunk/smallworld/admin/admin_footer.php XoopsModules/smallworld/trunk/smallworld/admin/index0.php XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt XoopsModules/smallworld/trunk/smallworld/docs/credits.txt XoopsModules/smallworld/trunk/smallworld/docs/install.txt XoopsModules/smallworld/trunk/smallworld/docs/lang_diff.txt XoopsModules/smallworld/trunk/smallworld/docs/licence.txt XoopsModules/smallworld/trunk/smallworld/docs/readme.txt XoopsModules/smallworld/trunk/smallworld/language/danish/admin.php XoopsModules/smallworld/trunk/smallworld/language/danish/help/ XoopsModules/smallworld/trunk/smallworld/language/danish/help/help.html XoopsModules/smallworld/trunk/smallworld/language/danish/help/index.html XoopsModules/smallworld/trunk/smallworld/language/danish/mailTpl/ XoopsModules/smallworld/trunk/smallworld/language/danish/mailTpl/index.html XoopsModules/smallworld/trunk/smallworld/language/danish/mailTpl/mail_attencionneeded.html XoopsModules/smallworld/trunk/smallworld/language/danish/mailTpl/mail_complaint.html XoopsModules/smallworld/trunk/smallworld/language/danish/mailTpl/mail_newcomment.html XoopsModules/smallworld/trunk/smallworld/language/danish/mailTpl/mail_register.html XoopsModules/smallworld/trunk/smallworld/language/danish/main.php XoopsModules/smallworld/trunk/smallworld/language/danish/modinfo.php XoopsModules/smallworld/trunk/smallworld/language/english/help/ XoopsModules/smallworld/trunk/smallworld/language/english/help/help.html XoopsModules/smallworld/trunk/smallworld/language/english/help/index.html Added: XoopsModules/smallworld/trunk/smallworld/admin/about.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/admin/about.php (rev 0) +++ XoopsModules/smallworld/trunk/smallworld/admin/about.php 2012-01-18 05:24:13 UTC (rev 8750) @@ -0,0 +1,29 @@ +<?php +/** + * Birthday module + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS Project (http://www.xoops.org) + * @license GNU GPL (http://www.gnu.org/licenses/gpl-2.0.html/) + * @package birthday + * @since 2.5.0 + * @author XOOPS Module Team + * @version $Id $ + **/ + +include_once dirname(__FILE__) . '/admin_header.php'; + +xoops_cp_header(); + +$aboutAdmin = new ModuleAdmin(); + +echo $aboutAdmin->addNavigation('about.php'); +echo $aboutAdmin->renderAbout('WKFZBRBGMYKCA', false); + +include 'admin_footer.php'; \ No newline at end of file Added: XoopsModules/smallworld/trunk/smallworld/admin/admin_footer.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/admin/admin_footer.php (rev 0) +++ XoopsModules/smallworld/trunk/smallworld/admin/admin_footer.php 2012-01-18 05:24:13 UTC (rev 8750) @@ -0,0 +1,28 @@ +<?php +/** +* You may not change or alter any portion of this comment or credits +* of supporting developers from this source code or any supporting source code +* which is considered copyrighted (c) material of the original comment or credit authors. +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +* +* @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ +* @license http://www.fsf.org/copyleft/gpl.html GNU public license +* @package modules +* @subpackage Small World +* @since 1.0.0 +* @author Culex - homepage.: http://culex.dk & email.: cu...@cu... +**/ + +echo "<div class='adminfooter'>\n" + ." <div style='text-align: center;'>\n" + ." <a href='http://www.xoops.org' target='_blank'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n" + ." </div>\n" + ." " . _AM_SMALLWORLD_FOOTER . "\n" + ."</div>"; + +echo "<span style='margin: 27%; height: 50px; position: relative;'>"._AM_SMALLWORLD_SP."</span>"; + + +xoops_cp_footer(); \ No newline at end of file Modified: XoopsModules/smallworld/trunk/smallworld/admin/admin_header.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/admin/admin_header.php 2012-01-18 05:17:13 UTC (rev 8749) +++ XoopsModules/smallworld/trunk/smallworld/admin/admin_header.php 2012-01-18 05:24:13 UTC (rev 8750) @@ -1,53 +1,52 @@ <?php /** -* You may not change or alter any portion of this comment or credits -* of supporting developers from this source code or any supporting source code -* which is considered copyrighted (c) material of the original comment or credit authors. -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -* -* @copyright: The XOOPS Project http://sourceforge.net/projects/xoops/ -* @license: http://www.fsf.org/copyleft/gpl.html GNU public license -* @module: Smallworld -* @Author: Michael Albertsen (http://culex.dk) <cu...@cu...> -* @copyright: 2011 Culex -* @Repository path: $HeadURL$ -* @Last committed: $Revision$ -* @Last changed by: $Author$ -* @Last changed date: $Date$ -* @ID: $Id$ -**/ + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright : The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license : http://www.fsf.org/copyleft/gpl.html GNU public license + * @module : Smallworld + * @Author : Michael Albertsen (http://culex.dk) <cu...@cu...> + * @copyright : 2011 Culex + * @Repository path: $HeadURL$ + * @Last committed: $Revision$ + * @Last changed by: $Author$ + * @Last changed date: $Date$ + * @ID : $Id$ + **/ - include '../../../mainfile.php'; - include_once XOOPS_ROOT_PATH.'/class/xoopsmodule.php'; - include XOOPS_ROOT_PATH.'/include/cp_functions.php'; - require_once XOOPS_ROOT_PATH.'/include/cp_header.php'; - global $xoopsModule; +$path = dirname(dirname(dirname(dirname(__FILE__)))); +include_once $path . '/mainfile.php'; +include_once $path . '/include/cp_functions.php'; +include_once $path . '/class/xoopsmodule.php'; +require_once $path . '/include/cp_header.php'; - $pathModuleAdmin = $xoopsModule->getInfo('dirmoduleadmin'); - if ( file_exists($GLOBALS['xoops']->path('/Frameworks/moduleclasses/moduleadmin/moduleadmin.php'))){ - include_once $GLOBALS['xoops']->path('/Frameworks/moduleclasses/moduleadmin/moduleadmin.php'); - - }else{ - redirect_header("../../../admin.php", 5, _AM_MODULEADMIN_MISSING, false); - - } +global $xoopsModule; - $pathIcon16 = '../'.$xoopsModule->getInfo('icons16'); - $pathIcon32 = '../'.$xoopsModule->getInfo('icons32'); - $pathModuleAdmin = $xoopsModule->getInfo('dirmoduleadmin'); - - if ( $xoopsUser ) { - $xoopsModule = XoopsModule::getByDirname("smallworld"); - if ( !$xoopsUser->isAdmin($xoopsModule->mid()) ) { - redirect_header(XOOPS_URL."/",2,_NOPERM); - exit(); - } - } - else { - redirect_header(XOOPS_URL."/",2,_NOPERM); - exit(); - } +$pathModuleAdmin = $xoopsModule->getInfo('dirmoduleadmin'); +if (file_exists($GLOBALS['xoops']->path('/Frameworks/moduleclasses/moduleadmin/moduleadmin.php'))) { + include_once $GLOBALS['xoops']->path('/Frameworks/moduleclasses/moduleadmin/moduleadmin.php'); -?> \ No newline at end of file +} else { + redirect_header("../../../admin.php", 5, _AM_MODULEADMIN_MISSING, false); + +} + +$pathIcon16 = '../' . $xoopsModule->getInfo('icons16'); +$pathIcon32 = '../' . $xoopsModule->getInfo('icons32'); +$pathModuleAdmin = $xoopsModule->getInfo('dirmoduleadmin'); + +if ($xoopsUser) { + $xoopsModule = XoopsModule::getByDirname("smallworld"); + if (!$xoopsUser->isAdmin($xoopsModule->mid())) { + redirect_header(XOOPS_URL . "/", 2, _NOPERM); + exit(); + } +} else { + redirect_header(XOOPS_URL . "/", 2, _NOPERM); + exit(); +} \ No newline at end of file Modified: XoopsModules/smallworld/trunk/smallworld/admin/index.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/admin/index.php 2012-01-18 05:17:13 UTC (rev 8749) +++ XoopsModules/smallworld/trunk/smallworld/admin/index.php 2012-01-18 05:24:13 UTC (rev 8750) @@ -19,20 +19,16 @@ * @ID: $Id$ **/ -require_once 'admin_header.php'; -require_once '../../../include/cp_header.php'; -include_once(XOOPS_ROOT_PATH."/modules/smallworld/include/functions.php"); -include_once(XOOPS_ROOT_PATH."/modules/smallworld/class/class_collector.php"); -require_once XOOPS_ROOT_PATH . '/class/template.php'; +require_once dirname(dirname(dirname(dirname(__FILE__)))) . '/include/cp_header.php'; +include_once dirname(__FILE__) . '/admin_header.php'; -if (!isset($xoopsTpl)) {$xoopsTpl = new XoopsTpl();} -$xoopsTpl->xoops_setCaching(0); - xoops_cp_header(); + $indexAdmin = new ModuleAdmin(); + + $admin = new SmallworldAdmin(); -$index_admin = new ModuleAdmin(); $tpl = new XoopsTpl(); $ai = array(); @@ -45,15 +41,15 @@ $totaldays = $admin->CountDays(); // get average messages per day $avgperday = $admin->AvgMsgDay ($totaldays); -// Smallworld version number +// XIM version number $installversion = $admin->ModuleInstallVersion (); -// Smallworld install date +// XIM install date $installdate = $admin->ModuleInstallDate (); -//check current version of Smallworld, return desc,link,version if new available +//check current version of XIM, return desc,link,version if new available $installCheck = $admin->doCheckUpdate (); -// Count members using Smallworld +// Count members using XIM $sumallusers = $admin->TotalUsers (); // Find list of most active users (total) $admin->mostactiveusers_allround(); @@ -66,118 +62,21 @@ // FInd list of worst rated users overall $admin->topratedusers('down'); -$allusers_inspect = $admin->getAllUsers('yes'); - if (!empty($allusers_inspect)) { - foreach ($allusers_inspect as $data) { - $ai['id'] = $data['id']; - $ai['userid'] = $data['userid']; - $ai['username'] = $data['username']; - $ai['realname'] = $data['realname']; - $ai['userimage'] = smallworld_getAvatarLink ($data['userid'],$data['userimage']); - $ai['ip'] = $data['ip']; - $ai['complaint'] = $data['complaint']; - $ai['inspect_start'] = $data['inspect_start']; - $ai['inspect_stop'] = $data['inspect_stop']; - $ai['userinspect_timetotal'] = ($data['inspect_start'] + $data['inspect_stop'])-time(); - $xoopsTpl->append('allusersinspect', $ai); - } - } - $xoopsTpl->assign('allusersinspectcounter',count($ai)); -$allusers_noinspect = $admin->getAllUsers('no'); - if (!empty($allusers_noinspect)) { - foreach ($allusers_noinspect as $data) { - $ani['id'] = $data['id']; - $ani['userid'] = $data['userid']; - $ani['username'] = $data['username']; - $ani['realname'] = $data['realname']; - $ani['userimage'] = smallworld_getAvatarLink ($data['userid'],$data['userimage']); - $ani['ip'] = $data['ip']; - $ani['complaint'] = $data['complaint']; - $ani['inspect_start'] = ''; - $ani['inspect_stop'] = ''; - $ani['userinspect_timetotal'] = ''; - $xoopsTpl->append('allusersnoinspect', $ani); - } - } - $xoopsTpl->assign('allusersnoinspectcounter',count($ani)); -// ---------------- end of tabs ---------------- // +$indexAdmin->addInfoBox( _AM_SMALLWORLD_USERSTATS); +//$indexAdmin->addInfoBoxLine( _AM_XTUBE_MINDEX_VIDEOSUMMARY, "<infolabel>" .<{$lang_userstats}>. "</infolabel>", index.php); +$indexAdmin->addInfoBoxLine( _AM_SMALLWORLD_USERSTATS, _AM_SMALLWORLD_DATEOFFIRSTMESSAGE, $dateoffirstmessage, 'Green'); +$indexAdmin->addInfoBoxLine( _AM_SMALLWORLD_USERSTATS, _AM_SMALLWORLD_TOTALUSERS, $totalusers, 'Red'); +$indexAdmin->addInfoBoxLine( _AM_SMALLWORLD_USERSTATS, _AM_SMALLWORLD_AVERAGEMSGPERDAY, $avgperday, 'Red'); -// template assignments - // tab titles - $xoopsTpl->assign('lang_statistics', _AM_SMALLWORLD_STATISTICS_TITLE); - $xoopsTpl->assign('lang_moduleinfo', _AM_SMALLWORLD_MODULEINFO); - $xoopsTpl->assign('lang_userstats', _AM_SMALLWORLD_USERSTATS); - $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('lang_dateoffirstmessage', _AM_SMALLWORLD_DATEOFFIRSTMESSAGE); - $xoopsTpl->assign('lang_totalusers', _AM_SMALLWORLD_TOTALUSERS); - $xoopsTpl->assign('lang_averagemsgperday', _AM_SMALLWORLD_AVERAGEMSGPERDAY); - $xoopsTpl->assign('lang_topchatters',_AM_SMALLWORLD_TOPCHATTERS); - $xoopsTpl->assign('lang_topchatterstoday',_AM_SMALLWORLD_TOPCHATTERS_TODAY); - $xoopsTpl->assign('lang_toprated',_AM_SMALLWORLD_TOPRATEDUSERS); - $xoopsTpl->assign('lang_bottomrated',_AM_SMALLWORLD_BOTTOMRATEDUSERS); - $xoopsTpl->assign('lang_useradmin',_AM_SMALLWORLD_USERADMIN_TITLE); - $xoopsTpl->assign('lang_help',_AM_SMALLWORLD_HELP); - $xoopsTpl->assign('lang_prefs',_MI_SYSTEM_ADMENU6); - $xoopsTpl->assign('lang_prefslink',"<a href='../../system/admin.php?fct=preferences&op=showmod&mod=".$xoopsModule ->getVar('mid')."'>"._MI_SYSTEM_ADMENU6."</a>"); - - // help file from admin - $xoopsTpl->assign('lang_hlp_about',_AM_SMALLWORLD_HELP_ABOUT); - $xoopsTpl->assign('lang_hlp_preface',_AM_SMALLWORLD_HELP_PREFACE); - $xoopsTpl->assign('lang_hlp_requirements_t',_AM_SMALLWORLD_HELP_HEADER_REQUIREMENTS); - $xoopsTpl->assign('lang_hlp_requirements',_AM_SMALLWORLD_HELP_REQUIREMENTS); - $xoopsTpl->assign('lang_hlp_recommended_t',_AM_SMALLWORLD_HELP_HEADER_RECOMMENDED); - $xoopsTpl->assign('lang_hlp_recommended',_AM_SMALLWORLD_HELP_RECOMMENDED); - $xoopsTpl->assign('lang_hlp_installation_t',_AM_SMALLWORLD_HELP_HEADER_INSTALLATION); - $xoopsTpl->assign('lang_hlp_firsttime',_AM_SMALLWORLD_HELP_FIRSTTIMEINSTALL); - $xoopsTpl->assign('lang_hlp_hostedplatform_t',_AM_SMALLWORLD_HELP_HEADER_HOSTED_PLATFORM); - $xoopsTpl->assign('lang_hlp_hostedplatform',_AM_SMALLWORLD_HELP_HOSTED_PLATFORM); - $xoopsTpl->assign('lang_hlp_upgrading_t',_AM_SMALLWORLD_HELP_HEADER_UPGRADING); - $xoopsTpl->assign('lang_hlp_upgrading',_AM_SMALLWORLD_HELP_UPGRADING); - $xoopsTpl->assign('lang_hlp_faq_t',_AM_SMALLWORLD_HELP_HEADER_FAQ); - $xoopsTpl->assign('lang_hlp_commen1_t',_AM_SMALLWORLD_HELP_HEADER_COMMENPROBLEMS1); - $xoopsTpl->assign('lang_hlp_commen1',_AM_SMALLWORLD_HELP_COMMENPROBLEMS1); - $xoopsTpl->assign('lang_hlp_contacts_t',_AM_SMALLWORLD_HELP_HEADER_CONTACTS); - $xoopsTpl->assign('lang_hlp_otherhelp',_AM_SMALLWORLD_HELP_OTHERHELP); - $xoopsTpl->assign('installversion', $installversion); - $xoopsTpl->assign('installdate', $installdate); - $xoopsTpl->assign('installversion_status',$installCheck); - $xoopsTpl->assign('dateoffirstmessage', $dateoffirstmessage); - $xoopsTpl->assign('totalusers', $sumallusers); - $xoopsTpl->assign('averagemsgperday', $avgperday); - $xoopsTpl->display('db:smallworld_admin.html'); - - global $xoTheme; - //Check Language - $lang = $xoopsConfig['language']; - // GET various variables from language folder - if ( file_exists(XOOPS_ROOT_PATH.'/modules/smallworld/language/js/'.$lang.'/variables.js')) { - $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/language/'.$lang.'/js/variables.js'); - } else { - $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/language/english/js/variables.js'); - } - -$adminscript= <<<SCRIPT - var smallworld_url="XOOPS_URL/modules/smallworld/"; - //var $ = jQuery(); -SCRIPT; - $xoTheme->addStyleSheet('modules/smallworld/css/SmallworldAdmin.css'); - $xoTheme->addScript(XOOPS_URL.'/browse.php?Frameworks/jquery/jquery.js'); - $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery-ui-1.8.11.custom.js'); - $xoTheme->addScript('modules/smallworld/js/smallworld_tabs.js'); - $xoTheme->addScript('','',$adminscript); - $xoTheme->addScript(XOOPS_URL . '/modules/smallworld/js/jquery.form.js'); - $xoTheme->addScript(XOOPS_URL . '/modules/smallworld/js/jquery.countdown.js'); - if ( file_exists(XOOPS_ROOT_PATH.'/modules/smallworld/language/js/'.$lang.'/jquery.ui.datepicker-language.js')) { - $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/language/'.$lang.'/js/jquery.ui.datepicker-language.js'); - $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/language/'.$lang.'/js/jquery.countdown.js'); - } else { - $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/language/english/js/jquery.ui.datepicker-language.js'); - $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/language/english/js/jquery.countdown.js'); - } - $xoTheme->addScript(XOOPS_URL . '/modules/smallworld/js/adminsmallworld.js'); - -xoops_cp_footer(); -?> +$indexAdmin->addInfoBoxLine( _AM_SMALLWORLD_USERSTATS, _AM_SMALLWORLD_TOPCHATTERS_TODAY, $avgperday, 'Red'); +$indexAdmin->addInfoBoxLine( _AM_SMALLWORLD_USERSTATS, _AM_SMALLWORLD_TOPCHATTERS, $avgperday, 'Red'); +$indexAdmin->addInfoBoxLine( _AM_SMALLWORLD_USERSTATS, _AM_SMALLWORLD_TOPRATEDUSERS, $avgperday, 'Red'); +$indexAdmin->addInfoBoxLine( _AM_SMALLWORLD_USERSTATS, _AM_SMALLWORLD_BOTTOMRATEDUSERS, $avgperday, 'Red'); + + + + echo $indexAdmin->addNavigation('index.php'); + echo $indexAdmin->renderIndex(); + +include "admin_footer.php"; \ No newline at end of file Added: XoopsModules/smallworld/trunk/smallworld/admin/index0.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/admin/index0.php (rev 0) +++ XoopsModules/smallworld/trunk/smallworld/admin/index0.php 2012-01-18 05:24:13 UTC (rev 8750) @@ -0,0 +1,183 @@ +<?php +/** +* You may not change or alter any portion of this comment or credits +* of supporting developers from this source code or any supporting source code +* which is considered copyrighted (c) material of the original comment or credit authors. +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +* +* @copyright: The XOOPS Project http://sourceforge.net/projects/xoops/ +* @license: http://www.fsf.org/copyleft/gpl.html GNU public license +* @module: Smallworld +* @Author: Michael Albertsen (http://culex.dk) <cu...@cu...> +* @copyright: 2011 Culex +* @Repository path: $HeadURL: https://xoops.svn.sourceforge.net/svnroot/xoops/XoopsModules/smallworld/trunk/admin/index.php $ +* @Last committed: $Revision: 8707 $ +* @Last changed by: $Author: djculex $ +* @Last changed date: $Date: 2012-01-13 03:40:50 -0500 (Fri, 13 Jan 2012) $ +* @ID: $Id: index.php 8707 2012-01-13 08:40:50Z djculex $ +**/ + +require_once 'admin_header.php'; +require_once '../../../include/cp_header.php'; +include_once(XOOPS_ROOT_PATH."/modules/smallworld/include/functions.php"); +include_once(XOOPS_ROOT_PATH."/modules/smallworld/class/class_collector.php"); +require_once XOOPS_ROOT_PATH . '/class/template.php'; + + +if (!isset($xoopsTpl)) {$xoopsTpl = new XoopsTpl();} +$xoopsTpl->xoops_setCaching(0); + +xoops_cp_header(); + +$admin = new SmallworldAdmin(); +$index_admin = new ModuleAdmin(); +$tpl = new XoopsTpl(); + +$ai = array(); +$ani = array(); + +// --------------- First tab in admin --------------- +// Find oldest message and apply to template +$dateoffirstmessage = date('d-m-Y H:i:s',$admin->oldestMsg()); +// Get days number +$totaldays = $admin->CountDays(); +// get average messages per day +$avgperday = $admin->AvgMsgDay ($totaldays); +// 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 (); + +// Count members using Smallworld +$sumallusers = $admin->TotalUsers (); +// Find list of most active users (total) +$admin->mostactiveusers_allround(); +// Find list of most active users (24 hours) +$admin->mostactiveusers_today(); + +// FInd list of best rated users overall +$admin->topratedusers('up'); + +// FInd list of worst rated users overall +$admin->topratedusers('down'); + +$allusers_inspect = $admin->getAllUsers('yes'); + if (!empty($allusers_inspect)) { + foreach ($allusers_inspect as $data) { + $ai['id'] = $data['id']; + $ai['userid'] = $data['userid']; + $ai['username'] = $data['username']; + $ai['realname'] = $data['realname']; + $ai['userimage'] = smallworld_getAvatarLink ($data['userid'],$data['userimage']); + $ai['ip'] = $data['ip']; + $ai['complaint'] = $data['complaint']; + $ai['inspect_start'] = $data['inspect_start']; + $ai['inspect_stop'] = $data['inspect_stop']; + $ai['userinspect_timetotal'] = ($data['inspect_start'] + $data['inspect_stop'])-time(); + $xoopsTpl->append('allusersinspect', $ai); + } + } + $xoopsTpl->assign('allusersinspectcounter',count($ai)); + +$allusers_noinspect = $admin->getAllUsers('no'); + if (!empty($allusers_noinspect)) { + foreach ($allusers_noinspect as $data) { + $ani['id'] = $data['id']; + $ani['userid'] = $data['userid']; + $ani['username'] = $data['username']; + $ani['realname'] = $data['realname']; + $ani['userimage'] = smallworld_getAvatarLink ($data['userid'],$data['userimage']); + $ani['ip'] = $data['ip']; + $ani['complaint'] = $data['complaint']; + $ani['inspect_start'] = ''; + $ani['inspect_stop'] = ''; + $ani['userinspect_timetotal'] = ''; + $xoopsTpl->append('allusersnoinspect', $ani); + } + } + $xoopsTpl->assign('allusersnoinspectcounter',count($ani)); +// ---------------- end of tabs ---------------- // + +// template assignments + // tab titles + $xoopsTpl->assign('lang_statistics', _AM_SMALLWORLD_STATISTICS_TITLE); + $xoopsTpl->assign('lang_moduleinfo', _AM_SMALLWORLD_MODULEINFO); + $xoopsTpl->assign('lang_userstats', _AM_SMALLWORLD_USERSTATS); + $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('lang_dateoffirstmessage', _AM_SMALLWORLD_DATEOFFIRSTMESSAGE); + $xoopsTpl->assign('lang_totalusers', _AM_SMALLWORLD_TOTALUSERS); + $xoopsTpl->assign('lang_averagemsgperday', _AM_SMALLWORLD_AVERAGEMSGPERDAY); + $xoopsTpl->assign('lang_topchatters',_AM_SMALLWORLD_TOPCHATTERS); + $xoopsTpl->assign('lang_topchatterstoday',_AM_SMALLWORLD_TOPCHATTERS_TODAY); + $xoopsTpl->assign('lang_toprated',_AM_SMALLWORLD_TOPRATEDUSERS); + $xoopsTpl->assign('lang_bottomrated',_AM_SMALLWORLD_BOTTOMRATEDUSERS); + $xoopsTpl->assign('lang_useradmin',_AM_SMALLWORLD_USERADMIN_TITLE); + $xoopsTpl->assign('lang_help',_AM_SMALLWORLD_HELP); + $xoopsTpl->assign('lang_prefs',_MI_SYSTEM_ADMENU6); + $xoopsTpl->assign('lang_prefslink',"<a href='../../system/admin.php?fct=preferences&op=showmod&mod=".$xoopsModule ->getVar('mid')."'>"._MI_SYSTEM_ADMENU6."</a>"); + + // help file from admin + $xoopsTpl->assign('lang_hlp_about',_AM_SMALLWORLD_HELP_ABOUT); + $xoopsTpl->assign('lang_hlp_preface',_AM_SMALLWORLD_HELP_PREFACE); + $xoopsTpl->assign('lang_hlp_requirements_t',_AM_SMALLWORLD_HELP_HEADER_REQUIREMENTS); + $xoopsTpl->assign('lang_hlp_requirements',_AM_SMALLWORLD_HELP_REQUIREMENTS); + $xoopsTpl->assign('lang_hlp_recommended_t',_AM_SMALLWORLD_HELP_HEADER_RECOMMENDED); + $xoopsTpl->assign('lang_hlp_recommended',_AM_SMALLWORLD_HELP_RECOMMENDED); + $xoopsTpl->assign('lang_hlp_installation_t',_AM_SMALLWORLD_HELP_HEADER_INSTALLATION); + $xoopsTpl->assign('lang_hlp_firsttime',_AM_SMALLWORLD_HELP_FIRSTTIMEINSTALL); + $xoopsTpl->assign('lang_hlp_hostedplatform_t',_AM_SMALLWORLD_HELP_HEADER_HOSTED_PLATFORM); + $xoopsTpl->assign('lang_hlp_hostedplatform',_AM_SMALLWORLD_HELP_HOSTED_PLATFORM); + $xoopsTpl->assign('lang_hlp_upgrading_t',_AM_SMALLWORLD_HELP_HEADER_UPGRADING); + $xoopsTpl->assign('lang_hlp_upgrading',_AM_SMALLWORLD_HELP_UPGRADING); + $xoopsTpl->assign('lang_hlp_faq_t',_AM_SMALLWORLD_HELP_HEADER_FAQ); + $xoopsTpl->assign('lang_hlp_commen1_t',_AM_SMALLWORLD_HELP_HEADER_COMMENPROBLEMS1); + $xoopsTpl->assign('lang_hlp_commen1',_AM_SMALLWORLD_HELP_COMMENPROBLEMS1); + $xoopsTpl->assign('lang_hlp_contacts_t',_AM_SMALLWORLD_HELP_HEADER_CONTACTS); + $xoopsTpl->assign('lang_hlp_otherhelp',_AM_SMALLWORLD_HELP_OTHERHELP); + $xoopsTpl->assign('installversion', $installversion); + $xoopsTpl->assign('installdate', $installdate); + $xoopsTpl->assign('installversion_status',$installCheck); + $xoopsTpl->assign('dateoffirstmessage', $dateoffirstmessage); + $xoopsTpl->assign('totalusers', $sumallusers); + $xoopsTpl->assign('averagemsgperday', $avgperday); + $xoopsTpl->display('db:smallworld_admin.html'); + + global $xoTheme; + //Check Language + $lang = $xoopsConfig['language']; + // GET various variables from language folder + if ( file_exists(XOOPS_ROOT_PATH.'/modules/smallworld/language/js/'.$lang.'/variables.js')) { + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/language/'.$lang.'/js/variables.js'); + } else { + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/language/english/js/variables.js'); + } + +$adminscript= <<<SCRIPT + var smallworld_url="XOOPS_URL/modules/smallworld/"; + //var $ = jQuery(); +SCRIPT; + $xoTheme->addStyleSheet('modules/smallworld/css/SmallworldAdmin.css'); + $xoTheme->addScript(XOOPS_URL.'/browse.php?Frameworks/jquery/jquery.js'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery-ui-1.8.11.custom.js'); + $xoTheme->addScript('modules/smallworld/js/smallworld_tabs.js'); + $xoTheme->addScript('','',$adminscript); + $xoTheme->addScript(XOOPS_URL . '/modules/smallworld/js/jquery.form.js'); + $xoTheme->addScript(XOOPS_URL . '/modules/smallworld/js/jquery.countdown.js'); + if ( file_exists(XOOPS_ROOT_PATH.'/modules/smallworld/language/js/'.$lang.'/jquery.ui.datepicker-language.js')) { + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/language/'.$lang.'/js/jquery.ui.datepicker-language.js'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/language/'.$lang.'/js/jquery.countdown.js'); + } else { + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/language/english/js/jquery.ui.datepicker-language.js'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/language/english/js/jquery.countdown.js'); + } + $xoTheme->addScript(XOOPS_URL . '/modules/smallworld/js/adminsmallworld.js'); + +xoops_cp_footer(); +?> Modified: XoopsModules/smallworld/trunk/smallworld/admin/menu.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/admin/menu.php 2012-01-18 05:17:13 UTC (rev 8749) +++ XoopsModules/smallworld/trunk/smallworld/admin/menu.php 2012-01-18 05:24:13 UTC (rev 8750) @@ -24,6 +24,11 @@ $pathIcon32 = $module->getInfo('icons32'); $i = 1; +$adminmenu[$i]['title'] = _MI_SMALLWORLDMENU_INDEX; +$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."/home.png"; @@ -38,8 +43,13 @@ $adminmenu[$i]['link'] = "admin/statistics.php"; $adminmenu[$i]['icon'] = $pathIcon32."/stats.png"; +//$i++; +//$adminmenu[$i]['title'] = _MI_SMALLWORLDMENU_HELP; +//$adminmenu[$i]['link'] = "admin/help.php"; +//$adminmenu[$i]['icon'] = $pathIcon32."/help.png"; + $i++; -$adminmenu[$i]['title'] = _MI_SMALLWORLDMENU_HELP; -$adminmenu[$i]['link'] = "admin/help.php"; -$adminmenu[$i]['icon'] = $pathIcon32."/help.png"; -?> \ No newline at end of file + +$adminmenu[$i]["title"] =_MI_SMALLWORLDMENU_ABOUT; +$adminmenu[$i]["link"] = "admin/about.php"; +$adminmenu[$i]["icon"] = $pathIcon32.'/about.png'; \ No newline at end of file Modified: XoopsModules/smallworld/trunk/smallworld/admin/statistics.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/admin/statistics.php 2012-01-18 05:17:13 UTC (rev 8749) +++ XoopsModules/smallworld/trunk/smallworld/admin/statistics.php 2012-01-18 05:24:13 UTC (rev 8750) @@ -74,6 +74,6 @@ global $xoTheme; $xoTheme->addStyleSheet('modules/smallworld/css/SmallworldAdmin.css'); $xoTheme->addScript(XOOPS_URL . '/modules/smallworld/js/adminsmallworld.js'); - + xoops_cp_footer(); -?> +?> \ No newline at end of file Added: XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt =================================================================== --- XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt (rev 0) +++ XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt 2012-01-18 05:24:13 UTC (rev 8750) @@ -0,0 +1,7 @@ +Changelog + +------------- +v.1.00 +------------- +- Converted to XOOPS 2.5.x GUI (Mamba) +- Original development: (Culex) \ No newline at end of file Added: XoopsModules/smallworld/trunk/smallworld/docs/credits.txt =================================================================== --- XoopsModules/smallworld/trunk/smallworld/docs/credits.txt (rev 0) +++ XoopsModules/smallworld/trunk/smallworld/docs/credits.txt 2012-01-18 05:24:13 UTC (rev 8750) @@ -0,0 +1,4 @@ +Credits +=============== + +Originally developed by Michael Albertsen (http://culex.dk) <cu...@cu...> Added: XoopsModules/smallworld/trunk/smallworld/docs/install.txt =================================================================== --- XoopsModules/smallworld/trunk/smallworld/docs/install.txt (rev 0) +++ XoopsModules/smallworld/trunk/smallworld/docs/install.txt 2012-01-18 05:24:13 UTC (rev 8750) @@ -0,0 +1,6 @@ +INSTALL/UNISTALL +================= + +No special measures necessary, follow the standard installation process \x96 extract the module folder into the ../modules directory. Install the module through Admin -> System Module -> Modules. + +Detailed instructions on installing modules are available in the XOOPS Operations Manual: http://goo.gl/adT2i \ No newline at end of file Added: XoopsModules/smallworld/trunk/smallworld/docs/lang_diff.txt =================================================================== --- XoopsModules/smallworld/trunk/smallworld/docs/lang_diff.txt (rev 0) +++ XoopsModules/smallworld/trunk/smallworld/docs/lang_diff.txt 2012-01-18 05:24:13 UTC (rev 8750) @@ -0,0 +1,14 @@ +LANGUAGE DIFFERENCES +===================== + +Below are language differences from a version to next version. + +Legend : ++ Added +- Removed +* Modified + +============= +1.0 +============= +Original Version \ No newline at end of file Added: XoopsModules/smallworld/trunk/smallworld/docs/licence.txt =================================================================== --- XoopsModules/smallworld/trunk/smallworld/docs/licence.txt (rev 0) +++ XoopsModules/smallworld/trunk/smallworld/docs/licence.txt 2012-01-18 05:24:13 UTC (rev 8750) @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + <signature of Ty Coon>, 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. Added: XoopsModules/smallworld/trunk/smallworld/docs/readme.txt =================================================================== --- XoopsModules/smallworld/trunk/smallworld/docs/readme.txt (rev 0) +++ XoopsModules/smallworld/trunk/smallworld/docs/readme.txt 2012-01-18 05:24:13 UTC (rev 8750) @@ -0,0 +1,10 @@ +Smallworld is a Social Network system for XOOPS. + +Inspired by the Srinivas Tamada tutorials on Facebook scripting. +The base system has been re-written, adapted, and heavily expanded for XOOPS by Culex The module is featuring +like/dislike, bookmarking, wall system, image gallery, and is using XIM if installed. The admin side is featuring +deleting users, banning users based on time. A countdown is shown on user side to when it's back. And many more features. +It is fully supported by XOOPS version 2.5.0 and higher. + +Smallworld is released under the terms of the GNU General Public License (GPL) and is free to use and modify. +It is free to redistribute as long as you abide by the distribution terms of the GPL. \ No newline at end of file Added: XoopsModules/smallworld/trunk/smallworld/language/danish/admin.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/language/danish/admin.php (rev 0) +++ XoopsModules/smallworld/trunk/smallworld/language/danish/admin.php 2012-01-18 05:24:13 UTC (rev 8750) @@ -0,0 +1,123 @@ +<?php +/** +* You may not change or alter any portion of this comment or credits +* of supporting developers from this source code or any supporting source code +* which is considered copyrighted (c) material of the original comment or credit authors. +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +* +* @copyright: The XOOPS Project http://sourceforge.net/projects/xoops/ +* @license: http://www.fsf.org/copyleft/gpl.html GNU public license +* @module: Smallworld +* @Author: Michael Albertsen (http://culex.dk) <cu...@cu...> +* @copyright: 2011 Culex +* @Repository path: $HeadURL: https://xoops.svn.sourceforge.net/svnroot/xoops/XoopsModules/smallworld/trunk/language/english/admin.php $ +* @Last committed: $Revision: 8707 $ +* @Last changed by: $Author: djculex $ +* @Last changed date: $Date: 2012-01-13 03:40:50 -0500 (Fri, 13 Jan 2012) $ +* @ID: $Id: admin.php 8707 2012-01-13 08:40:50Z djculex $ +**/ + + +// English language file for Smallworld Admin.php + +// tab titles + define('_AM_SMALLWORLD_ADMINMESSAGESEND','Post to all'); + define('_AM_SMALLWORLD_LOGSMAINTNANCE','Database maintenance'); + +// tab one in admin section +define('_AM_SMALLWORLD_MODULEINSTALL','Module version installed'); +define('_AM_SMALLWORLD_INSTALLDATE','Module installed on'); +define('_AM_SMALLWORLD_DATEOFFIRSTMESSAGE','Date of the oldest message'); +define('_AM_SMALLWORLD_TOTALUSERS','Total members using Smallworld'); +define('_AM_SMALLWORLD_AVERAGEMSGPERDAY','Average messages per day'); +define('_AM_SMALLWORLD_TOPCHATTERS','Most active users overall'); +define('_AM_SMALLWORLD_TOPCHATTERS_TODAY','Most active users in last 24 hours'); +define('_AM_SMALLWORLD_TOPRATEDUSERS','Higest rated users'); +define('_AM_SMALLWORLD_BOTTOMRATEDUSERS','Worst rated users'); +define('_AM_SMALLWORLD_STATISTICS_TITLE','Smallworld Statistics'); +define('_AM_SMALLWORLD_MODULEINFO','Module info'); +define('_AM_SMALLWORLD_USERSTATS','User stats'); +define('_AM_SMALLWORLD_NONEYET','No messages in database'); +define('_AM_SMALLWORLD_NO','no'); +define('_AM_SMALLWORLD_THEREARE','There are'); +define('_AM_SMALLWORLD_UPDATE_STATUS','Status of your Smallworld version:'); + +// tab two in admin section + +// tab three in admin section +define('_AM_SMALLWORLD_USERADMIN_TITLE','User administration'); +define('_AM_SMALLWORLD_USERADMININSPECT_TITLE','Users under admin inspection'); +define('_AM_SMALLWORLD_USERADMINNOINSPECT_TITLE','Normal users'); +define("_AM_SMALLWORLD_TITLE_IMAGE","User image"); +define("_AM_SMALLWORLD_TITLE_USERNAME","User name"); +define("_AM_SMALLWORLD_TITLE_REALNAME","Real name"); +define("_AM_SMALLWORLD_TITLE_IP","Ip"); +define("_AM_SMALLWORLD_TITLE_COMPLAINTS","Complaints received"); +define("_AM_SMALLWORLD_TITLE_INSPECTTIME","Inspection time"); +define("_AM_SMALLWORLD_TITLE_INSPECTADD","Add inspection time"); +define("_AM_SMALLWORLD_TITLE_DELETEUSER","Delete user account"); +define('_AM_SMALLWORLD_TITLE_INSPECTDELETE','Clear inspection time'); +define('_AM_SMALLWORLD_ADDTIMEDROPDOWN_MINUTES',' Minutes'); +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_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_HELP','Help'); +define('_AM_SMALLWORLD_ADMIN_USERDELETEDALERT',' and associated folders, files and table rows has been deleted'); + +//Help section +define('_AM_SMALLWORLD_HELP_ABOUT','About Smallworld'); +define('_AM_SMALLWORLD_HELP_PREFACE','Smallworld is a Social Network system. Inspired by the Srinivas Tamada tutorials on fecebook scripting. The base system has been re-written, adapted, and heavily expanded for XOOPS by Culex<br/>The module is featuring like/dislike, bookmarking, wall system, image gallery, and is using XIM if installed. The admin side is featuring deleting users, banning users based on time. A countdown is shown on user side to when it\'s back.. And many more features. It is fully supported by XOOPS version 2.5.0 and higher.<br/>Smallworld is released under the terms of the <a href="http://www.gnu.org/copyleft/gpl.html" target="_blank">GNU General Public License (GPL)</a> and is free to use and modify. It is free to redistribute as long as you abide by the distribution terms of the GPL.'); +define('_AM_SMALLWORLD_HELP_HEADER_REQUIREMENTS','Requirements'); +define('_AM_SMALLWORLD_HELP_REQUIREMENTS','<ul class="help"> + <li>WWW Server (<a href="http://www.apache.org/" target="_blank">Apache</a>, IIS, Roxen, etc)</li> + <li><a href="http://www.xoops.org/" target="_blank">XOOPS</a> 2.4.0 or higher as Smallworld uses preloads</li> + <li><a href="http://www.php.net/" target="_blank">PHP</a> 5.2.0 or higher.</li> + <li><a href="http://www.mysql.com/" target="_blank">MySQL</a> 4 or higher (5 or higher recommended)</li> + </ul>'); +define('_AM_SMALLWORLD_HELP_HEADER_RECOMMENDED','Recommended for testing Smallworld'); +define('_AM_SMALLWORLD_HELP_RECOMMENDED','<ul class="help"> + <li>Browser <a href="http://www.mozilla.com" target"_blank">Firefox</a> and the Firefox plugin <a href="https://addons.mozilla.org/en-US/firefox/downloads/latest/1843/addon-1843-latest.xpi" target="_blank">FireBug plugin (latest version)</a></li> + </ul>'); +define('_AM_SMALLWORLD_HELP_HEADER_INSTALLATION','How to install'); +define('_AM_SMALLWORLD_HELP_FIRSTTIMEINSTALL','<ul class="help"> + <li>Check to see if the downloaded Smallworld version is the latest released version.</li> + <li>Turn cookie and JavaScript of your browser on.</li> + </ul>'); + +define('_AM_SMALLWORLD_HELP_HEADER_HOSTED_PLATFORM','Installing on a hosted platform'); +define('_AM_SMALLWORLD_HELP_HOSTED_PLATFORM','<ul class="help"> + <li>Upload the unzipped folder Smallworld to your module directory.</li> + <li>Install using XOOPS module install as any other module installation.</li> + <li>Make the block visible for the user groups you want to see the block (admin/moderators etc etc).</li> + </ul>'); +define('_AM_SMALLWORLD_HELP_HEADER_UPGRADING','Upgrading from a previous version'); +define('_AM_SMALLWORLD_HELP_UPGRADING','<ul class="help"> + <li>Make sure you are using newest version</li> + <li>Read the readme.txt in archive</li> + <li>Maybe do a backup of your tables</li> + </ul>'); +define('_AM_SMALLWORLD_HELP_HEADER_FAQ','Problem solving'); +define('_AM_SMALLWORLD_HELP_HEADER_COMMENPROBLEMS1','I get blank page, can\'t click username, The block does not show.......'); +define('_AM_SMALLWORLD_HELP_COMMENPROBLEMS1','<ul class="help"> + <li>Make su... [truncated message content] |
From: <dj...@us...> - 2012-01-20 16:59:13
|
Revision: 8759 http://xoops.svn.sourceforge.net/xoops/?rev=8759&view=rev Author: djculex Date: 2012-01-20 16:59:04 +0000 (Fri, 20 Jan 2012) Log Message: ----------- Admin changes + applying statistics on index.php page thus deleting statistics.php Modified Paths: -------------- XoopsModules/smallworld/trunk/smallworld/admin/about.php XoopsModules/smallworld/trunk/smallworld/admin/admin_footer.php XoopsModules/smallworld/trunk/smallworld/admin/admin_header.php XoopsModules/smallworld/trunk/smallworld/admin/index.php XoopsModules/smallworld/trunk/smallworld/admin/index0.php XoopsModules/smallworld/trunk/smallworld/admin/menu.php XoopsModules/smallworld/trunk/smallworld/class/adminclass.php XoopsModules/smallworld/trunk/smallworld/language/danish/admin.php XoopsModules/smallworld/trunk/smallworld/language/danish/main.php XoopsModules/smallworld/trunk/smallworld/language/danish/modinfo.php XoopsModules/smallworld/trunk/smallworld/language/english/admin.php XoopsModules/smallworld/trunk/smallworld/language/english/modinfo.php Removed Paths: ------------- XoopsModules/smallworld/trunk/smallworld/admin/index.html XoopsModules/smallworld/trunk/smallworld/admin/statistics.php Property Changed: ---------------- XoopsModules/smallworld/trunk/smallworld/admin/about.php XoopsModules/smallworld/trunk/smallworld/admin/admin_footer.php XoopsModules/smallworld/trunk/smallworld/admin/help.php XoopsModules/smallworld/trunk/smallworld/admin/index0.php XoopsModules/smallworld/trunk/smallworld/admin/moduleinfo.php XoopsModules/smallworld/trunk/smallworld/admin/useradmin.php XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt XoopsModules/smallworld/trunk/smallworld/docs/credits.txt XoopsModules/smallworld/trunk/smallworld/docs/install.txt XoopsModules/smallworld/trunk/smallworld/docs/lang_diff.txt XoopsModules/smallworld/trunk/smallworld/docs/licence.txt XoopsModules/smallworld/trunk/smallworld/docs/readme.txt XoopsModules/smallworld/trunk/smallworld/language/danish/admin.php XoopsModules/smallworld/trunk/smallworld/language/danish/help/help.html XoopsModules/smallworld/trunk/smallworld/language/danish/help/index.html XoopsModules/smallworld/trunk/smallworld/language/danish/mailTpl/index.html XoopsModules/smallworld/trunk/smallworld/language/danish/mailTpl/mail_attencionneeded.html XoopsModules/smallworld/trunk/smallworld/language/danish/mailTpl/mail_complaint.html XoopsModules/smallworld/trunk/smallworld/language/danish/mailTpl/mail_newcomment.html XoopsModules/smallworld/trunk/smallworld/language/danish/mailTpl/mail_register.html XoopsModules/smallworld/trunk/smallworld/language/danish/main.php XoopsModules/smallworld/trunk/smallworld/language/danish/modinfo.php XoopsModules/smallworld/trunk/smallworld/language/english/help/help.html XoopsModules/smallworld/trunk/smallworld/language/english/help/index.html XoopsModules/smallworld/trunk/smallworld/templates/admin_help.html XoopsModules/smallworld/trunk/smallworld/templates/admin_moduleinfo.html XoopsModules/smallworld/trunk/smallworld/templates/admin_statistics.html XoopsModules/smallworld/trunk/smallworld/templates/admin_useradmin.html Modified: XoopsModules/smallworld/trunk/smallworld/admin/about.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/admin/about.php 2012-01-20 08:52:39 UTC (rev 8758) +++ XoopsModules/smallworld/trunk/smallworld/admin/about.php 2012-01-20 16:59:04 UTC (rev 8759) @@ -1,29 +1,36 @@ <?php /** - * Birthday module - * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting source code - * which is considered copyrighted (c) material of the original comment or credit authors. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * @copyright The XOOPS Project (http://www.xoops.org) - * @license GNU GPL (http://www.gnu.org/licenses/gpl-2.0.html/) - * @package birthday - * @since 2.5.0 - * @author XOOPS Module Team - * @version $Id $ - **/ +* You may not change or alter any portion of this comment or credits +* of supporting developers from this source code or any supporting source code +* which is considered copyrighted (c) material of the original comment or credit authors. +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +* +* @copyright: The XOOPS Project http://sourceforge.net/projects/xoops/ +* @license: http://www.fsf.org/copyleft/gpl.html GNU public license +* @module: Smallworld +* @Author: Michael Albertsen (http://culex.dk) <cu...@cu...> +* @copyright: 2011 Culex +* @Repository path: $HeadURL$ +* @Last committed: $Revision$ +* @Last changed by: $Author$ +* @Last changed date: $Date$ +* @ID: $Id$ +**/ include_once dirname(__FILE__) . '/admin_header.php'; xoops_cp_header(); +global $xoTheme; +$xoTheme->addStylesheet(XOOPS_URL . '/modules/smallworld/SmallworldAdmin.css'); +$xoTheme->addScript(XOOPS_URL . '/modules/smallworld/js/adminsmallworld.js'); $aboutAdmin = new ModuleAdmin(); echo $aboutAdmin->addNavigation('about.php'); -echo $aboutAdmin->renderAbout('WKFZBRBGMYKCA', false); +echo $aboutAdmin->renderAbout('', false); + + include 'admin_footer.php'; \ No newline at end of file Property changes on: XoopsModules/smallworld/trunk/smallworld/admin/about.php ___________________________________________________________________ Added: svn:keywords + HeadURL Revision Author Date ID Modified: XoopsModules/smallworld/trunk/smallworld/admin/admin_footer.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/admin/admin_footer.php 2012-01-20 08:52:39 UTC (rev 8758) +++ XoopsModules/smallworld/trunk/smallworld/admin/admin_footer.php 2012-01-20 16:59:04 UTC (rev 8759) @@ -7,12 +7,16 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * -* @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ -* @license http://www.fsf.org/copyleft/gpl.html GNU public license -* @package modules -* @subpackage Small World -* @since 1.0.0 -* @author Culex - homepage.: http://culex.dk & email.: cu...@cu... +* @copyright: The XOOPS Project http://sourceforge.net/projects/xoops/ +* @license: http://www.fsf.org/copyleft/gpl.html GNU public license +* @module: Smallworld +* @Author: Michael Albertsen (http://culex.dk) <cu...@cu...> +* @copyright: 2011 Culex +* @Repository path: $HeadURL$ +* @Last committed: $Revision$ +* @Last changed by: $Author$ +* @Last changed date: $Date$ +* @ID: $Id$ **/ echo "<div class='adminfooter'>\n" Property changes on: XoopsModules/smallworld/trunk/smallworld/admin/admin_footer.php ___________________________________________________________________ Added: svn:keywords + HeadURL Revision Author Date ID Modified: XoopsModules/smallworld/trunk/smallworld/admin/admin_header.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/admin/admin_header.php 2012-01-20 08:52:39 UTC (rev 8758) +++ XoopsModules/smallworld/trunk/smallworld/admin/admin_header.php 2012-01-20 16:59:04 UTC (rev 8759) @@ -1,28 +1,28 @@ <?php /** - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting source code - * which is considered copyrighted (c) material of the original comment or credit authors. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * @copyright : The XOOPS Project http://sourceforge.net/projects/xoops/ - * @license : http://www.fsf.org/copyleft/gpl.html GNU public license - * @module : Smallworld - * @Author : Michael Albertsen (http://culex.dk) <cu...@cu...> - * @copyright : 2011 Culex - * @Repository path: $HeadURL$ - * @Last committed: $Revision$ - * @Last changed by: $Author$ - * @Last changed date: $Date$ - * @ID : $Id$ - **/ +* You may not change or alter any portion of this comment or credits +* of supporting developers from this source code or any supporting source code +* which is considered copyrighted (c) material of the original comment or credit authors. +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +* +* @copyright: The XOOPS Project http://sourceforge.net/projects/xoops/ +* @license: http://www.fsf.org/copyleft/gpl.html GNU public license +* @module: Smallworld +* @Author: Michael Albertsen (http://culex.dk) <cu...@cu...> +* @copyright: 2011 Culex +* @Repository path: $HeadURL$ +* @Last committed: $Revision$ +* @Last changed by: $Author$ +* @Last changed date: $Date$ +* @ID: $Id$ +**/ $path = dirname(dirname(dirname(dirname(__FILE__)))); include_once $path . '/mainfile.php'; include_once $path . '/include/cp_functions.php'; -include_once $path . '/class/xoopsmodule.php'; +include_once $path . '/kernel/module.php'; require_once $path . '/include/cp_header.php'; global $xoopsModule; Property changes on: XoopsModules/smallworld/trunk/smallworld/admin/help.php ___________________________________________________________________ Added: svn:keywords + HeadURL Revision Author Date ID Deleted: XoopsModules/smallworld/trunk/smallworld/admin/index.html =================================================================== --- XoopsModules/smallworld/trunk/smallworld/admin/index.html 2012-01-20 08:52:39 UTC (rev 8758) +++ XoopsModules/smallworld/trunk/smallworld/admin/index.html 2012-01-20 16:59:04 UTC (rev 8759) @@ -1 +0,0 @@ - <script>history.go(-1);</script> \ No newline at end of file Modified: XoopsModules/smallworld/trunk/smallworld/admin/index.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/admin/index.php 2012-01-20 08:52:39 UTC (rev 8758) +++ XoopsModules/smallworld/trunk/smallworld/admin/index.php 2012-01-20 16:59:04 UTC (rev 8759) @@ -20,7 +20,7 @@ **/ -require_once dirname(dirname(dirname(dirname(__FILE__)))) . '/include/cp_header.php'; +//require_once dirname(dirname(dirname(dirname(__FILE__)))) . '/include/cp_header.php'; include_once dirname(__FILE__) . '/admin_header.php'; xoops_cp_header(); @@ -29,54 +29,93 @@ $admin = new SmallworldAdmin(); -$tpl = new XoopsTpl(); -$ai = array(); -$ani = array(); - -// --------------- First tab in admin --------------- // Find oldest message and apply to template $dateoffirstmessage = date('d-m-Y H:i:s',$admin->oldestMsg()); + // Get days number $totaldays = $admin->CountDays(); // get average messages per day $avgperday = $admin->AvgMsgDay ($totaldays); -// XIM version number +// Smallworld version number $installversion = $admin->ModuleInstallVersion (); -// XIM install date +// Smallworld install date $installdate = $admin->ModuleInstallDate (); -//check current version of XIM, return desc,link,version if new available +//check current version of Smallworld, return desc,link,version if new available $installCheck = $admin->doCheckUpdate (); -// Count members using XIM +// Count members using Smallworld $sumallusers = $admin->TotalUsers (); // Find list of most active users (total) -$admin->mostactiveusers_allround(); +$maAllround = $admin->mostactiveusers_allround(); + $ma = "<table class='smallworldadmin'><tr>"; + $ma .= "<td><b>"._AM_SMALLWORLD_STATS_POS."</b></td><td><b>"._AM_SMALLWORLD_STATS_IMG."</b></td><td><b>"._AM_SMALLWORLD_STATS_AMOUNT."</b></td><td><b>"._AM_SMALLWORLD_STATS_NAME."</b></td></tr>"; + $i = 1; + while ($i < count($maAllround)-1) { + $ma .= vsprintf('<tr><td>%s</td>',array($maAllround['counter'][$i])); + $ma .= vsprintf('<td>%s</td>',array($maAllround['img'][$i])); + $ma .= vsprintf('<td>%s</td>',array($maAllround['cnt'][$i])); + $ma .= vsprintf('<td>%s</td></tr>',array($maAllround['from'][$i])); + $i++; + } + $ma .= "</tr></table>"; + // Find list of most active users (24 hours) -$admin->mostactiveusers_today(); +$maToday = $admin->mostactiveusers_today(); + $mat = "<table class='smallworldadmin'><tr>"; + $mat .= "<td><b>"._AM_SMALLWORLD_STATS_POS."</b></td><td><b>"._AM_SMALLWORLD_STATS_IMG."</b></td><td><b>"._AM_SMALLWORLD_STATS_AMOUNT."</b></td><td><b>"._AM_SMALLWORLD_STATS_NAME."</b></td></tr>"; + $i = 1; + while ($i < count($maToday)-1) { + $mat .= vsprintf('<tr><td>%s</td>',array($maToday['counter'][$i])); + $mat .= vsprintf('<td>%s</td>',array($maToday['img'][$i])); + $mat .= vsprintf('<td>%s</td>',array($maToday['cnt'][$i])); + $mat .= vsprintf('<td>%s</td></tr>',array($maToday['from'][$i])); + $i++; + } + $mat .= "</tr></table>"; // FInd list of best rated users overall -$admin->topratedusers('up'); +$topusers = $admin->topratedusers('up'); + $top = "<table class='smallworldadmin'><tr>"; + $top .= "<td><b>"._AM_SMALLWORLD_STATS_POS."</b></td><td><b>"._AM_SMALLWORLD_STATS_IMG."</b></td><td><b>"._AM_SMALLWORLD_STATS_AMOUNT."</b></td><td><b>"._AM_SMALLWORLD_STATS_NAME."</b></td></tr>"; + $i = 1; + while ($i < count($topusers)-1) { + $top .= vsprintf('<tr><td>%s</td>',array($topusers['counter'][$i])); + $top .= vsprintf('<td>%s</td>',array($topusers['img'][$i])); + $top .= vsprintf('<td>%s</td>',array($topusers['cnt'][$i])); + $top .= vsprintf('<td>%s</td></tr>',array($topusers['user'][$i])); + $i++; + } + $top .= "</tr></table>"; // FInd list of worst rated users overall -$admin->topratedusers('down'); +$lowusers = $admin->topratedusers('down'); + $low = "<table class='smallworldadmin'><tr>"; + $low .= "<td><b>"._AM_SMALLWORLD_STATS_POS."</b></td><td><b>"._AM_SMALLWORLD_STATS_IMG."</b></td><td><b>"._AM_SMALLWORLD_STATS_AMOUNT."</b></td><td><b>"._AM_SMALLWORLD_STATS_NAME."</b></td></tr>"; + $i = 1; + while ($i < count($lowusers)-1) { + $low .= vsprintf('<tr><td>%s</td>',array($lowusers['counter'][$i])); + $low .= vsprintf('<td>%s</td>',array($lowusers['img'][$i])); + $low .= vsprintf('<td>%s</td>',array($lowusers['cnt'][$i])); + $low .= vsprintf('<td>%s</td></tr>',array($lowusers['user'][$i])); + $i++; + } + $low .= "</tr></table>"; -$indexAdmin->addInfoBox( _AM_SMALLWORLD_USERSTATS); -//$indexAdmin->addInfoBoxLine( _AM_XTUBE_MINDEX_VIDEOSUMMARY, "<infolabel>" .<{$lang_userstats}>. "</infolabel>", index.php); -$indexAdmin->addInfoBoxLine( _AM_SMALLWORLD_USERSTATS, _AM_SMALLWORLD_DATEOFFIRSTMESSAGE, $dateoffirstmessage, 'Green'); -$indexAdmin->addInfoBoxLine( _AM_SMALLWORLD_USERSTATS, _AM_SMALLWORLD_TOTALUSERS, $totalusers, 'Red'); -$indexAdmin->addInfoBoxLine( _AM_SMALLWORLD_USERSTATS, _AM_SMALLWORLD_AVERAGEMSGPERDAY, $avgperday, 'Red'); +$indexAdmin->addInfoBox(_AM_SMALLWORLD_USERSTATS); +$indexAdmin->addInfoBoxLine( _AM_SMALLWORLD_USERSTATS, "<span style='smallworldadmin_tab_container'><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, "<p class='smallworldadmin'>"._AM_SMALLWORLD_AVERAGEMSGPERDAY." : %s</p>", $avgperday, 'Red','default'); +$indexAdmin->addInfoBoxLine( _AM_SMALLWORLD_USERSTATS, "<p class='smallworldadmin'>"._AM_SMALLWORLD_TOPCHATTERS_TODAY." : %s</p>", $mat, 'Red','default'); +$indexAdmin->addInfoBoxLine( _AM_SMALLWORLD_USERSTATS, "<p class='smallworldadmin'>"._AM_SMALLWORLD_TOPCHATTERS." : %s</p>", $ma, 'Red','default'); +$indexAdmin->addInfoBoxLine( _AM_SMALLWORLD_USERSTATS, "<p class='smallworldadmin'>"._AM_SMALLWORLD_TOPRATEDUSERS." : %s</p>", $top, 'Red','default'); +$indexAdmin->addInfoBoxLine( _AM_SMALLWORLD_USERSTATS, "<p class='smallworldadmin'>"._AM_SMALLWORLD_BOTTOMRATEDUSERS." : %s</p></span>", $low, 'Red','default'); -$indexAdmin->addInfoBoxLine( _AM_SMALLWORLD_USERSTATS, _AM_SMALLWORLD_TOPCHATTERS_TODAY, $avgperday, 'Red'); -$indexAdmin->addInfoBoxLine( _AM_SMALLWORLD_USERSTATS, _AM_SMALLWORLD_TOPCHATTERS, $avgperday, 'Red'); -$indexAdmin->addInfoBoxLine( _AM_SMALLWORLD_USERSTATS, _AM_SMALLWORLD_TOPRATEDUSERS, $avgperday, 'Red'); -$indexAdmin->addInfoBoxLine( _AM_SMALLWORLD_USERSTATS, _AM_SMALLWORLD_BOTTOMRATEDUSERS, $avgperday, 'Red'); - echo $indexAdmin->addNavigation('index.php'); echo $indexAdmin->renderIndex(); - -include "admin_footer.php"; \ No newline at end of file +include "admin_footer.php"; +?> \ No newline at end of file Modified: XoopsModules/smallworld/trunk/smallworld/admin/index0.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/admin/index0.php 2012-01-20 08:52:39 UTC (rev 8758) +++ XoopsModules/smallworld/trunk/smallworld/admin/index0.php 2012-01-20 16:59:04 UTC (rev 8759) @@ -12,11 +12,11 @@ * @module: Smallworld * @Author: Michael Albertsen (http://culex.dk) <cu...@cu...> * @copyright: 2011 Culex -* @Repository path: $HeadURL: https://xoops.svn.sourceforge.net/svnroot/xoops/XoopsModules/smallworld/trunk/admin/index.php $ -* @Last committed: $Revision: 8707 $ -* @Last changed by: $Author: djculex $ -* @Last changed date: $Date: 2012-01-13 03:40:50 -0500 (Fri, 13 Jan 2012) $ -* @ID: $Id: index.php 8707 2012-01-13 08:40:50Z djculex $ +* @Repository path: $HeadURL$ +* @Last committed: $Revision$ +* @Last changed by: $Author$ +* @Last changed date: $Date$ +* @ID: $Id$ **/ require_once 'admin_header.php'; Property changes on: XoopsModules/smallworld/trunk/smallworld/admin/index0.php ___________________________________________________________________ Added: svn:keywords + HeadURL Revision Author Date ID Modified: XoopsModules/smallworld/trunk/smallworld/admin/menu.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/admin/menu.php 2012-01-20 08:52:39 UTC (rev 8758) +++ XoopsModules/smallworld/trunk/smallworld/admin/menu.php 2012-01-20 16:59:04 UTC (rev 8759) @@ -18,6 +18,7 @@ * @Last changed date: $Date$ * @ID: $Id$ **/ + $dirname = basename(dirname(dirname(__FILE__))); $module_handler = xoops_gethandler('module'); $module = $module_handler->getByDirname($dirname); @@ -31,7 +32,7 @@ $i++; $adminmenu[$i]['title'] = _MI_SMALLWORLD_ADMENU; $adminmenu[$i]['link'] = 'admin/moduleinfo.php'; -$adminmenu[$i]['icon'] = $pathIcon32."/home.png"; +$adminmenu[$i]['icon'] = $pathIcon32."/update.png"; $i++; $adminmenu[$i]['title'] = _MI_SMALLWORLDMENU_USERADMIN; @@ -39,17 +40,6 @@ $adminmenu[$i]['icon'] = $pathIcon32."/administration.png"; $i++; -$adminmenu[$i]['title'] = _MI_SMALLWORLDMENU_STATS; -$adminmenu[$i]['link'] = "admin/statistics.php"; -$adminmenu[$i]['icon'] = $pathIcon32."/stats.png"; - -//$i++; -//$adminmenu[$i]['title'] = _MI_SMALLWORLDMENU_HELP; -//$adminmenu[$i]['link'] = "admin/help.php"; -//$adminmenu[$i]['icon'] = $pathIcon32."/help.png"; - -$i++; - $adminmenu[$i]["title"] =_MI_SMALLWORLDMENU_ABOUT; $adminmenu[$i]["link"] = "admin/about.php"; $adminmenu[$i]["icon"] = $pathIcon32.'/about.png'; \ No newline at end of file Property changes on: XoopsModules/smallworld/trunk/smallworld/admin/moduleinfo.php ___________________________________________________________________ Added: svn:keywords + HeadURL Revision Author Date ID Deleted: XoopsModules/smallworld/trunk/smallworld/admin/statistics.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/admin/statistics.php 2012-01-20 08:52:39 UTC (rev 8758) +++ XoopsModules/smallworld/trunk/smallworld/admin/statistics.php 2012-01-20 16:59:04 UTC (rev 8759) @@ -1,79 +0,0 @@ -<?php -/** -* You may not change or alter any portion of this comment or credits -* of supporting developers from this source code or any supporting source code -* which is considered copyrighted (c) material of the original comment or credit authors. -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -* -* @copyright: The XOOPS Project http://sourceforge.net/projects/xoops/ -* @license: http://www.fsf.org/copyleft/gpl.html GNU public license -* @module: Smallworld -* @Author: Michael Albertsen (http://culex.dk) <cu...@cu...> -* @copyright: 2011 Culex -* @Repository path: $HeadURL$ -* @Last committed: $Revision$ -* @Last changed by: $Author$ -* @Last changed date: $Date$ -* @ID: $Id$ -**/ - -require_once 'admin_header.php'; -require_once '../../../include/cp_header.php'; -include_once(XOOPS_ROOT_PATH."/modules/smallworld/include/functions.php"); -include_once(XOOPS_ROOT_PATH."/modules/smallworld/class/class_collector.php"); - -require_once XOOPS_ROOT_PATH . '/class/template.php'; -if (!isset($xoopsTpl)) {$xoopsTpl = new XoopsTpl();} -$xoopsTpl->xoops_setCaching(0); - -xoops_cp_header(); - -$admin = new SmallworldAdmin(); -$tpl = new XoopsTpl(); - -$ai = array(); -$ani = array(); - -// Count members using Smallworld -$sumallusers = $admin->TotalUsers (); -// Find list of most active users (total) -$admin->mostactiveusers_allround(); -// Find list of most active users (24 hours) -$admin->mostactiveusers_today(); -// Get days number -$totaldays = $admin->CountDays(); -// Find oldest message and apply to template -$dateoffirstmessage = date('d-m-Y H:i:s',$admin->oldestMsg()); -// get average messages per day -$avgperday = $admin->AvgMsgDay ($totaldays); -// FInd list of best rated users overall -$admin->topratedusers('up'); - -// FInd list of worst rated users overall -$admin->topratedusers('down'); - -// template assignments - // tab titles - $xoopsTpl->assign('lang_statistics', _AM_SMALLWORLD_STATISTICS_TITLE); - - // help file from admin - $xoopsTpl->assign('lang_dateoffirstmessage', _AM_SMALLWORLD_DATEOFFIRSTMESSAGE); - $xoopsTpl->assign('lang_totalusers', _AM_SMALLWORLD_TOTALUSERS); - $xoopsTpl->assign('lang_averagemsgperday', _AM_SMALLWORLD_AVERAGEMSGPERDAY); - $xoopsTpl->assign('lang_topchatters',_AM_SMALLWORLD_TOPCHATTERS); - $xoopsTpl->assign('lang_topchatterstoday',_AM_SMALLWORLD_TOPCHATTERS_TODAY); - $xoopsTpl->assign('lang_toprated',_AM_SMALLWORLD_TOPRATEDUSERS); - $xoopsTpl->assign('lang_bottomrated',_AM_SMALLWORLD_BOTTOMRATEDUSERS); - $xoopsTpl->assign('dateoffirstmessage', $dateoffirstmessage); - $xoopsTpl->assign('totalusers', $sumallusers); - $xoopsTpl->assign('averagemsgperday', $avgperday); - $xoopsTpl->display(XOOPS_ROOT_PATH .'/modules/smallworld/templates/admin_statistics.html'); - - global $xoTheme; - $xoTheme->addStyleSheet('modules/smallworld/css/SmallworldAdmin.css'); - $xoTheme->addScript(XOOPS_URL . '/modules/smallworld/js/adminsmallworld.js'); - -xoops_cp_footer(); -?> \ No newline at end of file Property changes on: XoopsModules/smallworld/trunk/smallworld/admin/useradmin.php ___________________________________________________________________ Added: svn:keywords + HeadURL Revision Author Date ID Modified: XoopsModules/smallworld/trunk/smallworld/class/adminclass.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/class/adminclass.php 2012-01-20 08:52:39 UTC (rev 8758) +++ XoopsModules/smallworld/trunk/smallworld/class/adminclass.php 2012-01-20 16:59:04 UTC (rev 8759) @@ -90,41 +90,43 @@ } // find user with most posted messages function mostactiveusers_allround() { - global $xoopsDB,$xoopsUser,$xoopsTpl; + global $xoopsDB,$xoopsUser; $sql = "SELECT uid_fk, COUNT( * ) as cnt "; $sql .= "FROM ( "; $sql .= "SELECT uid_fk "; - $sql .= "FROM xoops_smallworld_messages "; + $sql .= "FROM ".$xoopsDB->prefix('smallworld_messages')." "; $sql .= "UNION ALL SELECT uid_fk "; - $sql .= "FROM xoops_smallworld_comments "; + $sql .= "FROM ".$xoopsDB->prefix('smallworld_comments')." "; $sql .= ") AS u "; $sql .= "GROUP BY uid_fk "; $sql .= "ORDER BY count( * ) DESC limit 20"; $result = $xoopsDB->queryF($sql); $counter = $xoopsDB->getRowsNum($result); - if ($counter < 1) { - $msg['cnt'] = _AM_SMALLWORLD_NO; - $msg['uid_fk'] = _AM_SMALLWORLD_THEREARE; - $xoopsTpl->append('topuser', $msg); + if ($counter == 1) { + $msg['cnt'][1] = _AM_SMALLWORLD_NO; + $msg['uid_fk'][1] = _AM_SMALLWORLD_THEREARE; + //$xoopsTpl->append('topuser', $msg); } else { $msg = array(); - $counter = 1; + + $i = 1; while ($row = $xoopsDB->fetchArray($result)) { - $msg["counter"] = $counter; - $msg["img"] = "<img src = '../images/".$counter.".png'></img>"; - if ($msg['counter'] > 3) { $msg["img"] = '';} - $msg["cnt"] = $row["cnt"]; - $msg["from"] = $xoopsUser->getUnameFromId($row["uid_fk"]); - $xoopsTpl->append('topuser', $msg); - $counter++; + $msg["counter"][$i] = $i; + $msg["img"][$i] = "<img style='margin:0px 5px;' src = '../images/".$i.".png'></img>"; + if ($msg['counter'][$i] > 3) { $msg["img"][$i] = '';} + $msg["cnt"][$i] = $row["cnt"]; + $msg["from"][$i] = $xoopsUser->getUnameFromId($row["uid_fk"]); + //$xoopsTpl->append('topuser', $msg); + $i++; } } - return $msg; + return $msg; } + // find user with most posted messages in last 24 hours function mostactiveusers_today() { - global $xoopsDB,$xoopsUser,$xoopsTpl; + global $xoopsDB,$xoopsUser; $sql = "SELECT uid_fk, COUNT( * ) as cnt "; $sql .= "FROM ( "; $sql .= "SELECT uid_fk "; @@ -139,20 +141,18 @@ $result = $xoopsDB->queryF($sql); if ($xoopsDB->getRowsNum($result) > 0) { $msgtoday = array(); - $counter = 1; + $i = 1; while ($row = $xoopsDB->fetchArray($result)) { - $msgtoday["counter"] = $counter; - $msgtoday["img"] = "<img src = '../images/".$counter.".png'></img>"; - if ($msgtoday['counter'] > 3) { $msgtoday["img"] = '';} - $msgtoday["cnt"] = $row["cnt"]; - $msgtoday["from"] = $xoopsUser->getUnameFromId($row["uid_fk"]); - $xoopsTpl->append('topusertoday', $msgtoday); - $counter++; + $msgtoday["counter"][$i] = $i; + $msgtoday["img"][$i] = "<img style='margin:0px 5px;' src = '../images/".$i.".png'></img>"; + if ($msgtoday['counter'][$i] > 3) { $msgtoday["img"][$i] = '';} + $msgtoday["cnt"][$i] = $row["cnt"]; + $msgtoday["from"][$i] = $xoopsUser->getUnameFromId($row["uid_fk"]); + $i++; } } else { - $msgtoday['cnt'] = _AM_SMALLWORLD_NO; - $msgtoday['from'] = _AM_SMALLWORLD_THEREARE; - $xoopsTpl->append('topusertoday', $msgtoday); + $msgtoday['cnt'][1] = _AM_SMALLWORLD_NO; + $msgtoday['from'][1] = _AM_SMALLWORLD_THEREARE; } return $msgtoday; } @@ -161,33 +161,47 @@ function topratedusers($direction) { global $xoopsUser, $xoopsDB,$xoopsTpl; $array = array(); - $counter = 1; - if ($direction == 'up') { - $sql = "SELECT owner, count(*) as cnt FROM ".$xoopsDB->prefix('smallworld_vote')." where up='1' GROUP by owner ORDER BY cnt DESC limit 20"; - $result = $xoopsDB->queryF($sql); - while ($row = $xoopsDB->fetchArray($result)) { - $array['counter'] = $counter; - $array['img'] = "<img src = '../images/".$counter.".png'></img>"; - if ($array['counter'] > 3) { $array["img"] = '';} - $array['cnt'] = $row['cnt']; - $array['user'] = $xoopsUser->getUnameFromId($row["owner"]); - $xoopsTpl->append('topratedusers', $array); - $counter++; - } - } else { - $sql = "SELECT owner, count(*) as cnt FROM ".$xoopsDB->prefix('smallworld_vote')." where down='1' GROUP by owner ORDER BY cnt DESC limit 20"; + $i = 1; + if ($direction == 'up') { + $sql = "SELECT owner, count(*) as cnt FROM ".$xoopsDB->prefix('smallworld_vote')." where up='1' GROUP by owner ORDER BY cnt DESC limit 20"; $result = $xoopsDB->queryF($sql); - while ($row = $xoopsDB->fetchArray($result)) { - $array['counter'] = $counter; - $array['img'] = "<img src = '../images/".$counter.".png'></img>"; - if ($array['counter'] > 3) { $array["img"] = '';} - $array['cnt'] = $row['cnt']; - $array['user'] = $xoopsUser->getUnameFromId($row["owner"]); - $xoopsTpl->append('bottomratedusers', $array); - $counter++; + $count = $xoopsDB->getRowsNum($result); + if ($count != 0) { + while ($row = $xoopsDB->fetchArray($result)) { + $array['counter'][$i] = $i; + $array['img'][$i] = "<img height='10px' width='10px' style='margin:0px 5px;' src = '../images/like.png'></img>"; + if ($array['counter'][$i] > 3) { $array["img"][$i] = '';} + $array['cnt'][$i] = $row['cnt']; + $array['user'][$i] = $xoopsUser->getUnameFromId($row["owner"]); + $i++; + } + } else { + $array['counter'][$i] = ''; + $array['img'][$i] = ""; + $array['cnt'][$i] = _AM_SMALLWORLD_NO; + $array['user'][$i] = _AM_SMALLWORLD_THEREARE; } - } - + } else { + $sql = "SELECT owner, count(*) as cnt FROM ".$xoopsDB->prefix('smallworld_vote')." where down='1' GROUP by owner ORDER BY cnt DESC limit 20"; + $result = $xoopsDB->queryF($sql); + $count = $xoopsDB->getRowsNum($result); + if ($count != 0) { + while ($row = $xoopsDB->fetchArray($result)) { + $array['counter'][$i] = $i; + $array['img'][$i] = "<img height='10px' width='10px' style='margin:0px 5px;' src = '../images/dislike.png'></img>"; + if ($array['counter'][$i] > 3) { $array["img"][$i] = '';} + $array['cnt'][$i] = $row['cnt']; + $array['user'][$i] = $xoopsUser->getUnameFromId($row["owner"]); + $i++; + } + } else { + $array['counter'][$i] = ''; + $array['img'][$i] = ""; + $array['cnt'][$i] = _AM_SMALLWORLD_NO; + $array['user'][$i] = _AM_SMALLWORLD_THEREARE; + } + } + return $array; } // Get all users to loop in admin for administration Property changes on: XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt ___________________________________________________________________ Added: svn:keywords + HeadURL Revision Author Date ID Property changes on: XoopsModules/smallworld/trunk/smallworld/docs/credits.txt ___________________________________________________________________ Added: svn:keywords + HeadURL Revision Author Date ID Property changes on: XoopsModules/smallworld/trunk/smallworld/docs/install.txt ___________________________________________________________________ Added: svn:keywords + HeadURL Revision Author Date ID Property changes on: XoopsModules/smallworld/trunk/smallworld/docs/lang_diff.txt ___________________________________________________________________ Added: svn:keywords + HeadURL Revision Author Date ID Property changes on: XoopsModules/smallworld/trunk/smallworld/docs/licence.txt ___________________________________________________________________ Added: svn:keywords + HeadURL Revision Author Date ID Property changes on: XoopsModules/smallworld/trunk/smallworld/docs/readme.txt ___________________________________________________________________ Added: svn:keywords + HeadURL Revision Author Date ID Modified: XoopsModules/smallworld/trunk/smallworld/language/danish/admin.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/language/danish/admin.php 2012-01-20 08:52:39 UTC (rev 8758) +++ XoopsModules/smallworld/trunk/smallworld/language/danish/admin.php 2012-01-20 16:59:04 UTC (rev 8759) @@ -12,11 +12,11 @@ * @module: Smallworld * @Author: Michael Albertsen (http://culex.dk) <cu...@cu...> * @copyright: 2011 Culex -* @Repository path: $HeadURL: https://xoops.svn.sourceforge.net/svnroot/xoops/XoopsModules/smallworld/trunk/language/english/admin.php $ -* @Last committed: $Revision: 8707 $ -* @Last changed by: $Author: djculex $ -* @Last changed date: $Date: 2012-01-13 03:40:50 -0500 (Fri, 13 Jan 2012) $ -* @ID: $Id: admin.php 8707 2012-01-13 08:40:50Z djculex $ +* @Repository path: $HeadURL$ +* @Last committed: $Revision$ +* @Last changed by: $Author$ +* @Last changed date: $Date$ +* @ID: $Id$ **/ Property changes on: XoopsModules/smallworld/trunk/smallworld/language/danish/admin.php ___________________________________________________________________ Added: svn:keywords + HeadURL Revision Author Date ID Property changes on: XoopsModules/smallworld/trunk/smallworld/language/danish/help/help.html ___________________________________________________________________ Added: svn:keywords + HeadURL Revision Author Date ID Property changes on: XoopsModules/smallworld/trunk/smallworld/language/danish/help/index.html ___________________________________________________________________ Added: svn:keywords + HeadURL Revision Author Date ID Property changes on: XoopsModules/smallworld/trunk/smallworld/language/danish/mailTpl/index.html ___________________________________________________________________ Added: svn:keywords + HeadURL Revision Author Date ID Property changes on: XoopsModules/smallworld/trunk/smallworld/language/danish/mailTpl/mail_attencionneeded.html ___________________________________________________________________ Added: svn:keywords + HeadURL Revision Author Date ID Property changes on: XoopsModules/smallworld/trunk/smallworld/language/danish/mailTpl/mail_complaint.html ___________________________________________________________________ Added: svn:keywords + HeadURL Revision Author Date ID Property changes on: XoopsModules/smallworld/trunk/smallworld/language/danish/mailTpl/mail_newcomment.html ___________________________________________________________________ Added: svn:keywords + HeadURL Revision Author Date ID Property changes on: XoopsModules/smallworld/trunk/smallworld/language/danish/mailTpl/mail_register.html ___________________________________________________________________ Added: svn:keywords + HeadURL Revision Author Date ID Modified: XoopsModules/smallworld/trunk/smallworld/language/danish/main.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/language/danish/main.php 2012-01-20 08:52:39 UTC (rev 8758) +++ XoopsModules/smallworld/trunk/smallworld/language/danish/main.php 2012-01-20 16:59:04 UTC (rev 8759) @@ -12,11 +12,11 @@ * @module: Smallworld * @Author: Michael Albertsen (http://culex.dk) <cu...@cu...> * @copyright: 2011 Culex -* @Repository path: $HeadURL: https://xoops.svn.sourceforge.net/svnroot/xoops/XoopsModules/smallworld/trunk/language/english/main.php $ -* @Last committed: $Revision: 8707 $ -* @Last changed by: $Author: djculex $ -* @Last changed date: $Date: 2012-01-13 03:40:50 -0500 (Fri, 13 Jan 2012) $ -* @ID: $Id: main.php 8707 2012-01-13 08:40:50Z djculex $ +* @Repository path: $HeadURL$ +* @Last committed: $Revision$ +* @Last changed by: $Author$ +* @Last changed date: $Date$ +* @ID: $Id$ **/ /*----------------- Menu items ---------------*/ Property changes on: XoopsModules/smallworld/trunk/smallworld/language/danish/main.php ___________________________________________________________________ Added: svn:keywords + HeadURL Revision Author Date ID Modified: XoopsModules/smallworld/trunk/smallworld/language/danish/modinfo.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/language/danish/modinfo.php 2012-01-20 08:52:39 UTC (rev 8758) +++ XoopsModules/smallworld/trunk/smallworld/language/danish/modinfo.php 2012-01-20 16:59:04 UTC (rev 8759) @@ -12,11 +12,11 @@ * @module: Smallworld * @Author: Michael Albertsen (http://culex.dk) <cu...@cu...> * @copyright: 2011 Culex -* @Repository path: $HeadURL: https://xoops.svn.sourceforge.net/svnroot/xoops/XoopsModules/smallworld/trunk/language/english/modinfo.php $ -* @Last committed: $Revision: 8743 $ -* @Last changed by: $Author: djculex $ -* @Last changed date: $Date: 2012-01-16 09:29:22 -0500 (Mon, 16 Jan 2012) $ -* @ID: $Id: modinfo.php 8743 2012-01-16 14:29:22Z djculex $ +* @Repository path: $HeadURL$ +* @Last committed: $Revision$ +* @Last changed by: $Author$ +* @Last changed date: $Date$ +* @ID: $Id$ **/ define("_MI_SMALLWORLD_MODULE_NAME","Smallworld"); Property changes on: XoopsModules/smallworld/trunk/smallworld/language/danish/modinfo.php ___________________________________________________________________ Added: svn:keywords + HeadURL Revision Author Date ID Modified: XoopsModules/smallworld/trunk/smallworld/language/english/admin.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/language/english/admin.php 2012-01-20 08:52:39 UTC (rev 8758) +++ XoopsModules/smallworld/trunk/smallworld/language/english/admin.php 2012-01-20 16:59:04 UTC (rev 8759) @@ -40,7 +40,7 @@ define('_AM_SMALLWORLD_MODULEINFO','Module info'); define('_AM_SMALLWORLD_USERSTATS','User stats'); define('_AM_SMALLWORLD_NONEYET','No messages in database'); -define('_AM_SMALLWORLD_NO','no'); +define('_AM_SMALLWORLD_NO','none'); define('_AM_SMALLWORLD_THEREARE','There are'); define('_AM_SMALLWORLD_UPDATE_STATUS','Status of your Smallworld version:'); @@ -71,53 +71,10 @@ 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','#'); +define('_AM_SMALLWORLD_STATS_NAME','Name'); +define('_AM_SMALLWORLD_STATS_AMOUNT','Amount'); +define('_AM_SMALLWORLD_STATS_IMG','Icon'); -//Help section -define('_AM_SMALLWORLD_HELP_ABOUT','About Smallworld'); -define('_AM_SMALLWORLD_HELP_PREFACE','Smallworld is a Social Network system. Inspired by the Srinivas Tamada tutorials on fecebook scripting. The base system has been re-written, adapted, and heavily expanded for XOOPS by Culex<br/>The module is featuring like/dislike, bookmarking, wall system, image gallery, and is using XIM if installed. The admin side is featuring deleting users, banning users based on time. A countdown is shown on user side to when it\'s back.. And many more features. It is fully supported by XOOPS version 2.5.0 and higher.<br/>Smallworld is released under the terms of the <a href="http://www.gnu.org/copyleft/gpl.html" target="_blank">GNU General Public License (GPL)</a> and is free to use and modify. It is free to redistribute as long as you abide by the distribution terms of the GPL.'); -define('_AM_SMALLWORLD_HELP_HEADER_REQUIREMENTS','Requirements'); -define('_AM_SMALLWORLD_HELP_REQUIREMENTS','<ul class="help"> - <li>WWW Server (<a href="http://www.apache.org/" target="_blank">Apache</a>, IIS, Roxen, etc)</li> - <li><a href="http://www.xoops.org/" target="_blank">XOOPS</a> 2.4.0 or higher as Smallworld uses preloads</li> - <li><a href="http://www.php.net/" target="_blank">PHP</a> 5.2.0 or higher.</li> - <li><a href="http://www.mysql.com/" target="_blank">MySQL</a> 4 or higher (5 or higher recommended)</li> - </ul>'); -define('_AM_SMALLWORLD_HELP_HEADER_RECOMMENDED','Recommended for testing Smallworld'); -define('_AM_SMALLWORLD_HELP_RECOMMENDED','<ul class="help"> - <li>Browser <a href="http://www.mozilla.com" target"_blank">Firefox</a> and the Firefox plugin <a href="https://addons.mozilla.org/en-US/firefox/downloads/latest/1843/addon-1843-latest.xpi" target="_blank">FireBug plugin (latest version)</a></li> - </ul>'); -define('_AM_SMALLWORLD_HELP_HEADER_INSTALLATION','How to install'); -define('_AM_SMALLWORLD_HELP_FIRSTTIMEINSTALL','<ul class="help"> - <li>Check to see if the downloaded Smallworld version is the latest released version.</li> - <li>Turn cookie and JavaScript of your browser on.</li> - </ul>'); - -define('_AM_SMALLWORLD_HELP_HEADER_HOSTED_PLATFORM','Installing on a hosted platform'); -define('_AM_SMALLWORLD_HELP_HOSTED_PLATFORM','<ul class="help"> - <li>Upload the unzipped folder Smallworld to your module directory.</li> - <li>Install using XOOPS module install as any other module installation.</li> - <li>Make the block visible for the user groups you want to see the block (admin/moderators etc etc).</li> - </ul>'); -define('_AM_SMALLWORLD_HELP_HEADER_UPGRADING','Upgrading from a previous version'); -define('_AM_SMALLWORLD_HELP_UPGRADING','<ul class="help"> - <li>Make sure you are using newest version</li> - <li>Read the readme.txt in archive</li> - <li>Maybe do a backup of your tables</li> - </ul>'); -define('_AM_SMALLWORLD_HELP_HEADER_FAQ','Problem solving'); -define('_AM_SMALLWORLD_HELP_HEADER_COMMENPROBLEMS1','I get blank page, can\'t click username, The block does not show.......'); -define('_AM_SMALLWORLD_HELP_COMMENPROBLEMS1','<ul class="help"> - <li>Make sure your Xoops version is > 2.4.0. Older versions of Xoops don\'t have preloads, which are required.</li> - <li>Turn on debug and check to see if any errors emerge.</li> - <li>Using FireFox, right click on the screen, choose inspect element, choose console in the tabs and check to see if any errors<br/></li> - <li>If no errors, use Firebug (Right click->inspect element->console) and see if there are any jQuery errors.</li> - <li>If there are no jQuery errors. Clean caches-> module update Smallworld, system modules.</li> - <li>If the page is still blank, Go to your protector module -> settings and write smallworld in the form "Modules out of Dos / Crawler checker".</li> - </ul>'); -define('_AM_SMALLWORLD_HELP_HEADER_CONTACTS','Ask question'); -define('_AM_SMALLWORLD_HELP_OTHERHELP','<ul class="help"> - <li>If still questions or errors please post at the <a href="http://www.xoops.org/modules/newbb" target="_blank">Xoops support Forum</a></li> - </ul> - '); -define('_AM_SMALLWORLD_SP','<img style="margin: 0pt 5px 0pt 0pt; vertical-align: middle;" src="../images/sp.png" height="30px" width="30px"> <a style="position: relative; margin: 0px;" href="javascript:void(0);" id="smallworldDonate">If you like this module and the work I put into it, you could keep me awake by buying me a coffee</a>'); +define('_AM_SMALLWORLD_SP','<img style="margin: 0pt 5px 0pt 0pt; vertical-align: middle;" src="../images/sp.png" height="30px" width="30px"> <a style="position: relative; margin: 0px;vertical-align: middle;" href="javascript:void(0);" id="smallworldDonate">If you like this module and the work I put into it, you could keep me awake by buying me a coffee</a>'); define('_AM_SMALLWORLD_FOOTER', "<div class='center smallsmall italic pad5'>Module SmallWorld is maintained by <a class='tooltip' rel='external' href='http://culex.dk/' title='Visit my Website'>Culex</a></div>"); \ No newline at end of file Property changes on: XoopsModules/smallworld/trunk/smallworld/language/english/help/help.html ___________________________________________________________________ Added: svn:keywords + HeadURL Revision Author Date ID Property changes on: XoopsModules/smallworld/trunk/smallworld/language/english/help/index.html ___________________________________________________________________ Added: svn:keywords + HeadURL Revision Author Date ID Modified: XoopsModules/smallworld/trunk/smallworld/language/english/modinfo.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/language/english/modinfo.php 2012-01-20 08:52:39 UTC (rev 8758) +++ XoopsModules/smallworld/trunk/smallworld/language/english/modinfo.php 2012-01-20 16:59:04 UTC (rev 8759) @@ -52,6 +52,9 @@ define ("_MI_SMALLWORLD_BOOKMARSAVATARS","Use Smallworld Logo when bookmarking ? "); define ("_MI_SMALLWORLD_BOOKMARKSAVATARS_DESC","When posts are public and you want to share on social networks. You can here descide weather to use<br>smallworld logo as shared image or 'no' = the posting users avatar.<br><br>Default is 'yes' = smallworld logo."); +define ("_MI_SMALLWORLD_USEMAILNOTIFICATION","Use mail notifications ? "); +define ("_MI_SMALLWORLD_USEMAILNOTIFICATION_DESC","When new user register a mail is sent to admin, or when a comment is added to a post where user is part a mail is sent to user.<br><br>Default is 'yes'"); + // Select fields & Mandetory fields define ('_MI_SMALLWORLD_VIEWFIELDS','Use fields in registration and profile'); define ('_MI_SMALLWORLD_VIEWFIELDS_DESC','Select fields to use in registration form and in profile viewing<br>Use control + mouse to multiselect'); @@ -59,6 +62,7 @@ define ('_MI_SMALLWORLD_VERIFYFIELDS_DESC','Select (*) mandatory fields in registration form<br>Use control + mouse to multiselect'); define ('_MI_SMALLWORLD_REALNAME','Real name'); +define ('_MI_SMALLWORLD_GENDER','Gender'); define ('_MI_SMALLWORLD_INTERESTEDIN','Interested in'); define ('_MI_SMALLWORLD_RELATIONSHIPSTATUS','relationship status'); define ('_MI_SMALLWORLD_PARTNER','Partner'); Property changes on: XoopsModules/smallworld/trunk/smallworld/templates/admin_help.html ___________________________________________________________________ Added: svn:keywords + HeadURL Revision Author Date ID Property changes on: XoopsModules/smallworld/trunk/smallworld/templates/admin_moduleinfo.html ___________________________________________________________________ Added: svn:keywords + HeadURL Revision Author Date ID Property changes on: XoopsModules/smallworld/trunk/smallworld/templates/admin_statistics.html ___________________________________________________________________ Added: svn:keywords + HeadURL Revision Author Date ID Property changes on: XoopsModules/smallworld/trunk/smallworld/templates/admin_useradmin.html ___________________________________________________________________ Added: svn:keywords + HeadURL Revision Author Date ID This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dj...@us...> - 2012-01-20 17:12:33
|
Revision: 8762 http://xoops.svn.sourceforge.net/xoops/?rev=8762&view=rev Author: djculex Date: 2012-01-20 17:12:27 +0000 (Fri, 20 Jan 2012) Log Message: ----------- amin adjustments Modified Paths: -------------- XoopsModules/smallworld/trunk/smallworld/class/adminclass.php Removed Paths: ------------- XoopsModules/smallworld/trunk/smallworld/css/base/images/Thumbs.db XoopsModules/smallworld/trunk/smallworld/css/ui-lightness/images/Thumbs.db Modified: XoopsModules/smallworld/trunk/smallworld/class/adminclass.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/class/adminclass.php 2012-01-20 17:04:28 UTC (rev 8761) +++ XoopsModules/smallworld/trunk/smallworld/class/adminclass.php 2012-01-20 17:12:27 UTC (rev 8762) @@ -103,9 +103,9 @@ $result = $xoopsDB->queryF($sql); $counter = $xoopsDB->getRowsNum($result); - if ($counter == 1) { - $msg['cnt'][1] = _AM_SMALLWORLD_NO; - $msg['uid_fk'][1] = _AM_SMALLWORLD_THEREARE; + if ($counter < 1) { + $msg['cnt'][1] = _AM_SMALLWORLD_THEREARE; + $msg['uid_fk'][1] = _AM_SMALLWORLD_NO; //$xoopsTpl->append('topuser', $msg); } else { $msg = array(); @@ -151,8 +151,8 @@ $i++; } } else { - $msgtoday['cnt'][1] = _AM_SMALLWORLD_NO; - $msgtoday['from'][1] = _AM_SMALLWORLD_THEREARE; + $msgtoday['cnt'][1] = _AM_SMALLWORLD_THEREARE; + $msgtoday['from'][1] = _AM_SMALLWORLD_NO; } return $msgtoday; } Deleted: XoopsModules/smallworld/trunk/smallworld/css/base/images/Thumbs.db =================================================================== (Binary files differ) Deleted: XoopsModules/smallworld/trunk/smallworld/css/ui-lightness/images/Thumbs.db =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dj...@us...> - 2012-01-20 18:51:16
|
Revision: 8767 http://xoops.svn.sourceforge.net/xoops/?rev=8767&view=rev Author: djculex Date: 2012-01-20 18:51:05 +0000 (Fri, 20 Jan 2012) Log Message: ----------- error in arraycount in both adminclass.php and index.php Modified Paths: -------------- XoopsModules/smallworld/trunk/smallworld/admin/index.php XoopsModules/smallworld/trunk/smallworld/class/adminclass.php Modified: XoopsModules/smallworld/trunk/smallworld/admin/index.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/admin/index.php 2012-01-20 18:21:33 UTC (rev 8766) +++ XoopsModules/smallworld/trunk/smallworld/admin/index.php 2012-01-20 18:51:05 UTC (rev 8767) @@ -74,12 +74,12 @@ // Find list of most active users (24 hours) $maToday = $admin->mostactiveusers_today(); $mat_cnt = 0; - if (count($maToday) != 0) { + if (count(array($maToday)) > 0) { $mat_cnt = 1; $mat = "<table class='smallworldadmin'><tr>"; $mat .= "<td><b>"._AM_SMALLWORLD_STATS_POS."</b></td><td><b>"._AM_SMALLWORLD_STATS_IMG."</b></td><td><b>"._AM_SMALLWORLD_STATS_AMOUNT."</b></td><td><b>"._AM_SMALLWORLD_STATS_NAME."</b></td></tr>"; $i = 1; - while ($i < count($maToday)-1) { + while ($i <= count(array($maToday))) { $mat .= vsprintf('<tr><td>%s</td>',array($maToday['counter'][$i])); $mat .= vsprintf('<td>%s</td>',array($maToday['img'][$i])); $mat .= vsprintf('<td>%s</td>',array($maToday['cnt'][$i])); Modified: XoopsModules/smallworld/trunk/smallworld/class/adminclass.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/class/adminclass.php 2012-01-20 18:21:33 UTC (rev 8766) +++ XoopsModules/smallworld/trunk/smallworld/class/adminclass.php 2012-01-20 18:51:05 UTC (rev 8767) @@ -139,9 +139,9 @@ $sql .= "GROUP BY uid_fk "; $sql .= "ORDER BY count( * ) DESC limit 20"; $result = $xoopsDB->queryF($sql); - if ($xoopsDB->getRowsNum($result) > 0) { $msgtoday = array(); - $i = 1; + if ($xoopsDB->getRowsNum($result) != 0) { + $i = 1; while ($row = $xoopsDB->fetchArray($result)) { $msgtoday["counter"][$i] = $i; $msgtoday["img"][$i] = "<img style='margin:0px 5px;' src = '../images/".$i.".png'></img>"; @@ -151,8 +151,7 @@ $i++; } } else { - $msgtoday['cnt'][1] = _AM_SMALLWORLD_THEREARE; - $msgtoday['from'][1] = _AM_SMALLWORLD_NO; + $msgtoday = array(); } return $msgtoday; } @@ -176,10 +175,7 @@ $i++; } } else { - $array['counter'][$i] = ''; - $array['img'][$i] = ""; - $array['cnt'][$i] = _AM_SMALLWORLD_NO; - $array['user'][$i] = _AM_SMALLWORLD_THEREARE; + $array = array(); } } else { $sql = "SELECT owner, count(*) as cnt FROM ".$xoopsDB->prefix('smallworld_vote')." where down='1' GROUP by owner ORDER BY cnt DESC limit 20"; @@ -195,10 +191,7 @@ $i++; } } else { - $array['counter'][$i] = ''; - $array['img'][$i] = ""; - $array['cnt'][$i] = _AM_SMALLWORLD_NO; - $array['user'][$i] = _AM_SMALLWORLD_THEREARE; + $array = array(); } } return $array; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
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. |
From: <dj...@us...> - 2012-01-23 13:15:40
|
Revision: 8790 http://xoops.svn.sourceforge.net/xoops/?rev=8790&view=rev Author: djculex Date: 2012-01-23 13:15:30 +0000 (Mon, 23 Jan 2012) Log Message: ----------- bugfix: check if array is empty before counting it (duh!) bugfix: Date of first message only set if any messages exists (double duh!) Modified Paths: -------------- XoopsModules/smallworld/trunk/smallworld/admin/index.php XoopsModules/smallworld/trunk/smallworld/class/adminclass.php Modified: XoopsModules/smallworld/trunk/smallworld/admin/index.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/admin/index.php 2012-01-23 12:46:42 UTC (rev 8789) +++ XoopsModules/smallworld/trunk/smallworld/admin/index.php 2012-01-23 13:15:30 UTC (rev 8790) @@ -35,7 +35,13 @@ $admin = new SmallworldAdmin(); // Find oldest message and apply to template -$dateoffirstmessage = date(_SHORTDATESTRING, $admin->oldestMsg()); +$dfm = $admin->oldestMsg(); +if ($dfm==0) { + $dfm = _AM_SMALLWORLD_NONEYET; +} else { + $dfm = date(_SHORTDATESTRING, $admin->oldestMsg()); +} +$dateoffirstmessage = $dfm; // Get days number $totaldays = $admin->CountDays(); @@ -93,7 +99,11 @@ // FInd list of best rated users overall $topusers = $admin->topratedusers('up'); +if (!empty($topusers)){ $count = count($topusers['cnt']); +} else { +$count = 0; +} $top_cnt = 0; if ($count != 0) { $top_cnt = 1; @@ -115,7 +125,11 @@ // FInd list of worst rated users overall $lowusers = $admin->topratedusers('down'); $low_cnt = 0; +if (!empty($lowusers)) { $count = count($lowusers['cnt']); +} else { +$count=0; +} if ($count != 0) { $low_cnt = 1; $low = "<table class='smallworldadmin'><tr>"; Modified: XoopsModules/smallworld/trunk/smallworld/class/adminclass.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/class/adminclass.php 2012-01-23 12:46:42 UTC (rev 8789) +++ XoopsModules/smallworld/trunk/smallworld/class/adminclass.php 2012-01-23 13:15:30 UTC (rev 8790) @@ -24,12 +24,14 @@ // Get oldes message in Db function oldestMsg () { global $xoopsDB; + $date = 0; $sql = "SELECT * FROM ".$xoopsDB->prefix('smallworld_messages')." ORDER BY created limit 1"; $result = $xoopsDB->queryF($sql); $counter = $xoopsDB->getRowsNum($result); - if ($counter < 1) {$date = _AM_SMALLWORLD_NONEYET;} - while ($sqlfetch = $xoopsDB->fetchArray($result)) { - $date = $sqlfetch['created']; + if ($counter >= 1) { + while ($sqlfetch = $xoopsDB->fetchArray($result)) { + $date = $sqlfetch['created']; + } } return $date; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dj...@us...> - 2012-01-23 13:31:50
|
Revision: 8791 http://xoops.svn.sourceforge.net/xoops/?rev=8791&view=rev Author: djculex Date: 2012-01-23 13:31:43 +0000 (Mon, 23 Jan 2012) Log Message: ----------- Bugfix: return empty array for function mostactiveusers_allround istead of string Bugfix: removed redundant containers in function doCheckUpdate() Modified Paths: -------------- XoopsModules/smallworld/trunk/smallworld/admin/index.php XoopsModules/smallworld/trunk/smallworld/class/adminclass.php Modified: XoopsModules/smallworld/trunk/smallworld/admin/index.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/admin/index.php 2012-01-23 13:15:30 UTC (rev 8790) +++ XoopsModules/smallworld/trunk/smallworld/admin/index.php 2012-01-23 13:31:43 UTC (rev 8791) @@ -59,8 +59,14 @@ $sumallusers = $admin->TotalUsers (); // Find list of most active users (total) $maAllround = $admin->mostactiveusers_allround(); -$ma_cnt = 0; - if (count($maAllround) != 0) { + $ma_cnt = 0; + if (!empty($maAllround)) { + $count = count($maAllround['cnt']); + } else { + $count=0; + } + $mat_cnt = 0; + if ($count != 0) { $ma_cnt = 1; $ma = "<table class='smallworldadmin'><tr>"; $ma .= "<td><b>"._AM_SMALLWORLD_STATS_POS."</b></td><td><b>"._AM_SMALLWORLD_STATS_IMG."</b></td><td><b>"._AM_SMALLWORLD_STATS_AMOUNT."</b></td><td><b>"._AM_SMALLWORLD_STATS_NAME."</b></td></tr>"; @@ -79,8 +85,13 @@ // Find list of most active users (24 hours) $maToday = $admin->mostactiveusers_today(); -$mat_cnt = 0; - if (count($maToday) != 0) { + if (!empty($maToday)) { + $count = count($maToday['cnt']); + } else { + $count=0; + } + $mat_cnt = 0; + if ($count != 0) { $mat_cnt = 1; $mat = "<table class='smallworldadmin'><tr>"; $mat .= "<td><b>"._AM_SMALLWORLD_STATS_POS."</b></td><td><b>"._AM_SMALLWORLD_STATS_IMG."</b></td><td><b>"._AM_SMALLWORLD_STATS_AMOUNT."</b></td><td><b>"._AM_SMALLWORLD_STATS_NAME."</b></td></tr>"; @@ -99,12 +110,12 @@ // FInd list of best rated users overall $topusers = $admin->topratedusers('up'); -if (!empty($topusers)){ -$count = count($topusers['cnt']); -} else { -$count = 0; -} -$top_cnt = 0; + if (!empty($topusers)){ + $count = count($topusers['cnt']); + } else { + $count = 0; + } + $top_cnt = 0; if ($count != 0) { $top_cnt = 1; $top = "<table class='smallworldadmin'><tr>"; @@ -124,12 +135,12 @@ // FInd list of worst rated users overall $lowusers = $admin->topratedusers('down'); -$low_cnt = 0; -if (!empty($lowusers)) { -$count = count($lowusers['cnt']); -} else { -$count=0; -} + $low_cnt = 0; + if (!empty($lowusers)) { + $count = count($lowusers['cnt']); + } else { + $count=0; + } if ($count != 0) { $low_cnt = 1; $low = "<table class='smallworldadmin'><tr>"; Modified: XoopsModules/smallworld/trunk/smallworld/class/adminclass.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/class/adminclass.php 2012-01-23 13:15:30 UTC (rev 8790) +++ XoopsModules/smallworld/trunk/smallworld/class/adminclass.php 2012-01-23 13:31:43 UTC (rev 8791) @@ -107,8 +107,7 @@ $counter = $xoopsDB->getRowsNum($result); if ($counter < 1) { - $msg['cnt'][1] = _AM_SMALLWORLD_THEREARE; - $msg['uid_fk'][1] = _AM_SMALLWORLD_NO; + $msg = array(); //$xoopsTpl->append('topuser', $msg); } else { $msg = array(); @@ -249,13 +248,13 @@ $upd_img = '../images/upd_normal.png'; } if ($critical) { - $rt = "<div class='smallworld_update'><img src='".$upd_img."' />"._AM_SMALLWORLD_UPDATE_CRITICAL_UPD."</div></p>"; + $rt = "<div class='smallworld_update'><img src='".$upd_img."' />"._AM_SMALLWORLD_UPDATE_CRITICAL_UPD."</div>"; $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>"; + $rt .=_AM_SMALLWORLD_UPDATE_SERVER_FILE."<br /><a href='".$read[3]."'>".$read[3]."</a>"; } else if ($update) { - $rt = "<div class='smallworld_update'><img src='".$upd_img."' />"._AM_SMALLWORLD_UPDATE_NORMAL_UPD."</div></p>"; + $rt = "<div class='smallworld_update'><img src='".$upd_img."' />"._AM_SMALLWORLD_UPDATE_NORMAL_UPD."</div>"; $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>"; + $rt .= _AM_SMALLWORLD_UPDATE_SERVER_FILE."<br /><a href='".$read[3]."'>".$read[3]."</a>"; } else { $rt = "<div class='smallworld_update'><br/><img src='".$upd_img."' />"._AM_SMALLWORLD_UPDATE_YOUHAVENEWESTVERSION."</div>"; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dj...@us...> - 2012-01-23 17:02:35
|
Revision: 8794 http://xoops.svn.sourceforge.net/xoops/?rev=8794&view=rev Author: djculex Date: 2012-01-23 17:02:29 +0000 (Mon, 23 Jan 2012) Log Message: ----------- Function set to transform image urls to <img> in wall posting Modified Paths: -------------- XoopsModules/smallworld/trunk/smallworld/css/smallworld.css XoopsModules/smallworld/trunk/smallworld/include/functions.php XoopsModules/smallworld/trunk/smallworld/language/danish/main.php XoopsModules/smallworld/trunk/smallworld/language/english/main.php Modified: XoopsModules/smallworld/trunk/smallworld/css/smallworld.css =================================================================== --- XoopsModules/smallworld/trunk/smallworld/css/smallworld.css 2012-01-23 14:25:50 UTC (rev 8793) +++ XoopsModules/smallworld/trunk/smallworld/css/smallworld.css 2012-01-23 17:02:29 UTC (rev 8794) @@ -742,6 +742,12 @@ width:75%; } +.smallworldAttImg{ + margin: 10px 125px 5px 10px; + max-height:200px; + position: relative; +} + .smallworld_sttext b{ color:#006699; } Modified: XoopsModules/smallworld/trunk/smallworld/include/functions.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/include/functions.php 2012-01-23 14:25:50 UTC (rev 8793) +++ XoopsModules/smallworld/trunk/smallworld/include/functions.php 2012-01-23 17:02:29 UTC (rev 8794) @@ -195,19 +195,32 @@ return $t; } +// Return only url/link +// If url is image link return <img> function smallworld_tolink($text){ - $text = html_entity_decode($text); - $text = " ".$text; - $text = preg_replace('/(((f|ht){1}tp:\/\/)[-a-zA-Z0-9@:%_\+.~#?&\/\/=]+)/i', - '<a href="\\1">\\1</a>', $text); - $text = preg_replace('/(((f|ht){1}tps:\/\/)[-a-zA-Z0-9@:%_\+.~#?&\/\/=]+)/i', - '<a href="\\1">\\1</a>', $text); - $text = preg_replace('/([[:space:]()[{}])(www.[-a-zA-Z0-9@:%_\+.~#?&\/\/=]+)/i', - '\\1<a href="http://\\2">\\2</a>', $text); - $text = preg_replace('/([_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,3})/i', - '<a href="mailto:\\1">\\1</a>', $text); - $myts = MyTextSanitizer::getInstance(); - $text = $myts->displayTarea($text,1,1,1,1); + $ext = substr($text,-4,4); + $ext2 = substr($text,-5,5); + if (in_array($ext,array('.jpg','.bmp','.gif','.png')) || in_array($ext2,array('.jpeg'))){ + $text = preg_replace('/(((f|ht){1}tp:\/\/)[-a-zA-Z0-9@:%_\+.~#?&\/\/=]+)/i', + '<a href="\\1">'._SMALLWORLD_CLICKIMAGETHUMB.' </a><img class="smallworldAttImg" src="\\1">', $text); + $text = preg_replace('/(((f|ht){1}tps:\/\/)[-a-zA-Z0-9@:%_\+.~#?&\/\/=]+)/i', + '<a href="\\1">lala</a>', $text); + $text = preg_replace('/([[:space:]()[{}])(www.[-a-zA-Z0-9@:%_\+.~#?&\/\/=]+)/i', + '\\1<a href="//\\2">'._SMALLWORLD_CLICKIMAGETHUMB.'</a><img class="smallworldAttImg" src="//\\2">', $text); + } else { + $text = html_entity_decode($text); + $text = " ".$text; + $text = preg_replace('/(((f|ht){1}tp:\/\/)[-a-zA-Z0-9@:%_\+.~#?&\/\/=]+)/i', + '<a href="\\1">\\1</a>', $text); + $text = preg_replace('/(((f|ht){1}tps:\/\/)[-a-zA-Z0-9@:%_\+.~#?&\/\/=]+)/i', + '<a href="\\1">\\1</a>', $text); + $text = preg_replace('/([[:space:]()[{}])(www.[-a-zA-Z0-9@:%_\+.~#?&\/\/=]+)/i', + '\\1<a href="http://\\2">\\2</a>', $text); + $text = preg_replace('/([_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,3})/i', + '<a href="mailto:\\1">\\1</a>', $text); + $myts = MyTextSanitizer::getInstance(); + $text = $myts->displayTarea($text,1,1,1,1); + } return $text; } Modified: XoopsModules/smallworld/trunk/smallworld/language/danish/main.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/language/danish/main.php 2012-01-23 14:25:50 UTC (rev 8793) +++ XoopsModules/smallworld/trunk/smallworld/language/danish/main.php 2012-01-23 17:02:29 UTC (rev 8794) @@ -319,6 +319,7 @@ define("_SMALLWORLD_MONTHSAGO"," months ago"); define("_SMALLWORLD_ONEYEARAGO","one year ago"); define("_SMALLWORLD_YEARSAGO"," years ago"); +define("_SMALLWORLD_CLICKIMAGETHUMB","Click here to see original size image"); /*-------------------- Friends page ---------------*/ define("_SMALLWORLD_FRIENDPAGE","Friends"); Modified: XoopsModules/smallworld/trunk/smallworld/language/english/main.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/language/english/main.php 2012-01-23 14:25:50 UTC (rev 8793) +++ XoopsModules/smallworld/trunk/smallworld/language/english/main.php 2012-01-23 17:02:29 UTC (rev 8794) @@ -319,6 +319,7 @@ define("_SMALLWORLD_MONTHSAGO"," months ago"); define("_SMALLWORLD_ONEYEARAGO","one year ago"); define("_SMALLWORLD_YEARSAGO"," years ago"); +define("_SMALLWORLD_CLICKIMAGETHUMB","Click here to see original size image"); /*-------------------- Friends page ---------------*/ define("_SMALLWORLD_FRIENDPAGE","Friends"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dj...@us...> - 2012-01-23 17:31:01
|
Revision: 8795 http://xoops.svn.sourceforge.net/xoops/?rev=8795&view=rev Author: djculex Date: 2012-01-23 17:30:55 +0000 (Mon, 23 Jan 2012) Log Message: ----------- Final adjust to image select.. :-) Modified Paths: -------------- XoopsModules/smallworld/trunk/smallworld/css/smallworld.css XoopsModules/smallworld/trunk/smallworld/include/functions.php Modified: XoopsModules/smallworld/trunk/smallworld/css/smallworld.css =================================================================== --- XoopsModules/smallworld/trunk/smallworld/css/smallworld.css 2012-01-23 17:02:29 UTC (rev 8794) +++ XoopsModules/smallworld/trunk/smallworld/css/smallworld.css 2012-01-23 17:30:55 UTC (rev 8795) @@ -748,6 +748,14 @@ position: relative; } +.smallworldAttImgTxt { + color: #A2ADE8; + font-size: 9px; + margin-left: 15%; + position: relative; + text-align: center; +} + .smallworld_sttext b{ color:#006699; } Modified: XoopsModules/smallworld/trunk/smallworld/include/functions.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/include/functions.php 2012-01-23 17:02:29 UTC (rev 8794) +++ XoopsModules/smallworld/trunk/smallworld/include/functions.php 2012-01-23 17:30:55 UTC (rev 8795) @@ -202,11 +202,11 @@ $ext2 = substr($text,-5,5); if (in_array($ext,array('.jpg','.bmp','.gif','.png')) || in_array($ext2,array('.jpeg'))){ $text = preg_replace('/(((f|ht){1}tp:\/\/)[-a-zA-Z0-9@:%_\+.~#?&\/\/=]+)/i', - '<a href="\\1">'._SMALLWORLD_CLICKIMAGETHUMB.' </a><img class="smallworldAttImg" src="\\1">', $text); + '<img class="smallworldAttImg" src="\\1"><a class="smallworldAttImgTxt" href="\\1">'._SMALLWORLD_CLICKIMAGETHUMB.' </a><br>', $text); $text = preg_replace('/(((f|ht){1}tps:\/\/)[-a-zA-Z0-9@:%_\+.~#?&\/\/=]+)/i', '<a href="\\1">lala</a>', $text); $text = preg_replace('/([[:space:]()[{}])(www.[-a-zA-Z0-9@:%_\+.~#?&\/\/=]+)/i', - '\\1<a href="//\\2">'._SMALLWORLD_CLICKIMAGETHUMB.'</a><img class="smallworldAttImg" src="//\\2">', $text); + '\\1<img class="smallworldAttImg" src="//\\2"><a class="smallworldAttImgTxt" href="//\\2">'._SMALLWORLD_CLICKIMAGETHUMB.'</a><br>', $text); } else { $text = html_entity_decode($text); $text = " ".$text; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dj...@us...> - 2012-01-23 19:52:08
|
Revision: 8796 http://xoops.svn.sourceforge.net/xoops/?rev=8796&view=rev Author: djculex Date: 2012-01-23 19:52:02 +0000 (Mon, 23 Jan 2012) Log Message: ----------- missing css/smallworld.css in permalink.php and smallworldshare.php Modified Paths: -------------- XoopsModules/smallworld/trunk/smallworld/permalink.php XoopsModules/smallworld/trunk/smallworld/smallworldshare.php Modified: XoopsModules/smallworld/trunk/smallworld/permalink.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/permalink.php 2012-01-23 17:30:55 UTC (rev 8795) +++ XoopsModules/smallworld/trunk/smallworld/permalink.php 2012-01-23 19:52:02 UTC (rev 8796) @@ -118,8 +118,9 @@ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.oembed.js'); $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/wall.js'); $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/oembed.css'); + $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/smallworld.css'); $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.innerfade.js'); - $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.bookmark.js'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.bookmark.js'); } } else { redirect_header(XOOPS_URL . "/user.php", 1, _NOPERM); Modified: XoopsModules/smallworld/trunk/smallworld/smallworldshare.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/smallworldshare.php 2012-01-23 17:30:55 UTC (rev 8795) +++ XoopsModules/smallworld/trunk/smallworld/smallworldshare.php 2012-01-23 19:52:02 UTC (rev 8796) @@ -86,6 +86,7 @@ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/wall.js'); $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.innerfade.js'); $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/oembed.css'); + $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/smallworld.css'); include(XOOPS_ROOT_PATH."/footer.php"); ?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <be...@us...> - 2012-01-24 02:47:13
|
Revision: 8800 http://xoops.svn.sourceforge.net/xoops/?rev=8800&view=rev Author: beckmi Date: 2012-01-24 02:47:07 +0000 (Tue, 24 Jan 2012) Log Message: ----------- - fixing cURL problem in adminclass.php - code clean-up Modified Paths: -------------- XoopsModules/smallworld/trunk/smallworld/admin/admin_header.php XoopsModules/smallworld/trunk/smallworld/admin/index.php XoopsModules/smallworld/trunk/smallworld/class/adminclass.php Modified: XoopsModules/smallworld/trunk/smallworld/admin/admin_header.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/admin/admin_header.php 2012-01-23 20:38:11 UTC (rev 8799) +++ XoopsModules/smallworld/trunk/smallworld/admin/admin_header.php 2012-01-24 02:47:07 UTC (rev 8800) @@ -28,18 +28,15 @@ global $xoopsModule; $pathModuleAdmin = $xoopsModule->getInfo('dirmoduleadmin'); -if (file_exists($GLOBALS['xoops']->path('/Frameworks/moduleclasses/moduleadmin/moduleadmin.php'))) { - include_once $GLOBALS['xoops']->path('/Frameworks/moduleclasses/moduleadmin/moduleadmin.php'); +$pathIcon16 = '../' . $xoopsModule->getInfo('icons16'); +$pathIcon32 = '../' . $xoopsModule->getInfo('icons32'); +if (file_exists($GLOBALS['xoops']->path($pathModuleAdmin . '/moduleadmin.php'))) { + include_once $GLOBALS['xoops']->path($pathModuleAdmin . '/moduleadmin.php'); } else { redirect_header("../../../admin.php", 5, _AM_MODULEADMIN_MISSING, false); - } -$pathIcon16 = '../' . $xoopsModule->getInfo('icons16'); -$pathIcon32 = '../' . $xoopsModule->getInfo('icons32'); -$pathModuleAdmin = $xoopsModule->getInfo('dirmoduleadmin'); - if ($xoopsUser) { $xoopsModule = XoopsModule::getByDirname("smallworld"); if (!$xoopsUser->isAdmin($xoopsModule->mid())) { Modified: XoopsModules/smallworld/trunk/smallworld/admin/index.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/admin/index.php 2012-01-23 20:38:11 UTC (rev 8799) +++ XoopsModules/smallworld/trunk/smallworld/admin/index.php 2012-01-24 02:47:07 UTC (rev 8800) @@ -20,13 +20,13 @@ **/ -//require_once dirname(dirname(dirname(dirname(__FILE__)))) . '/include/cp_header.php'; +require_once dirname(dirname(dirname(dirname(__FILE__)))) . '/include/cp_header.php'; include_once dirname(__FILE__) . '/admin_header.php'; xoops_cp_header(); global $xoTheme; -$xoTheme->addStylesheet(XOOPS_URL . '/modules/smallworld/css/SmallworldAdmin.css'); -$xoTheme->addScript(XOOPS_URL . '/modules/smallworld/js/adminsmallworld.js'); +$xoTheme->addStylesheet(XOOPS_URL . '/modules/smallworld/css/SmallworldAdmin.css'); +$xoTheme->addScript(XOOPS_URL . '/modules/smallworld/js/adminsmallworld.js'); $indexAdmin = new ModuleAdmin(); @@ -51,10 +51,8 @@ $installversion = $admin->ModuleInstallVersion (); // Smallworld install date $installdate = $admin->ModuleInstallDate (); - //check current version of Smallworld, return desc,link,version if new available $installCheck = $admin->doCheckUpdate (); - // Count members using Smallworld $sumallusers = $admin->TotalUsers (); // Find list of most active users (total) @@ -82,7 +80,6 @@ } else { $maAllround = 0; } - // Find list of most active users (24 hours) $maToday = $admin->mostactiveusers_today(); if (!empty($maToday)) { @@ -107,7 +104,6 @@ } else { $mat = 0; } - // FInd list of best rated users overall $topusers = $admin->topratedusers('up'); if (!empty($topusers)){ @@ -158,17 +154,8 @@ $low = 0; } - - //----------------------- -// 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); @@ -187,7 +174,6 @@ $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, "<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'); Modified: XoopsModules/smallworld/trunk/smallworld/class/adminclass.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/class/adminclass.php 2012-01-23 20:38:11 UTC (rev 8799) +++ XoopsModules/smallworld/trunk/smallworld/class/adminclass.php 2012-01-24 02:47:07 UTC (rev 8800) @@ -232,10 +232,9 @@ $critical = FALSE; $update = FALSE; $rt = ''; - $url = "http://www.culex.dk/updates/smallworld_version.csv"; - $fileC = $this->fetchURL($url,array('fopen', 'curl', 'socket')); - $read = explode(";", $fileC); + $fileC = $this->fetchURL($url,array('fopen', 'curl', 'socket')); + $read = explode(";", $fileC); $upd_img = $pathIcon16.'/on.png'; @@ -282,7 +281,7 @@ switch($method) { case 'fopen': - //uses file_get_contents in place of fopen + //uses file_get_contents in place of fopen //allow_url_fopen must still be enabled if(ini_get('allow_url_fopen')) { @@ -292,12 +291,17 @@ } break; case 'curl': - if(function_exists('curl_init')) + if(function_exists('curl_init')) { - $ch = curl_init(); + $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HEADER, 0); - return curl_exec($ch); + // return the value instead of printing the response to browser + curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); + $result = curl_exec($ch); + curl_close($ch); + //return curl_exec($ch); + return $result; } break; case 'socket': This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dj...@us...> - 2012-01-24 16:49:12
|
Revision: 8802 http://xoops.svn.sourceforge.net/xoops/?rev=8802&view=rev Author: djculex Date: 2012-01-24 16:49:01 +0000 (Tue, 24 Jan 2012) Log Message: ----------- Trolls stole code changes... bringing back verification php array to javascript array Modified Paths: -------------- XoopsModules/smallworld/trunk/smallworld/js/smallworld.js XoopsModules/smallworld/trunk/smallworld/preloads/core.php Modified: XoopsModules/smallworld/trunk/smallworld/js/smallworld.js =================================================================== --- XoopsModules/smallworld/trunk/smallworld/js/smallworld.js 2012-01-24 09:17:26 UTC (rev 8801) +++ XoopsModules/smallworld/trunk/smallworld/js/smallworld.js 2012-01-24 16:49:01 UTC (rev 8802) @@ -172,72 +172,105 @@ xoops_smallworld(function() { // Attact validation to registeration parts in register form - if (smallworldvalidationstrenght != 0) { + if (smallworldvalidationstrenght != 0) { xoops_smallworld("#smallworld_profileform-next-0").hide(); xoops_smallworld("#smallworld_profileform-next-1").hide(); + + if(xoops_smallworld.inArray('realname',smallworlduseverification) > -1) { + xoops_smallworld("input#realname").validate({ + expression: "if (VAL) return true; else return false;", + message: SmallworldValidationNameErrorMsg, + }); + } + + if(xoops_smallworld.inArray('gender',smallworlduseverification) > -1) { + xoops_smallworld("select#gender").validate({ + expression: "if (VAL != 0) return true; else return false;", + message: SmallworldValidationGenderErrorMsg + }); + } + + if(xoops_smallworld.inArray('interestedin',smallworlduseverification) > -1) { + xoops_smallworld("#intingender").validate({ + expression: "if (isChecked(SelfID)) return true; else return false;", + message: SmallworldValidationIntingenderErrorMsg + }); + + } + + if(xoops_smallworld.inArray('lookingfor',smallworlduseverification) > -1) { + xoops_smallworld("#searchrelat").validate({ + expression: "if (isChecked(SelfID)) return true; else return false;", + message: SmallworldValidationSearchrelatErrorMsg + }); + } + + if(xoops_smallworld.inArray('emails',smallworlduseverification) > -1) { + xoops_smallworld('input[name="emailtype[]"]').live('blur',function(){ + var id = xoops_smallworld(this).attr('id'); + xoops_smallworld("#"+id).validate({ + expression: "if (VAL.match(/^[^\\W][a-zA-Z0-9\\_\\-\\.]+([a-zA-Z0-9\\_\\-\\.]+)*\\@[a-zA-Z0-9_]+(\\.[a-zA-Z0-9_]+)*\\.[a-zA-Z]{2,4}$/)) return true; else return false;", + message:"<img src='images/error.png' title='"+SmallworldValidationEmailTitleErrorMsg+"'/>" + }); + }); + } + + if(xoops_smallworld.inArray('birthday',smallworlduseverification) > -1) { + xoops_smallworld("input[name='birthday']").validate({ + expression: "if (!isValidDate(parseInt(VAL.split('-')[2],10), parseInt(VAL.split('-')[1],10), parseInt(VAL.split('-')[0],10))) return false; else return true;", + message: SmallworldValidationBirthdayErrorMsg + }); + } + + if(xoops_smallworld.inArray('birthplace',smallworlduseverification) > -1) { + xoops_smallworld("#birthplace").validate({ + expression: "if (VAL) return true; else return false;", + message: SmallworldValidationBirthplaceErrorMsg + }); + } - xoops_smallworld("input#realname").validate({ - expression: "if (VAL) return true; else return false;", - message: SmallworldValidationNameErrorMsg, - }); + if(xoops_smallworld.inArray('birthplace',smallworlduseverification) > -1) { + xoops_smallworld("input#adress").validate({ + expression: "if (VAL) return true; else return false;", + message: SmallworldValidationAdressErrorMsg + }); + } - xoops_smallworld("select#gender").validate({ - expression: "if (VAL != 0) return true; else return false;", - message: SmallworldValidationGenderErrorMsg - }); + if(xoops_smallworld.inArray('presentcity',smallworlduseverification) > -1) { + xoops_smallworld("input#present_city").validate({ + expression: "if (VAL) return true; else return false;", + message: SmallworldValidationCityErrorMsg + }); + } - xoops_smallworld("#intingender").validate({ - expression: "if (isChecked(SelfID)) return true; else return false;", - message: SmallworldValidationIntingenderErrorMsg - }); + if(xoops_smallworld.inArray('country',smallworlduseverification) > -1) { + xoops_smallworld("input#present_country").validate({ + expression: "if (VAL) return true; else return false;", + message: SmallworldValidationCountryErrorMsg + }); + } - xoops_smallworld("#searchrelat").validate({ - expression: "if (isChecked(SelfID)) return true; else return false;", - message: SmallworldValidationSearchrelatErrorMsg - }); - xoops_smallworld('input[name="emailtype[]"]').live('blur',function(){ - var id = xoops_smallworld(this).attr('id'); - xoops_smallworld("#"+id).validate({ - expression: "if (VAL.match(/^[^\\W][a-zA-Z0-9\\_\\-\\.]+([a-zA-Z0-9\\_\\-\\.]+)*\\@[a-zA-Z0-9_]+(\\.[a-zA-Z0-9_]+)*\\.[a-zA-Z]{2,4}$/)) return true; else return false;", - message:"<img src='images/error.png' title='"+SmallworldValidationEmailTitleErrorMsg+"'/>" + if(xoops_smallworld.inArray('website',smallworlduseverification) > -1) { + xoops_smallworld("textarea#website").validate({ + expression: "if (urlCheck(VAL)) return true; else return false;", + message: SmallworldValidationWebsiteErrorMsg }); - }); + } - xoops_smallworld("input[name='birthday']").validate({ - expression: "if (!isValidDate(parseInt(VAL.split('-')[2],10), parseInt(VAL.split('-')[1],10), parseInt(VAL.split('-')[0],10))) return false; else return true;", - message: SmallworldValidationBirthdayErrorMsg - }); - xoops_smallworld("#birthplace").validate({ - expression: "if (VAL) return true; else return false;", - message: SmallworldValidationBirthplaceErrorMsg - }); - - xoops_smallworld("input#adress").validate({ - expression: "if (VAL) return true; else return false;", - message: SmallworldValidationAdressErrorMsg - }); - xoops_smallworld("input#present_city").validate({ - expression: "if (VAL) return true; else return false;", - message: SmallworldValidationCityErrorMsg - }); - xoops_smallworld("input#present_country").validate({ - expression: "if (VAL) return true; else return false;", - message: SmallworldValidationCountryErrorMsg - }); - xoops_smallworld("textarea#website").validate({ - expression: "if (urlCheck(VAL)) return true; else return false;", - message: SmallworldValidationWebsiteErrorMsg - }); - // Activation of validations to be filled on initial load xoops_smallworld('fieldset:visible').find('input,select,textarea').each(function() { xoops_smallworld(this).blur(); - }); + }); } - }); + + if (smallworlduseverification.length !=0) { + xoops_smallworld('#smallworld_profileform-next-0').show(); + xoops_smallworld('#smallworld_profileform-next-1').show(); + } + }); Modified: XoopsModules/smallworld/trunk/smallworld/preloads/core.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/preloads/core.php 2012-01-24 09:17:26 UTC (rev 8801) +++ XoopsModules/smallworld/trunk/smallworld/preloads/core.php 2012-01-24 16:49:01 UTC (rev 8802) @@ -65,8 +65,9 @@ // Check to see if smallworld should use username links to point to default xoops or smallworld $takeoverlinks = $moduleConfig['takeoveruserlinks']; $fieldstoshow = array_flip(smallworld_GetModuleOption('smallworldusethesefields', $repmodule='smallworld')); - $useverification = array_flip(smallworld_GetModuleOption('smallworldmandatoryfields', $repmodule='smallworld')); + $useverification = smallworld_GetModuleOption('smallworldmandatoryfields', $repmodule='smallworld'); $smallworldUV = implode(',', $useverification); + //echo var_dump($smallworldUV); // Get users messages count based on users followerArray $getUserMsgNum = smallworld_getCountFriendMessagesEtc (); @@ -81,7 +82,9 @@ var smallworldTakeOverLinks = $takeoverlinks; var geoL = $geolocate; var geocomplete = ''; - var smallworlduseverification = new Array($smallworldUV); + var smallworldVerString = "$smallworldUV"; + var smallworlduseverification = new Array(); + smallworlduseverification = smallworldVerString.split(","); var hasmessages = $count_invit; var smallworldvalidationstrenght = $validate; var smallworld_getFriendsMsgComCount = $getUserMsgNum; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dj...@us...> - 2012-01-24 18:03:21
|
Revision: 8804 http://xoops.svn.sourceforge.net/xoops/?rev=8804&view=rev Author: djculex Date: 2012-01-24 18:03:10 +0000 (Tue, 24 Jan 2012) Log Message: ----------- Added: Colorbox implimentation for more cool register dialog box Modified Paths: -------------- XoopsModules/smallworld/trunk/smallworld/editprofile.php XoopsModules/smallworld/trunk/smallworld/js/smallworld.js XoopsModules/smallworld/trunk/smallworld/register.php Modified: XoopsModules/smallworld/trunk/smallworld/editprofile.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/editprofile.php 2012-01-24 17:24:54 UTC (rev 8803) +++ XoopsModules/smallworld/trunk/smallworld/editprofile.php 2012-01-24 18:03:10 UTC (rev 8804) @@ -24,7 +24,7 @@ include_once(XOOPS_ROOT_PATH."/modules/smallworld/include/functions.php"); include_once(XOOPS_ROOT_PATH."/modules/smallworld/include/arrays.php"); include_once(XOOPS_ROOT_PATH."/modules/smallworld/class/class_collector.php"); -global $xoopsUser,$xoopsTpl,$xoopsDB; +global $xoopsUser,$xoopsTpl,$xoopsDB, $xoTheme; if ($xoopsUser) { $id = $xoopsUser->getVar('uid'); @@ -315,6 +315,9 @@ $xoopsTpl->append('smallworld_register_title',_SMALLWORLD_REGRISTATION_TITLE); $xoopsTpl->assign('smallworld_beforesubmit',_SMALLWORLD_TEXTBEFORESUBMIT); $xoopsTpl->assign('smallworld_save',_SMALLWORLD_SUBMIT); + + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.colorbox.js'); + $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/colorbox.css'); } } else { redirect_header("register.php", 1); Modified: XoopsModules/smallworld/trunk/smallworld/js/smallworld.js =================================================================== --- XoopsModules/smallworld/trunk/smallworld/js/smallworld.js 2012-01-24 17:24:54 UTC (rev 8803) +++ XoopsModules/smallworld/trunk/smallworld/js/smallworld.js 2012-01-24 18:03:10 UTC (rev 8804) @@ -60,6 +60,26 @@ location.href = 'index.php'; } }); + + // Attach colorbox.js to selector in register.php and edit_profile.php + // If other page / no presence of #smallworld_regform1 then exit function and continue + xoops_smallworld(document).ready(function(){ + if (xoops_smallworld('#smallworld_regform1').length) { // implies *not* zero + xoops_smallworld('#smallworld_regform1').show(); + xoops_smallworld.fn.colorbox({ + width:"auto", + height:"70%", + inline:true, + onCleanup:function() { + xoops_smallworld('#smallworld_regform1').hide(); + }, + onClosed:function() { + location.href = 'index.php'; + }, + href:"#smallworld_regform1" + }); + }; + }); // Function to make friend invitations form into ui dialog xoops_smallworld(function() { Modified: XoopsModules/smallworld/trunk/smallworld/register.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/register.php 2012-01-24 17:24:54 UTC (rev 8803) +++ XoopsModules/smallworld/trunk/smallworld/register.php 2012-01-24 18:03:10 UTC (rev 8804) @@ -25,7 +25,7 @@ include_once(XOOPS_ROOT_PATH."/modules/smallworld/include/functions.php"); include_once(XOOPS_ROOT_PATH."/modules/smallworld/include/arrays.php"); include_once(XOOPS_ROOT_PATH."/modules/smallworld/class/class_collector.php"); -global $xoopsUser,$xoopsTpl; +global $xoopsUser,$xoopsTpl,$xoTheme; if ($xoopsUser) { $id = $xoopsUser->getVar('uid'); @@ -287,6 +287,9 @@ $xoopsTpl->append('smallworld_register_title',_SMALLWORLD_REGRISTATION_TITLE); $xoopsTpl->assign('smallworld_beforesubmit',_SMALLWORLD_TEXTBEFORESUBMIT); $xoopsTpl->assign('smallworld_save',_SMALLWORLD_SUBMIT); + + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.colorbox.js'); + $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/colorbox.css'); } } else { redirect_header(XOOPS_URL . "/user.php", 1, _NOPERM); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dj...@us...> - 2012-01-24 18:04:00
|
Revision: 8805 http://xoops.svn.sourceforge.net/xoops/?rev=8805&view=rev Author: djculex Date: 2012-01-24 18:03:49 +0000 (Tue, 24 Jan 2012) Log Message: ----------- Added: colorbox files Added Paths: ----------- XoopsModules/smallworld/trunk/smallworld/css/colorbox.css XoopsModules/smallworld/trunk/smallworld/images/controlscb.png XoopsModules/smallworld/trunk/smallworld/images/loading_backgroundcb.png XoopsModules/smallworld/trunk/smallworld/images/loadingcb.gif XoopsModules/smallworld/trunk/smallworld/js/jquery.colorbox.js XoopsModules/smallworld/trunk/smallworld/language/danish/js/jquery.countdown.js XoopsModules/smallworld/trunk/smallworld/language/danish/js/variables.js Added: XoopsModules/smallworld/trunk/smallworld/css/colorbox.css =================================================================== --- XoopsModules/smallworld/trunk/smallworld/css/colorbox.css (rev 0) +++ XoopsModules/smallworld/trunk/smallworld/css/colorbox.css 2012-01-24 18:03:49 UTC (rev 8805) @@ -0,0 +1,51 @@ +/* + ColorBox Core Style: + The following CSS is consistent between example themes and should not be altered. +*/ +#colorbox, #cboxOverlay, #cboxWrapper{position:absolute; top:0; left:0; z-index:9999; overflow:hidden;} +#cboxOverlay{position:fixed; width:100%; height:100%;} +#cboxMiddleLeft, #cboxBottomLeft{clear:left;} +#cboxContent{position:relative;} +#cboxLoadedContent{overflow:auto;} +#cboxTitle{margin:0;} +#cboxLoadingOverlay, #cboxLoadingGraphic{position:absolute; top:0; left:0; width:100%; height:100%;} +#cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{cursor:pointer;} +.cboxPhoto{float:left; margin:auto; border:0; display:block;} +.cboxIframe{width:100%; height:100%; display:block; border:0;} + +/* + User Style: + Change the following styles to modify the appearance of ColorBox. They are + ordered & tabbed in a way that represents the nesting of the generated HTML. +*/ +#cboxOverlay{background:#000;} +#colorbox{} + #cboxTopLeft{width:14px; height:14px; background:url(../images/controls.png) no-repeat 0 0;} + #cboxTopCenter{height:14px; background:url(../images/bordercb.png) repeat-x top left;} + #cboxTopRight{width:14px; height:14px; background:url(../images/controlscb.png) no-repeat -36px 0;} + #cboxBottomLeft{width:14px; height:43px; background:url(../images/controlscb.png) no-repeat 0 -32px;} + #cboxBottomCenter{height:43px; background:url(../images/bordercb.png) repeat-x bottom left;} + #cboxBottomRight{width:14px; height:43px; background:url(../images/controlscb.png) no-repeat -36px -32px;} + #cboxMiddleLeft{width:14px; background:url(../images/controlscb.png) repeat-y -175px 0;} + #cboxMiddleRight{width:14px; background:url(../images/controlscb.png) repeat-y -211px 0;} + #cboxContent{background:#fff; overflow:visible;} + .cboxIframe{background:#fff;} + #cboxError{padding:50px; border:1px solid #ccc;} + #cboxLoadedContent{margin-bottom:5px;} + #cboxLoadingOverlay{background:url(../images/loading_backgroundcb.png) no-repeat center center;} + #cboxLoadingGraphic{background:url(../images/loadingcb.gif) no-repeat center center;} + #cboxTitle{position:absolute; bottom:-25px; left:0; text-align:center; width:100%; font-weight:bold; color:#7C7C7C;} + #cboxCurrent{position:absolute; bottom:-25px; left:58px; font-weight:bold; color:#7C7C7C;} + + #cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{position:absolute; bottom:-29px; background:url(../images/controlscb.png) no-repeat 0px 0px; width:23px; height:23px; text-indent:-9999px;} + #cboxPrevious{left:0px; background-position: -51px -25px;} + #cboxPrevious:hover{background-position:-51px 0px;} + #cboxNext{left:27px; background-position:-75px -25px;} + #cboxNext:hover{background-position:-75px 0px;} + #cboxClose{right:0; background-position:-100px -25px;} + #cboxClose:hover{background-position:-100px 0px;} + + .cboxSlideshow_on #cboxSlideshow{background-position:-125px 0px; right:27px;} + .cboxSlideshow_on #cboxSlideshow:hover{background-position:-150px 0px;} + .cboxSlideshow_off #cboxSlideshow{background-position:-150px -25px; right:27px;} + .cboxSlideshow_off #cboxSlideshow:hover{background-position:-125px 0px;} \ No newline at end of file Added: XoopsModules/smallworld/trunk/smallworld/images/controlscb.png =================================================================== (Binary files differ) Property changes on: XoopsModules/smallworld/trunk/smallworld/images/controlscb.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/smallworld/trunk/smallworld/images/loading_backgroundcb.png =================================================================== (Binary files differ) Property changes on: XoopsModules/smallworld/trunk/smallworld/images/loading_backgroundcb.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/smallworld/trunk/smallworld/images/loadingcb.gif =================================================================== (Binary files differ) Property changes on: XoopsModules/smallworld/trunk/smallworld/images/loadingcb.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/smallworld/trunk/smallworld/js/jquery.colorbox.js =================================================================== --- XoopsModules/smallworld/trunk/smallworld/js/jquery.colorbox.js (rev 0) +++ XoopsModules/smallworld/trunk/smallworld/js/jquery.colorbox.js 2012-01-24 18:03:49 UTC (rev 8805) @@ -0,0 +1,888 @@ +// ColorBox v1.3.19 - jQuery lightbox plugin +// (c) 2011 Jack Moore - jacklmoore.com +// License: http://www.opensource.org/licenses/mit-license.php +(function ($, document, window) { + var + // Default settings object. + // See http://jacklmoore.com/colorbox for details. + defaults = { + transition: "elastic", + speed: 300, + width: false, + initialWidth: "600", + innerWidth: false, + maxWidth: false, + height: false, + initialHeight: "450", + innerHeight: false, + maxHeight: false, + scalePhotos: true, + scrolling: true, + inline: false, + html: false, + iframe: false, + fastIframe: true, + photo: false, + href: false, + title: false, + rel: false, + opacity: 0.9, + preloading: true, + current: "image {current} of {total}", + previous: "previous", + next: "next", + close: "close", + open: false, + returnFocus: true, + reposition: true, + loop: true, + slideshow: false, + slideshowAuto: true, + slideshowSpeed: 2500, + slideshowStart: "start slideshow", + slideshowStop: "stop slideshow", + onOpen: false, + onLoad: false, + onComplete: false, + onCleanup: false, + onClosed: false, + overlayClose: true, + escKey: true, + arrowKey: true, + top: false, + bottom: false, + left: false, + right: false, + fixed: false, + data: undefined + }, + + // Abstracting the HTML and event identifiers for easy rebranding + colorbox = 'colorbox', + prefix = 'cbox', + boxElement = prefix + 'Element', + + // Events + event_open = prefix + '_open', + event_load = prefix + '_load', + event_complete = prefix + '_complete', + event_cleanup = prefix + '_cleanup', + event_closed = prefix + '_closed', + event_purge = prefix + '_purge', + + // Special Handling for IE + isIE = !$.support.opacity && !$.support.style, // IE7 & IE8 + isIE6 = isIE && !window.XMLHttpRequest, // IE6 + event_ie6 = prefix + '_IE6', + + // Cached jQuery Object Variables + $overlay, + $box, + $wrap, + $content, + $topBorder, + $leftBorder, + $rightBorder, + $bottomBorder, + $related, + $window, + $loaded, + $loadingBay, + $loadingOverlay, + $title, + $current, + $slideshow, + $next, + $prev, + $close, + $groupControls, + + // Variables for cached values or use across multiple functions + settings, + interfaceHeight, + interfaceWidth, + loadedHeight, + loadedWidth, + element, + index, + photo, + open, + active, + closing, + loadingTimer, + publicMethod, + div = "div", + init; + + // **************** + // HELPER FUNCTIONS + // **************** + + // Convience function for creating new jQuery objects + function $tag(tag, id, css) { + var element = document.createElement(tag); + + if (id) { + element.id = prefix + id; + } + + if (css) { + element.style.cssText = css; + } + + return $(element); + } + + // Determine the next and previous members in a group. + function getIndex(increment) { + var + max = $related.length, + newIndex = (index + increment) % max; + + return (newIndex < 0) ? max + newIndex : newIndex; + } + + // Convert '%' and 'px' values to integers + function setSize(size, dimension) { + return Math.round((/%/.test(size) ? ((dimension === 'x' ? $window.width() : $window.height()) / 100) : 1) * parseInt(size, 10)); + } + + // Checks an href to see if it is a photo. + // There is a force photo option (photo: true) for hrefs that cannot be matched by this regex. + function isImage(url) { + return settings.photo || /\.(gif|png|jpe?g|bmp|ico)((#|\?).*)?$/i.test(url); + } + + // Assigns function results to their respective properties + function makeSettings() { + var i; + settings = $.extend({}, $.data(element, colorbox)); + + for (i in settings) { + if ($.isFunction(settings[i]) && i.slice(0, 2) !== 'on') { // checks to make sure the function isn't one of the callbacks, they will be handled at the appropriate time. + settings[i] = settings[i].call(element); + } + } + + settings.rel = settings.rel || element.rel || 'nofollow'; + settings.href = settings.href || $(element).attr('href'); + settings.title = settings.title || element.title; + + if (typeof settings.href === "string") { + settings.href = $.trim(settings.href); + } + } + + function trigger(event, callback) { + $.event.trigger(event); + if (callback) { + callback.call(element); + } + } + + // Slideshow functionality + function slideshow() { + var + timeOut, + className = prefix + "Slideshow_", + click = "click." + prefix, + start, + stop, + clear; + + if (settings.slideshow && $related[1]) { + start = function () { + $slideshow + .text(settings.slideshowStop) + .unbind(click) + .bind(event_complete, function () { + if (settings.loop || $related[index + 1]) { + timeOut = setTimeout(publicMethod.next, settings.slideshowSpeed); + } + }) + .bind(event_load, function () { + clearTimeout(timeOut); + }) + .one(click + ' ' + event_cleanup, stop); + $box.removeClass(className + "off").addClass(className + "on"); + timeOut = setTimeout(publicMethod.next, settings.slideshowSpeed); + }; + + stop = function () { + clearTimeout(timeOut); + $slideshow + .text(settings.slideshowStart) + .unbind([event_complete, event_load, event_cleanup, click].join(' ')) + .one(click, function () { + publicMethod.next(); + start(); + }); + $box.removeClass(className + "on").addClass(className + "off"); + }; + + if (settings.slideshowAuto) { + start(); + } else { + stop(); + } + } else { + $box.removeClass(className + "off " + className + "on"); + } + } + + function launch(target) { + if (!closing) { + + element = target; + + makeSettings(); + + $related = $(element); + + index = 0; + + if (settings.rel !== 'nofollow') { + $related = $('.' + boxElement).filter(function () { + var relRelated = $.data(this, colorbox).rel || this.rel; + return (relRelated === settings.rel); + }); + index = $related.index(element); + + // Check direct calls to ColorBox. + if (index === -1) { + $related = $related.add(element); + index = $related.length - 1; + } + } + + if (!open) { + open = active = true; // Prevents the page-change action from queuing up if the visitor holds down the left or right keys. + + $box.show(); + + if (settings.returnFocus) { + $(element).blur().one(event_closed, function () { + $(this).focus(); + }); + } + + // +settings.opacity avoids a problem in IE when using non-zero-prefixed-string-values, like '.5' + $overlay.css({"opacity": +settings.opacity, "cursor": settings.overlayClose ? "pointer" : "auto"}).show(); + + // Opens inital empty ColorBox prior to content being loaded. + settings.w = setSize(settings.initialWidth, 'x'); + settings.h = setSize(settings.initialHeight, 'y'); + publicMethod.position(); + + if (isIE6) { + $window.bind('resize.' + event_ie6 + ' scroll.' + event_ie6, function () { + $overlay.css({width: $window.width(), height: $window.height(), top: $window.scrollTop(), left: $window.scrollLeft()}); + }).trigger('resize.' + event_ie6); + } + + trigger(event_open, settings.onOpen); + + $groupControls.add($title).hide(); + + $close.html(settings.close).show(); + } + + publicMethod.load(true); + } + } + + // ColorBox's markup needs to be added to the DOM prior to being called + // so that the browser will go ahead and load the CSS background images. + function appendHTML() { + if (!$box && document.body) { + init = false; + + $window = $(window); + $box = $tag(div).attr({id: colorbox, 'class': isIE ? prefix + (isIE6 ? 'IE6' : 'IE') : ''}).hide(); + $overlay = $tag(div, "Overlay", isIE6 ? 'position:absolute' : '').hide(); + $wrap = $tag(div, "Wrapper"); + $content = $tag(div, "Content").append( + $loaded = $tag(div, "LoadedContent", 'width:0; height:0; overflow:hidden'), + $loadingOverlay = $tag(div, "LoadingOverlay").add($tag(div, "LoadingGraphic")), + $title = $tag(div, "Title"), + $current = $tag(div, "Current"), + $next = $tag(div, "Next"), + $prev = $tag(div, "Previous"), + $slideshow = $tag(div, "Slideshow").bind(event_open, slideshow), + $close = $tag(div, "Close") + ); + + $wrap.append( // The 3x3 Grid that makes up ColorBox + $tag(div).append( + $tag(div, "TopLeft"), + $topBorder = $tag(div, "TopCenter"), + $tag(div, "TopRight") + ), + $tag(div, false, 'clear:left').append( + $leftBorder = $tag(div, "MiddleLeft"), + $content, + $rightBorder = $tag(div, "MiddleRight") + ), + $tag(div, false, 'clear:left').append( + $tag(div, "BottomLeft"), + $bottomBorder = $tag(div, "BottomCenter"), + $tag(div, "BottomRight") + ) + ).find('div div').css({'float': 'left'}); + + $loadingBay = $tag(div, false, 'position:absolute; width:9999px; visibility:hidden; display:none'); + + $groupControls = $next.add($prev).add($current).add($slideshow); + + $(document.body).append($overlay, $box.append($wrap, $loadingBay)); + } + } + + // Add ColorBox's event bindings + function addBindings() { + if ($box) { + if (!init) { + init = true; + + // Cache values needed for size calculations + interfaceHeight = $topBorder.height() + $bottomBorder.height() + $content.outerHeight(true) - $content.height();//Subtraction needed for IE6 + interfaceWidth = $leftBorder.width() + $rightBorder.width() + $content.outerWidth(true) - $content.width(); + loadedHeight = $loaded.outerHeight(true); + loadedWidth = $loaded.outerWidth(true); + + // Setting padding to remove the need to do size conversions during the animation step. + $box.css({"padding-bottom": interfaceHeight, "padding-right": interfaceWidth}); + + // Anonymous functions here keep the public method from being cached, thereby allowing them to be redefined on the fly. + $next.click(function () { + publicMethod.next(); + }); + $prev.click(function () { + publicMethod.prev(); + }); + $close.click(function () { + publicMethod.close(); + }); + $overlay.click(function () { + if (settings.overlayClose) { + publicMethod.close(); + } + }); + + // Key Bindings + $(document).bind('keydown.' + prefix, function (e) { + var key = e.keyCode; + if (open && settings.escKey && key === 27) { + e.preventDefault(); + publicMethod.close(); + } + if (open && settings.arrowKey && $related[1]) { + if (key === 37) { + e.preventDefault(); + $prev.click(); + } else if (key === 39) { + e.preventDefault(); + $next.click(); + } + } + }); + + $('.' + boxElement, document).live('click', function (e) { + // ignore non-left-mouse-clicks and clicks modified with ctrl / command, shift, or alt. + // See: http://jacklmoore.com/notes/click-events/ + if (!(e.which > 1 || e.shiftKey || e.altKey || e.metaKey)) { + e.preventDefault(); + launch(this); + } + }); + } + return true; + } + return false; + } + + // Don't do anything if ColorBox already exists. + if ($.colorbox) { + return; + } + + // Append the HTML when the DOM loads + $(appendHTML); + + + // **************** + // PUBLIC FUNCTIONS + // Usage format: $.fn.colorbox.close(); + // Usage from within an iframe: parent.$.fn.colorbox.close(); + // **************** + + publicMethod = $.fn[colorbox] = $[colorbox] = function (options, callback) { + var $this = this; + + options = options || {}; + + appendHTML(); + + if (addBindings()) { + if (!$this[0]) { + if ($this.selector) { // if a selector was given and it didn't match any elements, go ahead and exit. + return $this; + } + // if no selector was given (ie. $.colorbox()), create a temporary element to work with + $this = $('<a/>'); + options.open = true; // assume an immediate open + } + + if (callback) { + options.onComplete = callback; + } + + $this.each(function () { + $.data(this, colorbox, $.extend({}, $.data(this, colorbox) || defaults, options)); + }).addClass(boxElement); + + if (($.isFunction(options.open) && options.open.call($this)) || options.open) { + launch($this[0]); + } + } + + return $this; + }; + + publicMethod.position = function (speed, loadedCallback) { + var + top = 0, + left = 0, + offset = $box.offset(), + scrollTop = $window.scrollTop(), + scrollLeft = $window.scrollLeft(); + + $window.unbind('resize.' + prefix); + + // remove the modal so that it doesn't influence the document width/height + $box.css({top: -9e4, left: -9e4}); + + if (settings.fixed && !isIE6) { + offset.top -= scrollTop; + offset.left -= scrollLeft; + $box.css({position: 'fixed'}); + } else { + top = scrollTop; + left = scrollLeft; + $box.css({position: 'absolute'}); + } + + // keeps the top and left positions within the browser's viewport. + if (settings.right !== false) { + left += Math.max($window.width() - settings.w - loadedWidth - interfaceWidth - setSize(settings.right, 'x'), 0); + } else if (settings.left !== false) { + left += setSize(settings.left, 'x'); + } else { + left += Math.round(Math.max($window.width() - settings.w - loadedWidth - interfaceWidth, 0) / 2); + } + + if (settings.bottom !== false) { + top += Math.max($window.height() - settings.h - loadedHeight - interfaceHeight - setSize(settings.bottom, 'y'), 0); + } else if (settings.top !== false) { + top += setSize(settings.top, 'y'); + } else { + top += Math.round(Math.max($window.height() - settings.h - loadedHeight - interfaceHeight, 0) / 2); + } + + $box.css({top: offset.top, left: offset.left}); + + // setting the speed to 0 to reduce the delay between same-sized content. + speed = ($box.width() === settings.w + loadedWidth && $box.height() === settings.h + loadedHeight) ? 0 : speed || 0; + + // this gives the wrapper plenty of breathing room so it's floated contents can move around smoothly, + // but it has to be shrank down around the size of div#colorbox when it's done. If not, + // it can invoke an obscure IE bug when using iframes. + $wrap[0].style.width = $wrap[0].style.height = "9999px"; + + function modalDimensions(that) { + $topBorder[0].style.width = $bottomBorder[0].style.width = $content[0].style.width = that.style.width; + $content[0].style.height = $leftBorder[0].style.height = $rightBorder[0].style.height = that.style.height; + } + + $box.dequeue().animate({width: settings.w + loadedWidth, height: settings.h + loadedHeight, top: top, left: left}, { + duration: speed, + complete: function () { + modalDimensions(this); + + active = false; + + // shrink the wrapper down to exactly the size of colorbox to avoid a bug in IE's iframe implementation. + $wrap[0].style.width = (settings.w + loadedWidth + interfaceWidth) + "px"; + $wrap[0].style.height = (settings.h + loadedHeight + interfaceHeight) + "px"; + + if (settings.reposition) { + setTimeout(function () { // small delay before binding onresize due to an IE8 bug. + $window.bind('resize.' + prefix, publicMethod.position); + }, 1); + } + + if (loadedCallback) { + loadedCallback(); + } + }, + step: function () { + modalDimensions(this); + } + }); + }; + + publicMethod.resize = function (options) { + if (open) { + options = options || {}; + + if (options.width) { + settings.w = setSize(options.width, 'x') - loadedWidth - interfaceWidth; + } + if (options.innerWidth) { + settings.w = setSize(options.innerWidth, 'x'); + } + $loaded.css({width: settings.w}); + + if (options.height) { + settings.h = setSize(options.height, 'y') - loadedHeight - interfaceHeight; + } + if (options.innerHeight) { + settings.h = setSize(options.innerHeight, 'y'); + } + if (!options.innerHeight && !options.height) { + $loaded.css({height: "auto"}); + settings.h = $loaded.height(); + } + $loaded.css({height: settings.h}); + + publicMethod.position(settings.transition === "none" ? 0 : settings.speed); + } + }; + + publicMethod.prep = function (object) { + if (!open) { + return; + } + + var callback, speed = settings.transition === "none" ? 0 : settings.speed; + + $loaded.remove(); + $loaded = $tag(div, 'LoadedContent').append(object); + + function getWidth() { + settings.w = settings.w || $loaded.width(); + settings.w = settings.mw && settings.mw < settings.w ? settings.mw : settings.w; + return settings.w; + } + function getHeight() { + settings.h = settings.h || $loaded.height(); + settings.h = settings.mh && settings.mh < settings.h ? settings.mh : settings.h; + return settings.h; + } + + $loaded.hide() + .appendTo($loadingBay.show())// content has to be appended to the DOM for accurate size calculations. + .css({width: getWidth(), overflow: settings.scrolling ? 'auto' : 'hidden'}) + .css({height: getHeight()})// sets the height independently from the width in case the new width influences the value of height. + .prependTo($content); + + $loadingBay.hide(); + + // floating the IMG removes the bottom line-height and fixed a problem where IE miscalculates the width of the parent element as 100% of the document width. + //$(photo).css({'float': 'none', marginLeft: 'auto', marginRight: 'auto'}); + + $(photo).css({'float': 'none'}); + + // Hides SELECT elements in IE6 because they would otherwise sit on top of the overlay. + if (isIE6) { + $('select').not($box.find('select')).filter(function () { + return this.style.visibility !== 'hidden'; + }).css({'visibility': 'hidden'}).one(event_cleanup, function () { + this.style.visibility = 'inherit'; + }); + } + + callback = function () { + var preload, i, total = $related.length, iframe, frameBorder = 'frameBorder', allowTransparency = 'allowTransparency', complete, src, img; + + if (!open) { + return; + } + + function removeFilter() { + if (isIE) { + $box[0].style.removeAttribute('filter'); + } + } + + complete = function () { + clearTimeout(loadingTimer); + $loadingOverlay.hide(); + trigger(event_complete, settings.onComplete); + }; + + if (isIE) { + //This fadeIn helps the bicubic resampling to kick-in. + if (photo) { + $loaded.fadeIn(100); + } + } + + $title.html(settings.title).add($loaded).show(); + + if (total > 1) { // handle grouping + if (typeof settings.current === "string") { + $current.html(settings.current.replace('{current}', index + 1).replace('{total}', total)).show(); + } + + $next[(settings.loop || index < total - 1) ? "show" : "hide"]().html(settings.next); + $prev[(settings.loop || index) ? "show" : "hide"]().html(settings.previous); + + if (settings.slideshow) { + $slideshow.show(); + } + + // Preloads images within a rel group + if (settings.preloading) { + preload = [ + getIndex(-1), + getIndex(1) + ]; + while (i = $related[preload.pop()]) { + src = $.data(i, colorbox).href || i.href; + if ($.isFunction(src)) { + src = src.call(i); + } + if (isImage(src)) { + img = new Image(); + img.src = src; + } + } + } + } else { + $groupControls.hide(); + } + + if (settings.iframe) { + iframe = $tag('iframe')[0]; + + if (frameBorder in iframe) { + iframe[frameBorder] = 0; + } + if (allowTransparency in iframe) { + iframe[allowTransparency] = "true"; + } + // give the iframe a unique name to prevent caching + iframe.name = prefix + (+new Date()); + if (settings.fastIframe) { + complete(); + } else { + $(iframe).one('load', complete); + } + iframe.src = settings.href; + if (!settings.scrolling) { + iframe.scrolling = "no"; + } + $(iframe).addClass(prefix + 'Iframe').appendTo($loaded).one(event_purge, function () { + iframe.src = "//about:blank"; + }); + } else { + complete(); + } + + if (settings.transition === 'fade') { + $box.fadeTo(speed, 1, removeFilter); + } else { + removeFilter(); + } + }; + + if (settings.transition === 'fade') { + $box.fadeTo(speed, 0, function () { + publicMethod.position(0, callback); + }); + } else { + publicMethod.position(speed, callback); + } + }; + + publicMethod.load = function (launched) { + var href, setResize, prep = publicMethod.prep; + + active = true; + + photo = false; + + element = $related[index]; + + if (!launched) { + makeSettings(); + } + + trigger(event_purge); + + trigger(event_load, settings.onLoad); + + settings.h = settings.height ? + setSize(settings.height, 'y') - loadedHeight - interfaceHeight : + settings.innerHeight && setSize(settings.innerHeight, 'y'); + + settings.w = settings.width ? + setSize(settings.width, 'x') - loadedWidth - interfaceWidth : + settings.innerWidth && setSize(settings.innerWidth, 'x'); + + // Sets the minimum dimensions for use in image scaling + settings.mw = settings.w; + settings.mh = settings.h; + + // Re-evaluate the minimum width and height based on maxWidth and maxHeight values. + // If the width or height exceed the maxWidth or maxHeight, use the maximum values instead. + if (settings.maxWidth) { + settings.mw = setSize(settings.maxWidth, 'x') - loadedWidth - interfaceWidth; + settings.mw = settings.w && settings.w < settings.mw ? settings.w : settings.mw; + } + if (settings.maxHeight) { + settings.mh = setSize(settings.maxHeight, 'y') - loadedHeight - interfaceHeight; + settings.mh = settings.h && settings.h < settings.mh ? settings.h : settings.mh; + } + + href = settings.href; + + loadingTimer = setTimeout(function () { + $loadingOverlay.show(); + }, 100); + + if (settings.inline) { + // Inserts an empty placeholder where inline content is being pulled from. + // An event is bound to put inline content back when ColorBox closes or loads new content. + $tag(div).hide().insertBefore($(href)[0]).one(event_purge, function () { + $(this).replaceWith($loaded.children()); + }); + prep($(href)); + } else if (settings.iframe) { + // IFrame element won't be added to the DOM until it is ready to be displayed, + // to avoid problems with DOM-ready JS that might be trying to run in that iframe. + prep(" "); + } else if (settings.html) { + prep(settings.html); + } else if (isImage(href)) { + $(photo = new Image()) + .addClass(prefix + 'Photo') + .error(function () { + settings.title = false; + prep($tag(div, 'Error').text('This image could not be loaded')); + }) + .load(function () { + var percent; + photo.onload = null; //stops animated gifs from firing the onload repeatedly. + + if (settings.scalePhotos) { + setResize = function () { + photo.height -= photo.height * percent; + photo.width -= photo.width * percent; + }; + if (settings.mw && photo.width > settings.mw) { + percent = (photo.width - settings.mw) / photo.width; + setResize(); + } + if (settings.mh && photo.height > settings.mh) { + percent = (photo.height - settings.mh) / photo.height; + setResize(); + } + } + + if (settings.h) { + photo.style.marginTop = Math.max(settings.h - photo.height, 0) / 2 + 'px'; + } + + if ($related[1] && (settings.loop || $related[index + 1])) { + photo.style.cursor = 'pointer'; + photo.onclick = function () { + publicMethod.next(); + }; + } + + if (isIE) { + photo.style.msInterpolationMode = 'bicubic'; + } + + setTimeout(function () { // A pause because Chrome will sometimes report a 0 by 0 size otherwise. + prep(photo); + }, 1); + }); + + setTimeout(function () { // A pause because Opera 10.6+ will sometimes not run the onload function otherwise. + photo.src = href; + }, 1); + } else if (href) { + $loadingBay.load(href, settings.data, function (data, status, xhr) { + prep(status === 'error' ? $tag(div, 'Error').text('Request unsuccessful: ' + xhr.statusText) : $(this).contents()); + }); + } + }; + + // Navigates to the next page/image in a set. + publicMethod.next = function () { + if (!active && $related[1] && (settings.loop || $related[index + 1])) { + index = getIndex(1); + publicMethod.load(); + } + }; + + publicMethod.prev = function () { + if (!active && $related[1] && (settings.loop || index)) { + index = getIndex(-1); + publicMethod.load(); + } + }; + + // Note: to use this within an iframe use the following format: parent.$.fn.colorbox.close(); + publicMethod.close = function () { + if (open && !closing) { + + closing = true; + + open = false; + + trigger(event_cleanup, settings.onCleanup); + + $window.unbind('.' + prefix + ' .' + event_ie6); + + $overlay.fadeTo(200, 0); + + $box.stop().fadeTo(300, 0, function () { + + $box.add($overlay).css({'opacity': 1, cursor: 'auto'}).hide(); + + trigger(event_purge); + + $loaded.remove(); + + setTimeout(function () { + closing = false; + trigger(event_closed, settings.onClosed); + }, 1); + }); + } + }; + + // Removes changes ColorBox made to the document, but does not remove the plugin + // from jQuery. + publicMethod.remove = function () { + $([]).add($box).add($overlay).remove(); + $box = null; + $('.' + boxElement) + .removeData(colorbox) + .removeClass(boxElement) + .die(); + }; + + // A method for fetching the current element ColorBox is referencing. + // returns a jQuery object. + publicMethod.element = function () { + return $(element); + }; + + publicMethod.settings = defaults; + +}(jQuery, document, this)); \ No newline at end of file Added: XoopsModules/smallworld/trunk/smallworld/language/danish/js/jquery.countdown.js =================================================================== --- XoopsModules/smallworld/trunk/smallworld/language/danish/js/jquery.countdown.js (rev 0) +++ XoopsModules/smallworld/trunk/smallworld/language/danish/js/jquery.countdown.js 2012-01-24 18:03:49 UTC (rev 8805) @@ -0,0 +1,15 @@ +/* http://keith-wood.name/countdown.html + Countdown for jQuery v1.5.10. + Written by Keith Wood (kbwood{at}iinet.com.au) January 2008. + Dual licensed under the GPL (http://dev.jquery.com/browser/trunk/jquery/GPL-LICENSE.txt) and + MIT (http://dev.jquery.com/browser/trunk/jquery/MIT-LICENSE.txt) licenses. + Please attribute the author if you use it. */ +(function(xoops_smallworld) { + xoops_smallworld.countdown.regional[''] = { + labels: ['Years', 'Months', 'Weeks', 'Days', 'Hours', 'Minutes', 'Seconds'], + labels1: ['Year', 'Month', 'Week', 'Day', 'Hour', 'Minute', 'Second'], + compactLabels: ['y', 'm', 'w', 'd','hrs', 'min', 'sec'], // The compact texts for the counters + whichLabels: null, + timeSeparator: ':', isRTL: false}; + xoops_smallworld.countdown.setDefaults(xoops_smallworld.countdown.regional['']); +})(jQuery); Added: XoopsModules/smallworld/trunk/smallworld/language/danish/js/variables.js =================================================================== --- XoopsModules/smallworld/trunk/smallworld/language/danish/js/variables.js (rev 0) +++ XoopsModules/smallworld/trunk/smallworld/language/danish/js/variables.js 2012-01-24 18:03:49 UTC (rev 8805) @@ -0,0 +1,50 @@ +// Various language codes to be included in header + +var language = 'en'; +var countryshort = 'gb'; +var countrylong = 'england'; + +var _smallworldContinueToReg = "Continue to registration"; +var _smallworldCancel = "Cancel"; + +var SmallworldGenderError = "Please choose your gender"; +var SmallworldBirthdayError = "Please choose your birthday"; +var SmallworldEmailError = "Please fill at least one email"; + +var SmallworldSavedSuccesMsg = "Saved with success"; + +var SmallworldConfirmBtnFI = "Are you sure ?"; +var SmallworldConfirmBtnYes = 'Yes!'; +var SmallworldConfirmBtnNo = 'No!'; + +var smallworldNewMessages = "You have new events +"; +var smallworldDeletedMessages = "Messages have been deleted. Count is now -"; + +//Validation +var SmallworldValidationBackButton = "Backward"; // back button +var SmallworldValidationForwardButton = "Forward"; // Forward button +var SmallworldValidationNameErrorMsg = "Please write your name"; // Real name field +var SmallworldValidationGenderErrorMsg = "Please choose valid gender"; // Choose gender +var SmallworldValidationIntingenderErrorMsg = "Please check at least one. Default is 'none'"; // Interested in gender +var SmallworldValidationSearchrelatErrorMsg = "Please check at least one. Default is 'Friends'"; // Searching for +var SmallworldValidationBirthdayErrorMsg = "Please enter a valid Date"; // Birthday +var SmallworldValidationEmailTitleErrorMsg = "Invalid email format";// Emailtype image title +var SmallworldValidationBirthplaceErrorMsg = "Please enter birthplace"; // Birthplace +var SmallworldValidationAdressErrorMsg = "Please enter street adress"; // Adress +var SmallworldValidationCityErrorMsg = "Please enter city"; // City +var SmallworldValidationCountryErrorMsg = "Please enter country"; // country +var SmallworldValidationWebsiteErrorMsg = "Please enter your website"; // Website +var SmallworldSureDelete = "Sure you want to delete this update? There is NO undo!"; // Delete comments +var SmallworldAdminSureDeleteUser = "Are you sure you want to delete user "; //Admin delete user +var SmallworldDialogStatsTitle = "Statistics"; // Title for statistic dialog window +// Languages for jquery confirm box +var args = { + 'confirm' : false, // Ok and Cancel buttons + 'verify' : true, // Yes and No buttons + 'input' : false, // Text input (can be true or string for default text) + 'animate' : true, // Groovy animation (can true or number, default is 400) + 'textOk' : 'Okay', // Ok button default text + 'textCancel' : 'Cancel', // Cancel button default text + 'textYes' : 'Yes!', // Yes button default text + 'textNo' : 'No!' // No button default text + } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dj...@us...> - 2012-01-24 21:06:20
|
Revision: 8808 http://xoops.svn.sourceforge.net/xoops/?rev=8808&view=rev Author: djculex Date: 2012-01-24 21:06:14 +0000 (Tue, 24 Jan 2012) Log Message: ----------- keyword props Modified Paths: -------------- XoopsModules/smallworld/trunk/smallworld/admin/admin_header2.php XoopsModules/smallworld/trunk/smallworld/admin/div_useradmin.php XoopsModules/smallworld/trunk/smallworld/admin/main.php Property Changed: ---------------- XoopsModules/smallworld/trunk/smallworld/admin/admin_header2.php XoopsModules/smallworld/trunk/smallworld/admin/div_useradmin.php XoopsModules/smallworld/trunk/smallworld/admin/main.php XoopsModules/smallworld/trunk/smallworld/css/colorbox.css XoopsModules/smallworld/trunk/smallworld/images/controlscb.png XoopsModules/smallworld/trunk/smallworld/images/loading_backgroundcb.png XoopsModules/smallworld/trunk/smallworld/images/loadingcb.gif XoopsModules/smallworld/trunk/smallworld/js/jquery.colorbox.js XoopsModules/smallworld/trunk/smallworld/language/danish/js/jquery.countdown.js XoopsModules/smallworld/trunk/smallworld/language/danish/js/variables.js Modified: XoopsModules/smallworld/trunk/smallworld/admin/admin_header2.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/admin/admin_header2.php 2012-01-24 20:59:14 UTC (rev 8807) +++ XoopsModules/smallworld/trunk/smallworld/admin/admin_header2.php 2012-01-24 21:06:14 UTC (rev 8808) @@ -12,11 +12,11 @@ * @module: Smallworld * @Author: Michael Albertsen (http://culex.dk) <cu...@cu...> * @copyright: 2011 Culex -* @Repository path: $HeadURL: https://xoops.svn.sourceforge.net/svnroot/xoops/XoopsModules/smallworld/trunk/xoops_version.php $ -* @Last committed: $Revision: 8707 $ -* @Last changed by: $Author: djculex $ -* @Last changed date: $Date: 2012-01-13 09:40:50 +0100 (fr, 13 jan 2012) $ -* @ID: $Id: xoops_version.php 8707 2012-01-13 08:40:50Z djculex $ +* @Repository path: $HeadURL$ +* @Last committed: $Revision$ +* @Last changed by: $Author$ +* @Last changed date: $Date$ +* @ID: $Id$ **/ include '../../../mainfile.php'; Property changes on: XoopsModules/smallworld/trunk/smallworld/admin/admin_header2.php ___________________________________________________________________ Added: svn:keywords + HeadURL Revision Author Date ID Modified: XoopsModules/smallworld/trunk/smallworld/admin/div_useradmin.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/admin/div_useradmin.php 2012-01-24 20:59:14 UTC (rev 8807) +++ XoopsModules/smallworld/trunk/smallworld/admin/div_useradmin.php 2012-01-24 21:06:14 UTC (rev 8808) @@ -12,11 +12,11 @@ * @module: Smallworld * @Author: Michael Albertsen (http://culex.dk) <cu...@cu...> * @copyright: 2011 Culex -* @Repository path: $HeadURL: https://xoops.svn.sourceforge.net/svnroot/xoops/XoopsModules/smallworld/trunk/admin/div_useradmin.php $ -* @Last committed: $Revision: 8707 $ -* @Last changed by: $Author: djculex $ -* @Last changed date: $Date: 2012-01-13 09:40:50 +0100 (fr, 13 jan 2012) $ -* @ID: $Id: div_useradmin.php 8707 2012-01-13 08:40:50Z djculex $ +* @Repository path: $HeadURL$ +* @Last committed: $Revision$ +* @Last changed by: $Author$ +* @Last changed date: $Date$ +* @ID: $Id$ **/ require_once 'admin_header.php'; Property changes on: XoopsModules/smallworld/trunk/smallworld/admin/div_useradmin.php ___________________________________________________________________ Added: svn:keywords + HeadURL Revision Author Date ID Modified: XoopsModules/smallworld/trunk/smallworld/admin/main.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/admin/main.php 2012-01-24 20:59:14 UTC (rev 8807) +++ XoopsModules/smallworld/trunk/smallworld/admin/main.php 2012-01-24 21:06:14 UTC (rev 8808) @@ -12,11 +12,11 @@ * @module: Smallworld * @Author: Michael Albertsen (http://culex.dk) <cu...@cu...> * @copyright: 2011 Culex -* @Repository path: $HeadURL: https://xoops.svn.sourceforge.net/svnroot/xoops/XoopsModules/smallworld/trunk/xoops_version.php $ -* @Last committed: $Revision: 8707 $ -* @Last changed by: $Author: djculex $ -* @Last changed date: $Date: 2012-01-13 09:40:50 +0100 (fr, 13 jan 2012) $ -* @ID: $Id: xoops_version.php 8707 2012-01-13 08:40:50Z djculex $ +* @Repository path: $HeadURL$ +* @Last committed: $Revision$ +* @Last changed by: $Author$ +* @Last changed date: $Date$ +* @ID: $Id$ **/ require_once 'admin_header.php'; Property changes on: XoopsModules/smallworld/trunk/smallworld/admin/main.php ___________________________________________________________________ Added: svn:keywords + HeadURL Revision Author Date ID Property changes on: XoopsModules/smallworld/trunk/smallworld/css/colorbox.css ___________________________________________________________________ Added: svn:keywords + HeadURL Revision Author Date ID Property changes on: XoopsModules/smallworld/trunk/smallworld/images/controlscb.png ___________________________________________________________________ Added: svn:keywords + HeadURL Revision Author Date ID Property changes on: XoopsModules/smallworld/trunk/smallworld/images/loading_backgroundcb.png ___________________________________________________________________ Added: svn:keywords + HeadURL Revision Author Date ID Property changes on: XoopsModules/smallworld/trunk/smallworld/images/loadingcb.gif ___________________________________________________________________ Added: svn:keywords + HeadURL Revision Author Date ID Property changes on: XoopsModules/smallworld/trunk/smallworld/js/jquery.colorbox.js ___________________________________________________________________ Added: svn:keywords + HeadURL Revision Author Date ID Property changes on: XoopsModules/smallworld/trunk/smallworld/language/danish/js/jquery.countdown.js ___________________________________________________________________ Added: svn:keywords + HeadURL Revision Author Date ID Property changes on: XoopsModules/smallworld/trunk/smallworld/language/danish/js/variables.js ___________________________________________________________________ Added: svn:keywords + HeadURL Revision Author Date ID This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dj...@us...> - 2012-01-25 14:33:43
|
Revision: 8809 http://xoops.svn.sourceforge.net/xoops/?rev=8809&view=rev Author: djculex Date: 2012-01-25 14:33:36 +0000 (Wed, 25 Jan 2012) Log Message: ----------- - Implimenting colorbox instead of jquery dialog(); - Correction in stats() function to show correct user avatar - Css adjustments - Re-attach validate to colorbox forms Modified Paths: -------------- XoopsModules/smallworld/trunk/smallworld/admin/index.php XoopsModules/smallworld/trunk/smallworld/css/smallworld.css XoopsModules/smallworld/trunk/smallworld/editimages.php XoopsModules/smallworld/trunk/smallworld/galleryshow.php XoopsModules/smallworld/trunk/smallworld/img_upload.php XoopsModules/smallworld/trunk/smallworld/include/functions.php XoopsModules/smallworld/trunk/smallworld/index.php XoopsModules/smallworld/trunk/smallworld/js/smallworld.js XoopsModules/smallworld/trunk/smallworld/language/english/js/variables.js XoopsModules/smallworld/trunk/smallworld/language/english/main.php XoopsModules/smallworld/trunk/smallworld/userprofile.php Modified: XoopsModules/smallworld/trunk/smallworld/admin/index.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/admin/index.php 2012-01-24 21:06:14 UTC (rev 8808) +++ XoopsModules/smallworld/trunk/smallworld/admin/index.php 2012-01-25 14:33:36 UTC (rev 8809) @@ -20,7 +20,7 @@ **/ -require_once dirname(dirname(dirname(dirname(__FILE__)))) . '/include/cp_header.php'; +//require_once dirname(dirname(dirname(dirname(__FILE__)))) . '/include/cp_header.php'; include_once dirname(__FILE__) . '/admin_header.php'; xoops_cp_header(); Modified: XoopsModules/smallworld/trunk/smallworld/css/smallworld.css =================================================================== --- XoopsModules/smallworld/trunk/smallworld/css/smallworld.css 2012-01-24 21:06:14 UTC (rev 8808) +++ XoopsModules/smallworld/trunk/smallworld/css/smallworld.css 2012-01-25 14:33:36 UTC (rev 8809) @@ -330,6 +330,11 @@ left:20px } +#_smallworld_birthplace_map,#_smallworld_present_map { +height:550px; +width:550px; +} + /*-------- Register items ---------*/ #smallworld_divstepy-error { @@ -554,9 +559,10 @@ } .smallworld_edit_desc { + overflow:scroll; margin: 0 10px 0 15%; - width: 250px; - height:50px; + width:400px; + height:400px; } .smallworld_editTextSpan { @@ -941,6 +947,9 @@ margin: 5px; } +div#smallworldStatsDiv { +overflow:hidden; +} #smallworld_Stats_title { bottom: 10px; color: red; Modified: XoopsModules/smallworld/trunk/smallworld/editimages.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/editimages.php 2012-01-24 21:06:14 UTC (rev 8808) +++ XoopsModules/smallworld/trunk/smallworld/editimages.php 2012-01-25 14:33:36 UTC (rev 8809) @@ -24,7 +24,7 @@ include_once(XOOPS_ROOT_PATH."/modules/smallworld/include/functions.php"); include_once(XOOPS_ROOT_PATH."/modules/smallworld/include/arrays.php"); include_once(XOOPS_ROOT_PATH."/modules/smallworld/class/class_collector.php"); -global $xoopsUser,$xoopsTpl,$xoopsDB; +global $xoopsUser,$xoopsTpl,$xoopsDB,$xoTheme; if ($xoopsUser) { $userID = $xoopsUser->getVar('uid'); @@ -51,6 +51,8 @@ $i++; } $xoopsTpl->append('editimages',$editimages); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.colorbox.js'); + $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/colorbox.css'); } else { redirect_header("index.php", 1); } Modified: XoopsModules/smallworld/trunk/smallworld/galleryshow.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/galleryshow.php 2012-01-24 21:06:14 UTC (rev 8808) +++ XoopsModules/smallworld/trunk/smallworld/galleryshow.php 2012-01-25 14:33:36 UTC (rev 8809) @@ -34,6 +34,8 @@ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.opacityrollover.js'); $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/gallery_mod.js'); $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.innerfade.js'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.colorbox.js'); + $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/colorbox.css'); $id = $xoopsUser->getVar('uid'); $check = new SmallWorldUser; Modified: XoopsModules/smallworld/trunk/smallworld/img_upload.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/img_upload.php 2012-01-24 21:06:14 UTC (rev 8808) +++ XoopsModules/smallworld/trunk/smallworld/img_upload.php 2012-01-25 14:33:36 UTC (rev 8809) @@ -33,6 +33,8 @@ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.fileupload.js'); $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/upload_application.js'); $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/jquery.fileupload-ui.css'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.colorbox.js'); + $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/colorbox.css'); $id = $xoopsUser->getVar('uid'); $check = new SmallWorldUser; $profile = $check->CheckIfProfile($id); Modified: XoopsModules/smallworld/trunk/smallworld/include/functions.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/include/functions.php 2012-01-24 21:06:14 UTC (rev 8808) +++ XoopsModules/smallworld/trunk/smallworld/include/functions.php 2012-01-25 14:33:36 UTC (rev 8809) @@ -452,7 +452,7 @@ $nu[$i]['username_link'] = "<a href = '".XOOPS_URL."/modules/smallworld/userprofile.php?username=".$r['username']."'>"; $nu[$i]['username_link'] .= $r['username']." (".$r['realname'].") [".$nu[$i]['regdate']."] </a>"; $nu[$i]['userimage'] = $r['userimage']; - $nu[$i]['userimage_link'] = smallworld_getAvatarLink ($r['userid'], $r['userimage']); + $nu[$i]['userimage_link'] = smallworld_getAvatarLink ($r['userid'], Gravatar($r['userid'])); $i++; } Modified: XoopsModules/smallworld/trunk/smallworld/index.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/index.php 2012-01-24 21:06:14 UTC (rev 8808) +++ XoopsModules/smallworld/trunk/smallworld/index.php 2012-01-25 14:33:36 UTC (rev 8809) @@ -136,6 +136,8 @@ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.innerfade.js'); $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.bookmark.js'); $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/oembed.css'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.colorbox.js'); + $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/colorbox.css'); } else { redirect_header(XOOPS_URL . "/user.php", 1, _NOPERM); } Modified: XoopsModules/smallworld/trunk/smallworld/js/smallworld.js =================================================================== --- XoopsModules/smallworld/trunk/smallworld/js/smallworld.js 2012-01-24 21:06:14 UTC (rev 8808) +++ XoopsModules/smallworld/trunk/smallworld/js/smallworld.js 2012-01-25 14:33:36 UTC (rev 8809) @@ -14,53 +14,24 @@ xoops_smallworld(function() { // GET pop for statistics xoops_smallworld('#smallworld_statistics_lnk').live('click',function() { - xoops_smallworld("#smallworldStatsDiv").load('stats.php').dialog({ - show: "blind", - minHeight: "120px", - hide: "explode", - width: "950px", - close: function(event, ui) { - xoops_smallworld("#smallworldStatsDiv").hide(); - xoops_smallworld("#smallworldStatsDiv").empty(); - } - }); - xoops_smallworld("#smallworldStatsDiv").show(); - xoops_smallworld('#smallworldStatsDiv').find(".ui-dialog-titlebar").hide(); - xoops_smallworld('#smallworldStatsDiv').css('overflow','visible'); - - return false; + if (xoops_smallworld('#smallworld_statistics_lnk').length) { // implies *not* zero + xoops_smallworld('#smallworldStatsDiv').show(); + xoops_smallworld("#smallworldStatsDiv").load('stats.php'); + xoops_smallworld.fn.colorbox({ + width:"75%", + height:"18%", + inline:true, + onCleanup:function() { + xoops_smallworld('#smallworldStatsDiv').hide(); + }, + onClosed:function() { + xoops_smallworld('#smallworldStatsDiv').hide(); + }, + href:"#smallworldStatsDiv" + }); + }; }); - - // GET pop for about - xoops_smallworld('#smallworld_information_lnk').live('click',function() { - xoops_smallworld("#smallworldStatsDiv").load('about.php').dialog({ - show: "blind", - minHeight: "120px", - hide: "explode", - width: "950px", - close: function(event, ui) { - xoops_smallworld("#smallworldStatsDiv").hide(); - xoops_smallworld("#smallworldStatsDiv").empty(); - } - }); - xoops_smallworld("#smallworldStatsDiv").show(); - xoops_smallworld('#smallworldStatsDiv').find(".ui-dialog-titlebar").hide(); - xoops_smallworld('#smallworldStatsDiv').css('overflow','visible'); - return false; - }); - - // Function to make registration form into ui dialog - xoops_smallworld('#smallworld_regform1').dialog({ - minWidth: 800, - show: "blind", - hide: "explode", - width: "750px", - close: function(event, ui) { - location.href = 'index.php'; - } - }); - // Attach colorbox.js to selector in register.php and edit_profile.php // If other page / no presence of #smallworld_regform1 then exit function and continue xoops_smallworld(document).ready(function(){ @@ -70,6 +41,9 @@ width:"auto", height:"70%", inline:true, + onComplete: function() { + smallworld_DoValStart (); + }, onCleanup:function() { xoops_smallworld('#smallworld_regform1').hide(); }, @@ -83,49 +57,83 @@ // Function to make friend invitations form into ui dialog xoops_smallworld(function() { - if (hasmessages > 0) { - xoops_smallworld('#friendInvitations_box').dialog({ - minWidth: 500, - show: "blind", - hide: "explode", - width: "500px" - }); + if (hasmessages > 0) { + if (xoops_smallworld('#friendInvitations_box').length) { // implies *not* zero + xoops_smallworld('#friendInvitations_box').show(); + xoops_smallworld.fn.colorbox({ + width:"50%", + inline:true, + onCleanup:function() { + xoops_smallworld('#friendInvitations_box').hide(); + }, + href:"#friendInvitations_box" + }); + }; xoops_smallworld('#smallworldrequestlink').live('click',function() { - xoops_smallworld('#friendInvitations_box').dialog( "close" ); + //xoops_smallworld('#friendInvitations_box').dialog( "close" ); + xoops_smallworld.colorbox.close(); }); } }); // Function to make Edit image descriptions form into ui dialog - xoops_smallworld('#smallworld_edit_imageform').dialog({ - minWidth: 800, - show: "blind", - height: 300, - hide: "explode", - width: "600px", - close: function(event, ui) { location.href = 'index.php'; } - }); + xoops_smallworld(document).ready(function(){ + if (xoops_smallworld('#smallworld_edit_imageform').length) { // implies *not* zero + xoops_smallworld('#smallworld_edit_imageform').show(); + xoops_smallworld.fn.colorbox({ + width:"800", + height:"70%", + inline:true, + onCleanup:function() { + xoops_smallworld('#smallworld_edit_imageform').hide(); + }, + onClosed:function() { + location.href = 'index.php'; + }, + href:"#smallworld_edit_imageform" + }); + }; + }); // Function to make File upload form into ui dialog - xoops_smallworld('#file_upload').dialog({ - minWidth: 900, - height: 300, - show: "blind", - hide: "explode", - width: "950px", - close: function(event, ui) { location.href = 'editimages.php'; } - }); + xoops_smallworld(document).ready(function(){ + if (xoops_smallworld('#file_upload').length) { // implies *not* zero + xoops_smallworld('#file_upload').show(); + xoops_smallworld.fn.colorbox({ + width:"auto", + height:"70%", + inline:true, + onCleanup:function() { + xoops_smallworld('#file_upload').hide(); + }, + onClosed:function() { + location.href = 'index.php'; + }, + href:"#file_upload", + onComplete : function() { + xoops_smallworld(this).colorbox.resize(); + } + }); + }; + }); // Function to make Div with id page into ui dialog - xoops_smallworld('div#page').dialog({ - minWidth: "900px", - show: "blind", - hide: "explode", - width: "980px", - close: function(event, ui) { - location.href = 'index.php'; - } - }); + xoops_smallworld(document).ready(function(){ + if (xoops_smallworld('div#page').length) { // implies *not* zero + xoops_smallworld('div#page').show(); + xoops_smallworld.fn.colorbox({ + innerWidth:"1000px", + inline:true, + onCleanup:function() { + xoops_smallworld('div#page').hide(); + }, + onClosed:function() { + location.href = 'index.php'; + }, + href:"div#page" + }); + }; + }); // If user does not have a profile in smallworld then goto register. // If user has already a profile then goto edit profile dialog @@ -189,111 +197,7 @@ titleClick: false }); }); - - xoops_smallworld(function() { - // Attact validation to registeration parts in register form - if (smallworldvalidationstrenght != 0) { - xoops_smallworld("#smallworld_profileform-next-0").hide(); - xoops_smallworld("#smallworld_profileform-next-1").hide(); - - if(xoops_smallworld.inArray('realname',smallworlduseverification) > -1) { - xoops_smallworld("input#realname").validate({ - expression: "if (VAL) return true; else return false;", - message: SmallworldValidationNameErrorMsg, - }); - } - - if(xoops_smallworld.inArray('gender',smallworlduseverification) > -1) { - xoops_smallworld("select#gender").validate({ - expression: "if (VAL != 0) return true; else return false;", - message: SmallworldValidationGenderErrorMsg - }); - } - - if(xoops_smallworld.inArray('interestedin',smallworlduseverification) > -1) { - xoops_smallworld("#intingender").validate({ - expression: "if (isChecked(SelfID)) return true; else return false;", - message: SmallworldValidationIntingenderErrorMsg - }); - - } - - if(xoops_smallworld.inArray('lookingfor',smallworlduseverification) > -1) { - xoops_smallworld("#searchrelat").validate({ - expression: "if (isChecked(SelfID)) return true; else return false;", - message: SmallworldValidationSearchrelatErrorMsg - }); - } - - if(xoops_smallworld.inArray('emails',smallworlduseverification) > -1) { - xoops_smallworld('input[name="emailtype[]"]').live('blur',function(){ - var id = xoops_smallworld(this).attr('id'); - xoops_smallworld("#"+id).validate({ - expression: "if (VAL.match(/^[^\\W][a-zA-Z0-9\\_\\-\\.]+([a-zA-Z0-9\\_\\-\\.]+)*\\@[a-zA-Z0-9_]+(\\.[a-zA-Z0-9_]+)*\\.[a-zA-Z]{2,4}$/)) return true; else return false;", - message:"<img src='images/error.png' title='"+SmallworldValidationEmailTitleErrorMsg+"'/>" - }); - }); - } - - if(xoops_smallworld.inArray('birthday',smallworlduseverification) > -1) { - xoops_smallworld("input[name='birthday']").validate({ - expression: "if (!isValidDate(parseInt(VAL.split('-')[2],10), parseInt(VAL.split('-')[1],10), parseInt(VAL.split('-')[0],10))) return false; else return true;", - message: SmallworldValidationBirthdayErrorMsg - }); - } - - if(xoops_smallworld.inArray('birthplace',smallworlduseverification) > -1) { - xoops_smallworld("#birthplace").validate({ - expression: "if (VAL) return true; else return false;", - message: SmallworldValidationBirthplaceErrorMsg - }); - } - if(xoops_smallworld.inArray('birthplace',smallworlduseverification) > -1) { - xoops_smallworld("input#adress").validate({ - expression: "if (VAL) return true; else return false;", - message: SmallworldValidationAdressErrorMsg - }); - } - - if(xoops_smallworld.inArray('presentcity',smallworlduseverification) > -1) { - xoops_smallworld("input#present_city").validate({ - expression: "if (VAL) return true; else return false;", - message: SmallworldValidationCityErrorMsg - }); - } - - if(xoops_smallworld.inArray('country',smallworlduseverification) > -1) { - xoops_smallworld("input#present_country").validate({ - expression: "if (VAL) return true; else return false;", - message: SmallworldValidationCountryErrorMsg - }); - } - - - if(xoops_smallworld.inArray('website',smallworlduseverification) > -1) { - xoops_smallworld("textarea#website").validate({ - expression: "if (urlCheck(VAL)) return true; else return false;", - message: SmallworldValidationWebsiteErrorMsg - }); - } - - - // Activation of validations to be filled on initial load - xoops_smallworld('fieldset:visible').find('input,select,textarea').each(function() { - xoops_smallworld(this).blur(); - }); - - } - - if (smallworlduseverification.length !=0) { - xoops_smallworld('#smallworld_profileform-next-0').show(); - xoops_smallworld('#smallworld_profileform-next-1').show(); - } - }); - - - // Attach geolocate autocomplete to forms if (geoL === 1) { xoops_smallworld('#birthplace').geo_autocomplete(); @@ -304,7 +208,7 @@ // Make Textareas elastic xoops_smallworld(function() { - xoops_smallworld('.favourites, .smallworld_edit_desc, .smallworld_comment, #smallworld_update, #smallworld_update_profile').elastic(); + xoops_smallworld('.favourites, .smallworld_comment, #smallworld_update, #smallworld_update_profile').elastic(); }); @@ -476,77 +380,132 @@ image = "<img src ='"+url+"' />"; xoops_smallworld('<div id="lookingglassuseravatar">'+image+'</div>').appendTo('body'); event.preventDefault(); - xoops_smallworld("div#lookingglassuseravatar").dialog({ - width: 'auto', - modal: true, - open: function(event, ui) { - xoops_smallworld('.ui-dialog-titlebar').hide(); - }, - buttons: [{text: "X", click: function() { xoops_smallworld(this).dialog("close"); }}], - close: function(event, ui) { - xoops_smallworld("#lookingglassuseravatar").remove(); - } - }); + if (xoops_smallworld('#lookingglassuseravatar').length) { // implies *not* zero + xoops_smallworld('#lookingglassuseravatar').show(); + xoops_smallworld.fn.colorbox({ + width:"auto", + height:"70%", + inline:true, + onCleanup:function() { + xoops_smallworld('#lookingglassuseravatar').hide(); + }, + onClosed:function() { + xoops_smallworld("#lookingglassuseravatar").remove(); + }, + onComplete : function() { + xoops_smallworld(this).colorbox.resize(); + }, + href:"#lookingglassuseravatar" + }); + }; }); //close click }); // Attach on clik open education & work (..more) dialogues - xoops_smallworld('#_smallworld_workmore').live('click',function(){ - xoops_smallworld('#workfull').dialog({ - minWidth: 400, - show: "blind", - height: 300, - hide: "explode", - width: "450px" - }); - }); + xoops_smallworld('#_smallworld_workmore').live('click',function(){ + if (xoops_smallworld('#workfull').length) { // implies *not* zero + xoops_smallworld('#workfull').show(); + xoops_smallworld.fn.colorbox({ + width:"450", + height:"300", + inline:true, + onCleanup:function() { + xoops_smallworld('#workfull').hide(); + }, + onClosed:function() { + }, + href:"#workfull" + }); + }; + }); // Show educations in dialog when clicked on more xoops_smallworld('#_smallworld_educationmore').live('click',function(){ - xoops_smallworld('#educationfull').dialog({ - minWidth: 400, - show: "blind", - height: 300, - hide: "explode", - width: "450px" - }); + if (xoops_smallworld('#educationfull').length) { // implies *not* zero + xoops_smallworld('#educationfull').show(); + xoops_smallworld.fn.colorbox({ + width:"450", + height:"300", + inline:true, + onCleanup:function() { + xoops_smallworld('#educationfull').hide(); + }, + onClosed:function() { + }, + href:"#educationfull" + }); + }; }); // Show more info in dialog xoops_smallworld('#_SMALLWORLD_MOREINFO').live('click',function(){ - xoops_smallworld('#interestsandmore').dialog({ - minWidth: 300, - show: "blind", - height: 300, - hide: "explode", - width: "600px" - }); + if (xoops_smallworld('#interestsandmore').length) { // implies *not* zero + xoops_smallworld('#interestsandmore').show(); + xoops_smallworld.fn.colorbox({ + width:"600", + height:"300", + inline:true, + onCleanup:function() { + xoops_smallworld('#interestsandmore').hide(); + }, + onClosed:function() { + }, + href:"#interestsandmore" + }); + }; }); - // Display birthplace in a map dialog - xoops_smallworld('#_smallworld_birthplace_maplink').live('click',function(){ - xoops_smallworld('#_smallworld_birthplace_map').dialog({ - minWidth: 550, - show: "blind", - height: 550, - hide: "explode", - width: "550px" - }); - initialize_birthplace(smallworld_birthlng,smallworld_birthlatt); - }); + //Function to show images in birthplace input + xoops_smallworld('#_smallworld_birthplace_maplink').live('click',function(){ + if (xoops_smallworld('#_smallworld_birthplace_map').length) { // implies *not* zero + xoops_smallworld('#_smallworld_birthplace_map').show(); + xoops_smallworld.fn.colorbox({ + innerWidth:"550px", + innerHeight:"550px", + inline:true, + onCleanup:function() { + xoops_smallworld('#_smallworld_birthplace_map').hide(); + }, + onComplete:function() { + initialize_birthplace(smallworld_birthlng,smallworld_birthlatt); + xoops_smallworld('#_smallworld_birthplace_map').show(); + }, + title: function() { + var title = xoops_smallworld("#_smallworld_birthplace_map").attr( 'title' ); + return title != 'undefined' ? title : false; + }, + href:"#_smallworld_birthplace_map", + }); + + }; + }); - // Display Present location in a map dialog + //Function to show images in present location input xoops_smallworld('#_smallworld_present_maplink').live('click',function(){ - xoops_smallworld('#_smallworld_present_map').dialog({ - minWidth: 550, - show: "blind", - height: 550, - hide: "explode", - width: "550px" - }); - initialize_currplace(smallworld_currlng,smallworld_currlatt); - }); - + if (xoops_smallworld('#_smallworld_present_map').length) { // implies *not* zero + xoops_smallworld('#_smallworld_present_map').show(); + xoops_smallworld.fn.colorbox({ + innerWidth:"550px", + innerHeight:"550px", + inline:true, + onCleanup:function() { + xoops_smallworld('#_smallworld_present_map').hide(); + }, + onComplete:function(){ + initialize_currplace(smallworld_currlng,smallworld_currlatt); + xoops_smallworld('#_smallworld_present_map').show(); + }, + title: function() { + var title = xoops_smallworld("#_smallworld_present_map").attr( 'title' ); + return title != 'undefined' ? title : false; + }, + href:"#_smallworld_present_map" + }); + }; + + }); + + // Function to rewrite urls used in xoops core for directing to profile.php // Sets var uname = link text() // removes /userinfo.php?uid=# @@ -570,7 +529,7 @@ containerheight: '50px' }); - + // Return jSon with count of friends smallworld_getCountFriendMessagesEtcJS(); // Sharing bookmarks defines @@ -609,6 +568,7 @@ // Init birthplace_map function initialize_birthplace(smallworld_birthlng,smallworld_birthlatt) { + var birth_myLatlng = new google.maps.LatLng(smallworld_birthlatt, smallworld_birthlng); var birth_myOptions = { zoom: 8, @@ -767,3 +727,106 @@ }); setTimeout('smallworld_getCountFriendMessagesEtcJS()',10000); }; + +function smallworld_DoValStart () { + // Attact validation to registeration parts in register form + if (smallworldvalidationstrenght != 0) { + xoops_smallworld("#smallworld_profileform-next-0").hide(); + xoops_smallworld("#smallworld_profileform-next-1").hide(); + + if(xoops_smallworld.inArray('realname',smallworlduseverification) > -1) { + + xoops_smallworld("input#realname").validate({ + expression: "if (VAL) return true; else return false;", + message: SmallworldValidationNameErrorMsg, + }); + } + + if(xoops_smallworld.inArray('gender',smallworlduseverification) > -1) { + xoops_smallworld("select#gender").validate({ + expression: "if (VAL != 0) return true; else return false;", + message: SmallworldValidationGenderErrorMsg + }); + } + + if(xoops_smallworld.inArray('interestedin',smallworlduseverification) > -1) { + xoops_smallworld("#intingender").validate({ + expression: "if (isChecked(SelfID)) return true; else return false;", + message: SmallworldValidationIntingenderErrorMsg + }); + + } + + if(xoops_smallworld.inArray('lookingfor',smallworlduseverification) > -1) { + xoops_smallworld("#searchrelat").validate({ + expression: "if (isChecked(SelfID)) return true; else return false;", + message: SmallworldValidationSearchrelatErrorMsg + }); + } + + if(xoops_smallworld.inArray('emails',smallworlduseverification) > -1) { + xoops_smallworld('input[name="emailtype[]"]').live('blur',function(){ + var id = xoops_smallworld(this).attr('id'); + xoops_smallworld("#"+id).validate({ + expression: "if (VAL.match(/^[^\\W][a-zA-Z0-9\\_\\-\\.]+([a-zA-Z0-9\\_\\-\\.]+)*\\@[a-zA-Z0-9_]+(\\.[a-zA-Z0-9_]+)*\\.[a-zA-Z]{2,4}$/)) return true; else return false;", + message:"<img src='images/error.png' title='"+SmallworldValidationEmailTitleErrorMsg+"'/>" + }); + }); + } + + if(xoops_smallworld.inArray('birthday',smallworlduseverification) > -1) { + xoops_smallworld("input[name='birthday']").validate({ + expression: "if (!isValidDate(parseInt(VAL.split('-')[2],10), parseInt(VAL.split('-')[1],10), parseInt(VAL.split('-')[0],10))) return false; else return true;", + message: SmallworldValidationBirthdayErrorMsg + }); + } + + if(xoops_smallworld.inArray('birthplace',smallworlduseverification) > -1) { + xoops_smallworld("#birthplace").validate({ + expression: "if (VAL) return true; else return false;", + message: SmallworldValidationBirthplaceErrorMsg + }); + } + + if(xoops_smallworld.inArray('birthplace',smallworlduseverification) > -1) { + xoops_smallworld("input#adress").validate({ + expression: "if (VAL) return true; else return false;", + message: SmallworldValidationAdressErrorMsg + }); + } + + if(xoops_smallworld.inArray('presentcity',smallworlduseverification) > -1) { + xoops_smallworld("input#present_city").validate({ + expression: "if (VAL) return true; else return false;", + message: SmallworldValidationCityErrorMsg + }); + } + + if(xoops_smallworld.inArray('country',smallworlduseverification) > -1) { + xoops_smallworld("input#present_country").validate({ + expression: "if (VAL) return true; else return false;", + message: SmallworldValidationCountryErrorMsg + }); + } + + + if(xoops_smallworld.inArray('website',smallworlduseverification) > -1) { + xoops_smallworld("textarea#website").validate({ + expression: "if (urlCheck(VAL)) return true; else return false;", + message: SmallworldValidationWebsiteErrorMsg + }); + } + + + // Activation of validations to be filled on initial load + xoops_smallworld('fieldset:visible').find('input,select,textarea').each(function() { + xoops_smallworld(this).blur(); + }); + + } + + if (smallworlduseverification.length !=0) { + xoops_smallworld('#smallworld_profileform-next-0').show(); + xoops_smallworld('#smallworld_profileform-next-1').show(); + } +} \ No newline at end of file Modified: XoopsModules/smallworld/trunk/smallworld/language/english/js/variables.js =================================================================== --- XoopsModules/smallworld/trunk/smallworld/language/english/js/variables.js 2012-01-24 21:06:14 UTC (rev 8808) +++ XoopsModules/smallworld/trunk/smallworld/language/english/js/variables.js 2012-01-25 14:33:36 UTC (rev 8809) @@ -6,6 +6,7 @@ var _smallworldContinueToReg = "Continue to registration"; var _smallworldCancel = "Cancel"; +var _smallworldClose = "close"; var SmallworldGenderError = "Please choose your gender"; var SmallworldBirthdayError = "Please choose your birthday"; Modified: XoopsModules/smallworld/trunk/smallworld/language/english/main.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/language/english/main.php 2012-01-24 21:06:14 UTC (rev 8808) +++ XoopsModules/smallworld/trunk/smallworld/language/english/main.php 2012-01-25 14:33:36 UTC (rev 8809) @@ -243,7 +243,7 @@ define('_SMALLWORLD_UPLOADDESC','Image description'); define('_SMALLWORLD_UPLOAD_TITLE','Upload images to your image album'); define('_SMALLWORLD_UPLOADTEXT','Start upload'); -define('_SMALLWORLD_UPLOADFILESTEXT','Upload image(s)'); +define('_SMALLWORLD_UPLOADFILESTEXT','Select image(s)'); define('_SMALLWORLD_IMGDESCRIPTION','Image description'); define('_SMALLWORLD_IMGTITLE','Image title'); define('_SMALLWORLD_IMAGE_EDIT_TITLE','Edit descriptions where neded at send'); Modified: XoopsModules/smallworld/trunk/smallworld/userprofile.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/userprofile.php 2012-01-24 21:06:14 UTC (rev 8808) +++ XoopsModules/smallworld/trunk/smallworld/userprofile.php 2012-01-25 14:33:36 UTC (rev 8809) @@ -218,6 +218,8 @@ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/language/'.$lang.'/js/jquery.countdown.js'); } else { $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/language/english/js/jquery.countdown.js'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.colorbox.js'); + $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/colorbox.css'); } } else { redirect_header(XOOPS_URL . "/user.php", 1, _NOPERM); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dj...@us...> - 2012-01-26 14:58:53
|
Revision: 8813 http://xoops.svn.sourceforge.net/xoops/?rev=8813&view=rev Author: djculex Date: 2012-01-26 14:58:42 +0000 (Thu, 26 Jan 2012) Log Message: ----------- missing javascript in index.php, smallworldshare.php & userprofile.php Modified Paths: -------------- XoopsModules/smallworld/trunk/smallworld/index.php XoopsModules/smallworld/trunk/smallworld/smallworldshare.php XoopsModules/smallworld/trunk/smallworld/userprofile.php Modified: XoopsModules/smallworld/trunk/smallworld/index.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/index.php 2012-01-25 21:06:16 UTC (rev 8812) +++ XoopsModules/smallworld/trunk/smallworld/index.php 2012-01-26 14:58:42 UTC (rev 8813) @@ -133,11 +133,10 @@ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/wall.js'); $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/ajaxupload.3.5.js'); $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.avatar_helper.js'); - $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.innerfade.js'); $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.bookmark.js'); $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/oembed.css'); $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.colorbox.js'); - $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/colorbox.css'); + $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/colorbox.css'); } else { redirect_header(XOOPS_URL . "/user.php", 1, _NOPERM); } Modified: XoopsModules/smallworld/trunk/smallworld/smallworldshare.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/smallworldshare.php 2012-01-25 21:06:16 UTC (rev 8812) +++ XoopsModules/smallworld/trunk/smallworld/smallworldshare.php 2012-01-26 14:58:42 UTC (rev 8813) @@ -85,6 +85,7 @@ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.oembed.js'); $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/wall.js'); $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.innerfade.js'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.bookmark.js'); $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/oembed.css'); $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/smallworld.css'); Modified: XoopsModules/smallworld/trunk/smallworld/userprofile.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/userprofile.php 2012-01-25 21:06:16 UTC (rev 8812) +++ XoopsModules/smallworld/trunk/smallworld/userprofile.php 2012-01-26 14:58:42 UTC (rev 8813) @@ -206,9 +206,9 @@ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/wall.js'); $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/ajaxupload.3.5.js'); $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.avatar_helper.js'); - $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.countdown.js'); - $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.innerfade.js'); $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.bookmark.js'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.colorbox.js'); + $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/colorbox.css'); //Check Language $lang = $xoopsConfig['language']; @@ -218,8 +218,6 @@ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/language/'.$lang.'/js/jquery.countdown.js'); } else { $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/language/english/js/jquery.countdown.js'); - $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.colorbox.js'); - $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/colorbox.css'); } } else { redirect_header(XOOPS_URL . "/user.php", 1, _NOPERM); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dj...@us...> - 2012-01-26 15:33:54
|
Revision: 8815 http://xoops.svn.sourceforge.net/xoops/?rev=8815&view=rev Author: djculex Date: 2012-01-26 15:33:48 +0000 (Thu, 26 Jan 2012) Log Message: ----------- Check for send email is configured to 'no' else send mail Modified Paths: -------------- XoopsModules/smallworld/trunk/smallworld/comment_ajax.php XoopsModules/smallworld/trunk/smallworld/complaint.php XoopsModules/smallworld/trunk/smallworld/friendinvite.php XoopsModules/smallworld/trunk/smallworld/index.php XoopsModules/smallworld/trunk/smallworld/submit.php Modified: XoopsModules/smallworld/trunk/smallworld/comment_ajax.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/comment_ajax.php 2012-01-26 15:17:31 UTC (rev 8814) +++ XoopsModules/smallworld/trunk/smallworld/comment_ajax.php 2012-01-26 15:33:48 UTC (rev 8815) @@ -76,7 +76,9 @@ $emails = ""; foreach ($parts as $k=>$v) { $owner = getOwnerFromComment ($data['msg_id_fk']); - $mail->sendMails ($data['uid_fk'], $v, 'commentToWM', $link=null, $wc); + if(smallworld_GetModuleOption('smallworldusemailnotis', $repmodule='smallworld') != 0) { + $mail->sendMails ($data['uid_fk'], $v, 'commentToWM', $link=null, $wc); + } } } } Modified: XoopsModules/smallworld/trunk/smallworld/complaint.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/complaint.php 2012-01-26 15:17:31 UTC (rev 8814) +++ XoopsModules/smallworld/trunk/smallworld/complaint.php 2012-01-26 15:33:48 UTC (rev 8815) @@ -43,7 +43,9 @@ if ($already != 1) { $mail = new smallworld_mail; - $mail->sendMails($by_userid, '', 'complaint', $link=null, $data); + if(smallworld_GetModuleOption('smallworldusemailnotis', $repmodule='smallworld') != 0) { + $mail->sendMails($by_userid, '', 'complaint', $link=null, $data); + } $db->updateComplaint ($auserid); echo _SMALLWORLD_JS_COMPLAINTSENT; } else { Modified: XoopsModules/smallworld/trunk/smallworld/friendinvite.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/friendinvite.php 2012-01-26 15:17:31 UTC (rev 8814) +++ XoopsModules/smallworld/trunk/smallworld/friendinvite.php 2012-01-26 15:33:48 UTC (rev 8815) @@ -45,7 +45,9 @@ $friendshipExists = $check->friendcheck($myUid,$friend); if ($friendshipExists[0] == 0) { $resultMsg = _SMALLWORLD_JSON_ADDFRIEND.$friendName._SMALLWORLD_JSON_REQUEST_PENDING; - $mail->sendMails ($friend, $friend, 'friendshipfollow', $link=null, array()); + if(smallworld_GetModuleOption('smallworldusemailnotis', $repmodule='smallworld') != 0) { + $mail->sendMails ($friend, $friend, 'friendshipfollow', $link=null, array()); + } $db->toogleFriendInvite ($friendshipExists, $friend, $myUid); echo json_encode(array('error' => 'no', 'msg' => $resultMsg, 'msgChange' => _SMALLWORLD_JSON_CANCELFR_TEXT)); } Modified: XoopsModules/smallworld/trunk/smallworld/index.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/index.php 2012-01-26 15:17:31 UTC (rev 8814) +++ XoopsModules/smallworld/trunk/smallworld/index.php 2012-01-26 15:33:48 UTC (rev 8815) @@ -136,7 +136,7 @@ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.bookmark.js'); $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/oembed.css'); $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.colorbox.js'); - $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/colorbox.css'); + $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/colorbox.css'); } else { redirect_header(XOOPS_URL . "/user.php", 1, _NOPERM); } Modified: XoopsModules/smallworld/trunk/smallworld/submit.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/submit.php 2012-01-26 15:17:31 UTC (rev 8814) +++ XoopsModules/smallworld/trunk/smallworld/submit.php 2012-01-26 15:33:48 UTC (rev 8815) @@ -33,6 +33,8 @@ $userID = $xoopsUser->getVar('uid'); if ($_POST['function'] != 'edit') { $img->createAlbum ($userID); - $mail->sendMails ($userID, $userID, 'register', $link=null, array()); + if(smallworld_GetModuleOption('smallworldusemailnotis', $repmodule='smallworld') != 0) { + $mail->sendMails ($userID, $userID, 'register', $link=null, array()); + } } ?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dj...@us...> - 2012-01-26 17:03:53
|
Revision: 8816 http://xoops.svn.sourceforge.net/xoops/?rev=8816&view=rev Author: djculex Date: 2012-01-26 17:03:42 +0000 (Thu, 26 Jan 2012) Log Message: ----------- - show only "show more in profile" if any fields to show - Show fields allowed by admin in profile - Added language define if all fields are disabled Modified Paths: -------------- XoopsModules/smallworld/trunk/smallworld/language/english/main.php XoopsModules/smallworld/trunk/smallworld/templates/smallworld_userprofile_template.html XoopsModules/smallworld/trunk/smallworld/userprofile.php Modified: XoopsModules/smallworld/trunk/smallworld/language/english/main.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/language/english/main.php 2012-01-26 15:33:48 UTC (rev 8815) +++ XoopsModules/smallworld/trunk/smallworld/language/english/main.php 2012-01-26 17:03:42 UTC (rev 8816) @@ -24,6 +24,7 @@ /*------------ General items -------- */ define("_SMALLWORLD_SYSERROR","System Error!"); define("_SMALLWORLD_SYSNAME","Smallworld"); +define("_SMALLWORLD_ALL_FIELDS_DISABLED","No personal info available"); /*----------- Personal info ------------------*/ define("_SMALLWORLD_AVATAR","Current Image"); Modified: XoopsModules/smallworld/trunk/smallworld/templates/smallworld_userprofile_template.html =================================================================== --- XoopsModules/smallworld/trunk/smallworld/templates/smallworld_userprofile_template.html 2012-01-26 15:33:48 UTC (rev 8815) +++ XoopsModules/smallworld/trunk/smallworld/templates/smallworld_userprofile_template.html 2012-01-26 17:03:42 UTC (rev 8816) @@ -140,11 +140,13 @@ <{$heorshe}> <{$smarty.const._SMALLWORLD_ISEMPLOYEDBY}> <{$work}> <{$smarty.const._SMALLWORLD_AND}> <{$smarty.const._SMALLWORLD_ATTENDED}> <{$education}>. <br/><br/> + <{if $flds[0] != ''}> <fieldset> <label><{$smarty.const._SMALLWORLD_ADDITIONALINFO}> <{$username}></label> <{$aboutme}> <br><br><a href='javascript:void(0)' class="smallworld_moreinfo" id='_SMALLWORLD_MOREINFO'><{$smarty.const._SMALLWORLD_MOREINFO}></a><br><br> </fieldset> + <{/if}> </div> <{/if}> <{if $isuserafriend == 'no'}> @@ -368,6 +370,28 @@ </div> <div id="interestsandmore" title="<{$smarty.const._SMALLWORLD_INTERESTS_TITLE}>" > + <{if + !in_array('religiousview',$flds) && + !in_array('politicalview',$flds) && + !in_array('favouritebooks',$flds) && + !in_array('favouritemusic',$flds) && + !in_array('favouritemovies',$flds) && + !in_array('favouritetvshows',$flds) && + !in_array('interests',$flds) && + !in_array('emails',$flds) && !in_array('screennames',$flds) && + !in_array('mobile',$flds) && !in_array('landphone',$flds) && + !in_array('streetadress',$flds) && + !in_array('country',$flds) && + !in_array('website',$flds) + }> + <fieldset> + <table border="0" class="smallworld_table" cellspacing="0" cellpadding="0"> + <tr> + <td><label><{$smarty.const._SMALLWORLD_ALL_FIELDS_DISABLED}></label></td> + </tr> + </table> + </fieldset> + <{else}> <fieldset> <table border="0" class="smallworld_table" cellspacing="0" cellpadding="0"> <tr> @@ -375,64 +399,98 @@ </tr> </table> </fieldset> + <{/if}> + <{if !in_array('religiousview',$flds) && !in_array('politicalview',$flds)}> + <{else}> <fieldset> <table border="0" class="smallworld_table" cellspacing="0" cellpadding="0"> <tr> <h3><label><{$smarty.const._SMALLWORLD_BELIEFS}></label></h3> </tr> - + + <{if !in_array('politicalview',$flds)}> + <{else}> <tr> <td><{$smarty.const._SMALLWORLD_POLITICWORD}>:</td> <td><{$politic}></td> </tr> - + <{/if}> + <{if !in_array('religiousview',$flds)}> + <{else}> <tr> <td><{$smarty.const._SMALLWORLD_RELIGIONWORD}>:</td> <td><{$religion}></td> </tr> + <{/if}> </table> </fieldset> + <{/if}> + <{if + !in_array('favouritebooks',$flds) && !in_array('favouritemusic',$flds) && + !in_array('favouritemovies',$flds) && !in_array('favouritetvshows',$flds) && + !in_array('interests',$flds) + }> + <{else}> <fieldset> <table border="0" class="smallworld_table" cellspacing="0" cellpadding="0"> <tr> <h3><label><{$smarty.const._SMALLWORLD_FAVOURITETHINGS}></label></h3> </tr> - + <{if !in_array('favouritebooks',$flds)}> + <{else}> <tr> <td><{$smarty.const._SMALLWORLD_FAVOURITEBOOKS}>:</td> <td><{$favbook}></td> </tr> + <{/if}> + <{if !in_array('favouritemusic',$flds)}> + <{else}> <tr> <td><{$smarty.const._SMALLWORLD_FAVOURITEMUSIC}>:</td> <td><{$favmusic}></td> </tr> + <{/if}> + <{if !in_array('favouritemovies',$flds)}> + <{else}> <tr> <td><{$smarty.const._SMALLWORLD_FAVOURITEMOVIE}>:</td> <td><{$favmovie}></td> </tr> - + <{/if}> + <{if !in_array('favouritetvshows',$flds)}> + <{else}> <tr> <td><{$smarty.const._SMALLWORLD_FAVOURITETVSHOW}>:</td> <td><{$favtvshow}></td> </tr> - + <{/if}> + <{if !in_array('interests',$flds)}> + <{else}> <tr> <td><{$smarty.const._SMALLWORLD_FAVOURITEINTERESTS}>:</td> <td><{$favinterests}></td> </tr> + <{/if}> </table> </fieldset> + <{/if}> + <{if + !in_array('emails',$flds) && !in_array('screennames',$flds) && + !in_array('mobile',$flds) && !in_array('landphone',$flds) + }> + <{else}> <fieldset> <table border="0" class="smallworld_table" cellspacing="0" cellpadding="0"> <tr> <h3><label><{$smarty.const._SMALLWORLD_CONTACTS}></label></h3> </tr> - + <{if !in_array('emails',$flds)}> + <{else}> <tr> <td><{$smarty.const._SMALLWORLD_EMAIL}>:</td> <td> @@ -442,7 +500,9 @@ <br><br> </td> </tr> - + <{/if}> + <{if !in_array('screennames',$flds)}> + <{else}> <tr> <td><{$smarty.const._SMALLWORLD_SCREENNAMES}>:</td> <td> @@ -452,38 +512,63 @@ <br><br> </td> </tr> - + <{/if}> + + <{if !in_array('landphone',$flds)}> + <{else}> <tr> <td><{$smarty.const._SMALLWORLD_PHONE}>:</td> <td><{$phone}></td> </tr> + <{/if}> + <{if !in_array('mobile',$flds)}> + <{else}> <tr> <td><{$smarty.const._SMALLWORLD_GSM}>:</td> <td><{$mobile}></td> </tr> + <{/if}> </table> </fieldset> + <{/if}> + + <{if + !in_array('streetadress',$flds) && + !in_array('country',$flds) && + !in_array('website',$flds) + }> + <{else}> <fieldset> <table border="0" class="smallworld_table" cellspacing="0" cellpadding="0"> <tr><h3><label><{$smarty.const._SMALLWORLD_ADRESS}></label></h3></tr> + <{if !in_array('streetadress',$flds)}> + <{else}> <tr> <td><{$smarty.const._SMALLWORLD_ADRESS}>:</td> <td><{$realname}><br><{$adress}></td> </tr> + <{/if}> + <{if !in_array('country',$flds)}> + <{else}> <tr> <td><{$smarty.const._SMALLWORLD_COUNTRY}>:</td> <td><{$country}></td> </tr> + <{/if}> + <{if !in_array('website',$flds)}> + <{else}> <tr> <td><br><br><{$smarty.const._SMALLWORLD_WEBSITE}>:</td> <td><br><br><span class="smallworld_website"><a href="<{$website}>" target="_BLANK"><{$website}></a></span></td> </tr> + <{/if}> </table> </fieldset> + <{/if}> </div> <div id="_smallworld_birthplace_map" title="<{$birthcity}>/<{$country}>"> Modified: XoopsModules/smallworld/trunk/smallworld/userprofile.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/userprofile.php 2012-01-26 15:33:48 UTC (rev 8815) +++ XoopsModules/smallworld/trunk/smallworld/userprofile.php 2012-01-26 17:03:42 UTC (rev 8816) @@ -194,6 +194,7 @@ $xoopsTpl->assign('username',$Xusername); $xoopsTpl->assign('bdaynow',$birthday_today_text); $xoopsTpl->assign('isfollowing',$fl[0]); + $xoopsTpl->assign('flds',smallworld_GetModuleOption('smallworldusethesefields', $repmodule='smallworld')); } else { $check->chkUser (); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dj...@us...> - 2012-01-26 18:05:54
|
Revision: 8817 http://xoops.svn.sourceforge.net/xoops/?rev=8817&view=rev Author: djculex Date: 2012-01-26 18:05:41 +0000 (Thu, 26 Jan 2012) Log Message: ----------- Renaming and prefixing functions Modified Paths: -------------- XoopsModules/smallworld/trunk/smallworld/class/adminclass.php XoopsModules/smallworld/trunk/smallworld/class/db.php XoopsModules/smallworld/trunk/smallworld/class/images.php XoopsModules/smallworld/trunk/smallworld/class/mail.php XoopsModules/smallworld/trunk/smallworld/class/profile.php XoopsModules/smallworld/trunk/smallworld/class/wall.php XoopsModules/smallworld/trunk/smallworld/comment_ajax.php XoopsModules/smallworld/trunk/smallworld/editimages.php XoopsModules/smallworld/trunk/smallworld/editprofile.php XoopsModules/smallworld/trunk/smallworld/friends.php XoopsModules/smallworld/trunk/smallworld/galleryshow.php XoopsModules/smallworld/trunk/smallworld/include/functions.php XoopsModules/smallworld/trunk/smallworld/index.php XoopsModules/smallworld/trunk/smallworld/loadmore.php XoopsModules/smallworld/trunk/smallworld/message_ajax.php XoopsModules/smallworld/trunk/smallworld/partnersearch.php XoopsModules/smallworld/trunk/smallworld/permalink.php XoopsModules/smallworld/trunk/smallworld/register.php XoopsModules/smallworld/trunk/smallworld/search.php XoopsModules/smallworld/trunk/smallworld/smallworldshare.php XoopsModules/smallworld/trunk/smallworld/stats.php XoopsModules/smallworld/trunk/smallworld/userprofile.php Modified: XoopsModules/smallworld/trunk/smallworld/class/adminclass.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/class/adminclass.php 2012-01-26 17:03:42 UTC (rev 8816) +++ XoopsModules/smallworld/trunk/smallworld/class/adminclass.php 2012-01-26 18:05:41 UTC (rev 8817) @@ -359,7 +359,7 @@ return $return; } - function sanitize($text) { + function Smallworld_sanitize($text) { $text = htmlspecialchars($text, ENT_QUOTES); //$text = preg_replace('/([^\s]{10})(?=[^\s])/m', '$1<br />', $text); $myts = MyTextSanitizer::getInstance(); Modified: XoopsModules/smallworld/trunk/smallworld/class/db.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/class/db.php 2012-01-26 17:03:42 UTC (rev 8816) +++ XoopsModules/smallworld/trunk/smallworld/class/db.php 2012-01-26 18:05:41 UTC (rev 8817) @@ -141,53 +141,53 @@ } if ($_POST['relationship'] != '2') { - $partner = sanitize($_POST['partner']); + $partner = Smallworld_sanitize($_POST['partner']); } else { $partner = ''; } $regdate = time(); $username = $user->uname(); - $realname = sanitize($_POST['realname']); - $gender = sanitize($_POST['gender']); - $intingender = sanitize(serialize($_POST['intingender'])); - $relationship = sanitize($_POST['relationship']); - $searchrelat = sanitize(serialize($_POST['searchrelat'])); - $birthday = sanitize(euroToUsDate($_POST['birthday'])); - $birthplace = sanitize($_POST['birthplace']); - $birthplace_lat = sanitize($_POST['birthplace_lat']); - $birthplace_lng = sanitize($_POST['birthplace_lng']); - $birthplace_country = sanitize($_POST['birthplace_country']); - $birthplace_country_img = sanitize($_POST['birthplace_country_img']); - $politic = sanitize($_POST['politic']); - $religion = sanitize($_POST['religion']); - $emailtype = sanitize(serialize($_POST['emailtype'])); - $screenname_type = sanitize(serialize($_POST['screenname_type'])); - $screenname = sanitize(serialize($_POST['screenname'])); - $mobile = sanitize($_POST['mobile']); - $phone = sanitize($_POST['phone']); - $adress = sanitize($_POST['adress']); - $present_city = sanitize($_POST['present_city']); - $present_lat = sanitize($_POST['present_lat']); - $present_lng = sanitize($_POST['present_lng']); - $present_country = sanitize($_POST['present_country']); - $present_country_img = sanitize($_POST['present_country_img']); - $website = sanitize($_POST['website']); - $interests = sanitize($_POST['interests']); - $music = sanitize($_POST['music']); - $tvshow = sanitize($_POST['tvshow']); - $movie = sanitize($_POST['movie']); - $books = sanitize($_POST['books']); - $aboutme = sanitize($_POST['aboutme']); - $school_type = sanitize(serialize($_POST['school_type'])); - $school = sanitize(serialize($_POST['school'])); - $schoolstart = sanitize(serialize(DateOfArray ($_POST['schoolstart']))); - $schoolstop = sanitize(serialize(DateOfArray ($_POST['schoolstop']))); - $jobemployer = sanitize(serialize($_POST['employer'])); - $jobposition = sanitize(serialize($_POST['position'])); - $jobstart = sanitize(serialize(DateOfArray ($_POST['jobstart']))); - $jobstop = sanitize(serialize(DateOfArray ($_POST['jobstop']))); - $jobdescription = sanitize(serialize($_POST['description'])); + $realname = Smallworld_sanitize($_POST['realname']); + $gender = Smallworld_sanitize($_POST['gender']); + $intingender = Smallworld_sanitize(serialize($_POST['intingender'])); + $relationship = Smallworld_sanitize($_POST['relationship']); + $searchrelat = Smallworld_sanitize(serialize($_POST['searchrelat'])); + $birthday = Smallworld_sanitize(Smallworld_euroToUsDate($_POST['birthday'])); + $birthplace = Smallworld_sanitize($_POST['birthplace']); + $birthplace_lat = Smallworld_sanitize($_POST['birthplace_lat']); + $birthplace_lng = Smallworld_sanitize($_POST['birthplace_lng']); + $birthplace_country = Smallworld_sanitize($_POST['birthplace_country']); + $birthplace_country_img = Smallworld_sanitize($_POST['birthplace_country_img']); + $politic = Smallworld_sanitize($_POST['politic']); + $religion = Smallworld_sanitize($_POST['religion']); + $emailtype = Smallworld_sanitize(serialize($_POST['emailtype'])); + $screenname_type = Smallworld_sanitize(serialize($_POST['screenname_type'])); + $screenname = Smallworld_sanitize(serialize($_POST['screenname'])); + $mobile = Smallworld_sanitize($_POST['mobile']); + $phone = Smallworld_sanitize($_POST['phone']); + $adress = Smallworld_sanitize($_POST['adress']); + $present_city = Smallworld_sanitize($_POST['present_city']); + $present_lat = Smallworld_sanitize($_POST['present_lat']); + $present_lng = Smallworld_sanitize($_POST['present_lng']); + $present_country = Smallworld_sanitize($_POST['present_country']); + $present_country_img = Smallworld_sanitize($_POST['present_country_img']); + $website = Smallworld_sanitize($_POST['website']); + $interests = Smallworld_sanitize($_POST['interests']); + $music = Smallworld_sanitize($_POST['music']); + $tvshow = Smallworld_sanitize($_POST['tvshow']); + $movie = Smallworld_sanitize($_POST['movie']); + $books = Smallworld_sanitize($_POST['books']); + $aboutme = Smallworld_sanitize($_POST['aboutme']); + $school_type = Smallworld_sanitize(serialize($_POST['school_type'])); + $school = Smallworld_sanitize(serialize($_POST['school'])); + $schoolstart = Smallworld_sanitize(serialize(Smallworld_DateOfArray ($_POST['schoolstart']))); + $schoolstop = Smallworld_sanitize(serialize(Smallworld_DateOfArray ($_POST['schoolstop']))); + $jobemployer = Smallworld_sanitize(serialize($_POST['employer'])); + $jobposition = Smallworld_sanitize(serialize($_POST['position'])); + $jobstart = Smallworld_sanitize(serialize(Smallworld_DateOfArray ($_POST['jobstart']))); + $jobstop = Smallworld_sanitize(serialize(Smallworld_DateOfArray ($_POST['jobstop']))); + $jobdescription = Smallworld_sanitize(serialize($_POST['description'])); $sql = ''; Modified: XoopsModules/smallworld/trunk/smallworld/class/images.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/class/images.php 2012-01-26 17:03:42 UTC (rev 8816) +++ XoopsModules/smallworld/trunk/smallworld/class/images.php 2012-01-26 18:05:41 UTC (rev 8817) @@ -30,9 +30,9 @@ } else { mkdir($dir.'/'.$userID, 0777); mkdir($dir.'/'.$userID."/thumbnails", 0777); - CreateIndexFiles ($dir.'/'); - CreateIndexFiles($dir.'/'.$userID."/"); - CreateIndexFiles($dir.'/'.$userID."/thumbnails/"); + Smallworld_CreateIndexFiles ($dir.'/'); + Smallworld_CreateIndexFiles($dir.'/'.$userID."/"); + Smallworld_CreateIndexFiles($dir.'/'.$userID."/thumbnails/"); } } @@ -52,8 +52,8 @@ $post[$i]['id'] = stripslashes($sqlfetch['id']); $post[$i]['userid'] = stripslashes($sqlfetch['userid']); $post[$i]['imgurl'] = stripslashes($sqlfetch['imgurl']); - $post[$i]['desc'] = cleanup_string($sqlfetch['desc']); - $post[$i]['alt'] = cleanup_string($sqlfetch['desc']); + $post[$i]['desc'] = Smallworld_cleanup_string($sqlfetch['desc']); + $post[$i]['alt'] = Smallworld_cleanup_string($sqlfetch['desc']); $post[$i]['time'] = stripslashes($sqlfetch['time']); $post[$i]['editimg'] = "<span class='smallworld_edit_imgdesc_holder'><img src='images/edit_icon.png'/></span> <a class='smallworld_edit_imgdesc' href='editimages.php'>"._SMALLWORLD_EDITDESCRIPTION."</a>"; $i++; Modified: XoopsModules/smallworld/trunk/smallworld/class/mail.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/class/mail.php 2012-01-26 17:03:42 UTC (rev 8816) +++ XoopsModules/smallworld/trunk/smallworld/class/mail.php 2012-01-26 18:05:41 UTC (rev 8817) @@ -105,7 +105,7 @@ $ownermessage = stripslashes($this->getOwnerUpdateFromMsgID($data['msg_id_fk'])); - $owner = getOwnerFromComment ($data['msg_id_fk']); + $owner = Smallworld_getOwnerFromComment ($data['msg_id_fk']); $OwnerUser = new xoopsUser($owner); $Owner_avatar = $wall->Gravatar($owner); $Owner_avatarlink = "<img class='left' src='".XOOPS_URL."/uploads/".$Owner_avatar."' height='90px' width='90px'>"; Modified: XoopsModules/smallworld/trunk/smallworld/class/profile.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/class/profile.php 2012-01-26 17:03:42 UTC (rev 8816) +++ XoopsModules/smallworld/trunk/smallworld/class/profile.php 2012-01-26 18:05:41 UTC (rev 8817) @@ -38,7 +38,7 @@ $uname = ucwords($r['username']); $realname = $r['realname']; $membersince = date("d-m-Y",$user->user_regdate()); - $birthday = UsToEuroDate($r['birthday']); + $birthday = Smallworld_UsToEuroDate($r['birthday']); $cnt_bday = smallworldNextBdaySecs ($r['birthday']); $birthcity = $r['birthplace']; @@ -180,7 +180,7 @@ $adress = $r['adress']; $website = $r['website']; - $age = birthday($r['birthday']); + $age = Smallworld_Birthday($r['birthday']); } //SW_CheckIfUser ($userid); Modified: XoopsModules/smallworld/trunk/smallworld/class/wall.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/class/wall.php 2012-01-26 17:03:42 UTC (rev 8816) +++ XoopsModules/smallworld/trunk/smallworld/class/wall.php 2012-01-26 18:05:41 UTC (rev 8817) @@ -125,7 +125,7 @@ //Insert Update public function Insert_Update($uid, $update,$priv) { global $xoopsUser, $xoopsDB; - $update=sanitize(htmlentities($update, ENT_QUOTES,"UTF-8")); + $update=Smallworld_sanitize(htmlentities($update, ENT_QUOTES,"UTF-8")); $time=time(); $query = "SELECT msg_id,message FROM ".$xoopsDB->prefix('smallworld_messages')." WHERE uid_fk='".$uid."' order by msg_id desc limit 1"; $result = $xoopsDB->queryF($query); @@ -154,7 +154,7 @@ //Insert Comments public function Insert_Comment($uid,$msg_id,$comment) { global $xoopsUser, $xoopsDB; - $comment=sanitize(htmlentities($comment, ENT_QUOTES,"UTF-8")); + $comment=Smallworld_sanitize(htmlentities($comment, ENT_QUOTES,"UTF-8")); $time=time(); $query = "SELECT com_id,comment FROM ".$xoopsDB->prefix('smallworld_comments')." WHERE uid_fk='".$uid."' and msg_id_fk='".$msg_id."' order by com_id desc limit 1 "; $result = $xoopsDB->fetchArray($query); Modified: XoopsModules/smallworld/trunk/smallworld/comment_ajax.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/comment_ajax.php 2012-01-26 17:03:42 UTC (rev 8816) +++ XoopsModules/smallworld/trunk/smallworld/comment_ajax.php 2012-01-26 18:05:41 UTC (rev 8817) @@ -38,7 +38,7 @@ $tpl->assign('isadminuser', 'YES'); } //$followers = $Wall->getFollowers($id); - $followers = array_flatten($Wall->getFollowers($id),0); + $followers = Smallworld_array_flatten($Wall->getFollowers($id),0); $myavatar = $Wall->Gravatar($id); $myavatarlink = smallworld_getAvatarLink($id, $myavatar); @@ -59,7 +59,7 @@ $wc['myavatar_link']= $myavatarlink; $wc['cface'] = $Wall->Gravatar($data['uid_fk']); $wc['avatar_link'] = smallworld_getAvatarLink ($data['uid_fk'], $wc['cface']); - $wc['compl_msg_lnk'] = "<a href='".XOOPS_URL."/modules/smallworld/permalink.php?ownerid=".getOwnerFromComment($cdata['msg_id_fk']); + $wc['compl_msg_lnk'] = "<a href='".XOOPS_URL."/modules/smallworld/permalink.php?ownerid=".Smallworld_getOwnerFromComment($cdata['msg_id_fk']); $wc['compl_msg_lnk'] .= "&updid=".$cdata['msg_id_fk']."#".$cdata['com_id']."'>"._SMALLWORLD_COMP_MSG_LNK_DESC."</a>"; $wc['vote_up'] = $Wall->countVotesCom ('com', 'up', $data['msg_id_fk'],$data['com_id']); $wc['vote_down'] = $Wall->countVotesCom ('com', 'down', $data['msg_id_fk'],$data['com_id']); @@ -75,7 +75,7 @@ $parts = $mail->getPartsFromComment ($data['msg_id_fk']); $emails = ""; foreach ($parts as $k=>$v) { - $owner = getOwnerFromComment ($data['msg_id_fk']); + $owner = Smallworld_getOwnerFromComment ($data['msg_id_fk']); if(smallworld_GetModuleOption('smallworldusemailnotis', $repmodule='smallworld') != 0) { $mail->sendMails ($data['uid_fk'], $v, 'commentToWM', $link=null, $wc); } Modified: XoopsModules/smallworld/trunk/smallworld/editimages.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/editimages.php 2012-01-26 17:03:42 UTC (rev 8816) +++ XoopsModules/smallworld/trunk/smallworld/editimages.php 2012-01-26 18:05:41 UTC (rev 8817) @@ -30,7 +30,7 @@ $userID = $xoopsUser->getVar('uid'); // Check if inspected userid -> redirect to userprofile and show admin countdown - $inspect = isInspected ($userID); + $inspect = Smallworld_isInspected ($userID); if ($inspect['inspect'] == 'yes') { redirect_header("userprofile.php?username=".$xoopsUser->getVar('uname'), 1); } Modified: XoopsModules/smallworld/trunk/smallworld/editprofile.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/editprofile.php 2012-01-26 17:03:42 UTC (rev 8816) +++ XoopsModules/smallworld/trunk/smallworld/editprofile.php 2012-01-26 18:05:41 UTC (rev 8817) @@ -33,7 +33,7 @@ // Check if inspected userid -> redirect to userprofile and show admin countdown /* - $inspect = isInspected ($id); + $inspect = Smallworld_isInspected ($id); if ($inspect['inspect'] == 'yes') { redirect_header("userprofile.php?username=".$xoopsUser->getVar('uname'), 1); } @@ -97,7 +97,7 @@ if (smallworldGetValfromArray ('birthday', 'smallworldusethesefields') != 0) { // Select Birthday dd-mm-Y - $birthday = $item->input('birthday', 'birthday', 'birthday',$size='12', $preset=stripslashes(UsToEuroDate($r['birthday']))); + $birthday = $item->input('birthday', 'birthday', 'birthday',$size='12', $preset=stripslashes(Smallworld_UsToEuroDate($r['birthday']))); $xoopsTpl->append('birthdaydate',$birthday); } else { $xoopsTpl->assign('show_birthday','no'); Modified: XoopsModules/smallworld/trunk/smallworld/friends.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/friends.php 2012-01-26 17:03:42 UTC (rev 8816) +++ XoopsModules/smallworld/trunk/smallworld/friends.php 2012-01-26 18:05:41 UTC (rev 8817) @@ -36,7 +36,7 @@ $friends = new SmallWorldFriends; // Check if inspected userid -> redirect to userprofile and show admin countdown - $inspect = isInspected ($yourid); + $inspect = Smallworld_isInspected ($yourid); if ($inspect['inspect'] == 'yes') { redirect_header("userprofile.php?username=".$xoopsUser->getVar('uname'), 1); } @@ -115,7 +115,7 @@ if (!empty($pending_array)) { foreach ($pending_array as $data) { $fp['friend_id'] = $data['you']; - $fp['friendname'] = getName($data['you']); + $fp['friendname'] = Smallworld_getName($data['you']); $fp['avatar'] = $Wall->Gravatar($data['you']); $fp['avatar_link'] = smallworld_getAvatarLink ($data['you'], $fp['avatar']); $xoopsTpl->append('pendingfriends', $fp); @@ -127,7 +127,7 @@ if (!empty($friends_array)) { foreach ($friends_array as $data) { $ff['friend_id'] = $data['you']; - $ff['friendname'] = getName($data['you']); + $ff['friendname'] = Smallworld_getName($data['you']); $ff['avatar'] = $Wall->Gravatar($data['you']); $ff['avatar_link'] = smallworld_getAvatarLink ($data['you'], $ff['avatar']); $xoopsTpl->append('verifiedfriends', $ff); @@ -139,7 +139,7 @@ if (!empty($following_array)) { foreach ($following_array as $data) { $fy['friend_id'] = $data['you']; - $fy['friendname'] = getName($data['you']); + $fy['friendname'] = Smallworld_getName($data['you']); $fy['avatar'] = $Wall->Gravatar($data['you']); $fy['avatar_link'] = smallworld_getAvatarLink ($data['you'], $fy['avatar']); $xoopsTpl->append('followingyou', $fy); @@ -151,7 +151,7 @@ if (!empty($followingme_array)) { foreach ($followingme_array as $data) { $fm['friend_id'] = $data['me']; - $fm['friendname'] = getName($data['me']); + $fm['friendname'] = Smallworld_getName($data['me']); $fm['avatar'] = $Wall->Gravatar($data['me']); $fm['avatar_link'] = smallworld_getAvatarLink ($data['me'], $fm['avatar']); $xoopsTpl->append('followingme', $fm); Modified: XoopsModules/smallworld/trunk/smallworld/galleryshow.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/galleryshow.php 2012-01-26 17:03:42 UTC (rev 8816) +++ XoopsModules/smallworld/trunk/smallworld/galleryshow.php 2012-01-26 18:05:41 UTC (rev 8817) @@ -42,7 +42,7 @@ $image = new SmallWorldImages; // Check if inspected userid -> redirect to userprofile and show admin countdown - $inspect = isInspected ($id); + $inspect = Smallworld_isInspected ($id); if ($inspect['inspect'] == 'yes') { redirect_header("userprofile.php?username=".$xoopsUser->getVar('uname'), 1); } Modified: XoopsModules/smallworld/trunk/smallworld/include/functions.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/include/functions.php 2012-01-26 17:03:42 UTC (rev 8816) +++ XoopsModules/smallworld/trunk/smallworld/include/functions.php 2012-01-26 18:05:41 UTC (rev 8817) @@ -37,20 +37,20 @@ // Clean vars or arrays // If array check for magicQuotes. -// Pass string to cleanup_string -function cleanup($text) { +// Pass string to Smallworld_cleanup_string +function Smallworld_cleanup($text) { if (is_array($text)) { foreach ($text as $key => $value) { - $text[$key] = cleanup_string($value); + $text[$key] = Smallworld_cleanup_string($value); } } else { - $text = cleanup_string($text); + $text = Smallworld_cleanup_string($text); } return $text; } // Sanitize string -function cleanup_string($text) { +function Smallworld_cleanup_string($text) { $text = htmlspecialchars($text, ENT_QUOTES); $myts = MyTextSanitizer::getInstance(); $text = $myts->displayTarea($text,1,1,1,1); @@ -62,19 +62,19 @@ } // clean Array for mysql insertion -// or send string to sanitize_string -function sanitize ($text) { +// or send string to Smallworld_sanitize_string +function Smallworld_sanitize ($text) { if (is_array($text)) { foreach ($text as $key => $value) { - $text[$key] = sanitize_string($value); + $text[$key] = Smallworld_sanitize_string($value); } } else { - $text = sanitize_string($text); + $text = Smallworld_sanitize_string($text); } return $text; } -function sanitize_string ($value) { +function Smallworld_sanitize_string ($value) { $myts = MyTextSanitizer::getInstance(); if(get_magic_quotes_gpc()){ $value = $myts->stripSlashesGPC($value); @@ -84,7 +84,7 @@ return $value; } -function DateOfArray ($array) { +function Smallworld_DateOfArray ($array) { $data = array(); foreach ($array as $k => $v) { $data[$k] = strtotime($v); @@ -92,7 +92,7 @@ return $data; } -function CreateIndexFiles ($folderUrl) { +function Smallworld_CreateIndexFiles ($folderUrl) { $myts =& MyTextSanitizer::getInstance(); file_put_contents($folderUrl.'index.html', "<script>history.go(-1);</script>"); } @@ -103,10 +103,10 @@ // recursively reduces deep arrays to single-dimensional arrays // $preserve_keys: (0=>never, 1=>strings, 2=>always) -function array_flatten($array, $preserve_keys = 1, &$newArray = Array()) { +function Smallworld_array_flatten($array, $preserve_keys = 1, &$newArray = Array()) { foreach ($array as $key => $child) { if (is_array($child)) { - $newArray =& array_flatten($child, $preserve_keys, $newArray); + $newArray =& Smallworld_array_flatten($child, $preserve_keys, $newArray); } elseif ($preserve_keys + is_string($key) > 1) { $newArray[$key] = $child; } else { @@ -119,7 +119,7 @@ // Returns age in years // Input birthdate // Requires php >= 5.3 -function birthday($birth, $now = NULL){ +function Smallworld_Birthday($birth, $now = NULL){ $now = new DateTime($now); $birth = new DateTime($birth); return $birth->diff($now)->format('%r%y'); @@ -225,7 +225,7 @@ return $text; } -function stripWordsKeepUrl ($text) { +function Smallworld_stripWordsKeepUrl ($text) { preg_replace('/(((f|ht){1}tps:\/\/)[-a-zA-Z0-9@:%_\+.~#?&\/\/=]+)/i', '<div class=".embed"><a href="\\1">\\1</a></div>', $text); return $text; @@ -345,7 +345,7 @@ * Return owner of thread (original poster) * Return Integer */ -function getOwnerFromComment ($msg_id_fk) { +function Smallworld_getOwnerFromComment ($msg_id_fk) { global $xoopsDB; $sql = "Select uid_fk from ".$xoopsDB->prefix('smallworld_messages')." where msg_id = '".$msg_id_fk."'"; $result = $xoopsDB->queryF($sql); @@ -356,7 +356,7 @@ } // Get username from userID -function getName($userID){ +function Smallworld_getName($userID){ global $xoopsUser, $xoopsDB; $sql = "SELECT username FROM ".$xoopsDB->prefix('smallworld_user')." WHERE userid = '".intval($userID)."'"; $result = $xoopsDB->queryf($sql); @@ -369,7 +369,7 @@ // Check if user has been taken down for inspection by admin // Userid = user id of user to check // return array -function isInspected ($userid) { +function Smallworld_isInspected ($userid) { global $xoopsDB; $data = array(); $sql = "SELECT inspect_start, inspect_stop FROM ".$xoopsDB->prefix('smallworld_admin')." WHERE userid = '".$userid."' AND (inspect_start+inspect_stop) > ".time().""; @@ -400,7 +400,7 @@ $user = new xoopsUser; $Wall = new Wall_Updates(); $userid = $xoopsUser->getVar('uid'); - $followers = array_flatten($Wall->getFollowers($userid),0); + $followers = Smallworld_array_flatten($Wall->getFollowers($userid),0); if (smallworld_GetModuleOption('usersownpostscount', $repmodule='smallworld') == 1) { array_push($followers, $userid); } @@ -452,7 +452,7 @@ $nu[$i]['username_link'] = "<a href = '".XOOPS_URL."/modules/smallworld/userprofile.php?username=".$r['username']."'>"; $nu[$i]['username_link'] .= $r['username']." (".$r['realname'].") [".$nu[$i]['regdate']."] </a>"; $nu[$i]['userimage'] = $r['userimage']; - $nu[$i]['userimage_link'] = smallworld_getAvatarLink ($r['userid'], Gravatar($r['userid'])); + $nu[$i]['userimage_link'] = smallworld_getAvatarLink ($r['userid'], Smallworld_Gravatar($r['userid'])); $i++; } @@ -460,7 +460,7 @@ return $nu; } //Avatar Image -function Gravatar($uid) { +function Smallworld_Gravatar($uid) { global $xoopsUser, $xoopsDB; $image=''; $sql = "SELECT userimage FROM ".$xoopsDB->prefix('smallworld_user')." WHERE userid = '".$uid."'"; @@ -478,7 +478,7 @@ } // find user with most posted messages -function mostactiveusers_allround() { +function Smallworld_mostactiveusers_allround() { global $xoopsDB,$xoopsUser; $sql = "SELECT uid_fk, COUNT( * ) as cnt "; $sql .= "FROM ( "; @@ -499,7 +499,7 @@ $counter = 1; while ($row = $xoopsDB->fetchArray($result)) { $msg[$counter]["counter"] = $counter; - $msg[$counter]["img"] = smallworld_getAvatarLink ($row['uid_fk'], Gravatar($row['uid_fk'])); + $msg[$counter]["img"] = smallworld_getAvatarLink ($row['uid_fk'], Smallworld_Gravatar($row['uid_fk'])); $msg[$counter]["msgs"] = _SMALLWORLD_TOTALPOSTS." : ".$row["cnt"]; $msg[$counter]["cnt"] = $row["cnt"]; $msg[$counter]["username"] = $xoopsUser->getUnameFromId($row["uid_fk"]); @@ -512,7 +512,7 @@ } // Find worst rated users overall -function worstratedusers() { +function Smallworld_worstratedusers() { global $xoopsUser, $xoopsDB; $array = array(); $counter = 1; @@ -524,7 +524,7 @@ $result = $xoopsDB->queryF($sql); while ($row = $xoopsDB->fetchArray($result)) { $array[$counter]['counter'] = $counter; - $array[$counter]['img'] = smallworld_getAvatarLink ($row["owner"], Gravatar($row["owner"])); + $array[$counter]['img'] = smallworld_getAvatarLink ($row["owner"], Smallworld_Gravatar($row["owner"])); $array[$counter]['user'] = $xoopsUser->getUnameFromId($row["owner"]); $array[$counter]['rating'] = $row["total"]; $array[$counter]['user_link'] = "<a href = '".XOOPS_URL."/modules/smallworld/userprofile.php?username=".$array[$counter]['user']."'>"; @@ -535,7 +535,7 @@ } // Find best rated users overall -function topratedusers() { +function Smallworld_topratedusers() { global $xoopsUser, $xoopsDB; $array = array(); $counter = 1; @@ -547,7 +547,7 @@ $result = $xoopsDB->queryF($sql); while ($row = $xoopsDB->fetchArray($result)) { $array[$counter]['counter'] = $counter; - $array[$counter]['img'] = smallworld_getAvatarLink ($row["owner"], Gravatar($row["owner"])); + $array[$counter]['img'] = smallworld_getAvatarLink ($row["owner"], Smallworld_Gravatar($row["owner"])); $array[$counter]['user'] = $xoopsUser->getUnameFromId($row["owner"]); $array[$counter]['rating'] = $row["total"]; $array[$counter]['user_link'] = "<a href = '".XOOPS_URL."/modules/smallworld/userprofile.php?username=".$array[$counter]['user']."'>"; @@ -575,7 +575,7 @@ while ($r = $xoopsDB->fetchArray($result)) { $res[$i]['amount'] = $counter; $res[$i]['userid'] = $r['userid']; - $res[$i]['userimage'] = smallworld_getAvatarLink ($r['userid'], Gravatar($r["userid"])); + $res[$i]['userimage'] = smallworld_getAvatarLink ($r['userid'], Smallworld_Gravatar($r["userid"])); $res[$i]['birthday'] = $r['daymon']; $res[$i]['agenow'] = $r['age_now']; $res[$i]['username'] = $xoopsUser->getUnameFromId($r['userid']); @@ -589,13 +589,13 @@ // Return new date format US for MySql // Require php>5.2 using DateTime class -function euroToUsDate ($stringDate) { +function Smallworld_euroToUsDate ($stringDate) { $date = DateTime::createFromFormat('d-m-Y', $stringDate); return $date->format("Y-m-d"); } // Return new date format EU For display -function UsToEuroDate ($stringDate) { +function Smallworld_UsToEuroDate ($stringDate) { $date = DateTime::createFromFormat('Y-m-d', $stringDate); return $date->format("d-m-Y"); } Modified: XoopsModules/smallworld/trunk/smallworld/index.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/index.php 2012-01-26 17:03:42 UTC (rev 8816) +++ XoopsModules/smallworld/trunk/smallworld/index.php 2012-01-26 18:05:41 UTC (rev 8817) @@ -31,7 +31,7 @@ $user = new XoopsUser($id); // Check if inspected userid -> redirect to userprofile and show admin countdown - $inspect = isInspected ($id); + $inspect = Smallworld_isInspected ($id); if ($inspect['inspect'] == 'yes') { redirect_header("userprofile.php?username=".$xoopsUser->getVar('uname'), 1); } @@ -63,14 +63,14 @@ $getInvitations = $check->getRequests ($id); // Follow array here - $followers = array_flatten($Wall->getFollowers($id),0); + $followers = Smallworld_array_flatten($Wall->getFollowers($id),0); $updatesarray=$Wall->Updates(0,$id, $followers); //Srinivas Tamada http://9lessons.info //Loading Comments link with load_updates.php if (!empty($updatesarray)) { foreach ($updatesarray as $data) { $wm['msg_id'] = $data['msg_id']; - $wm['orimessage'] = str_replace(array("\r", "\n"), '',stripWordsKeepUrl($data['message'])); + $wm['orimessage'] = str_replace(array("\r", "\n"), '',Smallworld_stripWordsKeepUrl($data['message'])); $wm['message'] = smallworld_tolink(htmlentities($data['message'])); $wm['message'] = str_replace(array('<','>'),array('<','>'), $wm['message']); $wm['created'] = smallworld_time_stamp($data['created']); @@ -103,7 +103,7 @@ $wc['myavatar_link'] = $myavatarlink; $wc['cface'] = $Wall->Gravatar($cdata['uid_fk']); $wc['avatar_link'] = smallworld_getAvatarLink ($cdata['uid_fk'], $wc['cface']); - $wc['compl_msg_lnk'] = "<a href='".XOOPS_URL."/modules/smallworld/permalink.php?ownerid=".getOwnerFromComment($cdata['msg_id_fk']); + $wc['compl_msg_lnk'] = "<a href='".XOOPS_URL."/modules/smallworld/permalink.php?ownerid=".Smallworld_getOwnerFromComment($cdata['msg_id_fk']); $wc['compl_msg_lnk'] .= "&updid=".$cdata['msg_id_fk']."#".$cdata['com_id']."'>"._SMALLWORLD_COMP_MSG_LNK_DESC."</a>"; $wc['vote_up'] = $Wall->countVotesCom ('com', 'up', $cdata['msg_id_fk'],$cdata['com_id']); $wc['vote_down'] = $Wall->countVotesCom ('com', 'down', $cdata['msg_id_fk'],$cdata['com_id']); Modified: XoopsModules/smallworld/trunk/smallworld/loadmore.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/loadmore.php 2012-01-26 17:03:42 UTC (rev 8816) +++ XoopsModules/smallworld/trunk/smallworld/loadmore.php 2012-01-26 18:05:41 UTC (rev 8817) @@ -48,7 +48,7 @@ $myavatar = $Wall->Gravatar($id); $myavatarlink = smallworld_getAvatarLink($id, $myavatar); -$followers = array_flatten($Wall->getFollowers($id),0); +$followers = Smallworld_array_flatten($Wall->getFollowers($id),0); if ($page == 'index') { $updatesarray=$Wall->Updates($_POST['last'], $id, $followers); } elseif ($page == 'profile') { @@ -95,7 +95,7 @@ $wc['myavatar_link']= $myavatarlink; $wc['cface'] = $Wall->Gravatar($cdata['uid_fk']); $wc['avatar_link'] = smallworld_getAvatarLink ($cdata['uid_fk'], $wc['cface']); - $wc['compl_msg_lnk'] = "<a href='".XOOPS_URL."/modules/smallworld/permalink.php?ownerid=".getOwnerFromComment($cdata['msg_id_fk']); + $wc['compl_msg_lnk'] = "<a href='".XOOPS_URL."/modules/smallworld/permalink.php?ownerid=".Smallworld_getOwnerFromComment($cdata['msg_id_fk']); $wc['compl_msg_lnk'] .= "&updid=".$cdata['msg_id_fk']."#".$cdata['com_id']."'>"._SMALLWORLD_COMP_MSG_LNK_DESC."</a>"; $wc['vote_up'] = $Wall->countVotesCom ('com', 'up', $cdata['msg_id_fk'],$cdata['com_id']); $wc['vote_down'] = $Wall->countVotesCom ('com', 'down', $cdata['msg_id_fk'],$cdata['com_id']); Modified: XoopsModules/smallworld/trunk/smallworld/message_ajax.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/message_ajax.php 2012-01-26 17:03:42 UTC (rev 8816) +++ XoopsModules/smallworld/trunk/smallworld/message_ajax.php 2012-01-26 18:05:41 UTC (rev 8817) @@ -41,7 +41,7 @@ } $priv = intval($_POST['priv']); - $followers = array_flatten($Wall->getFollowers($id),0); + $followers = Smallworld_array_flatten($Wall->getFollowers($id),0); $myavatar = $Wall->Gravatar($id); @@ -88,7 +88,7 @@ $wc['myavatar_link']= $myavatarlink; $wc['cface'] = $Wall->Gravatar($cdata['uid_fk']); $wc['avatar_link'] = smallworld_getAvatarLink ($cdata['uid_fk'], $wc['cface']); - $wc['compl_msg_lnk'] = "<a href='".XOOPS_URL."/modules/smallworld/permalink.php?ownerid=".getOwnerFromComment($cdata['msg_id_fk']); + $wc['compl_msg_lnk'] = "<a href='".XOOPS_URL."/modules/smallworld/permalink.php?ownerid=".Smallworld_getOwnerFromComment($cdata['msg_id_fk']); $wc['compl_msg_lnk'] .= "&updid=".$cdata['msg_id_fk']."#".$cdata['com_id']."'>"._SMALLWORLD_COMP_MSG_LNK_DESC."</a>"; $wc['vote_up'] = $Wall->countVotesCom ('com', 'up', $cdata['msg_id_fk'],$cdata['com_id']); $wc['vote_down'] = $Wall->countVotesCom ('com', 'down', $cdata['msg_id_fk'],$cdata['com_id']); Modified: XoopsModules/smallworld/trunk/smallworld/partnersearch.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/partnersearch.php 2012-01-26 17:03:42 UTC (rev 8816) +++ XoopsModules/smallworld/trunk/smallworld/partnersearch.php 2012-01-26 18:05:41 UTC (rev 8817) @@ -27,7 +27,7 @@ global $xoopsUser,$xoopsDB,$xoopsLogger; $xoopsLogger->activated = false; if($_GET) { - $q=sanitize($_GET['term']); + $q=Smallworld_sanitize($_GET['term']); $sql = "select * from ".$xoopsDB->prefix('smallworld_user')." where realname like '%".$q."%' or username like '%".$q."%' order by userid LIMIT 5"; $result = $xoopsDB->query($sql); $data = array(); Modified: XoopsModules/smallworld/trunk/smallworld/permalink.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/permalink.php 2012-01-26 17:03:42 UTC (rev 8816) +++ XoopsModules/smallworld/trunk/smallworld/permalink.php 2012-01-26 18:05:41 UTC (rev 8817) @@ -58,7 +58,7 @@ $myavatarlink = smallworld_getAvatarLink($id, $myavatar); // Follow array here - $followers = array_flatten($Wall->getFollowers($id),0); + $followers = Smallworld_array_flatten($Wall->getFollowers($id),0); $updatesarray=$Wall->UpdatesPermalink ($updID,$id, $ownerID); @@ -66,7 +66,7 @@ //Loading Comments link with load_updates.php foreach ($updatesarray as $data) { $wm['msg_id'] = $data['msg_id']; - $wm['orimessage'] = str_replace(array("\r", "\n"), '',stripWordsKeepUrl($data['message'])); + $wm['orimessage'] = str_replace(array("\r", "\n"), '',Smallworld_stripWordsKeepUrl($data['message'])); $wm['message'] = smallworld_tolink(htmlentities($data['message'])); $wm['created'] = smallworld_time_stamp($data['created']); $wm['username'] = $data['username']; Modified: XoopsModules/smallworld/trunk/smallworld/register.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/register.php 2012-01-26 17:03:42 UTC (rev 8816) +++ XoopsModules/smallworld/trunk/smallworld/register.php 2012-01-26 18:05:41 UTC (rev 8817) @@ -34,7 +34,7 @@ // Check if inspected userid -> redirect to userprofile and show admin countdown /* - $inspect = isInspected ($id); + $inspect = Smallworld_isInspected ($id); if ($inspect['inspect'] == 'yes') { redirect_header("userprofile.php?username=".$xoopsUser->getVar('uname'), 1); } Modified: XoopsModules/smallworld/trunk/smallworld/search.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/search.php 2012-01-26 17:03:42 UTC (rev 8816) +++ XoopsModules/smallworld/trunk/smallworld/search.php 2012-01-26 18:05:41 UTC (rev 8817) @@ -27,7 +27,7 @@ global $xoopsUser,$xoTheme,$xoopsLogger,$xoopsDB; $xoopsLogger->activated = false; if($_GET) { - $q=sanitize($_GET['term']); + $q=Smallworld_sanitize($_GET['term']); $sql = "select * from ".$xoopsDB->prefix('smallworld_user')." where realname like '%".$q."%' or username like '%".$q."%' order by userid LIMIT 5"; $result = $xoopsDB->query($sql); $data = array(); Modified: XoopsModules/smallworld/trunk/smallworld/smallworldshare.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/smallworldshare.php 2012-01-26 17:03:42 UTC (rev 8816) +++ XoopsModules/smallworld/trunk/smallworld/smallworldshare.php 2012-01-26 18:05:41 UTC (rev 8817) @@ -42,7 +42,7 @@ //Loading Comments link with load_updates.php foreach ($updatesarray as $data) { $wm['msg_id'] = $data['msg_id']; - $wm['orimessage'] = str_replace(array("\r", "\n"), '',stripWordsKeepUrl($data['message'])); + $wm['orimessage'] = str_replace(array("\r", "\n"), '',Smallworld_stripWordsKeepUrl($data['message'])); $wm['message'] = smallworld_tolink(htmlentities($data['message'])); $wm['created'] = smallworld_time_stamp($data['created']); $wm['username'] = $data['username']; @@ -64,7 +64,7 @@ } } else { $wm['msg_id'] = $updID; - $wm['orimessage'] = str_replace(array("\r", "\n"), '',stripWordsKeepUrl(_SMALLWORLD_BOOKMARK_NOPERM_MESSAGE)); + $wm['orimessage'] = str_replace(array("\r", "\n"), '',Smallworld_stripWordsKeepUrl(_SMALLWORLD_BOOKMARK_NOPERM_MESSAGE)); $wm['message'] = smallworld_tolink(htmlentities(_SMALLWORLD_BOOKMARK_NOPERM_MESSAGE)); $wm['created'] = smallworld_time_stamp(time()); $wm['username'] = _SMALLWORLD_SYSNAME; Modified: XoopsModules/smallworld/trunk/smallworld/stats.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/stats.php 2012-01-26 17:03:42 UTC (rev 8816) +++ XoopsModules/smallworld/trunk/smallworld/stats.php 2012-01-26 18:05:41 UTC (rev 8817) @@ -29,9 +29,9 @@ $userid = $xoopsUser->getVar('uid'); $newusers = smallworld_Stats_newest (); -$m_a_users = mostactiveusers_allround(); -$br_users = topratedusers(); -$wo_users = worstratedusers(); +$m_a_users = Smallworld_mostactiveusers_allround(); +$br_users = Smallworld_topratedusers(); +$wo_users = Smallworld_worstratedusers(); $birth = smallworld_nextBirthdays (); $sp = smallworld_sp (); $tpl->assign('newusers',$newusers); Modified: XoopsModules/smallworld/trunk/smallworld/userprofile.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/userprofile.php 2012-01-26 17:03:42 UTC (rev 8816) +++ XoopsModules/smallworld/trunk/smallworld/userprofile.php 2012-01-26 18:05:41 UTC (rev 8817) @@ -41,7 +41,7 @@ $user = new SmallWorldProfile; $user->ShowUser($id); $username = $xoopsUser->getVar('uname'); //Myusername - $inspected = isInspected($id); + $inspected = Smallworld_isInspected($id); $xoopsTpl->assign('inspect',$inspected['inspect']); if ($inspected['inspect'] != 'no') { $xoopsTpl->assign('inspecttime',$inspected['totaltime']); @@ -139,7 +139,7 @@ $wc['myavatar_link']= $myavatarlink; $wc['cface'] = $Wall->Gravatar($cdata['uid_fk']); $wc['avatar_link'] = smallworld_getAvatarLink($cdata['uid_fk'],$wc['cface']); - $wc['compl_msg_lnk'] = "<a href='".XOOPS_URL."/modules/smallworld/permalink.php?ownerid=".getOwnerFromComment($cdata['msg_id_fk']); + $wc['compl_msg_lnk'] = "<a href='".XOOPS_URL."/modules/smallworld/permalink.php?ownerid=".Smallworld_getOwnerFromComment($cdata['msg_id_fk']); $wc['compl_msg_lnk'] .= "&updid=".$cdata['msg_id_fk']."#".$cdata['com_id']."'>"._SMALLWORLD_COMP_MSG_LNK_DESC."</a>"; $wc['vote_up'] = $Wall->countVotesCom ('com', 'up', $cdata['msg_id_fk'],$cdata['com_id']); $wc['vote_down'] = $Wall->countVotesCom ('com', 'down', $cdata['msg_id_fk'],$cdata['com_id']); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dj...@us...> - 2012-01-30 17:51:52
|
Revision: 8837 http://xoops.svn.sourceforge.net/xoops/?rev=8837&view=rev Author: djculex Date: 2012-01-30 17:51:44 +0000 (Mon, 30 Jan 2012) Log Message: ----------- - function to resize avatar proportionally - Adjusted some css - attached colorbox to all avatars & update images - Some missing Js includes - some missing language defines Modified Paths: -------------- XoopsModules/smallworld/trunk/smallworld/admin/div_useradmin.php XoopsModules/smallworld/trunk/smallworld/admin/main.php XoopsModules/smallworld/trunk/smallworld/admin/useradmin.php XoopsModules/smallworld/trunk/smallworld/class/profile.php XoopsModules/smallworld/trunk/smallworld/comment_ajax.php XoopsModules/smallworld/trunk/smallworld/css/smallworld.css XoopsModules/smallworld/trunk/smallworld/friends.php XoopsModules/smallworld/trunk/smallworld/include/functions.php XoopsModules/smallworld/trunk/smallworld/index.php XoopsModules/smallworld/trunk/smallworld/js/jquery.avatar_helper.js XoopsModules/smallworld/trunk/smallworld/js/smallworld.js XoopsModules/smallworld/trunk/smallworld/language/english/main.php XoopsModules/smallworld/trunk/smallworld/loadmore.php XoopsModules/smallworld/trunk/smallworld/message_ajax.php XoopsModules/smallworld/trunk/smallworld/permalink.php XoopsModules/smallworld/trunk/smallworld/smallworldshare.php XoopsModules/smallworld/trunk/smallworld/templates/admin_useradmin.html XoopsModules/smallworld/trunk/smallworld/templates/getlastcom.html XoopsModules/smallworld/trunk/smallworld/templates/getlastmsg.html XoopsModules/smallworld/trunk/smallworld/templates/getmore.html XoopsModules/smallworld/trunk/smallworld/templates/smallworld_admin.html XoopsModules/smallworld/trunk/smallworld/templates/smallworld_alluserstodiv.html XoopsModules/smallworld/trunk/smallworld/templates/smallworld_friends_template.html XoopsModules/smallworld/trunk/smallworld/templates/smallworld_index.html XoopsModules/smallworld/trunk/smallworld/templates/smallworld_permalink.html XoopsModules/smallworld/trunk/smallworld/templates/smallworld_share.html XoopsModules/smallworld/trunk/smallworld/templates/smallworld_userprofile_imgupload.html XoopsModules/smallworld/trunk/smallworld/templates/smallworld_userprofile_template.html XoopsModules/smallworld/trunk/smallworld/userprofile.php Modified: XoopsModules/smallworld/trunk/smallworld/admin/div_useradmin.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/admin/div_useradmin.php 2012-01-30 17:39:33 UTC (rev 8836) +++ XoopsModules/smallworld/trunk/smallworld/admin/div_useradmin.php 2012-01-30 17:51:44 UTC (rev 8837) @@ -36,6 +36,8 @@ $ai['username'] = $data['username']; $ai['realname'] = $data['realname']; $ai['userimage'] = smallworld_getAvatarLink ($data['userid'],$data['userimage']); + $ai['avatar_size'] = getimagesize($ai['userimage']); + $ai['avatar_highwide'] = smallworld_imageResize($ai['avatar_size'][0], $ai['avatar_size'][1], 50); $ai['ip'] = $data['ip']; $ai['complaint'] = $data['complaint']; $ai['inspect_start'] = $data['inspect_start']; @@ -54,6 +56,8 @@ $ani['username'] = $data['username']; $ani['realname'] = $data['realname']; $ani['userimage'] = smallworld_getAvatarLink ($data['userid'],$data['userimage']); + $ani['avatar_size'] = getimagesize($ani['userimage']); + $ani['avatar_highwide'] = smallworld_imageResize($ani['avatar_size'][0], $ani['avatar_size'][1], 50); $ani['ip'] = $data['ip']; $ani['complaint'] = $data['complaint']; $ani['inspect_start'] = ''; Modified: XoopsModules/smallworld/trunk/smallworld/admin/main.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/admin/main.php 2012-01-30 17:39:33 UTC (rev 8836) +++ XoopsModules/smallworld/trunk/smallworld/admin/main.php 2012-01-30 17:51:44 UTC (rev 8837) @@ -74,6 +74,8 @@ $ai['username'] = $data['username']; $ai['realname'] = $data['realname']; $ai['userimage'] = smallworld_getAvatarLink ($data['userid'],$data['userimage']); + $ai['avatar_size'] = getimagesize($ai['userimage']); + $ai['avatar_highwide'] = smallworld_imageResize($ai['avatar_size'][0], $ai['avatar_size'][1], 50); $ai['ip'] = $data['ip']; $ai['complaint'] = $data['complaint']; $ai['inspect_start'] = $data['inspect_start']; @@ -92,6 +94,8 @@ $ani['username'] = $data['username']; $ani['realname'] = $data['realname']; $ani['userimage'] = smallworld_getAvatarLink ($data['userid'],$data['userimage']); + $ani['avatar_size'] = getimagesize($ani['userimage']); + $ani['avatar_highwide'] = smallworld_imageResize($ani['avatar_size'][0], $ani['avatar_size'][1], 50); $ani['ip'] = $data['ip']; $ani['complaint'] = $data['complaint']; $ani['inspect_start'] = ''; Modified: XoopsModules/smallworld/trunk/smallworld/admin/useradmin.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/admin/useradmin.php 2012-01-30 17:39:33 UTC (rev 8836) +++ XoopsModules/smallworld/trunk/smallworld/admin/useradmin.php 2012-01-30 17:51:44 UTC (rev 8837) @@ -44,6 +44,8 @@ $ai['username'] = $data['username']; $ai['realname'] = $data['realname']; $ai['userimage'] = smallworld_getAvatarLink ($data['userid'],$data['userimage']); + $ai['avatar_size'] = getimagesize($ai['userimage']); + $ai['avatar_highwide'] = smallworld_imageResize($ai['avatar_size'][0], $ai['avatar_size'][1], 50); $ai['ip'] = $data['ip']; $ai['complaint'] = $data['complaint']; $ai['inspect_start'] = $data['inspect_start']; @@ -62,6 +64,8 @@ $ani['username'] = $data['username']; $ani['realname'] = $data['realname']; $ani['userimage'] = smallworld_getAvatarLink ($data['userid'],$data['userimage']); + $ani['avatar_size'] = getimagesize($ani['userimage']); + $ani['avatar_highwide'] = smallworld_imageResize($ani['avatar_size'][0], $ani['avatar_size'][1], 50); $ani['ip'] = $data['ip']; $ani['complaint'] = $data['complaint']; $ani['inspect_start'] = ''; Modified: XoopsModules/smallworld/trunk/smallworld/class/profile.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/class/profile.php 2012-01-30 17:39:33 UTC (rev 8836) +++ XoopsModules/smallworld/trunk/smallworld/class/profile.php 2012-01-30 17:51:44 UTC (rev 8837) @@ -87,7 +87,9 @@ $hisorher = _SMALLWORLD_HISHER; } $avatar = $Wall->Gravatar($id); - $user_img = "<img src='".smallworld_getAvatarLink($id, $avatar)."' id='smallworld_user_img' height='100px' width='100px'"."/></img>"; + $avatar_size = getimagesize(smallworld_getAvatarLink($id, $avatar)); + $avatar_highwide = smallworld_imageResize($avatar_size[0], $avatar_size[1], 100); + $user_img = "<img src='".smallworld_getAvatarLink($id, $avatar)."' id='smallworld_user_img' ".$avatar_highwide."/></img>"; $currentcity = $r['present_city']; $currlng = $r['present_lng']; Modified: XoopsModules/smallworld/trunk/smallworld/comment_ajax.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/comment_ajax.php 2012-01-30 17:39:33 UTC (rev 8836) +++ XoopsModules/smallworld/trunk/smallworld/comment_ajax.php 2012-01-30 17:51:44 UTC (rev 8837) @@ -59,6 +59,8 @@ $wc['myavatar_link']= $myavatarlink; $wc['cface'] = $Wall->Gravatar($data['uid_fk']); $wc['avatar_link'] = smallworld_getAvatarLink ($data['uid_fk'], $wc['cface']); + $wc['avatar_size'] = getimagesize($wc['myavatar_link']); + $wc['avatar_highwide'] = smallworld_imageResize($wc['avatar_size'][0], $wc['avatar_size'][1], 35); $wc['compl_msg_lnk'] = "<a href='".XOOPS_URL."/modules/smallworld/permalink.php?ownerid=".Smallworld_getOwnerFromComment($cdata['msg_id_fk']); $wc['compl_msg_lnk'] .= "&updid=".$cdata['msg_id_fk']."#".$cdata['com_id']."'>"._SMALLWORLD_COMP_MSG_LNK_DESC."</a>"; $wc['vote_up'] = $Wall->countVotesCom ('com', 'up', $data['msg_id_fk'],$data['com_id']); Modified: XoopsModules/smallworld/trunk/smallworld/css/smallworld.css =================================================================== --- XoopsModules/smallworld/trunk/smallworld/css/smallworld.css 2012-01-30 17:39:33 UTC (rev 8836) +++ XoopsModules/smallworld/trunk/smallworld/css/smallworld.css 2012-01-30 17:51:44 UTC (rev 8837) @@ -335,6 +335,10 @@ width:550px; } +#smallworld_user_img { + text-align:center; +} + /*-------- Register items ---------*/ #smallworld_divstepy-error { @@ -730,9 +734,9 @@ .smallworld_stimg{ float:left; - height:50px; + /*height:50px;*/ margin: 0 5px; - width:50px; + /*width:50px;*/ border:solid 1px #dedede; padding:3px; } @@ -800,8 +804,8 @@ .smallworld_stcommentimg { float:left; - height:35px; - width:35px; + /*height:35px;*/ + /*width:35px;*/ border:solid 1px #dedede; padding:2px; } @@ -814,7 +818,6 @@ padding:3px; display:block; font-size:11px; - width:80%; } .smallworld_stcommenttext b { @@ -840,7 +843,7 @@ .smallworld_commentupdate { background-color: #F2F2F2; padding: 5px; - width: 480px; + width: 100%; } .smallworld_comment { @@ -851,11 +854,13 @@ /* faceb image*/ .smallworld_small_face { - width:35px;height:35px + /*width:35px;*/ + /*height:35px*/ } .smallworld_big_face { - width:50px;height:50px + /*width:50px;*/ + /*height:50px*/ } #smallworld_flashmessage { Modified: XoopsModules/smallworld/trunk/smallworld/friends.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/friends.php 2012-01-30 17:39:33 UTC (rev 8836) +++ XoopsModules/smallworld/trunk/smallworld/friends.php 2012-01-30 17:51:44 UTC (rev 8837) @@ -118,6 +118,8 @@ $fp['friendname'] = Smallworld_getName($data['you']); $fp['avatar'] = $Wall->Gravatar($data['you']); $fp['avatar_link'] = smallworld_getAvatarLink ($data['you'], $fp['avatar']); + $fp['avatar_size'] = getimagesize($fp['avatar_link']); + $fp['avatar_highwide'] = smallworld_imageResize($fp['avatar_size'][0], $fp['avatar_size'][1], 50); $xoopsTpl->append('pendingfriends', $fp); } } else { @@ -130,6 +132,8 @@ $ff['friendname'] = Smallworld_getName($data['you']); $ff['avatar'] = $Wall->Gravatar($data['you']); $ff['avatar_link'] = smallworld_getAvatarLink ($data['you'], $ff['avatar']); + $ff['avatar_size'] = getimagesize($ff['avatar_link']); + $ff['avatar_highwide'] = smallworld_imageResize($ff['avatar_size'][0], $ff['avatar_size'][1], 50); $xoopsTpl->append('verifiedfriends', $ff); } } else { @@ -142,6 +146,8 @@ $fy['friendname'] = Smallworld_getName($data['you']); $fy['avatar'] = $Wall->Gravatar($data['you']); $fy['avatar_link'] = smallworld_getAvatarLink ($data['you'], $fy['avatar']); + $fy['avatar_size'] = getimagesize($fy['avatar_link']); + $fy['avatar_highwide'] = smallworld_imageResize($fy['avatar_size'][0], $fy['avatar_size'][1], 50); $xoopsTpl->append('followingyou', $fy); } } else { @@ -154,6 +160,8 @@ $fm['friendname'] = Smallworld_getName($data['me']); $fm['avatar'] = $Wall->Gravatar($data['me']); $fm['avatar_link'] = smallworld_getAvatarLink ($data['me'], $fm['avatar']); + $fm['avatar_size'] = getimagesize($fm['avatar_link']); + $fm['avatar_highwide'] = smallworld_imageResize($fm['avatar_size'][0], $fm['avatar_size'][1], 50); $xoopsTpl->append('followingme', $fm); } @@ -207,6 +215,8 @@ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/ajaxupload.3.5.js'); $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.avatar_helper.js'); $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.innerfade.js'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.colorbox.js'); + $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/colorbox.css'); } else { redirect_header(XOOPS_URL . "/user.php", 1, _NOPERM); Modified: XoopsModules/smallworld/trunk/smallworld/include/functions.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/include/functions.php 2012-01-30 17:39:33 UTC (rev 8836) +++ XoopsModules/smallworld/trunk/smallworld/include/functions.php 2012-01-30 17:51:44 UTC (rev 8837) @@ -322,10 +322,10 @@ if ($image == '' or $image=='Not specifiyed' AND $gender == '2') { $link = XOOPS_URL."/modules/smallworld/images/ano_man.png"; } - if ($image == 'blank.gif' or $image=='Not specifiyed' AND $gender == '0') { + if ($image == 'blank.gif' or $image=='Not specifiyed' AND $gender == '') { $link = XOOPS_URL."/modules/smallworld/images/genderless.png"; } - if ($image == '' or $image=='Not specifiyed' AND $gender == '0') { + if ($image == '' or $image=='Not specifiyed' AND $gender == '') { $link = XOOPS_URL."/modules/smallworld/images/genderless.png"; } return $link; @@ -660,4 +660,25 @@ } } + +//Function to resize images proportionally +// Using imagesize($imageurl) returns $img[0], $img[1] +// Target = new max height or width in px +function smallworld_imageResize($width, $height, $target) { + //takes the larger size of the width and height and applies the + //formula accordingly...this is so this script will work + //dynamically with any size image + if ($width > $height) { + $percentage = ($target / $width); + } else { + $percentage = ($target / $height); + } + //gets the new value and applies the percentage, then rounds the value + $width = round($width * $percentage); + $height = round($height * $percentage); + //returns the new sizes in html image tag format...this is so you + //can plug this function inside an image tag and just get the + + return "width=\"$width\" height=\"$height\""; +} ?> Modified: XoopsModules/smallworld/trunk/smallworld/index.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/index.php 2012-01-30 17:39:33 UTC (rev 8836) +++ XoopsModules/smallworld/trunk/smallworld/index.php 2012-01-30 17:51:44 UTC (rev 8837) @@ -58,6 +58,8 @@ $Wall = new Wall_Updates(); $myavatar = $Wall->Gravatar($id); $myavatarlink = smallworld_getAvatarLink($id, $myavatar); + $myavatar_size = getimagesize($myavatarlink); + $myavatar_highwide = smallworld_imageResize($myavatar_size[0], $myavatar_size[1], 50); //Get friends invitations $getInvitations = $check->getRequests ($id); @@ -79,6 +81,8 @@ $wm['priv'] = $data['priv']; $wm['avatar'] = $Wall->Gravatar($data['uid_fk']); $wm['avatar_link'] = smallworld_getAvatarLink ($data['uid_fk'], $wm['avatar']); + $wm['avatar_size'] = getimagesize($wm['avatar_link']); + $wm['avatar_highwide'] = smallworld_imageResize($wm['avatar_size'][0], $wm['avatar_size'][1], 50); $wm['vote_up'] = $Wall->countVotes ('msg', 'up', $data['msg_id']); $wm['vote_down'] = $Wall->countVotes ('msg', 'down', $data['msg_id']); $wm['compl_msg_lnk'] = "<a href='".XOOPS_URL."/modules/smallworld/permalink.php?ownerid=".$data['uid_fk']; @@ -101,7 +105,9 @@ $wc['uid'] = $cdata['uid_fk']; $wc['myavatar'] = $Wall->Gravatar($id); $wc['myavatar_link'] = $myavatarlink; - $wc['cface'] = $Wall->Gravatar($cdata['uid_fk']); + $wc['avatar_size'] = getimagesize($wc['myavatar_link']); + $wc['avatar_highwide'] = smallworld_imageResize($wc['avatar_size'][0], $wc['avatar_size'][1], 35); + $wc['cface'] = $Wall->Gravatar($cdata['uid_fk']); $wc['avatar_link'] = smallworld_getAvatarLink ($cdata['uid_fk'], $wc['cface']); $wc['compl_msg_lnk'] = "<a href='".XOOPS_URL."/modules/smallworld/permalink.php?ownerid=".Smallworld_getOwnerFromComment($cdata['msg_id_fk']); $wc['compl_msg_lnk'] .= "&updid=".$cdata['msg_id_fk']."#".$cdata['com_id']."'>"._SMALLWORLD_COMP_MSG_LNK_DESC."</a>"; @@ -122,6 +128,7 @@ $xoopsTpl->assign('check',1); $xoopsTpl->assign('myavatar',$myavatar); $xoopsTpl->assign('myavatarlink',$myavatarlink); + $xoopsTpl->assign('myavatar_highwide',$myavatar_highwide); $xoopsTpl->assign('friendinvitations',$getInvitations); } elseif ($profile == 0) { Modified: XoopsModules/smallworld/trunk/smallworld/js/jquery.avatar_helper.js =================================================================== --- XoopsModules/smallworld/trunk/smallworld/js/jquery.avatar_helper.js 2012-01-30 17:39:33 UTC (rev 8836) +++ XoopsModules/smallworld/trunk/smallworld/js/jquery.avatar_helper.js 2012-01-30 17:51:44 UTC (rev 8837) @@ -20,6 +20,7 @@ response = xoops_smallworld.parseJSON( response ); if(response[0]==="success"){ xoops_smallworld("#smallworld_user_img").attr("src", smallworld_uploaddir+response[1]); + xoops_smallworld("#smallworld_user_img").css('height', '100px'); xoops_smallworld('div .UploadNewAvatar').hide(); //xoops_smallworld('#smallworld_user_img').replaceWith('<img src="'+smallworld_uploaddir+file+'" id="smallworld_user_img" height="140px" width="100px"'+file); //xoops_smallworld('img#smallworld_user_img').appendTo('<img src="'+smallworld_uploaddir+file+'" id="smallworld_user_img" height="140px" width="100px"'+file).addClass('success'); Modified: XoopsModules/smallworld/trunk/smallworld/js/smallworld.js =================================================================== --- XoopsModules/smallworld/trunk/smallworld/js/smallworld.js 2012-01-30 17:39:33 UTC (rev 8836) +++ XoopsModules/smallworld/trunk/smallworld/js/smallworld.js 2012-01-30 17:51:44 UTC (rev 8837) @@ -12,7 +12,10 @@ * author 2011 Culex - homepage.: http://culex.dk & email.: cu...@cu... */ xoops_smallworld(function() { - // GET pop for statistics + //Attach function for avatar + attachAvatarOpen (); + + // GET pop for statistics xoops_smallworld('#smallworld_statistics_lnk').live('click',function() { if (xoops_smallworld('#smallworld_statistics_lnk').length) { // implies *not* zero xoops_smallworld('#smallworldStatsDiv').show(); @@ -375,6 +378,7 @@ // Open avatar imagen in new window on click xoops_smallworld(function() { xoops_smallworld('#smallworld_user_img').css('cursor', 'pointer'); + xoops_smallworld('#smallworld_user_img').css('margin', '0 10%'); xoops_smallworld('#smallworld_user_img').live('click',function(event) { var url = xoops_smallworld(this).attr('src'); image = "<img src ='"+url+"' />"; @@ -829,4 +833,35 @@ xoops_smallworld('#smallworld_profileform-next-0').show(); xoops_smallworld('#smallworld_profileform-next-1').show(); } +} + +function attachAvatarOpen () { + // Open comment and update avatar imagen in new window on click + xoops_smallworld(function() { + xoops_smallworld('.smallworld_big_face, .smallworld_small_face, .smallworldAttImg').css('cursor', 'pointer'); + xoops_smallworld('.smallworld_big_face, .smallworld_small_face, .smallworldAttImg').live('click',function(event) { + var url = xoops_smallworld(this).attr('src'); + image = "<img src ='"+url+"' />"; + xoops_smallworld('<div id="lookingglassuseravatar">'+image+'</div>').appendTo('body'); + event.preventDefault(); + if (xoops_smallworld('#lookingglassuseravatar').length) { // implies *not* zero + xoops_smallworld('#lookingglassuseravatar').show(); + xoops_smallworld.fn.colorbox({ + width:"auto", + height:"70%", + inline:true, + onCleanup:function() { + xoops_smallworld('#lookingglassuseravatar').hide(); + }, + onClosed:function() { + xoops_smallworld("#lookingglassuseravatar").remove(); + }, + onComplete : function() { + xoops_smallworld(this).colorbox.resize(); + }, + href:"#lookingglassuseravatar" + }); + }; + }); //close click + }); } \ No newline at end of file Modified: XoopsModules/smallworld/trunk/smallworld/language/english/main.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/language/english/main.php 2012-01-30 17:39:33 UTC (rev 8836) +++ XoopsModules/smallworld/trunk/smallworld/language/english/main.php 2012-01-30 17:51:44 UTC (rev 8837) @@ -251,6 +251,12 @@ define("_SMALLWORLD_WELCOME_TITLE","Welcome"); define("_SMALLWORLD_WELCOMETEXT",", welcome. Hope you'll enjoy your stay."); define("_SMALLWORLD_UPLOADEDSOMEIMAGES"," Uploaded some new pictures <br/>"); +define("_SMALLWORLD_IMAGES_START","Start"); +define("_SMALLWORLD_IMAGES_CANCEL","Cancel"); +define("_SMALLWORLD_IMAGES_DELETE","Delete"); +define("_SMALLWORLD_IMAGES_STARTALL","Start All"); +define("_SMALLWORLD_IMAGES_CANCELALL","Cancel All"); +define("_SMALLWORLD_IMAGES_DELETEALL","Delete All"); /*-------------- Image gallery -------------*/ define("_SMALLWORLD_ALBUMTITLETEXT","Close album"); Modified: XoopsModules/smallworld/trunk/smallworld/loadmore.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/loadmore.php 2012-01-30 17:39:33 UTC (rev 8836) +++ XoopsModules/smallworld/trunk/smallworld/loadmore.php 2012-01-30 17:51:44 UTC (rev 8837) @@ -69,6 +69,8 @@ $wm['priv'] = $data['priv']; $wm['avatar'] = $Wall->Gravatar($data['uid_fk']); $wm['avatar_link'] = smallworld_getAvatarLink ($data['uid_fk'], $wm['avatar']); + $wm['avatar_size'] = getimagesize($wm['avatar_link']); + $wm['avatar_highwide'] = smallworld_imageResize($wm['avatar_size'][0], $wm['avatar_size'][1], 50); $wm['compl_msg_lnk'] = "<a href='".XOOPS_URL."/modules/smallworld/permalink.php?ownerid=".$data['uid_fk']; $wm['compl_msg_lnk'] .= "&updid=".$data['msg_id']."'>"._SMALLWORLD_COMP_MSG_LNK_DESC."</a>"; $wm['vote_up'] = $Wall->countVotes ('msg', 'up', $data['msg_id']); @@ -93,6 +95,8 @@ $wc['uid'] = $cdata['uid_fk']; $wc['myavatar'] = $myavatar; $wc['myavatar_link']= $myavatarlink; + $wc['avatar_size'] = getimagesize($wc['myavatar_link']); + $wc['avatar_highwide'] = smallworld_imageResize($wc['avatar_size'][0], $wc['avatar_size'][1], 35); $wc['cface'] = $Wall->Gravatar($cdata['uid_fk']); $wc['avatar_link'] = smallworld_getAvatarLink ($cdata['uid_fk'], $wc['cface']); $wc['compl_msg_lnk'] = "<a href='".XOOPS_URL."/modules/smallworld/permalink.php?ownerid=".Smallworld_getOwnerFromComment($cdata['msg_id_fk']); Modified: XoopsModules/smallworld/trunk/smallworld/message_ajax.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/message_ajax.php 2012-01-30 17:39:33 UTC (rev 8836) +++ XoopsModules/smallworld/trunk/smallworld/message_ajax.php 2012-01-30 17:51:44 UTC (rev 8837) @@ -62,6 +62,8 @@ $wm['priv'] = $data['priv']; $wm['avatar'] = $Wall->Gravatar($data['uid_fk']); $wm['avatar_link'] = smallworld_getAvatarLink ($data['uid_fk'], $wm['avatar']); + $wm['avatar_size'] = getimagesize($wm['avatar_link']); + $wm['avatar_highwide'] = smallworld_imageResize($wm['avatar_size'][0], $wm['avatar_size'][1], 50); $wm['compl_msg_lnk'] = "<a href='".XOOPS_URL."/modules/smallworld/permalink.php?ownerid=".$data['uid_fk']; $wm['compl_msg_lnk'] .= "&updid=".$data['msg_id']."'>"._SMALLWORLD_COMP_MSG_LNK_DESC."</a>"; $wm['vote_up'] = $Wall->countVotes ('msg', 'up', $data['msg_id']); @@ -86,6 +88,8 @@ $wc['uid'] = $cdata['uid_fk']; $wc['myavatar'] = $myavatar; $wc['myavatar_link']= $myavatarlink; + $wc['avatar_size'] = getimagesize($wc['myavatar_link']); + $wc['avatar_highwide'] = smallworld_imageResize($wc['avatar_size'][0], $wc['avatar_size'][1], 35); $wc['cface'] = $Wall->Gravatar($cdata['uid_fk']); $wc['avatar_link'] = smallworld_getAvatarLink ($cdata['uid_fk'], $wc['cface']); $wc['compl_msg_lnk'] = "<a href='".XOOPS_URL."/modules/smallworld/permalink.php?ownerid=".Smallworld_getOwnerFromComment($cdata['msg_id_fk']); Modified: XoopsModules/smallworld/trunk/smallworld/permalink.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/permalink.php 2012-01-30 17:39:33 UTC (rev 8836) +++ XoopsModules/smallworld/trunk/smallworld/permalink.php 2012-01-30 17:51:44 UTC (rev 8837) @@ -56,6 +56,8 @@ $Wall = new Wall_Updates(); $myavatar = $Wall->Gravatar($id); $myavatarlink = smallworld_getAvatarLink($id, $myavatar); + $myavatar_size = getimagesize($myavatarlink); + $myavatar_highwide = smallworld_imageResize($myavatar_size[0], $myavatar_size[1], 50); // Follow array here $followers = Smallworld_array_flatten($Wall->getFollowers($id),0); @@ -74,6 +76,8 @@ $wm['priv'] = $data['priv']; $wm['avatar'] = $Wall->Gravatar($data['uid_fk']); $wm['avatar_link'] = smallworld_getAvatarLink ($data['uid_fk'], $wm['avatar']); + $wm['avatar_size'] = getimagesize($wm['avatar_link']); + $wm['avatar_highwide'] = smallworld_imageResize($wm['avatar_size'][0], $wm['avatar_size'][1], 50); $wm['vote_up'] = $Wall->countVotes ('msg', 'up', $data['msg_id']); $wm['vote_down'] = $Wall->countVotes ('msg', 'down', $data['msg_id']); $wm['sharelinkurl'] = XOOPS_URL."/modules/smallworld/smallworldshare.php?ownerid=".$data['uid_fk']; @@ -94,6 +98,8 @@ $wc['uid'] = $cdata['uid_fk']; $wc['myavatar'] = $Wall->Gravatar($id); $wc['myavatar_link'] = $myavatarlink; + $wc['avatar_size'] = getimagesize($wc['myavatar_link']); + $wc['avatar_highwide'] = smallworld_imageResize($wc['avatar_size'][0], $wc['avatar_size'][1], 35); $wc['cface'] = $Wall->Gravatar($cdata['uid_fk']); $wc['avatar_link'] = smallworld_getAvatarLink ($cdata['uid_fk'], $wc['cface']); $wc['vote_up'] = $Wall->countVotesCom ('com', 'up', $cdata['msg_id_fk'],$cdata['com_id']); @@ -112,6 +118,7 @@ $xoopsTpl->assign('check',1); $xoopsTpl->assign('myavatar',$myavatar); $xoopsTpl->assign('myavatarlink',$myavatarlink); + $xoopsTpl->assign('myavatar_highwide',$myavatar_highwide); } elseif ($profile == 0) { $check->chkUser (); } Modified: XoopsModules/smallworld/trunk/smallworld/smallworldshare.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/smallworldshare.php 2012-01-30 17:39:33 UTC (rev 8836) +++ XoopsModules/smallworld/trunk/smallworld/smallworldshare.php 2012-01-30 17:51:44 UTC (rev 8837) @@ -50,10 +50,12 @@ $wm['priv'] = $data['priv']; $wm['avatar'] = $Wall->Gravatar($data['uid_fk']); if (smallworld_GetModuleOption('smallworldbookmarkavatar', $repmodule='smallworld' !=1)) { - $wm['avatar_link'] = XOOPS_URL.'/modules/smallworld/images/smallworld.png'; + $wm['avatar_link'] = XOOPS_URL.'/modules/smallworld/images/smallworld.png'; } else { $wm['avatar_link'] = smallworld_getAvatarLink ($data['uid_fk'],$wm['avatar']); } + $wm['avatar_size'] = getimagesize($wm['avatar_link']); + $wm['avatar_highwide'] = smallworld_imageResize($wm['avatar_size'][0], $wm['avatar_size'][1], 50); $wm['usernameTitle'] = $wm['username']._SMALLWORLD_UPDATEONSITEMETA.$xoopsConfig['sitename']; $xoopsTpl->assign('xoops_pagetitle', $wm['usernameTitle']); if(isset($xoTheme) && is_object($xoTheme)) { @@ -72,6 +74,8 @@ $wm['priv'] = 1; $wm['avatar'] = ""; $wm['avatar_link'] = XOOPS_URL.'/modules/smallworld/images/smallworld.png'; + $wm['avatar_size'] = getimagesize($wm['avatar_link']); + $wm['avatar_highwide'] = smallworld_imageResize($wm['avatar_size'][0], $wm['avatar_size'][1], 50); $wm['usernameTitle'] = $wm['username']._SMALLWORLD_UPDATEONSITEMETA.$xoopsConfig['sitename']; $xoopsTpl->assign('xoops_pagetitle', $wm['usernameTitle']); if(isset($xoTheme) && is_object($xoTheme)) { Modified: XoopsModules/smallworld/trunk/smallworld/templates/admin_useradmin.html =================================================================== --- XoopsModules/smallworld/trunk/smallworld/templates/admin_useradmin.html 2012-01-30 17:39:33 UTC (rev 8836) +++ XoopsModules/smallworld/trunk/smallworld/templates/admin_useradmin.html 2012-01-30 17:51:44 UTC (rev 8837) @@ -15,7 +15,7 @@ <{foreach item=post from=$allusersinspect}> <tr> <td> - <img height="50px" width="60px" src="<{$post.userimage}>"/> + <img src="<{$post.userimage}>" <{$post.avatar_highwide}>/> </td> <td><{$post.username}></td> <td><{$post.realname}></td> @@ -77,7 +77,7 @@ <{foreach item=posts from=$allusersnoinspect}> <tr> <td> - <img height="50px" width="60px" src="<{$posts.userimage}>"/> + <img src="<{$posts.userimage}>" <{$posts.avatar_highwide}>/> </td> <td><{$posts.username}></td> <td><{$posts.realname}></td> Modified: XoopsModules/smallworld/trunk/smallworld/templates/getlastcom.html =================================================================== --- XoopsModules/smallworld/trunk/smallworld/templates/getlastcom.html 2012-01-30 17:39:33 UTC (rev 8836) +++ XoopsModules/smallworld/trunk/smallworld/templates/getlastcom.html 2012-01-30 17:51:44 UTC (rev 8837) @@ -1,7 +1,7 @@ <{section name=i loop=$comments}> <div class="smallworld_stcommentbody" id="smallworld_stcommentbody<{$comments[i].com_id}>"> <div class="smallworld_stcommentimg"> - <img src="<{$comments[i].avatar_link}>" class='smallworld_small_face'/> + <img src="<{$comments[i].avatar_link}>" class='smallworld_small_face' <{$comments[i].avatar_highwide}>/> </div> <div class="smallworld_stcommenttext"> <{if $isadminuser == 'YES' or $post.username == $myusername}> @@ -36,4 +36,7 @@ </div> <{/if}> </div> -<{/section}> \ No newline at end of file +<{/section}> +<script type="text/javascript"> +attachAvatarOpen(); +</script> \ No newline at end of file Modified: XoopsModules/smallworld/trunk/smallworld/templates/getlastmsg.html =================================================================== --- XoopsModules/smallworld/trunk/smallworld/templates/getlastmsg.html 2012-01-30 17:39:33 UTC (rev 8836) +++ XoopsModules/smallworld/trunk/smallworld/templates/getlastmsg.html 2012-01-30 17:51:44 UTC (rev 8837) @@ -11,7 +11,7 @@ <div class="smallworld_stbody" id="smallworld_stbody<{$post.msg_id}>"> <div class="smallworld_stimg"> - <img src="<{$post.avatar_link}>" class='smallworld_big_face'/> + <img src="<{$post.avatar_link}>" class='smallworld_big_face' <{$post.avatar_highwide}>/> </div> <div class="smallworld_sttext"> @@ -65,7 +65,7 @@ <{if $comm[i].msg_id_fk == $post.msg_id}> <div class="smallworld_stcommentbody" id="smallworld_stcommentbody<{$comm[i].com_id}>"/> <div class="smallworld_stcommentimg"> - <img src="<{$comm[i].avatar_link}>" class='smallworld_small_face'/> + <img src="<{$comm[i].avatar_link}>" class='smallworld_small_face' <{$comm[i].avatar_highwide}>/> </div> <div class="smallworld_stcommenttext"> <{if $isadminuser == 'YES' or $comm[i].username == $myusername}> @@ -107,7 +107,7 @@ <div class="smallworld_commentupdate" style='display:none' id='smallworld_commentbox<{$post.msg_id}>'> <div class="smallworld_stcommentimg"> - <img src="<{$myavatarlink}>" class='smallworld_small_face'/> + <img src="<{$myavatarlink}>" class='smallworld_small_face' <{$comm[i].avatar_highwide}>/> </div> <div class="smallworld_stcommenttext" > <form method="post" action=""> @@ -119,4 +119,7 @@ </div> </div> <br><br> -<{/foreach}> \ No newline at end of file +<{/foreach}> +<script type="text/javascript"> +attachAvatarOpen(); +</script> \ No newline at end of file Modified: XoopsModules/smallworld/trunk/smallworld/templates/getmore.html =================================================================== --- XoopsModules/smallworld/trunk/smallworld/templates/getmore.html 2012-01-30 17:39:33 UTC (rev 8836) +++ XoopsModules/smallworld/trunk/smallworld/templates/getmore.html 2012-01-30 17:51:44 UTC (rev 8837) @@ -9,7 +9,7 @@ </script> <div class="smallworld_stbody" id="smallworld_stbody<{$post.msg_id}>"> <div class="smallworld_stimg"> - <img src="<{$post.avatar_link}>" class='smallworld_big_face'/> + <img src="<{$post.avatar_link}>" class='smallworld_big_face' <{$post.avatar_highwide}> /> </div> <div class="smallworld_sttext"> @@ -51,7 +51,7 @@ <{if $comm[i].msg_id_fk == $post.msg_id}> <div class="smallworld_stcommentbody" id="smallworld_stcommentbody<{$comm[i].com_id}>"> <div class="smallworld_stcommentimg"> - <img src="<{$comm[i].avatar_link}>" class='smallworld_small_face'/> + <img src="<{$comm[i].avatar_link}>" class='smallworld_small_face' <{$comm[i].avatar_highwide}>/> </div> <div class="smallworld_stcommenttext"> <{if $isadminuser == 'YES' or $comm[i].username == $myusername}> @@ -95,7 +95,7 @@ </div> <!-- smallworld_commentcontainer --> <div class="smallworld_commentupdate" style='display:none' id='smallworld_commentbox<{$post.msg_id}>'> <div class="smallworld_stcommentimg"> - <img src="<{$myavatarlink}>" class='smallworld_small_face'/> + <img src="<{$myavatarlink}>" class='smallworld_small_face' <{$comm[i].avatar_highwide}>/> </div> <div class="smallworld_stcommenttext" > <form method="post" action=""> @@ -114,4 +114,7 @@ </div> <a href="javascript:void(0)" class="smallworld_msg_counter" rel="<{$pagename}>" id="<{$post.msg_id}>">MORE</a> <br><br> +<script type="text/javascript"> +attachAvatarOpen(); +</script> \ No newline at end of file Modified: XoopsModules/smallworld/trunk/smallworld/templates/smallworld_admin.html =================================================================== --- XoopsModules/smallworld/trunk/smallworld/templates/smallworld_admin.html 2012-01-30 17:39:33 UTC (rev 8836) +++ XoopsModules/smallworld/trunk/smallworld/templates/smallworld_admin.html 2012-01-30 17:51:44 UTC (rev 8837) @@ -98,7 +98,7 @@ <{foreach item=post from=$allusersinspect}> <tr> <td> - <img height="50px" width="60px" src="<{$post.userimage}>"/> + <img src="<{$post.userimage}>" <{$post.avatar_highwide}>/> </td> <td><{$post.username}></td> <td><{$post.realname}></td> @@ -160,7 +160,7 @@ <{foreach item=posts from=$allusersnoinspect}> <tr> <td> - <img height="50px" width="60px" src="<{$posts.userimage}>"/> + <img src="<{$posts.userimage}>" <{$posts.avatar_highwide}>/> </td> <td><{$posts.username}></td> <td><{$posts.realname}></td> Modified: XoopsModules/smallworld/trunk/smallworld/templates/smallworld_alluserstodiv.html =================================================================== --- XoopsModules/smallworld/trunk/smallworld/templates/smallworld_alluserstodiv.html 2012-01-30 17:39:33 UTC (rev 8836) +++ XoopsModules/smallworld/trunk/smallworld/templates/smallworld_alluserstodiv.html 2012-01-30 17:51:44 UTC (rev 8837) @@ -13,7 +13,7 @@ <{foreach item=post from=$allusersinspect}> <tr> <td> - <img height="50px" width="60px" src="<{$post.userimage}>"/> + <img src="<{$post.userimage}>" <{$post.avatar_highwide}>/> </td> <td><{$post.username}></td> <td><{$post.realname}></td> @@ -75,7 +75,7 @@ <{foreach item=posts from=$allusersnoinspect}> <tr> <td> - <img height="50px" width="60px" src="<{$posts.userimage}>"/> + <img src="<{$posts.userimage}>" <{$posts.avatar_highwide}>/> </td> <td><{$posts.username}></td> <td><{$posts.realname}></td> Modified: XoopsModules/smallworld/trunk/smallworld/templates/smallworld_friends_template.html =================================================================== --- XoopsModules/smallworld/trunk/smallworld/templates/smallworld_friends_template.html 2012-01-30 17:39:33 UTC (rev 8836) +++ XoopsModules/smallworld/trunk/smallworld/templates/smallworld_friends_template.html 2012-01-30 17:51:44 UTC (rev 8837) @@ -92,7 +92,7 @@ <{section name=i loop=$pendingfriends}> <div class="smallworld_friends_body"> <div class="smallworld_friendpageimg"> - <img src="<{$pendingfriends[i].avatar_link}>" class='smallworld_small_face'/> + <img src="<{$pendingfriends[i].avatar_link}>" class='smallworld_small_face' <{$pendingfriends[i].avatar_highwide}>/> </div> <div class="Friends_holder"> <a class="Friends_links" href="<{$xoops_url}>/modules/smallworld/userprofile.php?username=<{$pendingfriends[i].friendname}>"> @@ -114,7 +114,7 @@ <{section name=i loop=$verifiedfriends}> <div class="smallworld_friends_body"> <div class="smallworld_friendpageimg"> - <img src="<{$verifiedfriends[i].avatar_link}>" class='smallworld_small_face'/> + <img src="<{$verifiedfriends[i].avatar_link}>" class='smallworld_small_face' <{$verifiedfriends[i].avatar_highwide}>/> </div> <div class="Friends_holder"> <a class="Friends_links" href="<{$xoops_url}>/modules/smallworld/userprofile.php?username=<{$verifiedfriends[i].friendname}>"> @@ -135,7 +135,7 @@ <{section name=i loop=$followingyou}> <div class="smallworld_friends_body"> <div class="smallworld_friendpageimg"> - <img src="<{$followingyou[i].avatar_link}>" class='smallworld_small_face'/> + <img src="<{$followingyou[i].avatar_link}>" class='smallworld_small_face' <{$followingyou[i].avatar_highwide}>/> </div> <div class="Friends_holder"> <a class="Friends_links" href="<{$xoops_url}>/modules/smallworld/userprofile.php?username=<{$followingyou[i].friendname}>"> @@ -157,7 +157,7 @@ <{section name=i loop=$followingme}> <div class="smallworld_friends_body"> <div class="smallworld_friendpageimg"> - <img src="<{$followingme[i].avatar_link}>" class='smallworld_small_face'/> + <img src="<{$followingme[i].avatar_link}>" class='smallworld_small_face' <{$followingme[i].avatar_highwide}>/> </div> <div class="Friends_holder"> <a class="Friends_links" href="<{$xoops_url}>/modules/smallworld/userprofile.php?username=<{$followingme[i].friendname}>"> Modified: XoopsModules/smallworld/trunk/smallworld/templates/smallworld_index.html =================================================================== --- XoopsModules/smallworld/trunk/smallworld/templates/smallworld_index.html 2012-01-30 17:39:33 UTC (rev 8836) +++ XoopsModules/smallworld/trunk/smallworld/templates/smallworld_index.html 2012-01-30 17:51:44 UTC (rev 8837) @@ -9,7 +9,7 @@ <table class="smallworld_biotable"> <tr> <td> - <{$avatar}> + <{$avatar}> <div class="UploadNewAvatar" id="<{$ownerofpage}>" style="display:none"> <div id="smallworld_avatarupload" > <span>Upload File<span> @@ -97,7 +97,7 @@ }); </script> <div class="smallworld_stimg"> - <img src="<{$post.avatar_link}>" class='smallworld_big_face'/> + <img src="<{$post.avatar_link}>" class='smallworld_big_face' <{$post.avatar_highwide}>/> </div> <div class="smallworld_sttext"> @@ -138,7 +138,7 @@ <{if $comm[i].msg_id_fk == $post.msg_id}> <div class="smallworld_stcommentbody" id="smallworld_stcommentbody<{$comm[i].com_id}>"/> <div class="smallworld_stcommentimg"> - <img src="<{$comm[i].avatar_link}>" class='smallworld_small_face'/> + <img src="<{$comm[i].avatar_link}>" class='smallworld_small_face' <{$comm[i].avatar_highwide}>/> </div> <div class="smallworld_stcommenttext"> <{if $isadminuser == 'YES' or $comm[i].username == $myusername}> @@ -180,7 +180,7 @@ <div class="smallworld_commentupdate" style="display:none" id="smallworld_commentbox<{$post.msg_id}>"> <div class="smallworld_stcommentimg"> - <img src="<{$myavatarlink}>" class='smallworld_small_face'/> + <img src="<{$myavatarlink}>" class='smallworld_small_face' <{$myavatar_highwide}>/> </div> <div class="smallworld_stcommenttext" > <form method="post" action=""> Modified: XoopsModules/smallworld/trunk/smallworld/templates/smallworld_permalink.html =================================================================== --- XoopsModules/smallworld/trunk/smallworld/templates/smallworld_permalink.html 2012-01-30 17:39:33 UTC (rev 8836) +++ XoopsModules/smallworld/trunk/smallworld/templates/smallworld_permalink.html 2012-01-30 17:51:44 UTC (rev 8837) @@ -27,7 +27,7 @@ <div class="smallworld_stbody" id="smallworld_stbody<{$post.msg_id}>"> <div class="smallworld_stimg"> - <img src="<{$post.avatar_link}>" class='smallworld_big_face'/> + <img src="<{$post.avatar_link}>" class='smallworld_big_face' <{$post.avatar_highwide}>/> </div> <div class="smallworld_sttext"> @@ -66,7 +66,7 @@ <{if $comm[i].msg_id_fk == $post.msg_id}> <div class="smallworld_stcommentbody" id="smallworld_stcommentbody<{$comm[i].com_id}>"/> <div class="smallworld_stcommentimg"> - <img src="<{$comm[i].avatar_link}>" class='smallworld_small_face'/> + <img src="<{$comm[i].avatar_link}>" class='smallworld_small_face' <{$comm[i].avatar_highwide}>/> </div> <div class="smallworld_stcommenttext"> <{if $isadminuser == 'YES' or $comm[i].username == $myusername}> @@ -109,7 +109,7 @@ <div class="smallworld_commentupdate" style='display:none' id='smallworld_commentbox<{$post.msg_id}>'> <div class="smallworld_stcommentimg"> - <img src="<{$myavatarlink}>" class='smallworld_small_face'/> + <img src="<{$myavatarlink}>" class='smallworld_small_face' <{$myavatar_highwide}>/> </div> <div class="smallworld_stcommenttext" > <form method="post" action=""> Modified: XoopsModules/smallworld/trunk/smallworld/templates/smallworld_share.html =================================================================== --- XoopsModules/smallworld/trunk/smallworld/templates/smallworld_share.html 2012-01-30 17:39:33 UTC (rev 8836) +++ XoopsModules/smallworld/trunk/smallworld/templates/smallworld_share.html 2012-01-30 17:51:44 UTC (rev 8837) @@ -26,7 +26,7 @@ <div class="smallworld_stbody" id="smallworld_stbody<{$post.msg_id}>"> <div class="smallworld_stimg"> - <img src="<{$post.avatar_link}>" class='smallworld_big_face'/> + <img src="<{$post.avatar_link}>" class='smallworld_big_face' <{$post.avatar_highwide}>/> </div> <div class="smallworld_sttext"> Modified: XoopsModules/smallworld/trunk/smallworld/templates/smallworld_userprofile_imgupload.html =================================================================== --- XoopsModules/smallworld/trunk/smallworld/templates/smallworld_userprofile_imgupload.html 2012-01-30 17:39:33 UTC (rev 8836) +++ XoopsModules/smallworld/trunk/smallworld/templates/smallworld_userprofile_imgupload.html 2012-01-30 17:51:44 UTC (rev 8837) @@ -11,21 +11,21 @@ <td class="file_name"></td> <td class="file_size"></td> <td class="file_upload_progress"><div></div></td> - <td class="file_upload_start"><button>Start</button></td> - <td class="file_upload_cancel"><button>Cancel</button></td> + <td class="file_upload_start"><button><{$smarty.const._SMALLWORLD_IMAGES_START}></button></td> + <td class="file_upload_cancel"><button><{$smarty.const._SMALLWORLD_IMAGES_CANCEL}></button></td> </tr> <tr class="file_download_template" style="display:none;"> <td class="file_download_preview"></td> <td class="file_name"><a></a></td> <td class="file_size"></td> - <td class="file_download_delete" colspan="3"><button>Delete</button></td> + <td class="file_download_delete" colspan="3"><button><{$smarty.const._SMALLWORLD_IMAGES_DELETE}></button></td> </tr> </table> <div class="file_upload_overall_progress"><div style="display:none;"></div></div> <div class="file_upload_buttons"> - <button class="file_upload_start">Start All</button> - <button class="file_upload_cancel">Cancel All</button> - <button class="file_download_delete">Delete All</button> + <button class="file_upload_start"><{$smarty.const._SMALLWORLD_IMAGES_STARTALL}></button> + <button class="file_upload_cancel"><{$smarty.const._SMALLWORLD_IMAGES_CANCELALL}></button> + <button class="file_download_delete"><{$smarty.const._SMALLWORLD_IMAGES_DELETEALL}></button> </div> </div> <{/if}> Modified: XoopsModules/smallworld/trunk/smallworld/templates/smallworld_userprofile_template.html =================================================================== --- XoopsModules/smallworld/trunk/smallworld/templates/smallworld_userprofile_template.html 2012-01-30 17:39:33 UTC (rev 8836) +++ XoopsModules/smallworld/trunk/smallworld/templates/smallworld_userprofile_template.html 2012-01-30 17:51:44 UTC (rev 8837) @@ -20,7 +20,7 @@ <table class="smallworld_biotable"> <tr> <td> - <{$avatar}> + <{$avatar}> <{if $username == $myusername OR $isadminuser == 'YES'}> <div class="UploadNewAvatar" id="<{$ownerofpage}>" style="display:none"> <div id="smallworld_avatarupload" > @@ -175,7 +175,7 @@ <div class="smallworld_stbody" id="smallworld_stbody<{$post.msg_id}>"> <div class="smallworld_stimg"> - <img src="<{$post.avatar_link}>" class='smallworld_big_face'/> + <img src="<{$post.avatar_link}>" class='smallworld_big_face' <{$post.avatar_highwide}>/> </div> <div class="smallworld_sttext"> @@ -218,7 +218,7 @@ <{if $comm[i].msg_id_fk == $post.msg_id}> <div class="smallworld_stcommentbody" id="smallworld_stcommentbody<{$comm[i].com_id}>"/> <div class="smallworld_stcommentimg"> - <img src="<{$comm[i].avatar_link}>" class='smallworld_small_face'/> + <img src="<{$comm[i].avatar_link}>" class='smallworld_small_face' <{$comm[i].avatar_highwide}>/> </div> <div class="smallworld_stcommenttext"> <{if $comm[i].username == $myusername}> @@ -259,7 +259,7 @@ <div class="smallworld_commentupdate" style='display:none' id='smallworld_commentbox<{$post.msg_id}>'> <div class="smallworld_stcommentimg"> - <img src="<{$visitoravatarlink}>" class='smallworld_small_face'/> + <img src="<{$visitoravatarlink}>" class='smallworld_small_face' <{$visitoravatar_highwide}>/> </div> <div class="smallworld_stcommenttext" > <form method="post" action=""> Modified: XoopsModules/smallworld/trunk/smallworld/userprofile.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/userprofile.php 2012-01-30 17:39:33 UTC (rev 8836) +++ XoopsModules/smallworld/trunk/smallworld/userprofile.php 2012-01-30 17:51:44 UTC (rev 8837) @@ -95,8 +95,13 @@ $Wall = new Wall_Updates(); $myavatar = $Wall->Gravatar($id); //profile owners data $myavatarlink = smallworld_getAvatarLink($id, $myavatar); //profile owners data + $myavatar_size = getimagesize($myavatarlink); + $myavatar_highwide = smallworld_imageResize($myavatar_size[0], $myavatar_size[1], 50); + $visitorAvatar = $Wall->Gravatar($yourid); $visitorAvatarlink = smallworld_getAvatarLink($yourid, $visitorAvatar); + $visitorAvatar_size = getimagesize($visitorAvatarlink); + $visitorAvatar_highwide = smallworld_imageResize($visitorAvatar_size[0], $visitorAvatar_size[1], 50); // Follow array here $followers = $Wall->getFollowers($id); @@ -114,6 +119,8 @@ $wm['priv'] = $data['priv']; $wm['avatar'] = $Wall->Gravatar($data['uid_fk']); $wm['avatar_link'] = smallworld_getAvatarLink ($data['uid_fk'], $wm['avatar']); + $wm['avatar_size'] = getimagesize($wm['avatar_link']); + $wm['avatar_highwide'] = smallworld_imageResize($wm['avatar_size'][0], $wm['avatar_size'][1], 50); $wm['compl_msg_lnk'] = "<a href='".XOOPS_URL."/modules/smallworld/permalink.php?ownerid=".$data['uid_fk']; $wm['compl_msg_lnk'] .= "&updid=".$data['msg_id']."'>"._SMALLWORLD_COMP_MSG_LNK_DESC."</a>"; $wm['vote_up'] = $Wall->countVotes ('msg', 'up', $data['msg_id']); @@ -137,6 +144,8 @@ $wc['uid'] = $cdata['uid_fk']; $wc['myavatar'] = $myavatar; $wc['myavatar_link']= $myavatarlink; + $wc['avatar_size'] = getimagesize($wc['myavatar_link']); + $wc['avatar_highwide'] = smallworld_imageResize($wc['avatar_size'][0], $wc['avatar_size'][1], 35); $wc['cface'] = $Wall->Gravatar($cdata['uid_fk']); $wc['avatar_link'] = smallworld_getAvatarLink($cdata['uid_fk'],$wc['cface']); $wc['compl_msg_lnk'] = "<a href='".XOOPS_URL."/modules/smallworld/permalink.php?ownerid=".Smallworld_getOwnerFromComment($cdata['msg_id_fk']); @@ -188,8 +197,10 @@ $xoopsTpl->assign('friendinvitations',$getInvitations); $xoopsTpl->assign('myavatar',$myavatar); $xoopsTpl->assign('myavatarlink',$myavatarlink); + $xoopsTpl->assign('myavatar_highwide',$visitorAvatar_highwide); $xoopsTpl->assign('visitoravatar',$visitorAvatar); $xoopsTpl->assign('visitoravatarlink',$visitorAvatarlink); + $xoopsTpl->assign('visitoravatar_highwide',$visitorAvatar_highwide); $xoopsTpl->assign('myusername',$username); $xoopsTpl->assign('username',$Xusername); $xoopsTpl->assign('bdaynow',$birthday_today_text); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dj...@us...> - 2012-01-30 20:13:05
|
Revision: 8839 http://xoops.svn.sourceforge.net/xoops/?rev=8839&view=rev Author: djculex Date: 2012-01-30 20:12:58 +0000 (Mon, 30 Jan 2012) Log Message: ----------- visitor avatar resize missing in a few files Modified Paths: -------------- XoopsModules/smallworld/trunk/smallworld/index.php XoopsModules/smallworld/trunk/smallworld/message_ajax.php XoopsModules/smallworld/trunk/smallworld/permalink.php XoopsModules/smallworld/trunk/smallworld/templates/getlastmsg.html XoopsModules/smallworld/trunk/smallworld/userprofile.php Modified: XoopsModules/smallworld/trunk/smallworld/index.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/index.php 2012-01-30 17:54:13 UTC (rev 8838) +++ XoopsModules/smallworld/trunk/smallworld/index.php 2012-01-30 20:12:58 UTC (rev 8839) @@ -59,7 +59,7 @@ $myavatar = $Wall->Gravatar($id); $myavatarlink = smallworld_getAvatarLink($id, $myavatar); $myavatar_size = getimagesize($myavatarlink); - $myavatar_highwide = smallworld_imageResize($myavatar_size[0], $myavatar_size[1], 50); + $myavatar_highwide = smallworld_imageResize($myavatar_size[0], $myavatar_size[1], 35); //Get friends invitations $getInvitations = $check->getRequests ($id); Modified: XoopsModules/smallworld/trunk/smallworld/message_ajax.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/message_ajax.php 2012-01-30 17:54:13 UTC (rev 8838) +++ XoopsModules/smallworld/trunk/smallworld/message_ajax.php 2012-01-30 20:12:58 UTC (rev 8839) @@ -46,6 +46,8 @@ $myavatar = $Wall->Gravatar($id); $myavatarlink = smallworld_getAvatarLink($id, $myavatar); + $myavatar_size = getimagesize($myavatarlink); + $myavatar_highwide = smallworld_imageResize($myavatar_size[0], $myavatar_size[1], 35); $update=$_POST['update']; @@ -108,6 +110,7 @@ $tpl->assign('pagename',$page); $tpl->assign('myavatar',$myavatar); $tpl->assign('myavatarlink',$myavatarlink); + $tpl->assign('myavatar_highwide',$myavatar_highwide); $tpl->display(XOOPS_ROOT_PATH .'/modules/smallworld/templates/getlastmsg.html'); } } Modified: XoopsModules/smallworld/trunk/smallworld/permalink.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/permalink.php 2012-01-30 17:54:13 UTC (rev 8838) +++ XoopsModules/smallworld/trunk/smallworld/permalink.php 2012-01-30 20:12:58 UTC (rev 8839) @@ -57,7 +57,7 @@ $myavatar = $Wall->Gravatar($id); $myavatarlink = smallworld_getAvatarLink($id, $myavatar); $myavatar_size = getimagesize($myavatarlink); - $myavatar_highwide = smallworld_imageResize($myavatar_size[0], $myavatar_size[1], 50); + $myavatar_highwide = smallworld_imageResize($myavatar_size[0], $myavatar_size[1], 35); // Follow array here $followers = Smallworld_array_flatten($Wall->getFollowers($id),0); Modified: XoopsModules/smallworld/trunk/smallworld/templates/getlastmsg.html =================================================================== --- XoopsModules/smallworld/trunk/smallworld/templates/getlastmsg.html 2012-01-30 17:54:13 UTC (rev 8838) +++ XoopsModules/smallworld/trunk/smallworld/templates/getlastmsg.html 2012-01-30 20:12:58 UTC (rev 8839) @@ -107,7 +107,7 @@ <div class="smallworld_commentupdate" style='display:none' id='smallworld_commentbox<{$post.msg_id}>'> <div class="smallworld_stcommentimg"> - <img src="<{$myavatarlink}>" class='smallworld_small_face' <{$comm[i].avatar_highwide}>/> + <img src="<{$myavatarlink}>" class='smallworld_small_face' <{$myavatar_highwide}>/> </div> <div class="smallworld_stcommenttext" > <form method="post" action=""> Modified: XoopsModules/smallworld/trunk/smallworld/userprofile.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/userprofile.php 2012-01-30 17:54:13 UTC (rev 8838) +++ XoopsModules/smallworld/trunk/smallworld/userprofile.php 2012-01-30 20:12:58 UTC (rev 8839) @@ -96,12 +96,12 @@ $myavatar = $Wall->Gravatar($id); //profile owners data $myavatarlink = smallworld_getAvatarLink($id, $myavatar); //profile owners data $myavatar_size = getimagesize($myavatarlink); - $myavatar_highwide = smallworld_imageResize($myavatar_size[0], $myavatar_size[1], 50); + $myavatar_highwide = smallworld_imageResize($myavatar_size[0], $myavatar_size[1], 35); $visitorAvatar = $Wall->Gravatar($yourid); $visitorAvatarlink = smallworld_getAvatarLink($yourid, $visitorAvatar); $visitorAvatar_size = getimagesize($visitorAvatarlink); - $visitorAvatar_highwide = smallworld_imageResize($visitorAvatar_size[0], $visitorAvatar_size[1], 50); + $visitorAvatar_highwide = smallworld_imageResize($visitorAvatar_size[0], $visitorAvatar_size[1], 35); // Follow array here $followers = $Wall->getFollowers($id); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dj...@us...> - 2012-01-31 20:07:46
|
Revision: 8861 http://xoops.svn.sourceforge.net/xoops/?rev=8861&view=rev Author: djculex Date: 2012-01-31 20:07:37 +0000 (Tue, 31 Jan 2012) Log Message: ----------- - Return only year in education & job fields - Adjusted css for Crome, Opera, IE and FF Modified Paths: -------------- XoopsModules/smallworld/trunk/smallworld/class/db.php XoopsModules/smallworld/trunk/smallworld/css/smallworld.css XoopsModules/smallworld/trunk/smallworld/include/functions.php XoopsModules/smallworld/trunk/smallworld/js/jquery.stepy.js XoopsModules/smallworld/trunk/smallworld/js/smallworld.js Modified: XoopsModules/smallworld/trunk/smallworld/class/db.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/class/db.php 2012-01-31 20:06:11 UTC (rev 8860) +++ XoopsModules/smallworld/trunk/smallworld/class/db.php 2012-01-31 20:07:37 UTC (rev 8861) @@ -39,8 +39,8 @@ while ($start<=$end) { $msg[$start]['employer'] = $employer[$start]; $msg[$start]['position'] = $position[$start]; - $msg[$start]['jobstart'] = date('d-m-Y',$jobstart[$start]); - $msg[$start]['jobstop'] = date('d-m-Y',$jobstop[$start]); + $msg[$start]['jobstart'] = $jobstart[$start]; + $msg[$start]['jobstop'] = $jobstop[$start]; $msg[$start]['description'] = $description[$start]; $start++; } @@ -64,8 +64,8 @@ while ($start<=$end) { $msg[$start]['school_type'] = $school_type[$start]; $msg[$start]['school'] = $arr7[$school[$start]]; - $msg[$start]['schoolstart'] = date('d-m-Y',$schoolstart[$start]); - $msg[$start]['schoolstop'] = date('d-m-Y',$schoolstop[$start]); + $msg[$start]['schoolstart'] = date('Y',$schoolstart[$start]); + $msg[$start]['schoolstop'] = date('Y',$schoolstop[$start]); $start++; } return $msg; @@ -185,8 +185,8 @@ $schoolstop = Smallworld_sanitize(serialize(Smallworld_DateOfArray ($_POST['schoolstop']))); $jobemployer = Smallworld_sanitize(serialize($_POST['employer'])); $jobposition = Smallworld_sanitize(serialize($_POST['position'])); - $jobstart = Smallworld_sanitize(serialize(Smallworld_DateOfArray ($_POST['jobstart']))); - $jobstop = Smallworld_sanitize(serialize(Smallworld_DateOfArray ($_POST['jobstop']))); + $jobstart = Smallworld_sanitize(serialize(Smallworld_YearOfArray ($_POST['jobstart']))); + $jobstop = Smallworld_sanitize(serialize(Smallworld_YearOfArray ($_POST['jobstop']))); $jobdescription = Smallworld_sanitize(serialize($_POST['description'])); $sql = ''; Modified: XoopsModules/smallworld/trunk/smallworld/css/smallworld.css =================================================================== --- XoopsModules/smallworld/trunk/smallworld/css/smallworld.css 2012-01-31 20:06:11 UTC (rev 8860) +++ XoopsModules/smallworld/trunk/smallworld/css/smallworld.css 2012-01-31 20:07:37 UTC (rev 8861) @@ -162,7 +162,6 @@ border-left: none; background: #eef; padding: 10px 20px 20px; - width: 90%; } #smallworld_messagecounter_id { @@ -225,19 +224,16 @@ } .smallworld_content legend { background-color:#FFCCFF; - border-width:1px 0px 1px 0px; border-style:solid; border-color:#333333; - color:#333333; font-size:110%; font-weight:600; - padding:3px 5px; - margin:0px 0px 2px 0px; + /*margin:0px 0px 2px 0px; position:relative; - top: -15px; + top: -15px;*/ } .smallworld_content label { color:#888; @@ -363,18 +359,38 @@ a.button-back:hover, a.button-next:hover, .finish:hover { background-color: #69C; } -fieldset.step { border: 1px solid #DDD; clear: left; font: 10px verdana;} +fieldset.step { + border: 1px solid #DDD; + clear: left; + font: 10px verdana; +} + fieldset.step label { color: #444444; display: block; font: bold 10px verdana; margin: 0 0 0 2px; } -fieldset.step legend { color: #4080BF; font: bold 14px verdana; padding: 0 2px 3px 2px; } -fieldset.step input, fieldset.step textarea, fieldset.step select { border: 1px solid #AAA; font: 10px verdana; margin-left: 7px; } +fieldset.step legend { + color: #4080BF; + font: bold 14px verdana; + padding: 0 2px 3px 2px; +} -li.error-image { background: url('../images/error.png') no-repeat right top; } +fieldset.step input, fieldset.step textarea, fieldset.step select { + border: 1px solid #AAA; + font: 10px verdana; + margin-left: 7px; +} +fieldset.step #realname, #partner, input[name='emailtype[]'], input[name='screenname_type[]'] { + width:40%; +} + +li.error-image { + background: url('../images/error.png') no-repeat right top; +} + ul.stepy-titles { list-style: none; margin: 0; padding: 0; width: 100%; } ul.stepy-titles li { color: #DDD; cursor: pointer; font: bold 18px verdana; float: left; padding: 10px; } ul.stepy-titles li.current-step { color: #369; cursor: auto; } @@ -527,7 +543,7 @@ position:absolute; left:150px; margin: 0 10px 0 0; - width: 55px; + width: 10%; } input.job,input.jobdesc { Modified: XoopsModules/smallworld/trunk/smallworld/include/functions.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/include/functions.php 2012-01-31 20:06:11 UTC (rev 8860) +++ XoopsModules/smallworld/trunk/smallworld/include/functions.php 2012-01-31 20:07:37 UTC (rev 8861) @@ -92,6 +92,14 @@ return $data; } +function Smallworld_YearOfArray ($array) { + $data = array(); + foreach ($array as $k => $v) { + $data[$k] = $v; + } + return $data; +} + function Smallworld_CreateIndexFiles ($folderUrl) { $myts =& MyTextSanitizer::getInstance(); file_put_contents($folderUrl.'index.html', "<script>history.go(-1);</script>"); Modified: XoopsModules/smallworld/trunk/smallworld/js/jquery.stepy.js =================================================================== --- XoopsModules/smallworld/trunk/smallworld/js/jquery.stepy.js 2012-01-31 20:06:11 UTC (rev 8860) +++ XoopsModules/smallworld/trunk/smallworld/js/jquery.stepy.js 2012-01-31 20:07:37 UTC (rev 8861) @@ -57,7 +57,7 @@ xoops_smallworldtitlesWrapper = xoops_smallworld('<ul/>', { id: id + '-titles', 'class': 'stepy-titles' }), description = '', title = '', - xoops_smallworldlegend = null, + xoops_smallworldlegend = false, hasLegend = true, isForm = xoops_smallworldthis.is('form'), onSubmit = '', Modified: XoopsModules/smallworld/trunk/smallworld/js/smallworld.js =================================================================== --- XoopsModules/smallworld/trunk/smallworld/js/smallworld.js 2012-01-31 20:06:11 UTC (rev 8860) +++ XoopsModules/smallworld/trunk/smallworld/js/smallworld.js 2012-01-31 20:07:37 UTC (rev 8861) @@ -41,7 +41,7 @@ if (xoops_smallworld('#smallworld_regform1').length) { // implies *not* zero xoops_smallworld('#smallworld_regform1').show(); xoops_smallworld.fn.colorbox({ - width:"auto", + width:"50%", height:"70%", inline:true, onComplete: function() { @@ -175,15 +175,15 @@ xoops_smallworld(".jobstart" ).datepicker({ changeMonth: true, changeYear: true, - dateFormat: 'dd-mm-yy', - yearRange: '-100:+0' + dateFormat: 'yy', + yearRange: '-100:+0', }); // Attach jquery-ui datepicker to form. xoops_smallworld(".jobstop" ).datepicker({ changeMonth: true, changeYear: true, - dateFormat: 'dd-mm-yy', + dateFormat: 'yy', yearRange: '-100:+0' }); @@ -404,7 +404,7 @@ }; }); //close click }); - + // Attach on clik open education & work (..more) dialogues xoops_smallworld('#_smallworld_workmore').live('click',function(){ if (xoops_smallworld('#workfull').length) { // implies *not* zero This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |