From: <dj...@us...> - 2012-02-02 15:20:22
|
Revision: 8872 http://xoops.svn.sourceforge.net/xoops/?rev=8872&view=rev Author: djculex Date: 2012-02-02 15:20:11 +0000 (Thu, 02 Feb 2012) Log Message: ----------- - BUG: User website not added to form - BUG: Ie adding horizontal scroll to colorbox when not needed (Yeeeeahh IE - Personal: Update personal hate-list...IE still no.1 Modified Paths: -------------- XoopsModules/smallworld/trunk/smallworld/css/smallworld.css XoopsModules/smallworld/trunk/smallworld/editprofile.php XoopsModules/smallworld/trunk/smallworld/js/smallworld.js XoopsModules/smallworld/trunk/smallworld/templates/smallworld_userprofile_edittemplate.html Modified: XoopsModules/smallworld/trunk/smallworld/css/smallworld.css =================================================================== --- XoopsModules/smallworld/trunk/smallworld/css/smallworld.css 2012-02-02 13:46:31 UTC (rev 8871) +++ XoopsModules/smallworld/trunk/smallworld/css/smallworld.css 2012-02-02 15:20:11 UTC (rev 8872) @@ -469,7 +469,7 @@ .smallworld_remove2 { position:relative; top:-120px; - left: 400px; + left: 50%; font-size:8px; } Modified: XoopsModules/smallworld/trunk/smallworld/editprofile.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/editprofile.php 2012-02-02 13:46:31 UTC (rev 8871) +++ XoopsModules/smallworld/trunk/smallworld/editprofile.php 2012-02-02 15:20:11 UTC (rev 8872) @@ -315,6 +315,7 @@ $xoopsTpl->append('smallworld_register_title',_SMALLWORLD_REGRISTATION_TITLE); $xoopsTpl->assign('smallworld_beforesubmit',_SMALLWORLD_TEXTBEFORESUBMIT); $xoopsTpl->assign('smallworld_save',_SMALLWORLD_SUBMIT); + $xoopsTpl->assign('smallworld_user_website',$r['website']); $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.colorbox.js'); $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/colorbox.css'); Modified: XoopsModules/smallworld/trunk/smallworld/js/smallworld.js =================================================================== --- XoopsModules/smallworld/trunk/smallworld/js/smallworld.js 2012-02-02 13:46:31 UTC (rev 8871) +++ XoopsModules/smallworld/trunk/smallworld/js/smallworld.js 2012-02-02 15:20:11 UTC (rev 8872) @@ -41,7 +41,7 @@ if (xoops_smallworld('#smallworld_regform1').length) { // implies *not* zero xoops_smallworld('#smallworld_regform1').show(); xoops_smallworld.fn.colorbox({ - width:"50%", + innerWidth:"75%", height:"70%", inline:true, onComplete: function() { Modified: XoopsModules/smallworld/trunk/smallworld/templates/smallworld_userprofile_edittemplate.html =================================================================== --- XoopsModules/smallworld/trunk/smallworld/templates/smallworld_userprofile_edittemplate.html 2012-02-02 13:46:31 UTC (rev 8871) +++ XoopsModules/smallworld/trunk/smallworld/templates/smallworld_userprofile_edittemplate.html 2012-02-02 15:20:11 UTC (rev 8872) @@ -233,7 +233,7 @@ <{if $show_website != 'no'}> <tr> <td valign="top"><p><{$smarty.const._SMALLWORLD_WEBSITE}></p></td> - <td><textarea name="website" id="website">http://</textarea> + <td><textarea name="website" id="website"><{$smallworld_user_website}></textarea> </td> </tr> <{/if}> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dj...@us...> - 2012-02-07 21:58:05
|
Revision: 8905 http://xoops.svn.sourceforge.net/xoops/?rev=8905&view=rev Author: djculex Date: 2012-02-07 21:57:57 +0000 (Tue, 07 Feb 2012) Log Message: ----------- Reverting back...these condesed line confuses me :-S 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/admintool.php XoopsModules/smallworld/trunk/smallworld/admin/div_useradmin.php XoopsModules/smallworld/trunk/smallworld/admin/help.php XoopsModules/smallworld/trunk/smallworld/admin/index.php XoopsModules/smallworld/trunk/smallworld/admin/main.php XoopsModules/smallworld/trunk/smallworld/admin/menu.php XoopsModules/smallworld/trunk/smallworld/admin/moduleinfo.php XoopsModules/smallworld/trunk/smallworld/admin/useradmin.php XoopsModules/smallworld/trunk/smallworld/class/adminclass.php XoopsModules/smallworld/trunk/smallworld/class/class_collector.php XoopsModules/smallworld/trunk/smallworld/class/db.php XoopsModules/smallworld/trunk/smallworld/class/forms.php XoopsModules/smallworld/trunk/smallworld/class/friends.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/uploadclass.php XoopsModules/smallworld/trunk/smallworld/class/user.php XoopsModules/smallworld/trunk/smallworld/class/wall.php XoopsModules/smallworld/trunk/smallworld/include/arrays.php XoopsModules/smallworld/trunk/smallworld/include/functions.php XoopsModules/smallworld/trunk/smallworld/include/getSelects.php Modified: XoopsModules/smallworld/trunk/smallworld/admin/about.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/admin/about.php 2012-02-07 21:12:44 UTC (rev 8904) +++ XoopsModules/smallworld/trunk/smallworld/admin/about.php 2012-02-07 21:57:57 UTC (rev 8905) @@ -1,26 +1,24 @@ <?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. +* 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 -* @packet: Modules -* @sub-packet: Smallworld -* @since: Xoops 2.5.4 -* @Author: Michael Albertsen (http://culex.dk) <cu...@cu...> -* @copyright: 2011 Culex -* @Last committed: $Revision$ -* @Last changed by: $Author$ -* @Last changed date: $Date$ -* @ID: $Id$ +* @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(); @@ -37,6 +35,4 @@ echo $aboutAdmin->addNavigation('about.php'); echo $aboutAdmin->renderAbout('', false); - - include 'admin_footer.php'; \ No newline at end of file Modified: XoopsModules/smallworld/trunk/smallworld/admin/admin_footer.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/admin/admin_footer.php 2012-02-07 21:12:44 UTC (rev 8904) +++ XoopsModules/smallworld/trunk/smallworld/admin/admin_footer.php 2012-02-07 21:57:57 UTC (rev 8905) @@ -1,36 +1,32 @@ <?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. +* 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 -* @packet: Modules -* @sub-packet: Smallworld -* @since: Xoops 2.5.4 -* @Author: Michael Albertsen (http://culex.dk) <cu...@cu...> -* @copyright: 2011 Culex -* @Last committed: $Revision$ -* @Last changed by: $Author$ -* @Last changed date: $Date$ -* @ID: $Id$ +* @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" - . " <div style='text-align: center;'>\n" - . " <a href='http://www.xoops.org' target='_blank'>" - . "<img src='" . $pathIconBig . "/xoopsmicrobutton.gif' " - . "alt='XOOPS' title='XOOPS'></a>\n" - . " </div>\n" - . " " . _AM_SMALLWORLD_FOOTER . "\n" - . "</div>"; + ." <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>"; +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-02-07 21:12:44 UTC (rev 8904) +++ XoopsModules/smallworld/trunk/smallworld/admin/admin_header.php 2012-02-07 21:57:57 UTC (rev 8905) @@ -1,41 +1,38 @@ <?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. +* 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 -* @packet: Modules -* @sub-packet: Smallworld -* @since: Xoops 2.5.4 -* @Author: Michael Albertsen (http://culex.dk) <cu...@cu...> -* @copyright: 2011 Culex -* @Last committed: $Revision$ -* @Last changed by: $Author$ -* @Last changed date: $Date$ -* @ID: $Id$ +* @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__)))); -require_once $path . '/mainfile.php'; -require_once $path . '/include/cp_functions.php'; -require_once $path . '/kernel/module.php'; +include_once $path . '/mainfile.php'; +include_once $path . '/include/cp_functions.php'; +include_once $path . '/kernel/module.php'; require_once $path . '/include/cp_header.php'; global $xoopsModule; $pathModuleAdmin = $xoopsModule->getInfo('dirmoduleadmin'); -$pathIconSmall = '../' . $xoopsModule->getInfo('icons16'); -$pathIconBig = '../' . $xoopsModule->getInfo('icons32'); -$modAurl = '/Frameworks/moduleclasses/moduleadmin/moduleadmin.php'; +$pathIcon16 = '../' . $xoopsModule->getInfo('icons16'); +$pathIcon32 = '../' . $xoopsModule->getInfo('icons32'); -if (file_exists($GLOBALS['xoops']->path($modAurl))) { - require_once $GLOBALS['xoops']->path($modAurl); +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); } Modified: XoopsModules/smallworld/trunk/smallworld/admin/admintool.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/admin/admintool.php 2012-02-07 21:12:44 UTC (rev 8904) +++ XoopsModules/smallworld/trunk/smallworld/admin/admintool.php 2012-02-07 21:57:57 UTC (rev 8905) @@ -1,68 +1,55 @@ <?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. +* 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 -* @packet: Modules -* @sub-packet: Smallworld -* @since: Xoops 2.5.4 -* @Author: Michael Albertsen (http://culex.dk) <cu...@cu...> -* @copyright: 2011 Culex -* @Last committed: $Revision$ -* @Last changed by: $Author$ -* @Last changed date: $Date$ -* @ID: $Id$ +* @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(XOOPS_ROOT_PATH."/modules/smallworld/include/functions.php"); -require_once(XOOPS_ROOT_PATH."/modules/smallworld/class/class_collector.php"); require_once 'admin_header.php'; -global $xoopsDB, $xoopsLogger; - +global $xoopsDB, $xoTheme, $xoopsLogger ; $xoopsLogger->activated = false; +include_once(XOOPS_ROOT_PATH."/modules/smallworld/include/functions.php"); +include_once(XOOPS_ROOT_PATH."/modules/smallworld/class/class_collector.php"); if ($_POST['type'] == 'addtime') { - $userid = intval($_POST['userid']); - $amount = intval($_POST['amount']); - $test = "SELECT * FROM " - . $xoopsDB->prefix('smallworld_admin') - . " WHERE userid = '".$userid - . "' AND (inspect_start+inspect_stop) > ".time().""; - $result = $xoopsDB->queryF($test); - if ($xoopsDB->getRowsNum($result) < 1) { - $sql = "UPDATE ".$xoopsDB->prefix('smallworld_admin') - . " SET inspect_start = '".time() - . "', inspect_stop = '".$amount - . "' WHERE userid='".$userid."'"; - $result = $xoopsDB->queryF($sql); - } else { - $sql = "UPDATE ".$xoopsDB->prefix('smallworld_admin') - . " SET inspect_stop = (inspect_stop + " - . $amount.") WHERE userid='" - . $userid."'"; - $result = $xoopsDB->queryF($sql); - } - + $userid = intval($_POST['userid']); + $amount = intval($_POST['amount']); + $test = "SELECT * FROM ".$xoopsDB->prefix('smallworld_admin')." WHERE userid = '".$userid."' AND (inspect_start+inspect_stop) > ".time().""; + $result = $xoopsDB->queryF($test); + if ($xoopsDB->getRowsNum($result) < 1) { + $sql = "UPDATE ".$xoopsDB->prefix('smallworld_admin')." SET inspect_start = '".time()."', inspect_stop = '".$amount."' WHERE userid='".$userid."'"; + $result = $xoopsDB->queryF($sql); + } else { + $sql = "UPDATE ".$xoopsDB->prefix('smallworld_admin')." SET inspect_stop = (inspect_stop + ".$amount.") WHERE userid='".$userid."'"; + $result = $xoopsDB->queryF($sql); + } + } if ($_POST['type'] == 'deletetime') { - $sql = "UPDATE ".$xoopsDB->prefix('smallworld_admin') - . " SET inspect_start = '', inspect_stop = '' WHERE userid='" - . intval($_POST['deluserid'])."'"; - $result = $xoopsDB->queryF($sql); + $sql = "UPDATE ".$xoopsDB->prefix('smallworld_admin')." SET inspect_start = '', inspect_stop = '' WHERE userid='".intval($_POST['deluserid'])."'"; + $result = $xoopsDB->queryF($sql); } if ($_POST['type'] == 'deleteUser') { - $db = new SmallWorldDB; - - $userid = intval($_POST['deluserid']); - $db->deleteAccount($userid); - -} \ No newline at end of file + $db = new SmallWorldDB; + + $userid = intval($_POST['deluserid']); + $db->deleteAccount ($userid); + +} +?> \ No newline at end of file Modified: XoopsModules/smallworld/trunk/smallworld/admin/div_useradmin.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/admin/div_useradmin.php 2012-02-07 21:12:44 UTC (rev 8904) +++ XoopsModules/smallworld/trunk/smallworld/admin/div_useradmin.php 2012-02-07 21:57:57 UTC (rev 8905) @@ -1,86 +1,72 @@ <?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. +* 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 -* @packet: Modules -* @sub-packet: Smallworld -* @since: Xoops 2.5.4 -* @Author: Michael Albertsen (http://culex.dk) <cu...@cu...> -* @copyright: 2011 Culex -* @Last committed: $Revision$ -* @Last changed by: $Author$ -* @Last changed date: $Date$ -* @ID: $Id$ +* @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(XOOPS_ROOT_PATH."/modules/smallworld/include/functions.php"); -require_once(XOOPS_ROOT_PATH."/modules/smallworld/class/class_collector.php"); -global $xoopsLogger; +global $xoopsDB, $xoTheme, $xoopsLogger ; $xoopsLogger->activated = false; +include_once(XOOPS_ROOT_PATH."/modules/smallworld/include/functions.php"); +include_once(XOOPS_ROOT_PATH."/modules/smallworld/class/class_collector.php"); -$tpl = new XoopsTpl(); +$Tpl = new XoopsTpl(); $admin = new SmallworldAdmin(); -$allusersInspect = $admin->getAllUsers('yes'); - if (!empty($allusersInspect)) { - foreach ($allusersInspect 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['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']; - $ai['inspect_stop'] = $data['inspect_stop']; - $ai['userinspect_timetotal'] = ($data['inspect_start'] + - $data['inspect_stop']) - time(); - $tpl->append('allusersinspect', $ai); - } - } - $tpl->assign('allusersinspectcounter', count($ai)); +$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['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']; + $ai['inspect_stop'] = $data['inspect_stop']; + $ai['userinspect_timetotal'] = ($data['inspect_start'] + $data['inspect_stop'])-time(); + $Tpl->append('allusersinspect', $ai); + } + } + $Tpl->assign('allusersinspectcounter',count($ai)); -$allusersNoinspect = $admin->getAllUsers('no'); - if (!empty($allusersNoinspect)) { - foreach ($allusersNoinspect 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['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'] = ''; - $ani['inspect_stop'] = ''; - $ani['userinspect_timetotal'] = ''; - $tpl->append('allusersnoinspect', $ani); - } - } - $tpl->assign('allusersnoinspectcounter', count($ani)); +$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['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'] = ''; + $ani['inspect_stop'] = ''; + $ani['userinspect_timetotal'] = ''; + $Tpl->append('allusersnoinspect', $ani); + } + } + $Tpl->assign('allusersnoinspectcounter',count($ani)); -$tpl->display( - XOOPS_ROOT_PATH - . '/modules/smallworld/templates/' - . 'smallworld_alluserstodiv.html' -); \ No newline at end of file +$Tpl->display(XOOPS_ROOT_PATH .'/modules/smallworld/templates/smallworld_alluserstodiv.html'); +?> \ No newline at end of file Modified: XoopsModules/smallworld/trunk/smallworld/admin/help.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/admin/help.php 2012-02-07 21:12:44 UTC (rev 8904) +++ XoopsModules/smallworld/trunk/smallworld/admin/help.php 2012-02-07 21:57:57 UTC (rev 8905) @@ -1,121 +1,64 @@ <?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. +* 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 -* @packet: Modules -* @sub-packet: Smallworld -* @since: Xoops 2.5.4 -* @Author: Michael Albertsen (http://culex.dk) <cu...@cu...> -* @copyright: 2011 Culex -* @Last committed: $Revision$ -* @Last changed by: $Author$ -* @Last changed date: $Date$ -* @ID: $Id$ +* @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'; -require_once(XOOPS_ROOT_PATH . "/modules/smallworld/include/functions.php"); -require_once( - XOOPS_ROOT_PATH . "/modules/smallworld/class/class_collector.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); -if (!isset($xoopsTpl)) { - $xoopsTpl = new XoopsTpl(); -} - -$xoopsTpl->caching = 0; xoops_cp_header(); -global $xoTheme; -// template assignments - - // help file from admin - $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 - ); - +$admin = new SmallworldAdmin(); +$tpl = new XoopsTpl(); - $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_help', _AM_SMALLWORLD_HELP); - $xoopsTpl->assign('lang_hlp_about', _AM_SMALLWORLD_HELP_ABOUT); - $xoopsTpl->assign('lang_hlp_preface', _AM_SMALLWORLD_HELP_PREFACE); - $xoopsTpl->assign('lang_hlp_faq_t', _AM_SMALLWORLD_HELP_HEADER_FAQ); - $xoopsTpl->assign('lang_hlp_otherhelp', _AM_SMALLWORLD_HELP_OTHERHELP); - - $xoTheme->addStyleSheet('modules/smallworld/css/SmallworldAdmin.css'); - - $xoopsTpl->display( - XOOPS_ROOT_PATH .'/modules/smallworld/templates/admin_help.html' - ); - -xoops_cp_footer(); \ No newline at end of file +// template assignments + $xoopsTpl->assign('lang_help',_AM_SMALLWORLD_HELP); + + // 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->display(XOOPS_ROOT_PATH .'/modules/smallworld/templates/admin_help.html'); + + global $xoTheme; + $xoTheme->addStyleSheet('modules/smallworld/css/SmallworldAdmin.css'); + +xoops_cp_footer(); +?> Modified: XoopsModules/smallworld/trunk/smallworld/admin/index.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/admin/index.php 2012-02-07 21:12:44 UTC (rev 8904) +++ XoopsModules/smallworld/trunk/smallworld/admin/index.php 2012-02-07 21:57:57 UTC (rev 8905) @@ -1,331 +1,201 @@ <?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. +* 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 -* @packet: Modules -* @sub-packet: Smallworld -* @since: Xoops 2.5.4 -* @Author: Michael Albertsen (http://culex.dk) <cu...@cu...> -* @copyright: 2011 Culex -* @Last committed: $Revision$ -* @Last changed by: $Author$ -* @Last changed date: $Date$ -* @ID: $Id$ +* @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 dirname(__FILE__) . '/admin_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' -); +global $xoTheme; +$xoTheme->addStylesheet(XOOPS_URL . '/modules/smallworld/css/SmallworldAdmin.css'); +$xoTheme->addScript(XOOPS_URL . '/modules/smallworld/js/adminsmallworld.js'); -$indexAdmin = new ModuleAdmin(); + $indexAdmin = new ModuleAdmin(); + + $admin = new SmallworldAdmin(); // Find oldest message and apply to template $dfm = $admin->oldestMsg(); -if ($dfm == 0) { - $dfm = _AM_SMALLWORLD_NONEYET; +if ($dfm==0) { + $dfm = _AM_SMALLWORLD_NONEYET; } else { - $dfm = date(_SHORTDATESTRING, $admin->oldestMsg()); + $dfm = date(_SHORTDATESTRING, $admin->oldestMsg()); } $dateoffirstmessage = $dfm; // Get days number $totaldays = $admin->CountDays(); - // get average messages per day -$avgperday = $admin->AvgMsgDay($totaldays); - +$avgperday = $admin->AvgMsgDay ($totaldays); // Smallworld version number -$installversion = $admin->ModuleInstallVersion(); - +$installversion = $admin->ModuleInstallVersion (); // Smallworld install date -$installdate = $admin->ModuleInstallDate(); - -// check current version of Smallworld, -// return desc,link,version if new available -$installCheck = $admin->doCheckUpdate(); - +$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(); - +$sumallusers = $admin->TotalUsers (); // Find list of most active users (total) $maAllround = $admin->mostactiveusers_allround(); -$maCnt = 0; -if (!empty($maAllround)) { - $count = count($maAllround['cnt']); -} else { - $count = 0; -} -$matCnt = 0; -if ($count != 0) { - $maCnt = 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>"; - $i = 1; - $maAllroundCount = count($maAllround) - 1; - while ($i < $maAllroundCount) { - $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>"; -} else { - $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>"; + $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>"; + } else { + $maAllround = 0; + } // Find list of most active users (24 hours) $maToday = $admin->mostactiveusers_today(); -if (!empty($maToday)) { - $count = count($maToday['cnt']); -} else { - $count = 0; -} -$matCnt = 0; -if ($count != 0) { - $matCnt = 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; - $matodayCount = count(array($maToday)); - while ($i <= $matodayCount) { - $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>"; -} else { - $mat = 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>"; + $i = 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])); + $mat .= vsprintf('<td>%s</td></tr>',array($maToday['from'][$i])); + $i++; + } + $mat .= "</tr></table>"; + } else { + $mat = 0; + } // FInd list of best rated users overall $topusers = $admin->topratedusers('up'); -if (!empty($topusers)) { - $count = count($topusers['cnt']); -} else { - $count = 0; -} -$topCnt = 0; -if ($count != 0) { - $topCnt = 1; - $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) { - $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>"; -} else { - $top = 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>"; + $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) { + $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>"; + } else { + $top = 0; + } // FInd list of worst rated users overall $lowusers = $admin->topratedusers('down'); -$lowCnt = 0; -if (!empty($lowusers)) { - $count = count($lowusers['cnt']); -} else { - $count = 0; -} -if ($count != 0) { - $lowCnt = 1; - $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) { - $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>"; -} else { - $low = 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>"; + $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) { + $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>"; + } else { + $low = 0; + } +//----------------------- + // template assignments -$xoopsTpl->assign('lang_moduleinfo', _AM_SMALLWORLD_MODULEINFO); -$xoopsTpl->assign('lang_installversion', _AM_SMALLWORLD_MODULEINSTALL); + $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'); -$xoopsTpl->assign( - 'lang_installversion_status', - _AM_SMALLWORLD_UPDATE_STATUS -); -$xoopsTpl->assign( - 'lang_installdate', - _AM_SMALLWORLD_INSTALLDATE -); - -// AdminModule assignments +//----------------------- + $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, "<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'); -$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->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, - "<class='smallworldadmin'>" - . _AM_SMALLWORLD_AVERAGEMSGPERDAY." : %s</br>", - $avgperday, - 'Red', - 'default' - ); + $indexAdmin->addInfoBoxLine( _AM_SMALLWORLD_USERSTATS, "<class='smallworldadmin'>"._AM_SMALLWORLD_AVERAGEMSGPERDAY." : %s</br>", $avgperday, 'Red','default'); } -if ($matCnt != 0) { - $indexAdmin->addInfoBoxLine( - _AM_SMALLWORLD_USERSTATS, - "<p class='smallworldadmin'>" - . _AM_SMALLWORLD_TOPCHATTERS_TODAY." : %s</p>", - $mat, - 'Red', - 'default' - ); +if ($mat_cnt != 0 ) { + $indexAdmin->addInfoBoxLine( _AM_SMALLWORLD_USERSTATS, "<p class='smallworldadmin'>"._AM_SMALLWORLD_TOPCHATTERS_TODAY." : %s</p>", $mat, 'Red','default'); } -if ($maCnt != 0) { - $indexAdmin->addInfoBoxLine( - _AM_SMALLWORLD_USERSTATS, - "<p class='smallworldadmin'>" - . _AM_SMALLWORLD_TOPCHATTERS." : %s</p>", - $ma, - 'Red', - 'default' - ); +if ($ma_cnt != 0 ) { + $indexAdmin->addInfoBoxLine( _AM_SMALLWORLD_USERSTATS, "<p class='smallworldadmin'>"._AM_SMALLWORLD_TOPCHATTERS." : %s</p>", $ma, 'Red','default'); } - -if ($topCnt != 0) { - $indexAdmin->addInfoBoxLine( - _AM_SMALLWORLD_USERSTATS, - "<p class='smallworldadmin'>" - . _AM_SMALLWORLD_TOPRATEDUSERS." : %s</p>", - $top, - 'Red', - 'default' - ); +if ($top_cnt != 0 ) { + $indexAdmin->addInfoBoxLine( _AM_SMALLWORLD_USERSTATS, "<p class='smallworldadmin'>"._AM_SMALLWORLD_TOPRATEDUSERS." : %s</p>", $top, 'Red','default'); } -if ($lowCnt != 0) { - $indexAdmin->addInfoBoxLine( - _AM_SMALLWORLD_USERSTATS, - "<p class='smallworldadmin'>" - . _AM_SMALLWORLD_BOTTOMRATEDUSERS." : %s</p>", - $low, - 'Red', - 'default' - ); +if ($low_cnt != 0 ) { +$indexAdmin->addInfoBoxLine( _AM_SMALLWORLD_USERSTATS, "<p class='smallworldadmin'>"._AM_SMALLWORLD_BOTTOMRATEDUSERS." : %s</p>", $low, 'Red','default'); } -echo $indexAdmin->addNavigation('index.php'); -echo $indexAdmin->renderIndex(); -require_once "admin_footer.php"; \ No newline at end of file + echo $indexAdmin->addNavigation('index.php'); + echo $indexAdmin->renderIndex(); +include "admin_footer.php"; +?> \ No newline at end of file Modified: XoopsModules/smallworld/trunk/smallworld/admin/main.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/admin/main.php 2012-02-07 21:12:44 UTC (rev 8904) +++ XoopsModules/smallworld/trunk/smallworld/admin/main.php 2012-02-07 21:57:57 UTC (rev 8905) @@ -1,61 +1,60 @@ <?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. +* 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 -* @packet: Modules -* @sub-packet: Smallworld -* @since: Xoops 2.5.4 -* @Author: Michael Albertsen (http://culex.dk) <cu...@cu...> -* @copyright: 2011 Culex -* @Last committed: $Revision$ -* @Last changed by: $Author$ -* @Last changed date: $Date$ -* @ID: $Id$ +* @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'; -require_once XOOPS_ROOT_PATH . "/modules/smallworld/include/functions.php"; -require_once XOOPS_ROOT_PATH - . "/modules/smallworld/class/class_collector.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'; -global $xoopsConfig, $xoTheme, $xoopsModule; +if (!isset($xoopsTpl)) {$xoopsTpl = new XoopsTpl();} +$xoopsTpl->xoops_setCaching(0); -if (!isset($xoopsTpl)) { - $xoopsTpl = new XoopsTpl(); -} -$xoopsTpl->caching = 0; - xoops_cp_header(); +if (isset($_POST['xim_admin_message'])) {$_POST['xim_admin_message'] = '';} + +$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()); +$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); +$avgperday = $admin->AvgMsgDay ($totaldays); // XIM version number -$installversion = $admin->ModuleInstallVersion(); +$installversion = $admin->ModuleInstallVersion (); // XIM install date -$installdate = $admin->ModuleInstallDate(); +$installdate = $admin->ModuleInstallDate (); //check current version of XIM, return desc,link,version if new available -$installCheck = $admin->doCheckUpdate(); +$installCheck = $admin->doCheckUpdate (); // Count members using XIM -$sumallusers = $admin->TotalUsers(); +$sumallusers = $admin->TotalUsers (); // Find list of most active users (total) $admin->mostactiveusers_allround(); // Find list of most active users (24 hours) @@ -67,196 +66,122 @@ // FInd list of worst rated users overall $admin->topratedusers('down'); -$allusersInspect = $admin->getAllUsers('yes'); -if (!empty($allusersInspect)) { - foreach ($allusersInspect 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['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']; - $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_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['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']; + $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)); -$allusersNoinspect = $admin->getAllUsers('no'); -if (!empty($allusersNoinspect)) { - foreach ($allusersNoinspect 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['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'] = ''; - $ani['inspect_stop'] = ''; - $ani['userinspect_timetotal'] = ''; - $xoopsTpl->append('allusersnoinspect', $ani); - } -} -$xoopsTpl->assign('allusersnoinspectcounter', count($ani)); +$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['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'] = ''; + $ani['inspect_stop'] = ''; + $ani['userinspect_timetotal'] = ''; + $xoopsTpl->append('allusersnoinspect', $ani); + } + } + $xoopsTpl->assign('allusersnoinspectcounter',count($ani)); // ---------------- end of tabs ---------------- // // template assignments -$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_installdate', _AM_SMALLWORLD_INSTALLDATE); -$xoopsTpl->assign('lang_totalusers', _AM_SMALLWORLD_TOTALUSERS); -$xoopsTpl->assign('lang_topchatters', _AM_SMALLWORLD_TOPCHATTERS); -$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_installversion_status', _AM_SMALLWORLD_UPDATE_STATUS); -$xoopsTpl->assign('lang_averagemsgperday', _AM_SMALLWORLD_AVERAGEMSGPERDAY); -$xoopsTpl->assign('lang_topchatterstoday', _AM_SMALLWORLD_TOPCHATTERS_TODAY); - -// 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', _AM_SMALLWORLD_HELP_REQUIREMENTS); -$xoopsTpl->assign('lang_hlp_recommended', _AM_SMALLWORLD_HELP_RECOMMENDED); -$xoopsTpl->assign('lang_hlp_firsttime', _AM_SMALLWORLD_HELP_FIRSTTIMEINSTALL); -$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', _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->assign( - 'lang_hlp_upgrading_t', - _AM_SMALLWORLD_HELP_HEADER_UPGRADING -); - -$xoopsTpl->assign( - 'lang_dateoffirstmessage', - _AM_SMALLWORLD_DATEOFFIRSTMESSAGE -); - -$xoopsTpl->assign( - 'lang_hlp_hostedplatform_t', - _AM_SMALLWORLD_HELP_HEADER_HOSTED_PLATFORM -); - -$xoopsTpl->assign( - 'lang_hlp_installation_t', - _AM_SMALLWORLD_HELP_HEADER_INSTALLATION -); - -$xoopsTpl->assign( - 'lang_hlp_requirements_t', - _AM_SMALLWORLD_HELP_HEADER_REQUIREMENTS -); - -$xoopsTpl->assign( - 'lang_hlp_recommended_t', - _AM_SMALLWORLD_HELP_HEADER_RECOMMENDED -); - -$xoopsTpl->assign( - 'lang_hlp_commen1_t', - _AM_SMALLWORLD_HELP_HEADER_COMMENPROBLEMS1 -); - -$xoopsTpl->assign( - 'lang_hlp_hostedplatform', - _AM_SMALLWORLD_HELP_HOSTED_PLATFORM -); - -$xoopsTpl->assign( - 'lang_prefslink', - "<a href='../../system/admin.php?fct=preferences&op=showmod&mod=" - . $xoopsModule->getVar('mid') . "'>" - . _MI_SYSTEM_ADMENU6 . "</a>" -); - -$xoopsTpl->display('db:smallworld_admin.html'); - -//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(); + // 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 - . '/m... [truncated message content] |
From: <dj...@us...> - 2012-02-09 05:50:20
|
Revision: 8922 http://xoops.svn.sourceforge.net/xoops/?rev=8922&view=rev Author: djculex Date: 2012-02-09 05:50:13 +0000 (Thu, 09 Feb 2012) Log Message: ----------- Bugfix: Takeover links not using XOOPS_URL correct Modified Paths: -------------- XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt XoopsModules/smallworld/trunk/smallworld/js/smallworld.js XoopsModules/smallworld/trunk/smallworld/xoops_version.php Modified: XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt =================================================================== --- XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt 2012-02-08 23:13:48 UTC (rev 8921) +++ XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt 2012-02-09 05:50:13 UTC (rev 8922) @@ -1,4 +1,10 @@ ------------------------------ +Changelog v.1.11 RC +------------------------------ +9. february 2012 +- Bugfix: Takeover links not using XOOPS_URL correct + +------------------------------ Changelog v.1.10 RC ------------------------------ Modified: XoopsModules/smallworld/trunk/smallworld/js/smallworld.js =================================================================== --- XoopsModules/smallworld/trunk/smallworld/js/smallworld.js 2012-02-08 23:13:48 UTC (rev 8921) +++ XoopsModules/smallworld/trunk/smallworld/js/smallworld.js 2012-02-09 05:50:13 UTC (rev 8922) @@ -521,7 +521,7 @@ var uname = xoops_smallworld(this).text(); var tempArray = xoops_smallworld(this).attr("href").split("/"); var baseURL = tempArray[0]; - this.href = this.href.replace(oldurl, "/modules/smallworld/userprofile.php?username="+uname); + this.href = this.href.replace(oldurl, smallworld_url + "/modules/smallworld/userprofile.php?username="+uname); }); } Modified: XoopsModules/smallworld/trunk/smallworld/xoops_version.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/xoops_version.php 2012-02-08 23:13:48 UTC (rev 8921) +++ XoopsModules/smallworld/trunk/smallworld/xoops_version.php 2012-02-09 05:50:13 UTC (rev 8922) @@ -20,7 +20,7 @@ **/ $modversion['name'] = _MI_SMALLWORLD_MODULE_NAME; -$modversion['version'] = 1.10; +$modversion['version'] = 1.11; $modversion['description'] = _MI_SMALLWORLD_MODULE_DESC; $modversion['author'] = "Michael Albertsen"; $modversion['nickname'] = 'Culex'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dj...@us...> - 2012-02-09 20:13:31
|
Revision: 8924 http://xoops.svn.sourceforge.net/xoops/?rev=8924&view=rev Author: djculex Date: 2012-02-09 20:13:23 +0000 (Thu, 09 Feb 2012) Log Message: ----------- - Bugfix: Created function smallworld_getImageSize to test if allow_url_fopen = on else try cUrl else return default for image sizes 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/docs/changelog.txt XoopsModules/smallworld/trunk/smallworld/friends.php XoopsModules/smallworld/trunk/smallworld/index.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/userprofile.php XoopsModules/smallworld/trunk/smallworld/xoops_version.php Modified: XoopsModules/smallworld/trunk/smallworld/admin/div_useradmin.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/admin/div_useradmin.php 2012-02-09 08:58:54 UTC (rev 8923) +++ XoopsModules/smallworld/trunk/smallworld/admin/div_useradmin.php 2012-02-09 20:13:23 UTC (rev 8924) @@ -36,7 +36,7 @@ $ai['username'] = $data['username']; $ai['realname'] = $data['realname']; $ai['userimage'] = smallworld_getAvatarLink ($data['userid'],$data['userimage']); - $ai['avatar_size'] = getimagesize($ai['userimage']); + $ai['avatar_size'] = smallworld_getImageSize(80, 100, $ai['userimage']); $ai['avatar_highwide'] = smallworld_imageResize($ai['avatar_size'][0], $ai['avatar_size'][1], 50); $ai['ip'] = $data['ip']; $ai['complaint'] = $data['complaint']; @@ -56,7 +56,7 @@ $ani['username'] = $data['username']; $ani['realname'] = $data['realname']; $ani['userimage'] = smallworld_getAvatarLink ($data['userid'],$data['userimage']); - $ani['avatar_size'] = getimagesize($ani['userimage']); + $ani['avatar_size'] = smallworld_getImageSize(80, 100, $ani['userimage']); $ani['avatar_highwide'] = smallworld_imageResize($ani['avatar_size'][0], $ani['avatar_size'][1], 50); $ani['ip'] = $data['ip']; $ani['complaint'] = $data['complaint']; Modified: XoopsModules/smallworld/trunk/smallworld/admin/main.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/admin/main.php 2012-02-09 08:58:54 UTC (rev 8923) +++ XoopsModules/smallworld/trunk/smallworld/admin/main.php 2012-02-09 20:13:23 UTC (rev 8924) @@ -74,7 +74,7 @@ $ai['username'] = $data['username']; $ai['realname'] = $data['realname']; $ai['userimage'] = smallworld_getAvatarLink ($data['userid'],$data['userimage']); - $ai['avatar_size'] = getimagesize($ai['userimage']); + $ai['avatar_size'] = smallworld_getImageSize(80, 100, $ai['userimage']); $ai['avatar_highwide'] = smallworld_imageResize($ai['avatar_size'][0], $ai['avatar_size'][1], 50); $ai['ip'] = $data['ip']; $ai['complaint'] = $data['complaint']; @@ -94,7 +94,7 @@ $ani['username'] = $data['username']; $ani['realname'] = $data['realname']; $ani['userimage'] = smallworld_getAvatarLink ($data['userid'],$data['userimage']); - $ani['avatar_size'] = getimagesize($ani['userimage']); + $ani['avatar_size'] = smallworld_getImageSize(80, 100, $ani['userimage']); $ani['avatar_highwide'] = smallworld_imageResize($ani['avatar_size'][0], $ani['avatar_size'][1], 50); $ani['ip'] = $data['ip']; $ani['complaint'] = $data['complaint']; Modified: XoopsModules/smallworld/trunk/smallworld/admin/useradmin.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/admin/useradmin.php 2012-02-09 08:58:54 UTC (rev 8923) +++ XoopsModules/smallworld/trunk/smallworld/admin/useradmin.php 2012-02-09 20:13:23 UTC (rev 8924) @@ -44,7 +44,7 @@ $ai['username'] = $data['username']; $ai['realname'] = $data['realname']; $ai['userimage'] = smallworld_getAvatarLink ($data['userid'],$data['userimage']); - $ai['avatar_size'] = getimagesize($ai['userimage']); + $ai['avatar_size'] = smallworld_getImageSize(80, 100, $ai['userimage']); $ai['avatar_highwide'] = smallworld_imageResize($ai['avatar_size'][0], $ai['avatar_size'][1], 50); $ai['ip'] = $data['ip']; $ai['complaint'] = $data['complaint']; @@ -64,7 +64,7 @@ $ani['username'] = $data['username']; $ani['realname'] = $data['realname']; $ani['userimage'] = smallworld_getAvatarLink ($data['userid'],$data['userimage']); - $ani['avatar_size'] = getimagesize($ani['userimage']); + $ani['avatar_size'] = smallworld_getImageSize(80, 100, $ani['userimage']); $ani['avatar_highwide'] = smallworld_imageResize($ani['avatar_size'][0], $ani['avatar_size'][1], 50); $ani['ip'] = $data['ip']; $ani['complaint'] = $data['complaint']; Modified: XoopsModules/smallworld/trunk/smallworld/class/profile.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/class/profile.php 2012-02-09 08:58:54 UTC (rev 8923) +++ XoopsModules/smallworld/trunk/smallworld/class/profile.php 2012-02-09 20:13:23 UTC (rev 8924) @@ -84,7 +84,7 @@ $hisorher = _SMALLWORLD_HISHER; } $avatar = $Wall->Gravatar($id); - $avatar_size = getimagesize(smallworld_getAvatarLink($id, $avatar)); + $avatar_size = smallworld_getImageSize(80, 100, 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>"; Modified: XoopsModules/smallworld/trunk/smallworld/comment_ajax.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/comment_ajax.php 2012-02-09 08:58:54 UTC (rev 8923) +++ XoopsModules/smallworld/trunk/smallworld/comment_ajax.php 2012-02-09 20:13:23 UTC (rev 8924) @@ -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['avatar_size'] = getimagesize($wc['myavatar_link']); + $wc['avatar_size'] = smallworld_getImageSize(80, 100, $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>"; Modified: XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt =================================================================== --- XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt 2012-02-09 08:58:54 UTC (rev 8923) +++ XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt 2012-02-09 20:13:23 UTC (rev 8924) @@ -3,7 +3,7 @@ ------------------------------ 9. february 2012 - Bugfix: Takeover links not using XOOPS_URL correct - +- Bugfix: Created function smallworld_getImageSize to test if allow_url_fopen = on else try cUrl else return default for image sizes ------------------------------ Changelog v.1.10 RC ------------------------------ Modified: XoopsModules/smallworld/trunk/smallworld/friends.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/friends.php 2012-02-09 08:58:54 UTC (rev 8923) +++ XoopsModules/smallworld/trunk/smallworld/friends.php 2012-02-09 20:13:23 UTC (rev 8924) @@ -118,7 +118,7 @@ $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_size'] = smallworld_getImageSize(80, 100, $fp['avatar_link']); $fp['avatar_highwide'] = smallworld_imageResize($fp['avatar_size'][0], $fp['avatar_size'][1], 50); $xoopsTpl->append('pendingfriends', $fp); } @@ -132,7 +132,7 @@ $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_size'] = smallworld_getImageSize(80, 100, $ff['avatar_link']); $ff['avatar_highwide'] = smallworld_imageResize($ff['avatar_size'][0], $ff['avatar_size'][1], 50); $xoopsTpl->append('verifiedfriends', $ff); } @@ -146,7 +146,7 @@ $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_size'] = smallworld_getImageSize(80, 100, $fy['avatar_link']); $fy['avatar_highwide'] = smallworld_imageResize($fy['avatar_size'][0], $fy['avatar_size'][1], 50); $xoopsTpl->append('followingyou', $fy); } @@ -160,7 +160,7 @@ $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_size'] = smallworld_getImageSize(80, 100, $fm['avatar_link']); $fm['avatar_highwide'] = smallworld_imageResize($fm['avatar_size'][0], $fm['avatar_size'][1], 50); $xoopsTpl->append('followingme', $fm); } Modified: XoopsModules/smallworld/trunk/smallworld/index.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/index.php 2012-02-09 08:58:54 UTC (rev 8923) +++ XoopsModules/smallworld/trunk/smallworld/index.php 2012-02-09 20:13:23 UTC (rev 8924) @@ -58,7 +58,7 @@ $Wall = new Wall_Updates(); $myavatar = $Wall->Gravatar($id); $myavatarlink = smallworld_getAvatarLink($id, $myavatar); - $myavatar_size = getimagesize($myavatarlink); + $myavatar_size = smallworld_getImageSize(80, 100, $myavatarlink); $myavatar_highwide = smallworld_imageResize($myavatar_size[0], $myavatar_size[1], 35); //Get friends invitations @@ -81,7 +81,7 @@ $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_size'] = smallworld_getImageSize(80, 100, $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']); @@ -105,7 +105,7 @@ $wc['uid'] = $cdata['uid_fk']; $wc['myavatar'] = $Wall->Gravatar($id); $wc['myavatar_link'] = $myavatarlink; - $wc['avatar_size'] = getimagesize($wc['myavatar_link']); + $wc['avatar_size'] = smallworld_getImageSize(80, 100, $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']); Modified: XoopsModules/smallworld/trunk/smallworld/loadmore.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/loadmore.php 2012-02-09 08:58:54 UTC (rev 8923) +++ XoopsModules/smallworld/trunk/smallworld/loadmore.php 2012-02-09 20:13:23 UTC (rev 8924) @@ -69,7 +69,7 @@ $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_size'] = smallworld_getImageSize(80, 100, $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>"; @@ -95,7 +95,7 @@ $wc['uid'] = $cdata['uid_fk']; $wc['myavatar'] = $myavatar; $wc['myavatar_link']= $myavatarlink; - $wc['avatar_size'] = getimagesize($wc['myavatar_link']); + $wc['avatar_size'] = smallworld_getImageSize(80, 100, $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']); Modified: XoopsModules/smallworld/trunk/smallworld/message_ajax.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/message_ajax.php 2012-02-09 08:58:54 UTC (rev 8923) +++ XoopsModules/smallworld/trunk/smallworld/message_ajax.php 2012-02-09 20:13:23 UTC (rev 8924) @@ -46,7 +46,7 @@ $myavatar = $Wall->Gravatar($id); $myavatarlink = smallworld_getAvatarLink($id, $myavatar); - $myavatar_size = getimagesize($myavatarlink); + $myavatar_size = smallworld_getImageSize(80, 100, $myavatarlink); $myavatar_highwide = smallworld_imageResize($myavatar_size[0], $myavatar_size[1], 35); @@ -64,7 +64,7 @@ $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_size'] = smallworld_getImageSize(80, 100, $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>"; @@ -90,7 +90,7 @@ $wc['uid'] = $cdata['uid_fk']; $wc['myavatar'] = $myavatar; $wc['myavatar_link']= $myavatarlink; - $wc['avatar_size'] = getimagesize($wc['myavatar_link']); + $wc['avatar_size'] = smallworld_getImageSize(80, 100, $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']); Modified: XoopsModules/smallworld/trunk/smallworld/permalink.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/permalink.php 2012-02-09 08:58:54 UTC (rev 8923) +++ XoopsModules/smallworld/trunk/smallworld/permalink.php 2012-02-09 20:13:23 UTC (rev 8924) @@ -56,7 +56,7 @@ $Wall = new Wall_Updates(); $myavatar = $Wall->Gravatar($id); $myavatarlink = smallworld_getAvatarLink($id, $myavatar); - $myavatar_size = getimagesize($myavatarlink); + $myavatar_size = smallworld_getImageSize(80, 100, $myavatarlink); $myavatar_highwide = smallworld_imageResize($myavatar_size[0], $myavatar_size[1], 35); // Follow array here @@ -76,7 +76,7 @@ $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_size'] = smallworld_getImageSize(80, 100, $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']); @@ -98,7 +98,7 @@ $wc['uid'] = $cdata['uid_fk']; $wc['myavatar'] = $Wall->Gravatar($id); $wc['myavatar_link'] = $myavatarlink; - $wc['avatar_size'] = getimagesize($wc['myavatar_link']); + $wc['avatar_size'] = smallworld_getImageSize(80, 100, $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']); Modified: XoopsModules/smallworld/trunk/smallworld/smallworldshare.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/smallworldshare.php 2012-02-09 08:58:54 UTC (rev 8923) +++ XoopsModules/smallworld/trunk/smallworld/smallworldshare.php 2012-02-09 20:13:23 UTC (rev 8924) @@ -54,7 +54,7 @@ } else { $wm['avatar_link'] = smallworld_getAvatarLink ($data['uid_fk'],$wm['avatar']); } - $wm['avatar_size'] = getimagesize($wm['avatar_link']); + $wm['avatar_size'] = smallworld_getImageSize(80, 100, $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']); @@ -74,7 +74,7 @@ $wm['priv'] = 1; $wm['avatar'] = ""; $wm['avatar_link'] = XOOPS_URL.'/modules/smallworld/images/smallworld.png'; - $wm['avatar_size'] = getimagesize($wm['avatar_link']); + $wm['avatar_size'] = smallworld_getImageSize(80, 100, $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']); Modified: XoopsModules/smallworld/trunk/smallworld/userprofile.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/userprofile.php 2012-02-09 08:58:54 UTC (rev 8923) +++ XoopsModules/smallworld/trunk/smallworld/userprofile.php 2012-02-09 20:13:23 UTC (rev 8924) @@ -95,12 +95,12 @@ $Wall = new Wall_Updates(); $myavatar = $Wall->Gravatar($id); //profile owners data $myavatarlink = smallworld_getAvatarLink($id, $myavatar); //profile owners data - $myavatar_size = getimagesize($myavatarlink); + $myavatar_size = smallworld_getImageSize(80, 100, $myavatarlink); $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_size = smallworld_getImageSize(80, 100, $visitorAvatarlink); $visitorAvatar_highwide = smallworld_imageResize($visitorAvatar_size[0], $visitorAvatar_size[1], 35); // Follow array here @@ -119,7 +119,7 @@ $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_size'] = smallworld_getImageSize(80, 100, $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>"; @@ -144,7 +144,7 @@ $wc['uid'] = $cdata['uid_fk']; $wc['myavatar'] = $myavatar; $wc['myavatar_link']= $myavatarlink; - $wc['avatar_size'] = getimagesize($wc['myavatar_link']); + $wc['avatar_size'] = smallworld_getImageSize(80, 100, $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']); Modified: XoopsModules/smallworld/trunk/smallworld/xoops_version.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/xoops_version.php 2012-02-09 08:58:54 UTC (rev 8923) +++ XoopsModules/smallworld/trunk/smallworld/xoops_version.php 2012-02-09 20:13:23 UTC (rev 8924) @@ -20,7 +20,7 @@ **/ $modversion['name'] = _MI_SMALLWORLD_MODULE_NAME; -$modversion['version'] = 1.11; +$modversion['version'] = 1.12; $modversion['description'] = _MI_SMALLWORLD_MODULE_DESC; $modversion['author'] = "Michael Albertsen"; $modversion['nickname'] = 'Culex'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dj...@us...> - 2012-02-09 20:37:57
|
Revision: 8925 http://xoops.svn.sourceforge.net/xoops/?rev=8925&view=rev Author: djculex Date: 2012-02-09 20:37:51 +0000 (Thu, 09 Feb 2012) Log Message: ----------- Bugfix: ../js/smallworld.js added smallworld_url (xoops_url) to submit in registration (djculex) Modified Paths: -------------- XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt XoopsModules/smallworld/trunk/smallworld/js/smallworld.js XoopsModules/smallworld/trunk/smallworld/xoops_version.php Modified: XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt =================================================================== --- XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt 2012-02-09 20:13:23 UTC (rev 8924) +++ XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt 2012-02-09 20:37:51 UTC (rev 8925) @@ -2,8 +2,9 @@ Changelog v.1.11 RC ------------------------------ 9. february 2012 -- Bugfix: Takeover links not using XOOPS_URL correct -- Bugfix: Created function smallworld_getImageSize to test if allow_url_fopen = on else try cUrl else return default for image sizes +- Bugfix: Takeover links not using XOOPS_URL correct(djculex) +- Bugfix: Created function smallworld_getImageSize to test if allow_url_fopen = on else try cUrl else return default for image sizes(djculex) +- Bugfix: ../js/smallworld.js added smallworld_url (xoops_url) to submit in registration (djculex) ------------------------------ Changelog v.1.10 RC ------------------------------ Modified: XoopsModules/smallworld/trunk/smallworld/js/smallworld.js =================================================================== --- XoopsModules/smallworld/trunk/smallworld/js/smallworld.js 2012-02-09 20:13:23 UTC (rev 8924) +++ XoopsModules/smallworld/trunk/smallworld/js/smallworld.js 2012-02-09 20:37:51 UTC (rev 8925) @@ -346,7 +346,7 @@ } else { xoops_smallworld.ajax({ type: "POST", - url: "submit.php", + url: smallworld_url+"submit.php", data: dataString, success: function(){ location.href = smallworld_url+'index.php'; Modified: XoopsModules/smallworld/trunk/smallworld/xoops_version.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/xoops_version.php 2012-02-09 20:13:23 UTC (rev 8924) +++ XoopsModules/smallworld/trunk/smallworld/xoops_version.php 2012-02-09 20:37:51 UTC (rev 8925) @@ -20,7 +20,7 @@ **/ $modversion['name'] = _MI_SMALLWORLD_MODULE_NAME; -$modversion['version'] = 1.12; +$modversion['version'] = 1.13; $modversion['description'] = _MI_SMALLWORLD_MODULE_DESC; $modversion['author'] = "Michael Albertsen"; $modversion['nickname'] = 'Culex'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dj...@us...> - 2012-02-11 16:27:51
|
Revision: 8932 http://xoops.svn.sourceforge.net/xoops/?rev=8932&view=rev Author: djculex Date: 2012-02-11 16:27:44 +0000 (Sat, 11 Feb 2012) Log Message: ----------- - Bugfix: Added check to see if user images folder already exists in uploads - Bugfix: Check if dateTime obj is != null else return 01-01-1900 or 1900-01-01 - Bugfix: check if gender or country images are set else return '' - Bugfix: Added missing function previously added to svn ?? wierd! - Bugfix: Gender was missing in select multi for form items Modified Paths: -------------- XoopsModules/smallworld/trunk/smallworld/class/db.php XoopsModules/smallworld/trunk/smallworld/class/images.php XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt XoopsModules/smallworld/trunk/smallworld/include/functions.php XoopsModules/smallworld/trunk/smallworld/xoops_version.php Modified: XoopsModules/smallworld/trunk/smallworld/class/db.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/class/db.php 2012-02-11 15:08:40 UTC (rev 8931) +++ XoopsModules/smallworld/trunk/smallworld/class/db.php 2012-02-11 16:27:44 UTC (rev 8932) @@ -203,7 +203,7 @@ $regdate = time(); $username = $user->uname(); $realname = Smallworld_sanitize($_POST['realname']); - $gender = Smallworld_sanitize($_POST['gender']); + $gender = (isset($_POST['gender'])) ? $_POST['gender'] : ''; $intingender = Smallworld_sanitize(serialize($_POST['intingender'])); $relationship = Smallworld_sanitize($_POST['relationship']); $searchrelat = Smallworld_sanitize(serialize($_POST['searchrelat'])); @@ -212,7 +212,8 @@ $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']); + $birthplace_country_img = (isset($_POST['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'])); @@ -225,7 +226,8 @@ $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']); + $present_country_img = (isset($_POST['present_country_img'])) ? + Smallworld_sanitize($_POST['present_country_img']) : ''; $website = Smallworld_sanitize($_POST['website']); $interests = Smallworld_sanitize($_POST['interests']); $music = Smallworld_sanitize($_POST['music']); Modified: XoopsModules/smallworld/trunk/smallworld/class/images.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/class/images.php 2012-02-11 15:08:40 UTC (rev 8931) +++ XoopsModules/smallworld/trunk/smallworld/class/images.php 2012-02-11 16:27:44 UTC (rev 8932) @@ -30,15 +30,16 @@ function createAlbum ($userID) { $dir = XOOPS_ROOT_PATH.'/uploads/albums_smallworld'; - echo $dir.'/'.$userID."/thumbnails"; - if(!is_dir($dir."/")) { - mkdir($dir, 0777); - } else { - mkdir($dir.'/'.$userID, 0777); - mkdir($dir.'/'.$userID."/thumbnails", 0777); - Smallworld_CreateIndexFiles ($dir.'/'); - Smallworld_CreateIndexFiles($dir.'/'.$userID."/"); - Smallworld_CreateIndexFiles($dir.'/'.$userID."/thumbnails/"); + if (!file_exists($dir.'/'.$userID.'/thumbnails') || !file_exists($dir.'/'.$userID.'/')) { + if(!is_dir($dir."/")) { + mkdir($dir, 0777); + } else { + mkdir($dir.'/'.$userID, 0777); + mkdir($dir.'/'.$userID."/thumbnails", 0777); + Smallworld_CreateIndexFiles ($dir.'/'); + Smallworld_CreateIndexFiles($dir.'/'.$userID."/"); + Smallworld_CreateIndexFiles($dir.'/'.$userID."/thumbnails/"); + } } } Modified: XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt =================================================================== --- XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt 2012-02-11 15:08:40 UTC (rev 8931) +++ XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt 2012-02-11 16:27:44 UTC (rev 8932) @@ -5,6 +5,13 @@ - Bugfix: Takeover links not using XOOPS_URL correct(djculex) - Bugfix: Created function smallworld_getImageSize to test if allow_url_fopen = on else try cUrl else return default for image sizes(djculex) - Bugfix: ../js/smallworld.js added smallworld_url (xoops_url) to submit in registration (djculex) + +11. Februar 2012 +- Bugfix: Added check to see if user images folder already exists in uploads +- Bugfix: Check if dateTime obj is != null else return 01-01-1900 or 1900-01-01 +- Bugfix: check if gender or country images are set else return '' +- Bugfix: Added missing function previously added to svn ?? wierd! +- Bugfix: Gender was missing in select multi for form items ------------------------------ Changelog v.1.10 RC ------------------------------ Modified: XoopsModules/smallworld/trunk/smallworld/include/functions.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/include/functions.php 2012-02-11 15:08:40 UTC (rev 8931) +++ XoopsModules/smallworld/trunk/smallworld/include/functions.php 2012-02-11 16:27:44 UTC (rev 8932) @@ -598,14 +598,22 @@ // Return new date format US for MySql // Require php>5.2 using DateTime class function Smallworld_euroToUsDate ($stringDate) { - $date = DateTime::createFromFormat('d-m-Y', $stringDate); - return $date->format("Y-m-d"); + if ($stringDate != 0 || $stringDate != '') { + $date = DateTime::createFromFormat('d-m-Y', $stringDate); + return $date->format("Y-m-d"); + } else { + return "1900-01-01"; + } } // Return new date format EU For display function Smallworld_UsToEuroDate ($stringDate) { - $date = DateTime::createFromFormat('Y-m-d', $stringDate); - return $date->format("d-m-Y"); + if ($stringDate != 0 || $stringDate != '') { + $date = DateTime::createFromFormat('Y-m-d', $stringDate); + return $date->format("d-m-Y"); + } else { + return "01-01-1900"; + } } function smallworld_sp () { @@ -732,4 +740,20 @@ return array(0 => '0', 1 => '0'); } } + +/** + * Check weather requests are set or not + * If not return '' else return false + * @param string $req + * @returns string or void + */ + + function smallworld_isset($req) + { + if(isset($req) || !empty($req)) { + return $req; + } else { + return ''; + } + } ?> Modified: XoopsModules/smallworld/trunk/smallworld/xoops_version.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/xoops_version.php 2012-02-11 15:08:40 UTC (rev 8931) +++ XoopsModules/smallworld/trunk/smallworld/xoops_version.php 2012-02-11 16:27:44 UTC (rev 8932) @@ -7,20 +7,20 @@ * 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$ +* @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$ **/ $modversion['name'] = _MI_SMALLWORLD_MODULE_NAME; -$modversion['version'] = 1.13; +$modversion['version'] = 1.14; $modversion['description'] = _MI_SMALLWORLD_MODULE_DESC; $modversion['author'] = "Michael Albertsen"; $modversion['nickname'] = 'Culex'; @@ -170,58 +170,59 @@ $modversion['config'][$i]['description'] = '_MI_SMALLWORLD_VIEWFIELDS_DESC'; $modversion['config'][$i]['formtype'] = 'select_multi'; $modversion['config'][$i]['valuetype'] = 'array'; -$modversion['config'][$i]['options'] = array( '_MI_SMALLWORLD_REALNAME' => 'realname', - '_MI_SMALLWORLD_INTERESTEDIN' => 'interestedin', - '_MI_SMALLWORLD_RELATIONSHIPSTATUS' => 'relationshipstatus', - '_MI_SMALLWORLD_PARTNER' => 'partner', - '_MI_SMALLWORLD_LOOKINGFOR' => 'lookingfor', - '_MI_SMALLWORLD_BIRTHDAY' => 'birthday', - '_MI_SMALLWORLD_BIRTHPLACE' => 'birthplace', - '_MI_SMALLWORLD_POLITICALVIEWS' => 'politicalview', - '_MI_SMALLWORLD_RELIGIOUSVIEWS' => 'religiousview', - '_MI_SMALLWORLD_EMAILS' => 'emails', - '_MI_SMALLWORLD_SCREENNAMES' => 'screennames', - '_MI_SMALLWORLD_MOBILE' => 'mobile', - '_MI_SMALLWORLD_LANDPHONE' => 'landphone', - '_MI_SMALLWORLD_STREETADRESS' => 'streetadress', - '_MI_SMALLWORLD_PRESENTCITY' => 'presentcity', - '_MI_SMALLWORLD_COUNTRY' => 'country', - '_MI_SMALLWORLD_WEBSITE' => 'website', - '_MI_SMALLWORLD_INTERESTS' => 'interests', - '_MI_SMALLWORLD_FAVOURITEMUSIC' => 'favouritemusic', - '_MI_SMALLWORLD_FAVOURITETVSHOWS' => 'favouritetvshows', - '_MI_SMALLWORLD_FAVOURITEMOVIES' => 'favouritemovies', - '_MI_SMALLWORLD_FAVOURITEBOOKS' => 'favouritebooks', - '_MI_SMALLWORLD_ABOUTME' => 'aboutme', - '_MI_SMALLWORLD_EDUCATION' => 'education', - '_MI_SMALLWORLD_EMPLOYMENT' => 'employment',); -$modversion['config'][$i]['default'] = array( 'realname', - 'gender', - 'interestedin', - 'relationshipstatus', - 'partner', - 'lookingfor', - 'birthday', - 'birthplace', - 'politicalview', - 'religiousview', - 'emails', - 'screennames', - 'mobile', - 'landphone', - 'streetadress', - 'presentcity', - 'country', - 'website', - 'interests', - 'favouritemusic', - 'favouritetvshows', - 'favouritemovies', - 'favouritebooks', - 'aboutme', - 'education', - 'employment'); - +$modversion['config'][$i]['options'] = array( '_MI_SMALLWORLD_REALNAME' => 'realname', + '_MI_SMALLWORLD_GENDER' => 'gender', + '_MI_SMALLWORLD_INTERESTEDIN' => 'interestedin', + '_MI_SMALLWORLD_RELATIONSHIPSTATUS' => 'relationshipstatus', + '_MI_SMALLWORLD_PARTNER' => 'partner', + '_MI_SMALLWORLD_LOOKINGFOR' => 'lookingfor', + '_MI_SMALLWORLD_BIRTHDAY' => 'birthday', + '_MI_SMALLWORLD_BIRTHPLACE' => 'birthplace', + '_MI_SMALLWORLD_POLITICALVIEWS' => 'politicalview', + '_MI_SMALLWORLD_RELIGIOUSVIEWS' => 'religiousview', + '_MI_SMALLWORLD_EMAILS' => 'emails', + '_MI_SMALLWORLD_SCREENNAMES' => 'screennames', + '_MI_SMALLWORLD_MOBILE' => 'mobile', + '_MI_SMALLWORLD_LANDPHONE' => 'landphone', + '_MI_SMALLWORLD_STREETADRESS' => 'streetadress', + '_MI_SMALLWORLD_PRESENTCITY' => 'presentcity', + '_MI_SMALLWORLD_COUNTRY' => 'country', + '_MI_SMALLWORLD_WEBSITE' => 'website', + '_MI_SMALLWORLD_INTERESTS' => 'interests', + '_MI_SMALLWORLD_FAVOURITEMUSIC' => 'favouritemusic', + '_MI_SMALLWORLD_FAVOURITETVSHOWS' => 'favouritetvshows', + '_MI_SMALLWORLD_FAVOURITEMOVIES' => 'favouritemovies', + '_MI_SMALLWORLD_FAVOURITEBOOKS' => 'favouritebooks', + '_MI_SMALLWORLD_ABOUTME' => 'aboutme', + '_MI_SMALLWORLD_EDUCATION' => 'education', + '_MI_SMALLWORLD_EMPLOYMENT' => 'employment',); +$modversion['config'][$i]['default'] = array( 'realname', + 'gender', + 'interestedin', + 'relationshipstatus', + 'partner', + 'lookingfor', + 'birthday', + 'birthplace', + 'politicalview', + 'religiousview', + 'emails', + 'screennames', + 'mobile', + 'landphone', + 'streetadress', + 'presentcity', + 'country', + 'website', + 'interests', + 'favouritemusic', + 'favouritetvshows', + 'favouritemovies', + 'favouritebooks', + 'aboutme', + 'education', + 'employment'); + // Mandatory fields $i++; $modversion['config'][$i]['name'] = 'smallworldmandatoryfields'; @@ -229,43 +230,43 @@ $modversion['config'][$i]['description'] = '_MI_SMALLWORLD_VERIFYFIELDS_DESC'; $modversion['config'][$i]['formtype'] = 'select_multi'; $modversion['config'][$i]['valuetype'] = 'array'; -$modversion['config'][$i]['options'] = array( '_MI_SMALLWORLD_REALNAME' => 'realname', - '_MI_SMALLWORLD_GENDER' => 'gender', - '_MI_SMALLWORLD_INTERESTEDIN' => 'interestedin', - '_MI_SMALLWORLD_RELATIONSHIPSTATUS' => 'relationshipstatus', - '_MI_SMALLWORLD_PARTNER' => 'partner', - '_MI_SMALLWORLD_LOOKINGFOR' => 'lookingfor', - '_MI_SMALLWORLD_BIRTHDAY' => 'birthday', - '_MI_SMALLWORLD_BIRTHPLACE' => 'birthplace', - '_MI_SMALLWORLD_POLITICALVIEWS' => 'politicalview', - '_MI_SMALLWORLD_RELIGIOUSVIEWS' => 'religiousview', - '_MI_SMALLWORLD_EMAILS' => 'emails', - '_MI_SMALLWORLD_SCREENNAMES' => 'screennames', - '_MI_SMALLWORLD_MOBILE' => 'mobile', - '_MI_SMALLWORLD_LANDPHONE' => 'landphone', - '_MI_SMALLWORLD_STREETADRESS' => 'streetadress', - '_MI_SMALLWORLD_PRESENTCITY' => 'presentcity', - '_MI_SMALLWORLD_COUNTRY' => 'country', - '_MI_SMALLWORLD_WEBSITE' => 'website', - '_MI_SMALLWORLD_INTERESTS' => 'interests', - '_MI_SMALLWORLD_FAVOURITEMUSIC' => 'favouritemusic', - '_MI_SMALLWORLD_FAVOURITETVSHOWS' => 'favouritetvshows', - '_MI_SMALLWORLD_FAVOURITEMOVIES' => 'favouritemovies', - '_MI_SMALLWORLD_FAVOURITEBOOKS' => 'favouritebooks', - '_MI_SMALLWORLD_ABOUTME' => 'aboutme', - '_MI_SMALLWORLD_EDUCATION' => 'education', - '_MI_SMALLWORLD_EMPLOYMENT' => 'employment',); -$modversion['config'][$i]['default'] = array( 'realname', - 'gender', - 'interestedin', - 'relationshipstatus', - 'lookingfor', - 'birthday', - 'birthplace', - 'emails', - 'screennames', - 'streetadress', - 'presentcity', - 'country'); +$modversion['config'][$i]['options'] = array( '_MI_SMALLWORLD_REALNAME' => 'realname', + '_MI_SMALLWORLD_GENDER' => 'gender', + '_MI_SMALLWORLD_INTERESTEDIN' => 'interestedin', + '_MI_SMALLWORLD_RELATIONSHIPSTATUS' => 'relationshipstatus', + '_MI_SMALLWORLD_PARTNER' => 'partner', + '_MI_SMALLWORLD_LOOKINGFOR' => 'lookingfor', + '_MI_SMALLWORLD_BIRTHDAY' => 'birthday', + '_MI_SMALLWORLD_BIRTHPLACE' => 'birthplace', + '_MI_SMALLWORLD_POLITICALVIEWS' => 'politicalview', + '_MI_SMALLWORLD_RELIGIOUSVIEWS' => 'religiousview', + '_MI_SMALLWORLD_EMAILS' => 'emails', + '_MI_SMALLWORLD_SCREENNAMES' => 'screennames', + '_MI_SMALLWORLD_MOBILE' => 'mobile', + '_MI_SMALLWORLD_LANDPHONE' => 'landphone', + '_MI_SMALLWORLD_STREETADRESS' => 'streetadress', + '_MI_SMALLWORLD_PRESENTCITY' => 'presentcity', + '_MI_SMALLWORLD_COUNTRY' => 'country', + '_MI_SMALLWORLD_WEBSITE' => 'website', + '_MI_SMALLWORLD_INTERESTS' => 'interests', + '_MI_SMALLWORLD_FAVOURITEMUSIC' => 'favouritemusic', + '_MI_SMALLWORLD_FAVOURITETVSHOWS' => 'favouritetvshows', + '_MI_SMALLWORLD_FAVOURITEMOVIES' => 'favouritemovies', + '_MI_SMALLWORLD_FAVOURITEBOOKS' => 'favouritebooks', + '_MI_SMALLWORLD_ABOUTME' => 'aboutme', + '_MI_SMALLWORLD_EDUCATION' => 'education', + '_MI_SMALLWORLD_EMPLOYMENT' => 'employment',); +$modversion['config'][$i]['default'] = array( 'realname', + 'gender', + 'interestedin', + 'relationshipstatus', + 'lookingfor', + 'birthday', + 'birthplace', + 'emails', + 'screennames', + 'streetadress', + 'presentcity', + 'country'); ?> \ 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-02-11 16:52:20
|
Revision: 8933 http://xoops.svn.sourceforge.net/xoops/?rev=8933&view=rev Author: djculex Date: 2012-02-11 16:52:14 +0000 (Sat, 11 Feb 2012) Log Message: ----------- - Check if 'interested in' and 'searchrelat' isset else create default serialized array Modified Paths: -------------- XoopsModules/smallworld/trunk/smallworld/class/db.php XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt XoopsModules/smallworld/trunk/smallworld/xoops_version.php Modified: XoopsModules/smallworld/trunk/smallworld/class/db.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/class/db.php 2012-02-11 16:27:44 UTC (rev 8932) +++ XoopsModules/smallworld/trunk/smallworld/class/db.php 2012-02-11 16:52:14 UTC (rev 8933) @@ -204,9 +204,13 @@ $username = $user->uname(); $realname = Smallworld_sanitize($_POST['realname']); $gender = (isset($_POST['gender'])) ? $_POST['gender'] : ''; - $intingender = Smallworld_sanitize(serialize($_POST['intingender'])); + $intingender = (isset($_POST['intingender'])) ? + Smallworld_sanitize(serialize($_POST['intingender'])) : + Smallworld_sanitize(serialize(array(0 => '3'))); $relationship = Smallworld_sanitize($_POST['relationship']); - $searchrelat = Smallworld_sanitize(serialize($_POST['searchrelat'])); + $searchrelat = (isset($_POST['searchrelat'])) ? + Smallworld_sanitize(serialize($_POST['searchrelat'])) : + Smallworld_sanitize(serialize(array(0 => '0'))); $birthday = Smallworld_sanitize(Smallworld_euroToUsDate($_POST['birthday'])); $birthplace = Smallworld_sanitize($_POST['birthplace']); $birthplace_lat = Smallworld_sanitize($_POST['birthplace_lat']); Modified: XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt =================================================================== --- XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt 2012-02-11 16:27:44 UTC (rev 8932) +++ XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt 2012-02-11 16:52:14 UTC (rev 8933) @@ -5,6 +5,7 @@ - Bugfix: Takeover links not using XOOPS_URL correct(djculex) - Bugfix: Created function smallworld_getImageSize to test if allow_url_fopen = on else try cUrl else return default for image sizes(djculex) - Bugfix: ../js/smallworld.js added smallworld_url (xoops_url) to submit in registration (djculex) +- Bugfix: Check if 'interested in' and 'searchrelat' isset else create default serialized array 11. Februar 2012 - Bugfix: Added check to see if user images folder already exists in uploads Modified: XoopsModules/smallworld/trunk/smallworld/xoops_version.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/xoops_version.php 2012-02-11 16:27:44 UTC (rev 8932) +++ XoopsModules/smallworld/trunk/smallworld/xoops_version.php 2012-02-11 16:52:14 UTC (rev 8933) @@ -20,7 +20,7 @@ **/ $modversion['name'] = _MI_SMALLWORLD_MODULE_NAME; -$modversion['version'] = 1.14; +$modversion['version'] = 1.15; $modversion['description'] = _MI_SMALLWORLD_MODULE_DESC; $modversion['author'] = "Michael Albertsen"; $modversion['nickname'] = 'Culex'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dj...@us...> - 2012-02-11 22:15:18
|
Revision: 8935 http://xoops.svn.sourceforge.net/xoops/?rev=8935&view=rev Author: djculex Date: 2012-02-11 22:15:12 +0000 (Sat, 11 Feb 2012) Log Message: ----------- - Bugfix: Remove error in json reply Modified Paths: -------------- XoopsModules/smallworld/trunk/smallworld/Get_Count.php XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt Modified: XoopsModules/smallworld/trunk/smallworld/Get_Count.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/Get_Count.php 2012-02-11 18:06:24 UTC (rev 8934) +++ XoopsModules/smallworld/trunk/smallworld/Get_Count.php 2012-02-11 22:15:12 UTC (rev 8935) @@ -25,11 +25,12 @@ global $xoopsUser, $xoopsLogger, $xoopsDB; $xoopsLogger->activated = false; +$_COOKIE[session_name()] = session_id(); if ($xoopsUser) { if($_GET['SmallworldGetUserMsgCount']) { - $counts = smallworld_getCountFriendMessagesEtc (); - header('Content-type: application/json'); - echo "{\"NewUserMsgCount\":$counts}"; + $counts = smallworld_getCountFriendMessagesEtc (); + header('Content-type: application/json'); + echo "{\"NewUserMsgCount\":$counts}"; } } ?> \ No newline at end of file Modified: XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt =================================================================== --- XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt 2012-02-11 18:06:24 UTC (rev 8934) +++ XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt 2012-02-11 22:15:12 UTC (rev 8935) @@ -13,6 +13,7 @@ - Bugfix: check if gender or country images are set else return '' - Bugfix: Added missing function previously added to svn ?? wierd! - Bugfix: Gender was missing in select multi for form items +- Bugfix: Remove error in json reply ------------------------------ Changelog v.1.10 RC ------------------------------ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dj...@us...> - 2012-02-12 13:38:41
|
Revision: 8936 http://xoops.svn.sourceforge.net/xoops/?rev=8936&view=rev Author: djculex Date: 2012-02-12 13:38:34 +0000 (Sun, 12 Feb 2012) Log Message: ----------- Bugfix: Keep imagegallery in colorbox even if imageData.index is null Modified Paths: -------------- XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt XoopsModules/smallworld/trunk/smallworld/js/jquery.galleriffic.js Modified: XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt =================================================================== --- XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt 2012-02-11 22:15:12 UTC (rev 8935) +++ XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt 2012-02-12 13:38:34 UTC (rev 8936) @@ -14,6 +14,10 @@ - Bugfix: Added missing function previously added to svn ?? wierd! - Bugfix: Gender was missing in select multi for form items - Bugfix: Remove error in json reply + +12. Fevruary 2012 +- Bugfix: Keep imagegallery in colorbox even if imageData.index is null + ------------------------------ Changelog v.1.10 RC ------------------------------ Modified: XoopsModules/smallworld/trunk/smallworld/js/jquery.galleriffic.js =================================================================== --- XoopsModules/smallworld/trunk/smallworld/js/jquery.galleriffic.js 2012-02-11 22:15:12 UTC (rev 8935) +++ XoopsModules/smallworld/trunk/smallworld/js/jquery.galleriffic.js 2012-02-12 13:38:34 UTC (rev 8936) @@ -279,14 +279,20 @@ isPreloadComplete: false, - // Initalizes the image preloader - preloadInit: function() { - if (this.preloadAhead == 0) return this; - - this.preloadStartIndex = this.currentImage.index; - var nextIndex = this.getNextIndex(this.preloadStartIndex); - return this.preloadRecursive(this.preloadStartIndex, nextIndex); - }, + // Initalizes the image preloader + preloadInit: function() { + // edit. Cgheck to see if defined + if (!this.currentImage) { + return this; + } + // end edit + if (this.preloadAhead == 0) { + return this; + } + this.preloadStartIndex = this.currentImage.index; + var nextIndex = this.getNextIndex(this.preloadStartIndex); + return this.preloadRecursive(this.preloadStartIndex, nextIndex); + }, // Changes the location in the gallery the preloader should work // @param {Integer} index The index of the image where the preloader should restart at. @@ -500,21 +506,23 @@ }, // This function is garaunteed to be called anytime a gallery slide changes. - // @param {Object} imageData An object holding the image metadata of the image to navigate to. - gotoImage: function(imageData) { - var index = imageData.index; + // @param {Object} imageData An object holding the image metadata of the image to navigate to. + gotoImage: function(imageData) { + // edit. check to see if defined + if (!imageData) { + return this; + } + // end edit + var index = imageData.index; + if (this.onSlideChange) { + this.onSlideChange(this.currentImage.index, index); + } + this.currentImage = imageData; + this.preloadRelocate(index); + this.refresh(); + return this; + }, - if (this.onSlideChange) - this.onSlideChange(this.currentImage.index, index); - - this.currentImage = imageData; - this.preloadRelocate(index); - - this.refresh(); - - return this; - }, - // Returns the default transition duration value. The value is halved when not // performing a synchronized transition. // @param {Boolean} isSync Specifies whether the transitions are synchronized. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dj...@us...> - 2012-02-13 01:09:42
|
Revision: 8943 http://xoops.svn.sourceforge.net/xoops/?rev=8943&view=rev Author: djculex Date: 2012-02-13 01:09:36 +0000 (Mon, 13 Feb 2012) Log Message: ----------- Bugfix: Removed php 5.30 function to convert dateformat and replaced with simpler function Modified Paths: -------------- XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt XoopsModules/smallworld/trunk/smallworld/include/functions.php Modified: XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt =================================================================== --- XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt 2012-02-12 23:10:22 UTC (rev 8942) +++ XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt 2012-02-13 01:09:36 UTC (rev 8943) @@ -18,6 +18,9 @@ 12. Fevruary 2012 - Bugfix: Keep imagegallery in colorbox even if imageData.index is null +13. February +- Bugfix: Removed php 5.30 function to convert dateformat and replaced with simpler function + ------------------------------ Changelog v.1.10 RC ------------------------------ Modified: XoopsModules/smallworld/trunk/smallworld/include/functions.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/include/functions.php 2012-02-12 23:10:22 UTC (rev 8942) +++ XoopsModules/smallworld/trunk/smallworld/include/functions.php 2012-02-13 01:09:36 UTC (rev 8943) @@ -595,22 +595,31 @@ return $res; } -// Return new date format US for MySql -// Require php>5.2 using DateTime class -function Smallworld_euroToUsDate ($stringDate) { +/* + * Return date format (YYYY-MM-DD) for MySql + * @param date $stringDate + * $returns date +*/ +function Smallworld_euroToUsDate($stringDate) { if ($stringDate != 0 || $stringDate != '') { - $date = DateTime::createFromFormat('d-m-Y', $stringDate); - return $date->format("Y-m-d"); + $theData = split("-", trim($stringDate)); + $ret = $theData[2] . "-" . $theData[1] . "-" . $theData[0]; + return $ret; } else { return "1900-01-01"; } } -// Return new date format EU For display -function Smallworld_UsToEuroDate ($stringDate) { +/* + * Return date format (DD-MM-YYYY) for display + * @param date $stringDate + * $returns date +*/ +function Smallworld_UsToEuroDate($stringDate) { if ($stringDate != 0 || $stringDate != '') { - $date = DateTime::createFromFormat('Y-m-d', $stringDate); - return $date->format("d-m-Y"); + $theData = split("-", trim($stringDate)); + $ret = $theData[2] . "-" . $theData[1] . "-" . $theData[0]; + return $ret; } else { return "01-01-1900"; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dj...@us...> - 2012-02-13 02:08:58
|
Revision: 8944 http://xoops.svn.sourceforge.net/xoops/?rev=8944&view=rev Author: djculex Date: 2012-02-13 02:08:50 +0000 (Mon, 13 Feb 2012) Log Message: ----------- Change: Removed php 5.30 function to calculate difference between dates in Years. Modified Paths: -------------- XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt XoopsModules/smallworld/trunk/smallworld/include/functions.php Modified: XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt =================================================================== --- XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt 2012-02-13 01:09:36 UTC (rev 8943) +++ XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt 2012-02-13 02:08:50 UTC (rev 8944) @@ -20,6 +20,7 @@ 13. February - Bugfix: Removed php 5.30 function to convert dateformat and replaced with simpler function +- Change: Removed php 5.30 function to calculate difference between dates in Years. ------------------------------ Changelog v.1.10 RC Modified: XoopsModules/smallworld/trunk/smallworld/include/functions.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/include/functions.php 2012-02-13 01:09:36 UTC (rev 8943) +++ XoopsModules/smallworld/trunk/smallworld/include/functions.php 2012-02-13 02:08:50 UTC (rev 8944) @@ -7,345 +7,371 @@ * 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$ +* @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$ **/ /* Get array of timestamps based on the timetype configured in preferences */ -function SmallworldGetTimestampsToForm () { - $timearray = array(); - $start = 1900; - $end = date('Y'); - for ( $i=$start; $i <= $end; $i++) { - $key = $i; - $timearray[$key] = $i; - } - ksort($timearray); - return $timearray; +function SmallworldGetTimestampsToForm() +{ + $timearray = array(); + $start = 1900; + $end = date('Y'); + for ($i = $start; $i <= $end; $i++) { + $key = $i; + $timearray[$key] = $i; + } + ksort($timearray); + return $timearray; } // Clean vars or arrays // If array check for magicQuotes. // Pass string to Smallworld_cleanup_string -function Smallworld_cleanup($text) { - if (is_array($text)) { - foreach ($text as $key => $value) { - $text[$key] = Smallworld_cleanup_string($value); - } - } else { - $text = Smallworld_cleanup_string($text); - } - return $text; +function Smallworld_cleanup($text) +{ + if (is_array($text)) { + foreach ($text as $key => $value) { + $text[$key] = Smallworld_cleanup_string($value); + } + } else { + $text = Smallworld_cleanup_string($text); + } + return $text; } // Sanitize string -function Smallworld_cleanup_string($text) { +function Smallworld_cleanup_string($text) +{ $text = htmlspecialchars($text, ENT_QUOTES); $myts = MyTextSanitizer::getInstance(); - $text = $myts->displayTarea($text,1,1,1,1); - $text = str_replace("\n\r","\n",$text); - $text = str_replace("\r\n","\n",$text); - $text = str_replace("\n","<br />",$text); - $text = str_replace("\"","'",$text); + $text = $myts->displayTarea($text, 1, 1, 1, 1); + $text = str_replace("\n\r", "\n", $text); + $text = str_replace("\r\n", "\n", $text); + $text = str_replace("\n", "<br />", $text); + $text = str_replace("\"", "'", $text); return $text; } // clean Array for mysql insertion // or send string to Smallworld_sanitize_string -function Smallworld_sanitize ($text) { - if (is_array($text)) { - foreach ($text as $key => $value) { - $text[$key] = Smallworld_sanitize_string($value); - } - } else { - $text = Smallworld_sanitize_string($text); - } - return $text; +function Smallworld_sanitize($text) +{ + if (is_array($text)) { + foreach ($text as $key => $value) { + $text[$key] = Smallworld_sanitize_string($value); + } + } else { + $text = Smallworld_sanitize_string($text); + } + return $text; } -function Smallworld_sanitize_string ($value) { - $myts = MyTextSanitizer::getInstance(); - if(get_magic_quotes_gpc()){ - $value = $myts->stripSlashesGPC($value); - } else { - $value = mysql_real_escape_string($value); - } - return $value; +function Smallworld_sanitize_string($value) +{ + $myts = MyTextSanitizer::getInstance(); + if(get_magic_quotes_gpc()){ + $value = $myts->stripSlashesGPC($value); + } else { + $value = mysql_real_escape_string($value); + } + return $value; } -function Smallworld_DateOfArray ($array) { - $data = array(); - foreach ($array as $k => $v) { - $data[$k] = strtotime($v); - } - return $data; +function Smallworld_DateOfArray($array) +{ + $data = array(); + foreach ($array as $k => $v) { + $data[$k] = strtotime($v); + } + return $data; } -function Smallworld_YearOfArray ($array) { - $data = array(); - foreach ($array as $k => $v) { - $data[$k] = $v; - } - 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>"); +function Smallworld_CreateIndexFiles($folderUrl) +{ + $myts =& MyTextSanitizer::getInstance(); + file_put_contents($folderUrl . 'index.html', "<script>history.go(-1);</script>"); } -function smallworld_ImplodeArray ($glue = ", ", $pieces) { +function smallworld_ImplodeArray($glue = ", ", $pieces) +{ return implode($glue, $pieces); } // recursively reduces deep arrays to single-dimensional arrays // $preserve_keys: (0=>never, 1=>strings, 2=>always) -function Smallworld_array_flatten($array, $preserve_keys = 1, &$newArray = Array()) { - foreach ($array as $key => $child) { - if (is_array($child)) { - $newArray =& Smallworld_array_flatten($child, $preserve_keys, $newArray); - } elseif ($preserve_keys + is_string($key) > 1) { - $newArray[$key] = $child; - } else { - $newArray[] = $child; +function Smallworld_array_flatten($array, $preserve_keys = 1, &$newArray = Array()) +{ + foreach ($array as $key => $child) { + if (is_array($child)) { + $newArray =& Smallworld_array_flatten($child, $preserve_keys, $newArray); + } elseif ($preserve_keys + is_string($key) > 1) { + $newArray[$key] = $child; + } else { + $newArray[] = $child; + } } - } - return $newArray; + return $newArray; } -// Returns age in years -// Input birthdate -// Requires php >= 5.3 -function Smallworld_Birthday($birth, $now = NULL){ - $now = new DateTime($now); - $birth = new DateTime($birth); - return $birth->diff($now)->format('%r%y'); +/* + * Calculate years from date format (YYYY-MM-DD) + * @param date $birth + * @returns integer + */ +function Smallworld_Birthday($birth) +{ + list($year, $month, $day) = explode("-", $birth); + $yearDiff = date("Y") - $year; + $monthDiff = date("m") - $month; + $dayDiff = date("d") - $day; + if ($dayDiff < 0 || $monthDiff < 0) { + $yearDiff--; + } + return $yearDiff; } -function smallworld_isset_or($check) { +function smallworld_isset_or($check) +{ global $xoopsDB,$xoopsUser; - $query = "SELECT * FROM ".$xoopsDB->prefix('smallworld_user')." WHERE username = '".$check."'"; - $result=$xoopsDB->queryF($query); - while ($row=$xoopsDB->fetchArray($result)) { - if ($row['userid'] == '') { - return false; - } else { - return $row['userid']; - } - } + $query = "SELECT * FROM ".$xoopsDB->prefix('smallworld_user')." WHERE username = '".$check."'"; + $result=$xoopsDB->queryF($query); + while ($row=$xoopsDB->fetchArray($result)) { + if ($row['userid'] == '') { + return false; + } else { + return $row['userid']; + } + } } //Srinivas Tamada http://9lessons.info //Loading Comments link with load_updates.php -function smallworld_time_stamp($session_time) { - global $xoopsConfig; - - $time_difference = time() - $session_time ; - $seconds = $time_difference ; - $minutes = round($time_difference / 60 ); - $hours = round($time_difference / 3600 ); - $days = round($time_difference / 86400 ); - $weeks = round($time_difference / 604800 ); - $months = round($time_difference / 2419200 ); - $years = round($time_difference / 29030400 ); - - if($seconds <= 60) { - $t = "$seconds"._SMALLWORLD_SECONDSAGO; - } else if($minutes <=60) { - if($minutes==1) { - $t = _SMALLWORLD_ONEMINUTEAGO; - } - else { - $t = "$minutes"._SMALLWORLD_MINUTESAGO; - } - } else if($hours <=24) { - if($hours==1) { - $t = _SMALLWORLD_ONEHOURAGO; - } else { - $t = "$hours"._SMALLWORLD_HOURSAGO; - } - } else if($days <=7) { - if($days==1){ - $t = _SMALLWORLD_ONEDAYAGO; - } else { - $t = "$days"._SMALLWORLD_DAYSAGO; - } - } else if($weeks <=4) { - if($weeks==1) { - $t = _SMALLWORLD_ONEWEEKAGO; - } else { - $t = "$weeks"._SMALLWORLD_WEEKSAGO; - } - } else if($months <=12) { - if($months==1) { - $t = _SMALLWORLD_ONEMONTHAGO; - } else { - $t = "$months"._SMALLWORLD_MONTHSAGO; - } - } else { - if($years==1) { - $t = _SMALLWORLD_ONEYEARAGO; - } else { - $t = "$years"._SMALLWORLD_YEARSAGO; - } - } - return $t; +function smallworld_time_stamp($session_time) +{ + global $xoopsConfig; + $time_difference = time() - $session_time; + $seconds = $time_difference; + $minutes = round($time_difference / 60); + $hours = round($time_difference / 3600); + $days = round($time_difference / 86400); + $weeks = round($time_difference / 604800); + $months = round($time_difference / 2419200); + $years = round($time_difference / 29030400); + if($seconds <= 60) { + $t = "$seconds"._SMALLWORLD_SECONDSAGO; + } else if($minutes <= 60) { + if($minutes == 1) { + $t = _SMALLWORLD_ONEMINUTEAGO; + } else { + $t = "$minutes"._SMALLWORLD_MINUTESAGO; + } + } else if($hours <= 24) { + if($hours == 1) { + $t = _SMALLWORLD_ONEHOURAGO; + } else { + $t = "$hours"._SMALLWORLD_HOURSAGO; + } + } else if($days <= 7 ) { + if($days == 1){ + $t = _SMALLWORLD_ONEDAYAGO; + } else { + $t = "$days"._SMALLWORLD_DAYSAGO; + } + } else if($weeks <=4) { + if($weeks==1) { + $t = _SMALLWORLD_ONEWEEKAGO; + } else { + $t = "$weeks"._SMALLWORLD_WEEKSAGO; + } + } else if($months <= 12) { + if($months == 1) { + $t = _SMALLWORLD_ONEMONTHAGO; + } else { + $t = "$months"._SMALLWORLD_MONTHSAGO; + } + } else { + if($years == 1) { + $t = _SMALLWORLD_ONEYEARAGO; + } else { + $t = "$years"._SMALLWORLD_YEARSAGO; + } + } + return $t; } // Return only url/link // If url is image link return <img> -function smallworld_tolink($text){ - $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', - '<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<img class="smallworldAttImg" src="//\\2"><a class="smallworldAttImgTxt" href="//\\2">'._SMALLWORLD_CLICKIMAGETHUMB.'</a><br>', $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; +function smallworld_tolink($text) +{ + $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', + '<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<img class="smallworldAttImg" src="//\\2"><a class="smallworldAttImgTxt" href="//\\2">'._SMALLWORLD_CLICKIMAGETHUMB.'</a><br>', $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; } -function Smallworld_stripWordsKeepUrl ($text) { - preg_replace('/(((f|ht){1}tps:\/\/)[-a-zA-Z0-9@:%_\+.~#?&\/\/=]+)/i', +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; + return $text; } -function Smallworld_sociallinks ($num, $name) { - if ($num == 0) { - $image = '<img title="Msn" id="Smallworld_socialnetworkimg" src="'.XOOPS_URL.'/modules/smallworld/images/socialnetworkicons/msn.png"/>'; - $link = '<a title="Msn" id="Smallworld_socialnetwork" target="_blank" href="http://members.msn.com/'.$name.'">'; - } - if ($num == 1) { - $image = '<img title="facebook" id="Smallworld_socialnetworkimg" src="'.XOOPS_URL.'/modules/smallworld/images/socialnetworkicons/facebook.png"/>'; - $link = '<a title="facebook" id="Smallworld_socialnetwork" target="_blank" href="http://www.facebook.com/'.$name.'">'; - } - if ($num == 2) { - $image = '<img title="GooglePlus" id="Smallworld_socialnetworkimg" src="'.XOOPS_URL.'/modules/smallworld/images/socialnetworkicons/googleplus.png"/>'; - $link = '<a title="GooglePlus" id="Smallworld_socialnetwork" target="_blank" href="https://plus.google.com/'.$name.'">'; - } - if ($num == 3) { - $image = '<img title="Icq" id="Smallworld_socialnetworkimg" src="'.XOOPS_URL.'/modules/smallworld/images/socialnetworkicons/icq.png"/>'; - $link = '<a title="icq" id="Smallworld_socialnetwork" target="_blank" href="http://www.icq.com/people/'.$name.'/">'; - } - if ($num == 4) { - $image = '<img title="Skype" id="Smallworld_socialnetworkimg" src="'.XOOPS_URL.'/modules/smallworld/images/socialnetworkicons/skype.png"/>'; - $link = '<a title="Skype" id="Smallworld_socialnetwork" target="_blank" href="skype:'.$name.'?userinfo">'; - } - if ($num == 5) { - $image = '<img title="Twitter" id="Smallworld_socialnetworkimg" src="'.XOOPS_URL.'/modules/smallworld/images/socialnetworkicons/twitter.png"/>'; - $link = '<a title="Twitter" id="Smallworld_socialnetwork" target="_blank" href="http://twitter.com/#!/'.$name.'">'; - } - if ($num == 6) { - $image = '<img title="MySpace" id="Smallworld_socialnetworkimg" src="'.XOOPS_URL.'/modules/smallworld/images/socialnetworkicons/myspace.png"/>'; - $link = '<a title="MySpace" id="Smallworld_socialnetwork" target="_blank" href="http://www.myspace.com/'.$name.'">'; - } - if ($num == 7) { - $image = '<img title="Xoops" id="Smallworld_socialnetworkimg" src="'.XOOPS_URL.'/modules/smallworld/images/socialnetworkicons/xoops.png"/>'; - $link = '<a title="Xoops" id="Smallworld_socialnetwork" target="_blank" href="http://xoops.org/modules/profile/userinfo.php?uid='.$name.'">'; - } - if ($num == 8) { - $image = '<img title="Yahoo Messenger" id="Smallworld_socialnetworkimg" src="'.XOOPS_URL.'/modules/smallworld/images/socialnetworkicons/yahoo.png"/>'; - $link = '<a title="Yahoo Messenger" id="Smallworld_socialnetwork" target="_blank" href="ymsgr:sendim?'.$name.'">'; - } - if ($num == 9) { - $image = '<img title="Youtube" id="Smallworld_socialnetworkimg" src="'.XOOPS_URL.'/modules/smallworld/images/socialnetworkicons/youtube.png"/>'; - $link = '<a title="Youtube" id="Smallworld_socialnetwork" target="_blank" href="http://www.youtube.com/user/'.$name.'">'; - } - return $image.$link; +function Smallworld_sociallinks($num, $name) +{ + if ($num == 0) { + $image = '<img title="Msn" id="Smallworld_socialnetworkimg" src="'.XOOPS_URL.'/modules/smallworld/images/socialnetworkicons/msn.png"/>'; + $link = '<a title="Msn" id="Smallworld_socialnetwork" target="_blank" href="http://members.msn.com/'.$name.'">'; + } + if ($num == 1) { + $image = '<img title="facebook" id="Smallworld_socialnetworkimg" src="'.XOOPS_URL.'/modules/smallworld/images/socialnetworkicons/facebook.png"/>'; + $link = '<a title="facebook" id="Smallworld_socialnetwork" target="_blank" href="http://www.facebook.com/'.$name.'">'; + } + if ($num == 2) { + $image = '<img title="GooglePlus" id="Smallworld_socialnetworkimg" src="'.XOOPS_URL.'/modules/smallworld/images/socialnetworkicons/googleplus.png"/>'; + $link = '<a title="GooglePlus" id="Smallworld_socialnetwork" target="_blank" href="https://plus.google.com/'.$name.'">'; + } + if ($num == 3) { + $image = '<img title="Icq" id="Smallworld_socialnetworkimg" src="'.XOOPS_URL.'/modules/smallworld/images/socialnetworkicons/icq.png"/>'; + $link = '<a title="icq" id="Smallworld_socialnetwork" target="_blank" href="http://www.icq.com/people/'.$name.'/">'; + } + if ($num == 4) { + $image = '<img title="Skype" id="Smallworld_socialnetworkimg" src="'.XOOPS_URL.'/modules/smallworld/images/socialnetworkicons/skype.png"/>'; + $link = '<a title="Skype" id="Smallworld_socialnetwork" target="_blank" href="skype:'.$name.'?userinfo">'; + } + if ($num == 5) { + $image = '<img title="Twitter" id="Smallworld_socialnetworkimg" src="'.XOOPS_URL.'/modules/smallworld/images/socialnetworkicons/twitter.png"/>'; + $link = '<a title="Twitter" id="Smallworld_socialnetwork" target="_blank" href="http://twitter.com/#!/'.$name.'">'; + } + if ($num == 6) { + $image = '<img title="MySpace" id="Smallworld_socialnetworkimg" src="'.XOOPS_URL.'/modules/smallworld/images/socialnetworkicons/myspace.png"/>'; + $link = '<a title="MySpace" id="Smallworld_socialnetwork" target="_blank" href="http://www.myspace.com/'.$name.'">'; + } + if ($num == 7) { + $image = '<img title="Xoops" id="Smallworld_socialnetworkimg" src="'.XOOPS_URL.'/modules/smallworld/images/socialnetworkicons/xoops.png"/>'; + $link = '<a title="Xoops" id="Smallworld_socialnetwork" target="_blank" href="http://xoops.org/modules/profile/userinfo.php?uid='.$name.'">'; + } + if ($num == 8) { + $image = '<img title="Yahoo Messenger" id="Smallworld_socialnetworkimg" src="'.XOOPS_URL.'/modules/smallworld/images/socialnetworkicons/yahoo.png"/>'; + $link = '<a title="Yahoo Messenger" id="Smallworld_socialnetwork" target="_blank" href="ymsgr:sendim?'.$name.'">'; + } + if ($num == 9) { + $image = '<img title="Youtube" id="Smallworld_socialnetworkimg" src="'.XOOPS_URL.'/modules/smallworld/images/socialnetworkicons/youtube.png"/>'; + $link = '<a title="Youtube" id="Smallworld_socialnetwork" target="_blank" href="http://www.youtube.com/user/'.$name.'">'; + } + return $image.$link; } -function smallworld_GetModuleOption($option, $repmodule='smallworld') { - global $xoopsModuleConfig, $xoopsModule; - static $tbloptions= Array(); - if(is_array($tbloptions) && array_key_exists($option,$tbloptions)) { - return $tbloptions[$option]; - } - - $retval = false; - if (isset($xoopsModuleConfig) && (is_object($xoopsModule) && $xoopsModule->getVar('dirname') == $repmodule && $xoopsModule->getVar('isactive'))) { - if(isset($xoopsModuleConfig[$option])) { - $retval= $xoopsModuleConfig[$option]; - } - } else { - $module_handler =& xoops_gethandler('module'); - $module =& $module_handler->getByDirname($repmodule); - $config_handler =& xoops_gethandler('config'); - if ($module) { - $moduleConfig =& $config_handler->getConfigsByCat(0, $module->getVar('mid')); - if(isset($moduleConfig[$option])) { - $retval= $moduleConfig[$option]; - } - } - } - $tbloptions[$option]=$retval; - return $retval; +function smallworld_GetModuleOption($option, $repmodule='smallworld') +{ + global $xoopsModuleConfig, $xoopsModule; + static $tbloptions = Array(); + if(is_array($tbloptions) && array_key_exists($option,$tbloptions)) { + return $tbloptions[$option]; + } + $retval = false; + if (isset($xoopsModuleConfig) + && (is_object($xoopsModule) + && $xoopsModule->getVar('dirname') == $repmodule + && $xoopsModule->getVar('isactive')) + ) + { + if(isset($xoopsModuleConfig[$option])) { + $retval= $xoopsModuleConfig[$option]; + } + } else { + $module_handler =& xoops_gethandler('module'); + $module =& $module_handler->getByDirname($repmodule); + $config_handler =& xoops_gethandler('config'); + if ($module) { + $moduleConfig =& $config_handler->getConfigsByCat(0, $module->getVar('mid')); + if(isset($moduleConfig[$option])) { + $retval= $moduleConfig[$option]; + } + } + } + $tbloptions[$option]=$retval; + return $retval; } -function smallworld_getAvatarLink ($userid, $image) { - global $xoopsUser, $xoopsDB; - $sql = "SELECT gender FROM ".$xoopsDB->prefix('smallworld_user')." WHERE userid = '".intval($userid)."'"; - $result = $xoopsDB->queryf($sql); - while ($row = $xoopsDB->fetchArray($result)) { - $gender = $row['gender']; - } - $link = XOOPS_UPLOAD_URL."/".$image; - if ($image == 'blank.gif' or $image=='Not specifiyed' AND $gender == '1') { - $link = XOOPS_URL."/modules/smallworld/images/ano_woman.png"; - } - if ($image == 'blank.gif' or $image=='Not specifiyed' AND $gender == '2') { - $link = XOOPS_URL."/modules/smallworld/images/ano_man.png"; - } - if ($image == '' or $image=='Not specifiyed' AND $gender == '1') { - $link = XOOPS_URL."/modules/smallworld/images/ano_woman.png"; - } - 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 == '') { - $link = XOOPS_URL."/modules/smallworld/images/genderless.png"; - } - if ($image == '' or $image=='Not specifiyed' AND $gender == '') { - $link = XOOPS_URL."/modules/smallworld/images/genderless.png"; - } - return $link; +function smallworld_getAvatarLink($userid, $image) +{ + global $xoopsUser, $xoopsDB; + $sql = "SELECT gender FROM ".$xoopsDB->prefix('smallworld_user')." WHERE userid = '".intval($userid)."'"; + $result = $xoopsDB->queryf($sql); + while ($row = $xoopsDB->fetchArray($result)) { + $gender = $row['gender']; + } + $link = XOOPS_UPLOAD_URL."/".$image; + if ($image == 'blank.gif' or $image=='Not specifiyed' AND $gender == '1') { + $link = XOOPS_URL."/modules/smallworld/images/ano_woman.png"; + } + if ($image == 'blank.gif' or $image=='Not specifiyed' AND $gender == '2') { + $link = XOOPS_URL."/modules/smallworld/images/ano_man.png"; + } + if ($image == '' or $image=='Not specifiyed' AND $gender == '1') { + $link = XOOPS_URL."/modules/smallworld/images/ano_woman.png"; + } + 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 == '') { + $link = XOOPS_URL."/modules/smallworld/images/genderless.png"; + } + if ($image == '' or $image=='Not specifiyed' AND $gender == '') { + $link = XOOPS_URL."/modules/smallworld/images/genderless.png"; + } + return $link; } -function smallworld_checkForXim () { - $filename = XOOPS_ROOT_PATH."/modules/xim/chat.php"; - if (file_exists($filename)) { - return true; - } else { - return false; - } +function smallworld_checkForXim() +{ + $filename = XOOPS_ROOT_PATH."/modules/xim/chat.php"; + if (file_exists($filename)) { + return true; + } else { + return false; + } } /* @@ -353,246 +379,255 @@ * Return owner of thread (original poster) * Return Integer */ -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); - while ($r = $xoopsDB->fetchArray($result)) { - $owner = $r['uid_fk']; - } - return $owner; +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); + while ($r = $xoopsDB->fetchArray($result)) { + $owner = $r['uid_fk']; + } + return $owner; } // Get username from userID -function Smallworld_getName($userID){ - global $xoopsUser, $xoopsDB; - $sql = "SELECT username FROM ".$xoopsDB->prefix('smallworld_user')." WHERE userid = '".intval($userID)."'"; - $result = $xoopsDB->queryf($sql); - while ($row = $xoopsDB->fetchArray($result)) { - $name = $row['username']; - } - return $name; +function Smallworld_getName($userID) +{ + global $xoopsUser, $xoopsDB; + $sql = "SELECT username FROM ".$xoopsDB->prefix('smallworld_user')." WHERE userid = '".intval($userID)."'"; + $result = $xoopsDB->queryf($sql); + while ($row = $xoopsDB->fetchArray($result)) { + $name = $row['username']; + } + return $name; } // Check if user has been taken down for inspection by admin // Userid = user id of user to check // return array -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().""; - $result = $xoopsDB->queryF($sql); - if ($xoopsDB->getRowsNum($result) > 0) { - while ($row = $xoopsDB->fetchArray($result)) { - $data['inspect'] = 'yes'; - $data['totaltime'] = ($row['inspect_start'] + $row['inspect_stop'])-time(); - } - } else { - $data['inspect'] = 'no'; - } - return $data; +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().""; + $result = $xoopsDB->queryF($sql); + if ($xoopsDB->getRowsNum($result) > 0) { + while ($row = $xoopsDB->fetchArray($result)) { + $data['inspect'] = 'yes'; + $data['totaltime'] = ($row['inspect_start'] + $row['inspect_stop'])-time(); + } + } else { + $data['inspect'] = 'no'; + } + return $data; } // Auto delete all inspects from DB where time has passed // inspect_start + inspect_stop - time() is deleted if negative intval -function SmallworldDeleteOldInspects () { - global $xoopsDB; - $sql = "UPDATE ".$xoopsDB->prefix('smallworld_admin')." SET inspect_start = '', inspect_stop = '' WHERE (inspect_start+inspect_stop) <= ".time().""; - $result = $xoopsDB->queryF($sql); +function SmallworldDeleteOldInspects() +{ + global $xoopsDB; + $sql = "UPDATE ".$xoopsDB->prefix('smallworld_admin')." SET inspect_start = '', inspect_stop = '' WHERE (inspect_start+inspect_stop) <= ".time().""; + $result = $xoopsDB->queryF($sql); } // Function to get sum of users in you following array // Used to calculate new message flash in jQuery intval fetch -function smallworld_getCountFriendMessagesEtc () { -global $xoopsUser, $xoopsDB; - $user = new xoopsUser; - $Wall = new Wall_Updates(); - $userid = $xoopsUser->getVar('uid'); - $followers = Smallworld_array_flatten($Wall->getFollowers($userid),0); - if (smallworld_GetModuleOption('usersownpostscount', $repmodule='smallworld') == 1) { - array_push($followers, $userid); - } - $ids = join(',',$followers); - $sql = "SELECT COUNT(*) AS total " - ." FROM ( " - ." SELECT com_id , count( * ) as comments FROM ".$xoopsDB->prefix('smallworld_comments')." WHERE uid_fk IN ($ids) Group by com_id " - ." UNION ALL " - ." Select msg_id , count( * ) as messages FROM ".$xoopsDB->prefix('smallworld_messages')." WHERE uid_fk IN ($ids) group by msg_id " - ." ) as d"; - $result = $xoopsDB->queryF($sql); - while ($r = $xoopsDB->fetchArray($result)) { - $total = $r['total']; - } - return $total; +function smallworld_getCountFriendMessagesEtc() +{ + global $xoopsUser, $xoopsDB; + $user = new xoopsUser; + $Wall = new Wall_Updates(); + $userid = $xoopsUser->getVar('uid'); + $followers = Smallworld_array_flatten($Wall->getFollowers($userid),0); + if (smallworld_GetModuleOption('usersownpostscount', $repmodule='smallworld') == 1) { + array_push($followers, $userid); + } + $ids = join(',',$followers); + $sql = "SELECT COUNT(*) AS total " + ." FROM ( " + ." SELECT com_id , count( * ) as comments FROM ".$xoopsDB->prefix('smallworld_comments')." WHERE uid_fk IN ($ids) Group by com_id " + ." UNION ALL " + ." Select msg_id , count( * ) as messages FROM ".$xoopsDB->prefix('smallworld_messages')." WHERE uid_fk IN ($ids) group by msg_id " + ." ) as d"; + $result = $xoopsDB->queryF($sql); + while ($r = $xoopsDB->fetchArray($result)) { + $total = $r['total']; + } + return $total; } // Function to get sum of users in you following array // Used to calculate new message flash in jQuery intval fetch -function smallworld_countUsersMessages ($id) { -global $xoopsUser, $xoopsDB; - $user = new xoopsUser; - $Wall = new Wall_Updates(); - $sql = "SELECT COUNT(*) AS total " - ." FROM ( " - ." SELECT com_id , count( * ) as comments FROM ".$xoopsDB->prefix('smallworld_comments')." WHERE uid_fk = ".intval($id)." Group by com_id " - ." UNION ALL " - ." Select msg_id , count( * ) as messages FROM ".$xoopsDB->prefix('smallworld_messages')." WHERE uid_fk = ".intval($id)."group by msg_id " - ." ) as d"; - $result = $xoopsDB->queryF($sql); - while ($r = $xoopsDB->fetchArray($result)) { - $total = $r['total']; - } - return $total; +function smallworld_countUsersMessages($id) +{ + global $xoopsUser, $xoopsDB; + $user = new xoopsUser; + $Wall = new Wall_Updates(); + $sql = "SELECT COUNT(*) AS total " + ." FROM ( " + ." SELECT com_id , count( * ) as comments FROM ".$xoopsDB->prefix('smallworld_comments')." WHERE uid_fk = ".intval($id)." Group by com_id " + ." UNION ALL " + ." Select msg_id , count( * ) as messages FROM ".$xoopsDB->prefix('smallworld_messages')." WHERE uid_fk = ".intval($id)."group by msg_id " + ." ) as d"; + $result = $xoopsDB->queryF($sql); + while ($r = $xoopsDB->fetchArray($result)) { + $total = $r['total']; + } + return $total; } // Get the three newest members to array -function smallworld_Stats_newest () { - global $xoopsDB, $xoopsUser; - $nu = array(); - $sql = "SELECT * FROM ".$xoopsDB->prefix('smallworld_user')." ORDER BY regdate DESC limit 3"; - $result = $xoopsDB->queryF($sql); - if ($xoopsDB->getRowsNum($result) > 0) { - $i = 0; - while ($r = $xoopsDB->fetchArray($result)) { - $nu[$i]['userid'] = $r['userid']; - $nu[$i]['username'] = $r['username']; - $nu[$i]['regdate'] = date('d-m-Y',$r['regdate']); - $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'], Smallworld_Gravatar($r['userid'])); - - $i++; - } - } - return $nu; +function smallworld_Stats_newest() +{ + global $xoopsDB, $xoopsUser; + $nu = array(); + $sql = "SELECT * FROM ".$xoopsDB->prefix('smallworld_user')." ORDER BY regdate DESC limit 3"; + $result = $xoopsDB->queryF($sql); + if ($xoopsDB->getRowsNum($result) > 0) { + $i = 0; + while ($r = $xoopsDB->fetchArray($result)) { + $nu[$i]['userid'] = $r['userid']; + $nu[$i]['username'] = $r['username']; + $nu[$i]['regdate'] = date('d-m-Y',$r['regdate']); + $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'], Smallworld_Gravatar($r['userid'])); + $i++; + } + } + return $nu; } //Avatar Image -function Smallworld_Gravatar($uid) { - global $xoopsUser, $xoopsDB; - $image=''; - $sql = "SELECT userimage FROM ".$xoopsDB->prefix('smallworld_user')." WHERE userid = '".$uid."'"; - $result = $xoopsDB->queryF($sql); - while ($r = $xoopsDB->fetchArray($result)) { - $image = $r['userimage']; - } - if ($image == 'Not specifiyed' || $image == '') { - $avt = new XoopsUser($uid); - $avatar = $avt->user_avatar(); - } else { - $avatar = $image; - } - return $avatar; +function Smallworld_Gravatar($uid) +{ + global $xoopsUser, $xoopsDB; + $image=''; + $sql = "SELECT userimage FROM ".$xoopsDB->prefix('smallworld_user')." WHERE userid = '".$uid."'"; + $result = $xoopsDB->queryF($sql); + while ($r = $xoopsDB->fetchArray($result)) { + $image = $r['userimage']; + } + if ($image == 'Not specifiyed' || $image == '') { + $avt = new XoopsUser($uid); + $avatar = $avt->user_avatar(); + } else { + $avatar = $image; + } + return $avatar; } - + // find user with most posted messages -function Smallworld_mostactiveusers_allround() { - global $xoopsDB,$xoopsUser; - $sql = "SELECT uid_fk, COUNT( * ) as cnt "; - $sql .= "FROM ( "; - $sql .= "SELECT uid_fk "; - $sql .= "FROM ".$xoopsDB->prefix('smallworld_messages')." "; - $sql .= "UNION ALL SELECT uid_fk "; - $sql .= "FROM ".$xoopsDB->prefix('smallworld_comments')." "; - $sql .= ") AS u "; - $sql .= "GROUP BY uid_fk "; - $sql .= "ORDER BY count( * ) DESC limit 3"; - $result = $xoopsDB->queryF($sql); - $counter = $xoopsDB->getRowsNum($result); - - if ($counter < 1) { - - } else { - $msg = array(); - $counter = 1; - while ($row = $xoopsDB->fetchArray($result)) { - $msg[$counter]["counter"] = $counter; - $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"]); - $msg[$counter]["username_link"] = "<a href = '".XOOPS_URL."/modules/smallworld/userprofile.php?username=".$msg[$counter]["username"]."'>"; - $msg[$counter]["username_link"] .= $msg[$counter]["username"]." (".$msg[$counter]["msgs"].")</a>"; - $counter++; - } - } - return $msg; +function Smallworld_mostactiveusers_allround() +{ + global $xoopsDB,$xoopsUser; + $sql = "SELECT uid_fk, COUNT( * ) as cnt "; + $sql .= "FROM ( "; + $sql .= "SELECT uid_fk "; + $sql .= "FROM ".$xoopsDB->prefix('smallworld_messages')." "; + $sql .= "UNION ALL SELECT uid_fk "; + $sql .= "FROM ".$xoopsDB->prefix('smallworld_comments')." "; + $sql .= ") AS u "; + $sql .= "GROUP BY uid_fk "; + $sql .= "ORDER BY count( * ) DESC limit 3"; + $result = $xoopsDB->queryF($sql); + $counter = $xoopsDB->getRowsNum($result); + if ($counter < 1) { + } else { + $msg = array(); + $counter = 1; + while ($row = $xoopsDB->fetchArray($result)) { + $msg[$counter]["counter"] = $counter; + $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"]); + $msg[$counter]["username_link"] = "<a href = '".XOOPS_URL."/modules/smallworld/userprofile.php?username=".$msg[$counter]["username"]."'>"; + $msg[$counter]["username_link"] .= $msg[$counter]["username"]." (".$msg[$counter]["msgs"].")</a>"; + $counter++; + } + } + return $msg; } // Find worst rated users overall -function Smallworld_worstratedusers() { - global $xoopsUser, $xoopsDB; - $array = array(); - $counter = 1; - $sql = "SELECT owner, ("; - $sql .= "sum( up ) - sum( down )"; - $sql .= ") AS total"; - $sql .= " FROM ".$xoopsDB->prefix('smallworld_vote').""; - $sql .= " GROUP BY owner ORDER by total ASC LIMIT 5"; - $result = $xoopsDB->queryF($sql); - while ($row = $xoopsDB->fetchArray($result)) { - $array[$counter]['counter'] = $counter; - $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']."'>"; - $array[$counter]['user_link'] .= $array[$counter]['user']." (".$array[$counter]['rating'].")</a>"; - $counter++; - } - return $array; +function Smallworld_worstratedusers() +{ + global $xoopsUser, $xoopsDB; + $array = array(); + $counter = 1; + $sql = "SELECT owner, ("; + $sql .= "sum( up ) - sum( down )"; + $sql .= ") AS total"; + $sql .= " FROM ".$xoopsDB->prefix('smallworld_vote').""; + $sql .= " GROUP BY owner ORDER by total ASC LIMIT 5"; + $result = $xoopsDB->queryF($sql); + while ($row = $xoopsDB->fetchArray($result)) { + $array[$counter]['counter'] = $counter; + $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']."'>"; + $array[$counter]['user_link'] .= $array[$counter]['user']." (".$array[$counter]['rating'].")</a>"; + $counter++; + } + return $array; } // Find best rated users overall -function Smallworld_topratedusers() { - global $xoopsUser, $xoopsDB; - $array = array(); - $counter = 1; - $sql = "SELECT owner, ("; - $sql .= "sum( up ) - sum( down )"; - $sql .= ") AS total"; - $sql .= " FROM ".$xoopsDB->prefix('smallworld_vote').""; - $sql .= " GROUP BY owner ORDER by total DESC LIMIT 5"; - $result = $xoopsDB->queryF($sql); - while ($row = $xoopsDB->fetchArray($result)) { - $array[$counter]['counter'] = $counter; - $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']."'>"; - $array[$counter]['user_link'] .= $array[$counter]['user']." (".$array[$counter]['rating'].")</a>"; - $counter++; - } - return $array; +function Smallworld_topratedusers() +{ + global $xoopsUser, $xoopsDB; + $array = array(); + $counter = 1; + $sql = "SELECT owner, ("; + $sql .= "sum( up ) - sum( down )"; + $sql .= ") AS total"; + $sql .= " FROM ".$xoopsDB->prefix('smallworld_vote').""; + $sql .= " GROUP BY owner ORDER by total DESC LIMIT 5"; + $result = $xoopsDB->queryF($sql); + while ($row = $xoopsDB->fetchArray($result)) { + $array[$counter]['counter'] = $counter; + $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']."'>"; + $array[$counter]['user_link'] .= $array[$counter]['user']." (".$array[$counter]['rating'].")</a>"; + $counter++; + } + return $array; } -function smallworld_nextBirthdays () { - global $xoopsDB,$xoopsUser; - $now = date('d-m'); - $res = array(); - $sql = 'SELECT userid, username, userimage, realname, birthday, CURDATE(),' - . ' DATE_FORMAT(birthday, "%d / %m") AS daymon , ' +function smallworld_nextBirthdays() +{ + global $xoopsDB,$xoopsUser; + $now = date('d-m'); + $res = array(); + $sql = 'SELECT userid, username, userimage, realname, birthday, CURDATE(),' + . ' DATE_FORMAT(birthday, "%d / %m") AS daymon , ' . ' (YEAR(CURDATE())-YEAR(birthday))' . ' - (RIGHT(CURDATE(),5)<RIGHT(birthday,5))' . ' AS age_now' . ' FROM xoops_smallworld_user WHERE right(birthday,5) = right(CURDATE(),5)' - . ' ORDER BY MONTH( birthday ) , DAY( birthday ) ' - . ' LIMIT 10 '; - $result = $xoopsDB->queryF($sql); - $counter = $xoopsDB->getRowsNum($result); - $i = 0; - while ($r = $xoopsDB->fetchArray($result)) { - $res[$i]['amount'] = $counter; - $res[$i]['userid'] = $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']); - $res[$i]['username_link'] = "<a href = '".XOOPS_URL."/modules/smallworld/userprofile.php?username=".$res[$i]['username']."'>"; - $res[$i]['username_link'] .= $res[$i]['username']." (".$r['daymon'].") ".$r['age_now']." "._SMALLWORLD_BDAY_YEARS; - $res[$i]['username_link'] .="</a>"; - $i++; - } - return $res; + . ' ORDER BY MONTH( birthday ) , DAY( birthday ) ' + . ' LIMIT 10 '; + $result = $xoopsDB->queryF($sql); + $counter = $xoopsDB->getRowsNum($result); + $i = 0; + while ($r = $xoopsDB->fetchArray($result)) { + $res[$i]['amount'] = $counter; + $res[$i]['userid'] = $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']); + $res[$i]['username_link'] = "<a href = '".XOOPS_URL."/modules/smallworld/userprofile.php?username=".$res[$i]['username']."'>"; + $res[$i]['username_link'] .= $res[$i]['username']." (".$r['daymon'].") ".$r['age_now']." "._SMALLWORLD_BDAY_YEARS; + $res[$i]['username_link'] .="</a>"; + $i++; + } + return $res; } /* @@ -600,8 +635,9 @@ * @param date $stringDate * $returns date */ -function Smallworld_euroToUsDate($stringDate) { - if ($stringDate != 0 || $stringDate != '') { +function Smallworld_euroToUsDate($stringDate) +{ + if ($stringDate != 0 || $stringDate != '') { $theData = split("-", trim($stringDate)); $ret = $theData[2] . "-" . $theData[1] . "-" . $theData[0]; return $ret; @@ -615,8 +651,9 @@ * @param date $stringDate * $returns date */ -function Smallworld_UsToEuroDate($stringDate) { - if ($stringDate != 0 || $stringDate != '') { +function Smallworld_UsToEuroDate($stringDate) +{ + if ($stringDate != 0 || $stringDate != '') { $theData = split("-", trim($stringDate)); $ret = $theData[2] . "-" . $theData[1] . "-" . $theData[0]; return $ret; @@ -625,71 +662,76 @@ } } -function smallworld_sp () { - $sp = array(); - $sp[0]['spimage'] = "<img id = 'smallworld_img_sp' src = '".XOOPS_URL."/modules/smallworld/images/sp.png' height='30px' width='30px' />"; - return $sp; +function smallworld_sp () +{ + $sp = array(); + $sp[0]['spimage'] = "<img id = 'smallworld_img_sp' src = '" + . XOOPS_URL . "/modules/smallworld/images/sp.png' height='30px' width='30px' />"; + return $sp; } //Check privacy settings in permapage -function smallworldCheckPriv ($id) { - global $xoopsDB; - $public = "SELECT priv FROM ".$xoopsDB->prefix('smallworld_messages')." WHERE msg_id = ".$id.""; - $result = $xoopsDB->queryF($public); - while ($row = $xoopsDB->fetchArray($result)){ - $priv = $row['priv']; - } - return $priv; +function smallworldCheckPriv ($id) +{ + global $xoopsDB; + $public = "SELECT priv FROM ".$xoopsDB->prefix('smallworld_messages')." WHERE msg_id = ".$id.""; + $result = $xoopsDB->queryF($public); + while ($row = $xoopsDB->fetchArray($result)){ + $priv = $row['priv']; + } + return $priv; } // Function to calculate remaining seconds until user's birthday // Input $d : date('Y-m-d') format // return seconds until date at midnight, or // return 0 if date ('Y-m-d') is equal to today -function smallworldNextBDaySecs($d) { - $olddate = substr($d, 4); - $exactdate = date('Y')."".$olddate; - $newdate = date('Y') ."".$olddate." 00:00:00"; - $nextyear = date('Y')+1 ."".$olddate." 00:00:00"; - if ($exactdate != date('Y-m-d')) { - if($newdate > date("Y-m-d H:i:s")) { - $start_ts = strtotime($newdate); - $end_ts = strtotime(date("Y-m-d H:i:s")); - $diff = $end_ts - $start_ts; - $n = round($diff); - $return = substr($n, 1); - return $return; - } - else { - $start_ts = strtotime($nextyear); - $end_ts = strtotime(date("Y-m-d H:i:s")); - $diff = $end_ts - $start_ts; - $n = round($diff); - $return = substr($n, 1); - return $return; - } - } else { - return 0; - } +function smallworldNextBDaySecs($d) +{ + $olddate = substr($d, 4); + $exactdate = date('Y') . "" . $olddate; + $newdate = date('Y') . "" . $olddate . " 00:00:00"; + $nextyear = date('Y') + 1 . "" . $olddate . " 00:00:00"; + if ($exactdate != date('Y-m-d')) { + if($newdate > date("Y-m-d H:i:s")) { + $start_ts = strtotime($newdate); + $end_ts = strtotime(date("Y-m-d H:i:s")); + $diff = $end_ts - $start_ts; + $n = round($diff); + $return = substr($n, 1); + return $return; + } else { + $start_ts = strtotime($nextyear); + $end_ts = strtotime(date("Y-m-d H:i:s")); + $diff = $end_ts - $start_ts; + $n = round($diff); + $return = substr($n, 1); + return $return; + } + } else { + return 0; + } } //Function to get value from xoopsConfig array -function smallworldGetValfromArray ($key, $array) { - $ar = smallworld_GetModuleOption($array, $repmodule='smallworld'); - $ret = 0; - if (in_array($key, $ar,true)) { - $ret = 1; - return $ret; - } else { - return 0; - } - +function smallworldGetValfromArray($key, $array) +{ + $ar = smallworld_GetModuleOption($array, $repmodule='smallworld'); + $ret = 0; + if (in_array($key, $ar,true)) { + $ret = 1; + return $ret; + } else { + return 0; + } + } //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) { +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 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dj...@us...> - 2013-02-11 16:06:41
|
Revision: 10211 http://xoops.svn.sourceforge.net/xoops/?rev=10211&view=rev Author: djculex Date: 2013-02-11 16:06:28 +0000 (Mon, 11 Feb 2013) Log Message: ----------- New: Upgraded uploadHandler.php and edited img_upload.php and imgupload.php to use new class Modified Paths: -------------- XoopsModules/smallworld/trunk/smallworld/img_upload.php XoopsModules/smallworld/trunk/smallworld/imgupload.php XoopsModules/smallworld/trunk/smallworld/templates/smallworld_userprofile_imgupload.html Added Paths: ----------- XoopsModules/smallworld/trunk/smallworld/class/UploadHandler.php Added: XoopsModules/smallworld/trunk/smallworld/class/UploadHandler.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/class/UploadHandler.php (rev 0) +++ XoopsModules/smallworld/trunk/smallworld/class/UploadHandler.php 2013-02-11 16:06:28 UTC (rev 10211) @@ -0,0 +1,805 @@ +<?php +/* + * jQuery File Upload Plugin PHP Class 6.1.2 + * https://github.com/blueimp/jQuery-File-Upload + * + * Copyright 2010, Sebastian Tschan + * https://blueimp.net + * + * Licensed under the MIT license: + * http://www.opensource.org/licenses/MIT + */ + +class UploadHandler +{ + var $xoopsUser; + protected $options; + + // PHP File Upload error message codes: + // http://php.net/manual/en/features.file-upload.errors.php + protected $error_messages = array( + 1 => 'The uploaded file exceeds the upload_max_filesize directive in php.ini', + 2 => 'The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form', + 3 => 'The uploaded file was only partially uploaded', + 4 => 'No file was uploaded', + 6 => 'Missing a temporary folder', + 7 => 'Failed to write file to disk', + 8 => 'A PHP extension stopped the file upload', + 'post_max_size' => 'The uploaded file exceeds the post_max_size directive in php.ini', + 'max_file_size' => 'File is too big', + 'min_file_size' => 'File is too small', + 'accept_file_types' => 'Filetype not allowed', + 'max_number_of_files' => 'Maximum number of files exceeded', + 'max_width' => 'Image exceeds maximum width', + 'min_width' => 'Image requires a minimum width', + 'max_height' => 'Image exceeds maximum height', + 'min_height' => 'Image requires a minimum height' + ); + + function __construct($options = null, $initialize = true) { + global $xoopsUser; + $userID = $xoopsUser->getVar('uid'); + $this->options = array( + 'script_url' => $this->get_full_url().'/imgupload.php', + 'upload_dir' => XOOPS_ROOT_PATH.'/uploads/albums_smallworld/'.$userID."/", + 'upload_url' => XOOPS_URL.'/uploads/albums_smallworld/'.$userID."/", + 'user_dirs' => false, + 'mkdir_mode' => 0755, + 'param_name' => 'files', + // Set the following option to 'POST', if your server does not support + // DELETE requests. This is a parameter sent to the client: + 'delete_type' => 'DELETE', + 'access_control_allow_origin' => '*', + 'access_control_allow_credentials' => false, + 'access_control_allow_methods' => array( + 'OPTIONS', + 'HEAD', + 'GET', + 'POST', + 'PUT', + 'PATCH', + 'DELETE' + ), + 'access_control_allow_headers' => array( + 'Content-Type', + 'Content-Range', + 'Content-Disposition' + ), + // Enable to provide file downloads via GET requests to the PHP script: + 'download_via_php' => false, + // Defines which files can be displayed inline when downloaded: + 'inline_file_types' => '/\.(gif|jpe?g|png|JPE?G)$/i', + // Defines which files (based on their names) are accepted for upload: + 'accept_file_types' => '/.+$/i', + // The php.ini settings upload_max_filesize and post_max_size + // take precedence over the following max_file_size setting: + 'max_file_size' => null, + 'min_file_size' => 1, + // The maximum number of files for the upload directory: + 'max_number_of_files' => null, + // Image resolution restrictions: + 'max_width' => null, + 'max_height' => null, + 'min_width' => 1, + 'min_height' => 1, + // Set the following option to false to enable resumable uploads: + 'discard_aborted_uploads' => true, + // Set to true to rotate images based on EXIF meta data, if available: + 'orient_image' => false, + 'image_versions' => array( + // Uncomment the following version to restrict the size of + // uploaded images: + /* + '' => array( + 'max_width' => 1920, + 'max_height' => 1200, + 'jpeg_quality' => 95 + ), + */ + // Uncomment the following to create medium sized images: + /* + 'medium' => array( + 'max_width' => 800, + 'max_height' => 600, + 'jpeg_quality' => 80 + ), + */ + 'thumbnails' => array( + 'upload_dir' => XOOPS_ROOT_PATH.'/uploads/albums_smallworld'.'/'.$userID.'/thumbnails/', + 'upload_url' => XOOPS_URL.'/uploads/albums_smallworld'.'/'.$userID.'/thumbnails/', + 'max_width' => 80, + 'max_height' => 80 + ) + ) + ); + if ($options) { + $this->options = array_merge($this->options, $options); + } + if ($initialize) { + $this->initialize(); + } + } + + protected function initialize() { + switch ($_SERVER['REQUEST_METHOD']) { + case 'OPTIONS': + case 'HEAD': + $this->head(); + break; + case 'GET': + $this->get(); + break; + case 'PATCH': + case 'PUT': + case 'POST': + $this->post(); + break; + case 'DELETE': + $this->delete(); + break; + default: + $this->header('HTTP/1.1 405 Method Not Allowed'); + } + } + + protected function get_full_url() { + $https = !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off'; + return + ($https ? 'https://' : 'http://'). + (!empty($_SERVER['REMOTE_USER']) ? $_SERVER['REMOTE_USER'].'@' : ''). + (isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : ($_SERVER['SERVER_NAME']. + ($https && $_SERVER['SERVER_PORT'] === 443 || + $_SERVER['SERVER_PORT'] === 80 ? '' : ':'.$_SERVER['SERVER_PORT']))). + substr($_SERVER['SCRIPT_NAME'],0, strrpos($_SERVER['SCRIPT_NAME'], '/')); + } + + protected function get_user_id() { + @session_start(); + return session_id(); + } + + protected function get_user_path() { + if ($this->options['user_dirs']) { + return $this->get_user_id().'/'; + } + return ''; + } + + protected function get_upload_path($file_name = null, $version = null) { + $file_name = $file_name ? $file_name : ''; + $version_path = empty($version) ? '' : $version.'/'; + return $this->options['upload_dir'].$this->get_user_path() + .$version_path.$file_name; + } + + protected function get_query_separator($url) { + return strpos($url, '?') === false ? '?' : '&'; + } + + protected function get_download_url($file_name, $version = null) { + if ($this->options['download_via_php']) { + $url = $this->options['script_url'] + .$this->get_query_separator($this->options['script_url']) + .'file='.rawurlencode($file_name); + if ($version) { + $url .= '&version='.rawurlencode($version); + } + return $url.'&download=1'; + } + $version_path = empty($version) ? '' : rawurlencode($version).'/'; + return $this->options['upload_url'].$this->get_user_path() + .$version_path.rawurlencode($file_name); + } + + protected function set_file_delete_properties($file) { + $file->delete_url = $this->options['script_url'] + .$this->get_query_separator($this->options['script_url']) + .'file='.rawurlencode($file->name); + $file->delete_type = $this->options['delete_type']; + if ($file->delete_type !== 'DELETE') { + $file->delete_url .= '&_method=DELETE'; + } + if ($this->options['access_control_allow_credentials']) { + $file->delete_with_credentials = true; + } + } + + // Fix for overflowing signed 32 bit integers, + // works for sizes up to 2^32-1 bytes (4 GiB - 1): + protected function fix_integer_overflow($size) { + if ($size < 0) { + $size += 2.0 * (PHP_INT_MAX + 1); + } + return $size; + } + + protected function get_file_size($file_path, $clear_stat_cache = false) { + if ($clear_stat_cache) { + clearstatcache(true, $file_path); + } + return $this->fix_integer_overflow(filesize($file_path)); + + } + + protected function is_valid_file_object($file_name) { + $file_path = $this->get_upload_path($file_name); + if (is_file($file_path) && $file_name[0] !== '.') { + return true; + } + return false; + } + + protected function get_file_object($file_name) { + if ($this->is_valid_file_object($file_name)) { + $file = new stdClass(); + $file->name = $file_name; + $file->size = $this->get_file_size( + $this->get_upload_path($file_name) + ); + $file->url = $this->get_download_url($file->name); + foreach($this->options['image_versions'] as $version => $options) { + if (!empty($version)) { + if (is_file($this->get_upload_path($file_name, $version))) { + $file->{$version.'_url'} = $this->get_download_url( + $file->name, + $version + ); + } + } + } + $this->set_file_delete_properties($file); + return $file; + } + return null; + } + + protected function get_file_objects($iteration_method = 'get_file_object') { + $upload_dir = $this->get_upload_path(); + if (!is_dir($upload_dir)) { + return array(); + } + return array_values(array_filter(array_map( + array($this, $iteration_method), + scandir($upload_dir) + ))); + } + + protected function count_file_objects() { + return count($this->get_file_objects('is_valid_file_object')); + } + + protected function create_scaled_image($file_name, $version, $options) { + $file_path = $this->get_upload_path($file_name); + if (!empty($version)) { + $version_dir = $this->get_upload_path(null, $version); + if (!is_dir($version_dir)) { + mkdir($version_dir, $this->options['mkdir_mode'], true); + } + $new_file_path = $version_dir.'/'.$file_name; + } else { + $new_file_path = $file_path; + } + list($img_width, $img_height) = @getimagesize($file_path); + if (!$img_width || !$img_height) { + return false; + } + $scale = min( + $options['max_width'] / $img_width, + $options['max_height'] / $img_height + ); + if ($scale >= 1) { + if ($file_path !== $new_file_path) { + return copy($file_path, $new_file_path); + } + return true; + } + $new_width = $img_width * $scale; + $new_height = $img_height * $scale; + $new_img = @imagecreatetruecolor($new_width, $new_height); + switch (strtolower(substr(strrchr($file_name, '.'), 1))) { + case 'jpg': + case 'jpeg': + $src_img = @imagecreatefromjpeg($file_path); + $write_image = 'imagejpeg'; + $image_quality = isset($options['jpeg_quality']) ? + $options['jpeg_quality'] : 75; + break; + case 'gif': + @imagecolortransparent($new_img, @imagecolorallocate($new_img, 0, 0, 0)); + $src_img = @imagecreatefromgif($file_path); + $write_image = 'imagegif'; + $image_quality = null; + break; + case 'png': + @imagecolortransparent($new_img, @imagecolorallocate($new_img, 0, 0, 0)); + @imagealphablending($new_img, false); + @imagesavealpha($new_img, true); + $src_img = @imagecreatefrompng($file_path); + $write_image = 'imagepng'; + $image_quality = isset($options['png_quality']) ? + $options['png_quality'] : 9; + break; + default: + $src_img = null; + } + $success = $src_img && @imagecopyresampled( + $new_img, + $src_img, + 0, 0, 0, 0, + $new_width, + $new_height, + $img_width, + $img_height + ) && $write_image($new_img, $new_file_path, $image_quality); + // Free up memory (imagedestroy does not delete files): + @imagedestroy($src_img); + @imagedestroy($new_img); + return $success; + } + + protected function get_error_message($error) { + return array_key_exists($error, $this->error_messages) ? + $this->error_messages[$error] : $error; + } + + function get_config_bytes($val) { + $val = trim($val); + $last = strtolower($val[strlen($val)-1]); + switch($last) { + case 'g': + $val *= 1024; + case 'm': + $val *= 1024; + case 'k': + $val *= 1024; + } + return $this->fix_integer_overflow($val); + } + + protected function validate($uploaded_file, $file, $error, $index) { + if ($error) { + $file->error = $this->get_error_message($error); + return false; + } + $content_length = $this->fix_integer_overflow(intval($_SERVER['CONTENT_LENGTH'])); + $post_max_size = $this->get_config_bytes(ini_get('post_max_size')); + if ($post_max_size && ($content_length > $post_max_size)) { + $file->error = $this->get_error_message('post_max_size'); + return false; + } + if (!preg_match($this->options['accept_file_types'], $file->name)) { + $file->error = $this->get_error_message('accept_file_types'); + return false; + } + if ($uploaded_file && is_uploaded_file($uploaded_file)) { + $file_size = $this->get_file_size($uploaded_file); + } else { + $file_size = $content_length; + } + if ($this->options['max_file_size'] && ( + $file_size > $this->options['max_file_size'] || + $file->size > $this->options['max_file_size']) + ) { + $file->error = $this->get_error_message('max_file_size'); + return false; + } + if ($this->options['min_file_size'] && + $file_size < $this->options['min_file_size']) { + $file->error = $this->get_error_message('min_file_size'); + return false; + } + if (is_int($this->options['max_number_of_files']) && ( + $this->count_file_objects() >= $this->options['max_number_of_files']) + ) { + $file->error = $this->get_error_message('max_number_of_files'); + return false; + } + list($img_width, $img_height) = @getimagesize($uploaded_file); + if (is_int($img_width)) { + if ($this->options['max_width'] && $img_width > $this->options['max_width']) { + $file->error = $this->get_error_message('max_width'); + return false; + } + if ($this->options['max_height'] && $img_height > $this->options['max_height']) { + $file->error = $this->get_error_message('max_height'); + return false; + } + if ($this->options['min_width'] && $img_width < $this->options['min_width']) { + $file->error = $this->get_error_message('min_width'); + return false; + } + if ($this->options['min_height'] && $img_height < $this->options['min_height']) { + $file->error = $this->get_error_message('min_height'); + return false; + } + } + return true; + } + + protected function upcount_name_callback($matches) { + $index = isset($matches[1]) ? intval($matches[1]) + 1 : 1; + $ext = isset($matches[2]) ? $matches[2] : ''; + return ' ('.$index.')'.$ext; + } + + protected function upcount_name($name) { + return preg_replace_callback( + '/(?:(?: \(([\d]+)\))?(\.[^.]+))?$/', + array($this, 'upcount_name_callback'), + $name, + 1 + ); + } + + protected function get_unique_filename($name, $type, $index, $content_range) { + while(is_dir($this->get_upload_path($name))) { + $name = $this->upcount_name($name); + } + // Keep an existing filename if this is part of a chunked upload: + $uploaded_bytes = $this->fix_integer_overflow(intval($content_range[1])); + while(is_file($this->get_upload_path($name))) { + if ($uploaded_bytes === $this->get_file_size( + $this->get_upload_path($name))) { + break; + } + $name = $this->upcount_name($name); + } + return $name; + } + + protected function trim_file_name($name, $type, $index, $content_range) { + // Remove path information and dots around the filename, to prevent uploading + // into different directories or replacing hidden system files. + // Also remove control characters and spaces (\x00..\x20) around the filename: + $name = trim(basename(stripslashes($name)), ".\x00..\x20"); + // Use a timestamp for empty filenames: + if (!$name) { + $name = str_replace('.', '-', microtime(true)); + } + // Add missing file extension for known image types: + if (strpos($name, '.') === false && + preg_match('/^image\/(gif|jpe?g|png)/', $type, $matches)) { + $name .= '.'.$matches[1]; + } + return $name; + } + + protected function get_file_name($name, $type, $index, $content_range) { + return $this->get_unique_filename( + $this->trim_file_name($name, $type, $index, $content_range), + $type, + $index, + $content_range + ); + } + + protected function handle_form_data($file, $index) { + // Handle form data, e.g. $_REQUEST['description'][$index] + } + + protected function orient_image($file_path) { + if (!function_exists('exif_read_data')) { + return false; + } + $exif = @exif_read_data($file_path); + if ($exif === false) { + return false; + } + $orientation = intval(@$exif['Orientation']); + if (!in_array($orientation, array(3, 6, 8))) { + return false; + } + $image = @imagecreatefromjpeg($file_path); + switch ($orientation) { + case 3: + $image = @imagerotate($image, 180, 0); + break; + case 6: + $image = @imagerotate($image, 270, 0); + break; + case 8: + $image = @imagerotate($image, 90, 0); + break; + default: + return false; + } + $success = imagejpeg($image, $file_path); + // Free up memory (imagedestroy does not delete files): + @imagedestroy($image); + return $success; + } + + protected function handle_file_upload($uploaded_file, $name, $size, $type, $error, + $index = null, $content_range = null) { + global $xoopsUser, $SmallWorldDB; + $file = new stdClass(); + + $file->name = $this->get_file_name($name, $type, $index, $content_range); + $file->size = $this->fix_integer_overflow(intval($size)); + $file->type = $type; + + // Save to database for later use + $db = new SmallWorldDB; + $userid = $xoopsUser->getVar('uid'); + + // Generate new name for file + $file->name = basename(stripslashes($name)); + $file->name = time().rand(0,99999).".".$this->getFileExtension($name); + $img = XOOPS_URL."/uploads/albums_smallworld/".$userid."/".$file->name; + $db->saveImage ("'', '".$userid."', '".$file->name."', '".addslashes($img)."', '".time()."', ''"); + + if ($this->validate($uploaded_file, $file, $error, $index)) { + $this->handle_form_data($file, $index); + $upload_dir = $this->get_upload_path(); + if (!is_dir($upload_dir)) { + mkdir($upload_dir, $this->options['mkdir_mode'], true); + } + $file_path = $this->get_upload_path($file->name); + $append_file = $content_range && is_file($file_path) && + $file->size > $this->get_file_size($file_path); + if ($uploaded_file && is_uploaded_file($uploaded_file)) { + // multipart/formdata uploads (POST method uploads) + if ($append_file) { + file_put_contents( + $file_path, + fopen($uploaded_file, 'r'), + FILE_APPEND + ); + } else { + move_uploaded_file($uploaded_file, $file_path); + } + } else { + // Non-multipart uploads (PUT method support) + file_put_contents( + $file_path, + fopen('php://input', 'r'), + $append_file ? FILE_APPEND : 0 + ); + } + $file_size = $this->get_file_size($file_path, $append_file); + if ($file_size === $file->size) { + if ($this->options['orient_image']) { + $this->orient_image($file_path); + } + $file->url = $this->get_download_url($file->name); + foreach($this->options['image_versions'] as $version => $options) { + if ($this->create_scaled_image($file->name, $version, $options)) { + if (!empty($version)) { + $file->{$version.'_url'} = $this->get_download_url( + $file->name, + $version + ); + } else { + $file_size = $this->get_file_size($file_path, true); + } + } + } + } else if (!$content_range && $this->options['discard_aborted_uploads']) { + unlink($file_path); + $file->error = 'abort'; + } + $file->size = $file_size; + $this->set_file_delete_properties($file); + } + return $file; + } + + //function to return file extension from a path or file name + function getFileExtension($path){ + $parts=pathinfo($path); + return $parts['extension']; + } + + protected function readfile($file_path) { + return readfile($file_path); + } + + protected function body($str) { + echo $str; + } + + protected function header($str) { + header($str); + } + + protected function generate_response($content, $print_response = true) { + if ($print_response) { + $json = json_encode($content); + $redirect = isset($_REQUEST['redirect']) ? + stripslashes($_REQUEST['redirect']) : null; + if ($redirect) { + $this->header('Location: '.sprintf($redirect, rawurlencode($json))); + return; + } + $this->head(); + if (isset($_SERVER['HTTP_CONTENT_RANGE'])) { + $files = isset($content[$this->options['param_name']]) ? + $content[$this->options['param_name']] : null; + if ($files && is_array($files) && is_object($files[0]) && $files[0]->size) { + $this->header('Range: 0-'.($this->fix_integer_overflow(intval($files[0]->size)) - 1)); + } + } + $this->body($json); + } + return $content; + } + + protected function get_version_param() { + return isset($_GET['version']) ? basename(stripslashes($_GET['version'])) : null; + } + + protected function get_file_name_param() { + return isset($_GET['file']) ? basename(stripslashes($_GET['file'])) : null; + } + + protected function get_file_type($file_path) { + switch (strtolower(pathinfo($file_path, PATHINFO_EXTENSION))) { + case 'jpeg': + case 'jpg': + return 'image/jpeg'; + case 'png': + return 'image/png'; + case 'gif': + return 'image/gif'; + default: + return ''; + } + } + + protected function download() { + if (!$this->options['download_via_php']) { + $this->header('HTTP/1.1 403 Forbidden'); + return; + } + $file_name = $this->get_file_name_param(); + if ($this->is_valid_file_object($file_name)) { + $file_path = $this->get_upload_path($file_name, $this->get_version_param()); + if (is_file($file_path)) { + if (!preg_match($this->options['inline_file_types'], $file_name)) { + $this->header('Content-Description: File Transfer'); + $this->header('Content-Type: application/octet-stream'); + $this->header('Content-Disposition: attachment; filename="'.$file_name.'"'); + $this->header('Content-Transfer-Encoding: binary'); + } else { + // Prevent Internet Explorer from MIME-sniffing the content-type: + $this->header('X-Content-Type-Options: nosniff'); + $this->header('Content-Type: '.$this->get_file_type($file_path)); + $this->header('Content-Disposition: inline; filename="'.$file_name.'"'); + } + $this->header('Content-Length: '.$this->get_file_size($file_path)); + $this->header('Last-Modified: '.gmdate('D, d M Y H:i:s T', filemtime($file_path))); + $this->readfile($file_path); + } + } + } + + protected function send_content_type_header() { + $this->header('Vary: Accept'); + if (isset($_SERVER['HTTP_ACCEPT']) && + (strpos($_SERVER['HTTP_ACCEPT'], 'application/json') !== false)) { + $this->header('Content-type: application/json'); + } else { + $this->header('Content-type: text/plain'); + } + } + + protected function send_access_control_headers() { + $this->header('Access-Control-Allow-Origin: '.$this->options['access_control_allow_origin']); + $this->header('Access-Control-Allow-Credentials: ' + .($this->options['access_control_allow_credentials'] ? 'true' : 'false')); + $this->header('Access-Control-Allow-Methods: ' + .implode(', ', $this->options['access_control_allow_methods'])); + $this->header('Access-Control-Allow-Headers: ' + .implode(', ', $this->options['access_control_allow_headers'])); + } + + public function head() { + $this->header('Pragma: no-cache'); + $this->header('Cache-Control: no-store, no-cache, must-revalidate'); + $this->header('Content-Disposition: inline; filename="files.json"'); + // Prevent Internet Explorer from MIME-sniffing the content-type: + $this->header('X-Content-Type-Options: nosniff'); + if ($this->options['access_control_allow_origin']) { + $this->send_access_control_headers(); + } + $this->send_content_type_header(); + } + + public function get($print_response = true) { + if ($print_response && isset($_GET['download'])) { + return $this->download(); + } + $file_name = $this->get_file_name_param(); + if ($file_name) { + $response = array( + substr($this->options['param_name'], 0, -1) => $this->get_file_object($file_name) + ); + } else { + $response = array( + $this->options['param_name'] => $this->get_file_objects() + ); + } + return $this->generate_response($response, $print_response); + } + + public function post($print_response = true) { + if (isset($_REQUEST['_method']) && $_REQUEST['_method'] === 'DELETE') { + return $this->delete($print_response); + } + $upload = isset($_FILES[$this->options['param_name']]) ? + $_FILES[$this->options['param_name']] : null; + // Parse the Content-Disposition header, if available: + $file_name = isset($_SERVER['HTTP_CONTENT_DISPOSITION']) ? + rawurldecode(preg_replace( + '/(^[^"]+")|("$)/', + '', + $_SERVER['HTTP_CONTENT_DISPOSITION'] + )) : null; + // Parse the Content-Range header, which has the following form: + // Content-Range: bytes 0-524287/2000000 + $content_range = isset($_SERVER['HTTP_CONTENT_RANGE']) ? + preg_split('/[^0-9]+/', $_SERVER['HTTP_CONTENT_RANGE']) : null; + $size = $content_range ? $content_range[3] : null; + $files = array(); + if ($upload && is_array($upload['tmp_name'])) { + // param_name is an array identifier like "files[]", + // $_FILES is a multi-dimensional array: + foreach ($upload['tmp_name'] as $index => $value) { + $files[] = $this->handle_file_upload( + $upload['tmp_name'][$index], + $file_name ? $file_name : $upload['name'][$index], + $size ? $size : $upload['size'][$index], + $upload['type'][$index], + $upload['error'][$index], + $index, + $content_range + ); + } + } else { + // param_name is a single object identifier like "file", + // $_FILES is a one-dimensional array: + $files[] = $this->handle_file_upload( + isset($upload['tmp_name']) ? $upload['tmp_name'] : null, + $file_name ? $file_name : (isset($upload['name']) ? + $upload['name'] : null), + $size ? $size : (isset($upload['size']) ? + $upload['size'] : $_SERVER['CONTENT_LENGTH']), + isset($upload['type']) ? + $upload['type'] : $_SERVER['CONTENT_TYPE'], + isset($upload['error']) ? $upload['error'] : null, + null, + $content_range + ); + } + return $this->generate_response( + array($this->options['param_name'] => $files), + $print_response + ); + } + + public function delete($print_response = true) { + global $xoopsUser; + $userid = $xoopsUser->getVar('uid'); + $db = new SmallWorldDB; + $file_name = $this->get_file_name_param(); + $file_path = $this->get_upload_path($file_name); + $success = is_file($file_path) && $file_name[0] !== '.' && unlink($file_path); + + // Delete file based on user and filename + $db->DeleteImage ($userid, $file_name); + $db->DeleteImage ($userid, 'Thumbs.db'); + + if ($success) { + foreach($this->options['image_versions'] as $version => $options) { + if (!empty($version)) { + $file = $this->get_upload_path($file_name, $version); + if (is_file($file)) { + unlink($file); + } + } + } + } + return $this->generate_response(array('success' => $success), $print_response); + } + +} Modified: XoopsModules/smallworld/trunk/smallworld/img_upload.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/img_upload.php 2013-02-11 16:04:59 UTC (rev 10210) +++ XoopsModules/smallworld/trunk/smallworld/img_upload.php 2013-02-11 16:06:28 UTC (rev 10211) @@ -26,12 +26,37 @@ include_once(XOOPS_ROOT_PATH."/modules/smallworld/class/class_collector.php"); if ($xoopsUser) { - global $xoTheme; - $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.fileupload-uix.js'); + global $xoTheme; +$xoopsLogger->activated = false; + //$xoTheme->addScript("http://code.jquery.com/jquery-migrate-1.0.0.js"); +$xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/uploader/bootstrap.min.css'); +$xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/uploader/style.css'); +$xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/uploader/bootstrap-responsive.min.css'); +$xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/uploader/bootstrap-image-gallery.min.css'); +//$xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/uploader/jquery.fileupload-ui.css'); +//$xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/uploader/jquery.fileupload-ui-noscript.css'); + + + +//$xoTheme->addScript("http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"); +$xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/vendor/jquery.ui.widget.js'); +$xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/uploader/tmpl.js'); +$xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/uploader/load-image.js'); +$xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/uploader/canvas-to-blob.js'); +$xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/uploader/bootstrap.js'); +$xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/uploader/bootstrap-image-gallery.js'); +$xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.iframe-transport.js'); +$xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.fileupload.js'); +$xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.fileupload-fp.js'); +$xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.fileupload-ui.js'); +$xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/main.js'); + + /* $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.fileupload-uix.js'); $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.fileupload-ui.js'); $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'); @@ -46,7 +71,7 @@ // ------------ IMAGE UPLOADER ------------ // // Image upload form $upload = $item->uploadform ($id); - $xoopsTpl->append('uploadform',$upload); + //$xoopsTpl->append('uploadform',$upload); } else { redirect_header("register.php", 1); } Modified: XoopsModules/smallworld/trunk/smallworld/imgupload.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/imgupload.php 2013-02-11 16:04:59 UTC (rev 10210) +++ XoopsModules/smallworld/trunk/smallworld/imgupload.php 2013-02-11 16:06:28 UTC (rev 10211) @@ -17,24 +17,22 @@ include_once("../../mainfile.php"); include_once(XOOPS_ROOT_PATH."/modules/smallworld/class/class_collector.php"); include_once(XOOPS_ROOT_PATH."/modules/smallworld/include/functions.php"); +include_once(XOOPS_ROOT_PATH."/modules/smallworld/class/UploadHandler.php"); if ($xoopsUser) { $xoopsLogger->activated = false; $img = new smallWorldImages; $userID = $xoopsUser->getVar('uid'); $user = new XoopsUser($userID); - $options = array( + /* $options = array( 'upload_dir' => XOOPS_ROOT_PATH.'/uploads/albums_smallworld/'.$userID."/", 'upload_url' => XOOPS_URL.'/uploads/albums_smallworld/'.$userID."/", 'thumbnails_dir' => XOOPS_ROOT_PATH.'/uploads/albums_smallworld'.'/'.$userID.'/thumbnails/', - 'thumbnails_url' => XOOPS_URL.'/uploads/albums_smallworld'.'/'.$userID.'/thumbnails/', - 'thumbnail_max_width' => 80, - 'thumbnail_max_height' => 80, - 'field_name' => 'file' + 'thumbnails_url' => XOOPS_URL.'/uploads/albums_smallworld'.'/'.$userID.'/thumbnails/' ); + */ + $upload_handler = new UploadHandler(); - $upload_handler = new SmallworldUploadHandler($options); - - switch ($_SERVER['REQUEST_METHOD']) { + /*switch ($_SERVER['REQUEST_METHOD']) { case 'HEAD': case 'GET': $upload_handler->get(); @@ -47,6 +45,6 @@ break; default: header('HTTP/1.0 405 Method Not Allowed'); - } + }*/ } ?> \ No newline at end of file Modified: XoopsModules/smallworld/trunk/smallworld/templates/smallworld_userprofile_imgupload.html =================================================================== --- XoopsModules/smallworld/trunk/smallworld/templates/smallworld_userprofile_imgupload.html 2013-02-11 16:04:59 UTC (rev 10210) +++ XoopsModules/smallworld/trunk/smallworld/templates/smallworld_userprofile_imgupload.html 2013-02-11 16:06:28 UTC (rev 10211) @@ -1,32 +1,154 @@ - <{if $xoops_isuser}> - <{if $check >= 1}> - <div id="file_upload" class="smallworld_content" title="<{$smarty.const._SMALLWORLD_UPLOAD_TITLE}>"> - <{$smarty.const._SMALLWORLD_UPLOAD_HOWTO}> - <{section name=i loop=$uploadform}> - <{$uploadform[i]}> - <{/section}> - <table style="height:500px" class="files"> - <tr class="file_upload_template" style="display:none;"> - <td class="file_upload_preview"></td> - <td class="file_name"></td> - <td class="file_size"></td> - <td class="file_upload_progress"><div></div></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="height:59px;display:none;"> - <td style="vertical-align: middle;" class="file_download_preview"></td> - <td style="vertical-align: middle;" class="file_name"><a></a></td> - <td style="vertical-align: middle;" class="file_size"></td> - <td style="vertical-align: middle;" 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"><{$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}> - <{/if}> \ No newline at end of file +<{if $xoops_isuser}> + <{if $check >= 1}> + <div id="file_upload" class="smallworld_content" title="<{$smarty.const._SMALLWORLD_UPLOAD_TITLE}>"> + <div class="container"> + <div class="page-header"> + <h1><{$smarty.const._SMALLWORLD_UPLOAD_TITLE}></h1> + </div> + <blockquote> + <p><{$smarty.const._SMALLWORLD_UPLOAD_HOWTO}></p> + </blockquote> + <br> + <!-- The file upload form used as target for the file upload widget --> + <form id="fileupload" action="imgupload.php" method="POST" enctype="multipart/form-data"> + <!-- The fileupload-buttonbar contains buttons to add/delete files and start/cancel the upload --> + <div class="row fileupload-buttonbar"> + <div class="span7"> + <!-- The fileinput-button span is used to style the file input field as button --> + <span class="btn btn-success fileinput-button"> + <i class="icon-plus icon-white"></i> + <span>Add files...</span> + <input type="file" name="files[]" multiple> + </span> + <button type="submit" class="btn btn-primary start"> + <i class="icon-upload icon-white"></i> + <span><{$smarty.const._SMALLWORLD_IMAGES_START}></span> + </button> + <button type="reset" class="btn btn-warning cancel"> + <i class="icon-ban-circle icon-white"></i> + <span><{$smarty.const._SMALLWORLD_IMAGES_CANCEL}></span> + </button> + <button type="button" class="btn btn-danger delete"> + <i class="icon-trash icon-white"></i> + <span><{$smarty.const._SMALLWORLD_IMAGES_DELETE}></span> + </button> + <input type="checkbox" class="toggle"> + </div> + <!-- The global progress information --> + <div class="span5 fileupload-progress fade"> + <!-- The global progress bar --> + <div class="progress progress-success progress-striped active" role="progressbar" aria-valuemin="0" aria-valuemax="100"> + <div class="bar" style="width:0%;"></div> + </div> + <!-- The extended global progress information --> + <div class="progress-extended"> </div> + </div> + </div> + <!-- The loading indicator is shown during file processing --> + <div class="fileupload-loading"></div> + <br> + <!-- The table listing the files available for upload/download --> + <table role="presentation" class="table table-striped"><tbody class="files" data-toggle="modal-gallery" data-target="#modal-gallery"></tbody></table> + </form> + <br> + <div class="well"> + <h3>Demo Notes</h3> + <ul> + <li>The maximum file size for uploads in this demo is <strong>5 MB</strong> (default file size is unlimited).</li> + <li>Only image files (<strong>JPG, GIF, PNG</strong>) are allowed in this demo (by default there is no file type restriction).</li> + <li>Uploaded files will be deleted automatically after <strong>5 minutes</strong> (demo setting).</li> + <li>You can <strong>drag & drop</strong> files from your desktop on this webpage with Google Chrome, Mozilla Firefox and Apple Safari.</li> + <li>Please refer to the <a href="https://github.com/blueimp/jQuery-File-Upload">project website</a> and <a href="https://github.com/blueimp/jQuery-File-Upload/wiki">documentation</a> for more information.</li> + <li>Built with Twitter's <a href="http://twitter.github.com/bootstrap/">Bootstrap</a> toolkit and Icons from <a href="http://glyphicons.com/">Glyphicons</a>.</li> + </ul> + </div> + </div> +<!-- modal-gallery is the modal dialog used for the image gallery --> +<div id="modal-gallery" class="modal modal-gallery hide fade" data-filter=":odd" tabindex="-1"> + <div class="modal-header"> + <a class="close" data-dismiss="modal">×</a> + <h3 class="modal-title"></h3> + </div> + <div class="modal-body"><div class="modal-image"></div></div> + <div class="modal-footer"> + <a class="btn modal-download" target="_blank"> + <i class="icon-download"></i> + <span><{$smarty.const._SMALLWORLD_IMAGES_DOWNLOAD}></span> + </a> + <a class="btn btn-success modal-play modal-slideshow" data-slideshow="5000"> + <i class="icon-play icon-white"></i> + <span><{$smarty.const._SMALLWORLD_IMAGES_SLIDESHOW}></span> + </a> + <a class="btn btn-info modal-prev"> + <i class="icon-arrow-left icon-white"></i> + <span><{$smarty.const._SMALLWORLD_IMAGES_PREVIOUS}></span> + </a> + <a class="btn btn-primary modal-next"> + <span><{$smarty.const._SMALLWORLD_IMAGES_NEXT}></span> + <i class="icon-arrow-right icon-white"></i> + </a> + </div> +</div> + <!-- The template to display files available for upload --> + <script id="template-upload" type="text/x-tmpl"> + {% for (var i=0, file; file=o.files[i]; i++) { %} + <tr class="template-upload fade"> + <td class="preview"><span class="fade"></span></td> + <td class="name"><span>{%=file.name%}</span></td> + <td class="size"><span>{%=o.formatFileSize(file.size)%}</span></td> + {% if (file.error) { %} + <td class="error" colspan="2"><span class="label label-important">Error</span> {%=file.error%}</td> + {% } else if (o.files.valid && !i) { %} + <td> + <div class="progress progress-success progress-striped active" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0"><div class="bar" style="width:0%;"></div></div> + </td> + <td class="start">{% if (!o.options.autoUpload) { %} + <button class="btn btn-primary"> + <i class="icon-upload icon-white"></i> + <span><{$smarty.const._SMALLWORLD_IMAGES_START}></span> + </button> + {% } %}</td> + {% } else { %} + <td colspan="2"></td> + {% } %} + <td class="cancel">{% if (!i) { %} + <button class="btn btn-warning"> + <i class="icon-ban-circle icon-white"></i> + <span><{$smarty.const._SMALLWORLD_IMAGES_CANCEL}></span> + </button> + {% } %}</td> + </tr> + {% } %} + </script> + <!-- The template to display files available for download --> + <script id="template-download" type="text/x-tmpl"> + {% for (var i=0, file; file=o.files[i]; i++) { %} + <tr class="template-download fade"> + {% if (file.error) { %} + <td></td> + <td class="name"><span>{%=file.name%}</span></td> + <td class="size"><span>{%=o.formatFileSize(file.size)%}</span></td> + <td class="error" colspan="2"><span class="label label-important">Error</span> {%=file.error%}</td> + {% } else { %} + <td class="preview">{% if (file.thumbnails_url) { %} + <a href="{%=file.url%}" title="{%=file.name%}" data-gallery="gallery" download="{%=file.name%}"><img src="{%=file.thumbnails_url%}"></a> + {% } %}</td> + <td class="name"> + <a href="{%=file.url%}" title="{%=file.name%}" data-gallery="{%=file.thumbnails_url&&'gallery'%}" download="{%=file.name%}">{%=file.name%}</a> + </td> + <td class="size"><span>{%=o.formatFileSize(file.size)%}</span></td> + <td colspan="2"></td> + {% } %} + <td class="delete"> + <button class="btn btn-danger" data-type="{%=file.delete_type%}" data-url="{%=file.delete_url%}"{% if (file.delete_with_credentials) { %} data-xhr-fields='{"withCredentials":true}'{% } %}> + <i class="icon-trash icon-white"></i> + <span><{$smarty.const._SMALLWORLD_IMAGES_DELETE}></span> + </button> + <input type="checkbox" name="delete" value="1"> + </td> + </tr> + {% } %} + </script> + </div> + <{/if}> +<{/if}> \ 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-02-13 17:16:20
|
Revision: 8957 http://xoops.svn.sourceforge.net/xoops/?rev=8957&view=rev Author: djculex Date: 2012-02-13 17:16:13 +0000 (Mon, 13 Feb 2012) Log Message: ----------- - NEW: If number if comments >2 then show 2 comments and show "show more" / "Show less" container - CHANGE: Replace a split() -> explode() function to remove depreseated info - LANG_DIFF: see docs/lang_diff.txt for 2 changes in lang/js/variables.js Modified Paths: -------------- XoopsModules/smallworld/trunk/smallworld/css/smallworld.css XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt XoopsModules/smallworld/trunk/smallworld/docs/lang_diff.txt XoopsModules/smallworld/trunk/smallworld/include/functions.php XoopsModules/smallworld/trunk/smallworld/js/smallworld.js XoopsModules/smallworld/trunk/smallworld/js/wall.js XoopsModules/smallworld/trunk/smallworld/language/english/js/variables.js XoopsModules/smallworld/trunk/smallworld/templates/getlastcom.html XoopsModules/smallworld/trunk/smallworld/templates/getlastmsg.html XoopsModules/smallworld/trunk/smallworld/templates/getmore.html Modified: XoopsModules/smallworld/trunk/smallworld/css/smallworld.css =================================================================== --- XoopsModules/smallworld/trunk/smallworld/css/smallworld.css 2012-02-13 16:43:44 UTC (rev 8956) +++ XoopsModules/smallworld/trunk/smallworld/css/smallworld.css 2012-02-13 17:16:13 UTC (rev 8957) @@ -410,7 +410,9 @@ padding-top: 2px; } -input.error, select.error, textarea.error { background-color: #FAF4F4; } +input.error, select.error, textarea.error { + background-color: #FAF4F4; +} .smallworld_moreinfo { color: #7777FF; @@ -672,7 +674,29 @@ /*---------- Gallery ------------*/ /*----------- WALL -------------*/ +.smallworld_commentcontainer { +} + +.smallworld_CommentShowMoreSpan { + background-color: #E6E6E6; + border-color: #A8A8A8; + border-style: dotted; + border-width: thin; + display: block; + height: 5px; + margin: 0 5%; + padding: 5px 0 5%; + width: 96%; +} + +.smallworld_CommentShowMore:link { + color: #6B6B6B; + font-size: 9px; + margin: 0 36%; + position: relative; +} + .smallworld_share { } Modified: XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt =================================================================== --- XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt 2012-02-13 16:43:44 UTC (rev 8956) +++ XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt 2012-02-13 17:16:13 UTC (rev 8957) @@ -22,6 +22,9 @@ - Bugfix: Removed php 5.30 function to convert dateformat and replaced with simpler function - Change: Removed php 5.30 function to calculate difference between dates in Years. - change: Smallworld decreased min-php to >= 5.20 +- NEW: If number if comments >2 then show 2 comments and show "show more" / "Show less" container +- Change: Replace a split() -> explode() function to remove depreseated info +- land_diff: see docs/lang_diff.txt for 2 changes in lang/js/variables.js ------------------------------ Changelog v.1.10 RC Modified: XoopsModules/smallworld/trunk/smallworld/docs/lang_diff.txt =================================================================== --- XoopsModules/smallworld/trunk/smallworld/docs/lang_diff.txt 2012-02-13 16:43:44 UTC (rev 8956) +++ XoopsModules/smallworld/trunk/smallworld/docs/lang_diff.txt 2012-02-13 17:16:13 UTC (rev 8957) @@ -7,12 +7,15 @@ + Added - Removed * Modified + +=============================== +2012/02/13: Version 1.15 RC3 +=============================== +htdocs/modules/smallworld/language/english/js/variables.js ++ var _smallworldCommentsMoreMore = "..Show more"; ++ var _smallworldCommentsMoreLess = "..Show less"; -============= -1.0 -============= +=============================== +2011/12/24: Version 1.00 RC1 +=============================== Original Version - -============= -1.10 -============= \ No newline at end of file Modified: XoopsModules/smallworld/trunk/smallworld/include/functions.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/include/functions.php 2012-02-13 16:43:44 UTC (rev 8956) +++ XoopsModules/smallworld/trunk/smallworld/include/functions.php 2012-02-13 17:16:13 UTC (rev 8957) @@ -638,7 +638,7 @@ function Smallworld_euroToUsDate($stringDate) { if ($stringDate != 0 || $stringDate != '') { - $theData = split("-", trim($stringDate)); + $theData = explode("-", trim($stringDate)); $ret = $theData[2] . "-" . $theData[1] . "-" . $theData[0]; return $ret; } else { @@ -654,7 +654,7 @@ function Smallworld_UsToEuroDate($stringDate) { if ($stringDate != 0 || $stringDate != '') { - $theData = split("-", trim($stringDate)); + $theData = explode("-", trim($stringDate)); $ret = $theData[2] . "-" . $theData[1] . "-" . $theData[0]; return $ret; } else { @@ -806,5 +806,4 @@ } else { return ''; } - } -?> + } \ No newline at end of file Modified: XoopsModules/smallworld/trunk/smallworld/js/smallworld.js =================================================================== --- XoopsModules/smallworld/trunk/smallworld/js/smallworld.js 2012-02-13 16:43:44 UTC (rev 8956) +++ XoopsModules/smallworld/trunk/smallworld/js/smallworld.js 2012-02-13 17:16:13 UTC (rev 8957) @@ -562,8 +562,41 @@ }); }); + +smallworldCheckNumDivs(); + }); // END OF DOCUMENT READY IN THE START +// function to apply "show more" show less if number of comments +// are more than 2 +function smallworldCheckNumDivs() { +xoops_smallworld(document).ready(function() { + xoops_smallworld('.smallworld_commentcontainer').children('div').show(); + xoops_smallworld('.smallworld_CommentShowMore').remove(); + xoops_smallworld('.smallworld_CommentShowMore').die('click'); + + xoops_smallworld('.smallworld_commentcontainer').each(function(){ + var hiddenElements = xoops_smallworld(this).children('div:gt(1)').hide(); + if (hiddenElements.size() > 0) { + var showCaption = _smallworldCommentsMoreMore; + xoops_smallworld(this).children('div:gt(1)').hide(); + xoops_smallworld(this).after('<div class="smallworld_CommentShowMoreSpan"><a href="javascript:void(0);" class="smallworld_CommentShowMore">' + showCaption + '</a></div>'); + } + }); + + xoops_smallworld('.smallworld_CommentShowMore').live('click', function(e){ + e.preventDefault(); + xoops_smallworld(this).parent().prev('div').children('div:gt(1)').slideToggle('slow'); + xoops_smallworld(this).text(_smallworldCommentsMoreLess); + }, + function() { + hiddenElements.hide(); + xoops_smallworld(this).text('more'); + }); + }); +} + + // Open custom boomark window function customBookmark(id, display, url) { window.open(url, '_blank', Modified: XoopsModules/smallworld/trunk/smallworld/js/wall.js =================================================================== --- XoopsModules/smallworld/trunk/smallworld/js/wall.js 2012-02-13 16:43:44 UTC (rev 8956) +++ XoopsModules/smallworld/trunk/smallworld/js/wall.js 2012-02-13 17:16:13 UTC (rev 8957) @@ -23,6 +23,7 @@ xoops_smallworld("#smallworld_update").val(''); xoops_smallworld("#smallworld_update").focus(); xoops_smallworld("#smallworld_stexpand").oembed(updateval); + smallworldCheckNumDivs(); } }); } @@ -130,6 +131,7 @@ else { } + smallworldCheckNumDivs(); return false; }); }); Modified: XoopsModules/smallworld/trunk/smallworld/language/english/js/variables.js =================================================================== --- XoopsModules/smallworld/trunk/smallworld/language/english/js/variables.js 2012-02-13 16:43:44 UTC (rev 8956) +++ XoopsModules/smallworld/trunk/smallworld/language/english/js/variables.js 2012-02-13 17:16:13 UTC (rev 8957) @@ -10,6 +10,9 @@ var _smallworldCancel = "Cancel"; var _smallworldClose = "close"; +var _smallworldCommentsMoreMore = "..Show more"; +var _smallworldCommentsMoreLess = "..Show less"; + var SmallworldGenderError = "Please choose your gender"; var SmallworldBirthdayError = "Please choose your birthday"; var SmallworldEmailError = "Please fill at least one email"; Modified: XoopsModules/smallworld/trunk/smallworld/templates/getlastcom.html =================================================================== --- XoopsModules/smallworld/trunk/smallworld/templates/getlastcom.html 2012-02-13 16:43:44 UTC (rev 8956) +++ XoopsModules/smallworld/trunk/smallworld/templates/getlastcom.html 2012-02-13 17:16:13 UTC (rev 8957) @@ -38,5 +38,8 @@ </div> <{/section}> <script type="text/javascript"> -attachAvatarOpen(); +xoops_smallworld(document).ready(function() { + smallworldCheckNumDivs(); + attachAvatarOpen(); +}); </script> \ No newline at end of file Modified: XoopsModules/smallworld/trunk/smallworld/templates/getlastmsg.html =================================================================== --- XoopsModules/smallworld/trunk/smallworld/templates/getlastmsg.html 2012-02-13 16:43:44 UTC (rev 8956) +++ XoopsModules/smallworld/trunk/smallworld/templates/getlastmsg.html 2012-02-13 17:16:13 UTC (rev 8957) @@ -121,5 +121,8 @@ <br><br> <{/foreach}> <script type="text/javascript"> -attachAvatarOpen(); +xoops_smallworld(document).ready(function() { + smallworldCheckNumDivs(); + attachAvatarOpen(); +}); </script> \ No newline at end of file Modified: XoopsModules/smallworld/trunk/smallworld/templates/getmore.html =================================================================== --- XoopsModules/smallworld/trunk/smallworld/templates/getmore.html 2012-02-13 16:43:44 UTC (rev 8956) +++ XoopsModules/smallworld/trunk/smallworld/templates/getmore.html 2012-02-13 17:16:13 UTC (rev 8957) @@ -115,6 +115,9 @@ <a href="javascript:void(0)" class="smallworld_msg_counter" rel="<{$pagename}>" id="<{$post.msg_id}>">MORE</a> <br><br> <script type="text/javascript"> -attachAvatarOpen(); +xoops_smallworld(document).ready(function() { + smallworldCheckNumDivs(); + attachAvatarOpen(); +}); </script> \ 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-02-13 21:24:51
|
Revision: 8966 http://xoops.svn.sourceforge.net/xoops/?rev=8966&view=rev Author: djculex Date: 2012-02-13 21:24:44 +0000 (Mon, 13 Feb 2012) Log Message: ----------- - Bugfix: Textarea in updates did not resize while writing. - Bugfix: Dom set max-width to ".update" - Change: Center search field, and use imageResize function on avatars - Change: Minor css adjustments Modified Paths: -------------- XoopsModules/smallworld/trunk/smallworld/css/smallworld.css XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt XoopsModules/smallworld/trunk/smallworld/js/smallworld.js XoopsModules/smallworld/trunk/smallworld/search.php XoopsModules/smallworld/trunk/smallworld/templates/smallworld_index.html Modified: XoopsModules/smallworld/trunk/smallworld/css/smallworld.css =================================================================== --- XoopsModules/smallworld/trunk/smallworld/css/smallworld.css 2012-02-13 20:23:41 UTC (rev 8965) +++ XoopsModules/smallworld/trunk/smallworld/css/smallworld.css 2012-02-13 21:24:44 UTC (rev 8966) @@ -556,7 +556,7 @@ } #smallworld_searchform { - margin: 25px 33% 0 33%; + margin: 25px 20% 0 20%; position: relative; } @@ -684,10 +684,10 @@ border-style: dotted; border-width: thin; display: block; - height: 5px; - margin: 0 5%; - padding: 5px 0 5%; - width: 96%; + height: 15px; + margin: 0 15px; + padding: 5px; + width: 95%; } .smallworld_CommentShowMore:link { @@ -882,12 +882,13 @@ .smallworld_commentupdate { background-color: #F2F2F2; + margin: 0 15px; padding: 5px; - width: 100%; + width: 95%; } .smallworld_comment { - width:98%; + width:180px; height:35px; font-size:11px; } Modified: XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt =================================================================== --- XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt 2012-02-13 20:23:41 UTC (rev 8965) +++ XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt 2012-02-13 21:24:44 UTC (rev 8966) @@ -15,15 +15,19 @@ - Bugfix: Gender was missing in select multi for form items - Bugfix: Remove error in json reply -12. Fevruary 2012 +12. February 2012 - Bugfix: Keep imagegallery in colorbox even if imageData.index is null 13. February +- NEW: If number if comments >2 then show 2 comments and show "show more" / "Show less" container - Bugfix: Removed php 5.30 function to convert dateformat and replaced with simpler function +- Bugfix: Textarea in updates did not resize while writing. +- Bugfix: Dom set max-width to ".update" - Change: Removed php 5.30 function to calculate difference between dates in Years. - change: Smallworld decreased min-php to >= 5.20 -- NEW: If number if comments >2 then show 2 comments and show "show more" / "Show less" container - Change: Replace a split() -> explode() function to remove depreseated info +- Change: Center search field, and use imageResize function on avatars +- Change: Minor css adjustments - land_diff: see docs/lang_diff.txt for 2 changes in lang/js/variables.js ------------------------------ Modified: XoopsModules/smallworld/trunk/smallworld/js/smallworld.js =================================================================== --- XoopsModules/smallworld/trunk/smallworld/js/smallworld.js 2012-02-13 20:23:41 UTC (rev 8965) +++ XoopsModules/smallworld/trunk/smallworld/js/smallworld.js 2012-02-13 21:24:44 UTC (rev 8966) @@ -212,9 +212,10 @@ // Make Textareas elastic xoops_smallworld(function() { xoops_smallworld('.favourites, .smallworld_comment, #smallworld_update, #smallworld_update_profile').elastic(); + xoops_smallworld('.smallworld_comment').css('max-width', xoops_smallworld('.smallworld_stcommentbody').outerWidth() - 90 + 'px'); + xoops_smallworld('#smallworld_update').css('max-width', xoops_smallworld('#smallworld_wall_container').outerWidth() - 30 + 'px'); }); - // Toggle the form 'partner' if choosen status is married, in relationship, complicated xoops_smallworld(function() { if (xoops_smallworld("#relationship").val == '2') { @@ -268,7 +269,7 @@ var htmlString = xoops_smallworld(this).html().replace(/</g, '<'); htmlString = htmlString.replace(/>/g, '>'); xoops_smallworld(this).html(htmlString); - xoops_smallworld('.ui-autocomplete.ui-menu').width(233); + xoops_smallworld('.ui-autocomplete.ui-menu').width(275); }); }, select: function(event,ui){ Modified: XoopsModules/smallworld/trunk/smallworld/search.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/search.php 2012-02-13 20:23:41 UTC (rev 8965) +++ XoopsModules/smallworld/trunk/smallworld/search.php 2012-02-13 21:24:44 UTC (rev 8966) @@ -35,18 +35,23 @@ while ($row=$xoopsDB->fetchArray($result)) { $user = new xoopsUser($row['userid']); if ($row['userimage'] != 'Not specifiyed') { - $image = '<img src="'.XOOPS_URL.'/uploads/'.$row['userimage'].'" height="30px" />'; + $imageLink = XOOPS_URL.'/uploads/'.trim($row['userimage']); + $imageSize = smallworld_getImageSize(30, 30, $imageLink); + $imageHw = smallworld_imageResize($imageSize[0], $imageSize[1], 30); + $image = '<img src="'.XOOPS_URL.'/uploads/'.$row['userimage'].'" '.$imageHw.'/>'; } else { if ($row['gender'] == 1) { - $image = "<img src='".XOOPS_URL."/modules/smallworld/images/ano_woman.png'"." height='30px' /></img>"; + $image = "<img src='".XOOPS_URL."/modules/smallworld/images/ano_woman.png'"." height='30px' width='30px'/></img>"; } if ($row['gender'] == 2) { - $image = "<img src='".XOOPS_URL."/modules/smallworld/images/ano_man.png'"." height='30px' /></img>"; + $image = "<img src='".XOOPS_URL."/modules/smallworld/images/ano_man.png'"." height='30px' width='30px'/></img>"; } if ($row['gender'] == 0) { - $image = "<img src='".XOOPS_URL."/modules/smallworld/images/genderless.png'"." height='30px' /></img>"; + $image = "<img src='".XOOPS_URL."/modules/smallworld/images/genderless.png'"." height='30px' width='30px'/></img>"; } } + + $imageHw = smallworld_imageResize($imageSize[0], $imageSize[1], 30); $data[] = array( 'label' => $image.' '.'<span class="searchusername">'.$row['realname']." (".$row['username'].")</span>", 'value' => $user->uname() Modified: XoopsModules/smallworld/trunk/smallworld/templates/smallworld_index.html =================================================================== --- XoopsModules/smallworld/trunk/smallworld/templates/smallworld_index.html 2012-02-13 20:23:41 UTC (rev 8965) +++ XoopsModules/smallworld/trunk/smallworld/templates/smallworld_index.html 2012-02-13 21:24:44 UTC (rev 8966) @@ -59,7 +59,7 @@ <br> <br> - <input id="smallworld_searchform" size="35" type="text" value="<{$smarty.const._SMALLWORLD_SEARCHMEMBER}>"/> + <center><input id="smallworld_searchform" size="35" type="text" value="<{$smarty.const._SMALLWORLD_SEARCHMEMBER}>"/></center> <br> <br> <div id="smallworld_wall_container"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dj...@us...> - 2012-02-15 00:39:46
|
Revision: 8973 http://xoops.svn.sourceforge.net/xoops/?rev=8973&view=rev Author: djculex Date: 2012-02-15 00:39:40 +0000 (Wed, 15 Feb 2012) Log Message: ----------- - Bugfix: Aply function to only run getSelects.php on register.php and editprofile.php. - Bugfix: removed anoying pop up [object, object] error - Change: adjusted jSon returned from checks Modified Paths: -------------- XoopsModules/smallworld/trunk/smallworld/Get_Count.php XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt XoopsModules/smallworld/trunk/smallworld/include/getSelects.php XoopsModules/smallworld/trunk/smallworld/js/smallworld.js Modified: XoopsModules/smallworld/trunk/smallworld/Get_Count.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/Get_Count.php 2012-02-14 17:35:36 UTC (rev 8972) +++ XoopsModules/smallworld/trunk/smallworld/Get_Count.php 2012-02-15 00:39:40 UTC (rev 8973) @@ -28,9 +28,9 @@ $_COOKIE[session_name()] = session_id(); if ($xoopsUser) { if($_GET['SmallworldGetUserMsgCount']) { - $counts = smallworld_getCountFriendMessagesEtc (); + $counts = smallworld_getCountFriendMessagesEtc(); header('Content-type: application/json'); - echo "{\"NewUserMsgCount\":$counts}"; + echo "{\"NewUserMsgCount\":\"$counts\"}"; } } ?> \ No newline at end of file Modified: XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt =================================================================== --- XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt 2012-02-14 17:35:36 UTC (rev 8972) +++ XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt 2012-02-15 00:39:40 UTC (rev 8973) @@ -30,6 +30,12 @@ - Change: Minor css adjustments - land_diff: see docs/lang_diff.txt for 2 changes in lang/js/variables.js +14. February +- Bugfix: Aply function to only run getSelects.php on register and editprofile.php. +- Bugfix: removed anoying pop up [object, object] error +- Change: adjusted jSon returned from checks + + ------------------------------ Changelog v.1.10 RC ------------------------------ Modified: XoopsModules/smallworld/trunk/smallworld/include/getSelects.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/include/getSelects.php 2012-02-14 17:35:36 UTC (rev 8972) +++ XoopsModules/smallworld/trunk/smallworld/include/getSelects.php 2012-02-15 00:39:40 UTC (rev 8973) @@ -25,7 +25,7 @@ include_once(XOOPS_ROOT_PATH."/modules/smallworld/class/class_collector.php"); global $xoopsUser, $xoopsModule,$xoopsLogger; $xoopsLogger->activated = false; - if (is_object($xoopsUser)) { + if ($xoopsUser) { $db = new SmallWorldDB; $id = $xoopsUser->getVar('uid'); $relat = $db->getVar($id,'relationship'); @@ -33,7 +33,7 @@ $gender = $db->getVar($id,'gender'); $politic = $db->getVar($id,'politic'); $religion = $db->getVar($id,'religion'); - header('Content-type: "application/json"'); - echo "{\"relat\": \"$relat \", \"partner\": \"$partner \", \"gender\": \"$gender \", \"politic\": \"$politic \", \"religion\": \"$religion \"}"; + header('Content-type: "application/json"'); + echo "{\"relat\":\"$relat \", \"partner\":\"$partner \", \"gender\":\"$gender \", \"politic\":\"$politic \", \"religion\":\"$religion \"}"; } ?> \ No newline at end of file Modified: XoopsModules/smallworld/trunk/smallworld/js/smallworld.js =================================================================== --- XoopsModules/smallworld/trunk/smallworld/js/smallworld.js 2012-02-14 17:35:36 UTC (rev 8972) +++ XoopsModules/smallworld/trunk/smallworld/js/smallworld.js 2012-02-15 00:39:40 UTC (rev 8973) @@ -15,6 +15,10 @@ //Attach function for avatar attachAvatarOpen (); + // Get page url and page title (index.php) + var smallworld_pageUrl = window.location.pathname; + var smallworld_PageName = smallworld_pageUrl.substring(smallworld_pageUrl.lastIndexOf('/') + 1); + // GET pop for statistics xoops_smallworld('#smallworld_statistics_lnk').live('click',function() { if (xoops_smallworld('#smallworld_statistics_lnk').length) { // implies *not* zero @@ -33,7 +37,7 @@ href:"#smallworldStatsDiv" }); }; - }); + }); // 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 @@ -280,28 +284,31 @@ // Function to reset gender, relationshipstatus,politics an religion select:Selected in forms after send and in pagerefresh xoops_smallworld(function() { + if (smallworld_PageName == 'register.php' && smallworld_PageName == 'editprofile.php') { var sw_data; - xoops_smallworld.ajax({ - url: smallworld_url+"include/getSelects.php", - cache: false, - dataType: "json", - success: function(sw_data) { - response = jQuery.parseJSON(sw_data); - xoops_smallworld("select[name=gender] option[value="+sw_data.gender+"]").attr("selected", true); - xoops_smallworld("select[name=relationship] option[value="+sw_data.relat+"]").attr("selected", true); - if (sw_data.relat == 2) { - xoops_smallworld("#partner").hide(); - xoops_smallworld("p.partner").hide(); - } - if (sw_data.relat != 2) { - xoops_smallworld("#partner").show(); - xoops_smallworld("p.partner").show(); - } - xoops_smallworld("select[name=politic] option[value="+sw_data.politic+"]").attr("selected", true); - xoops_smallworld("select[name=religion] option[value="+sw_data.religion+"]").attr("selected", true); - }, - error: function(xhr, status, thrown) {alert(xhr+" "+status+" "+thrown);} + xoops_smallworld.ajax({ + url: smallworld_url+"include/getSelects.php"+ Math.random(), + cache: false, + dataType: "json", + success: function(sw_data) { + xoops_smallworld("select[name=gender] option[value="+sw_data.gender+"]").attr("selected", true); + xoops_smallworld("select[name=relationship] option[value="+sw_data.relat+"]").attr("selected", true); + if (sw_data.relat == 2) { + xoops_smallworld("#partner").hide(); + xoops_smallworld("p.partner").hide(); + } + if (sw_data.relat != 2) { + xoops_smallworld("#partner").show(); + xoops_smallworld("p.partner").show(); + } + xoops_smallworld("select[name=politic] option[value="+sw_data.politic+"]").attr("selected", true); + xoops_smallworld("select[name=religion] option[value="+sw_data.religion+"]").attr("selected", true); + }, + error: function(xhr, status, thrown) { + alert(xhr+" "+status+" "+thrown); + } }); + } }); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dj...@us...> - 2012-02-16 20:41:16
|
Revision: 9004 http://xoops.svn.sourceforge.net/xoops/?rev=9004&view=rev Author: djculex Date: 2012-02-16 20:41:09 +0000 (Thu, 16 Feb 2012) Log Message: ----------- - Bugfix: Friendship requests sometimes show when empty - Bugfix: Get size of avatar function return void on blank.png - Bugfix: Miss count is most active users in admin - Bugfix: Miscount in todays most active users in admin - Change: min mysql set to 5.0.5 instead of 5.0.7 Modified Paths: -------------- XoopsModules/smallworld/trunk/smallworld/admin/index.php XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt XoopsModules/smallworld/trunk/smallworld/include/functions.php XoopsModules/smallworld/trunk/smallworld/js/smallworld.js XoopsModules/smallworld/trunk/smallworld/preloads/core.php XoopsModules/smallworld/trunk/smallworld/xoops_version.php Modified: XoopsModules/smallworld/trunk/smallworld/admin/index.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/admin/index.php 2012-02-16 12:44:19 UTC (rev 9003) +++ XoopsModules/smallworld/trunk/smallworld/admin/index.php 2012-02-16 20:41:09 UTC (rev 9004) @@ -69,7 +69,7 @@ $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) { + while ($i < count($maAllround)) { $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])); @@ -93,7 +93,7 @@ $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(array($maToday))) { + while ($i <= count($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/docs/changelog.txt =================================================================== --- XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt 2012-02-16 12:44:19 UTC (rev 9003) +++ XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt 2012-02-16 20:41:09 UTC (rev 9004) @@ -35,6 +35,12 @@ - Bugfix: removed anoying pop up [object, object] error - Change: adjusted jSon returned from checks +16. February +- Bugfix: Friendship requests sometimes show when empty +- Bugfix: Get size of avatar function return void on blank.png +- Bugfix: Miss count is most active users in admin +- Bugfix: Miscount in todays most active users in admin +- Change: min mysql set to 5.0.5 instead of 5.0.7 ------------------------------ Changelog v.1.10 RC Modified: XoopsModules/smallworld/trunk/smallworld/include/functions.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/include/functions.php 2012-02-16 12:44:19 UTC (rev 9003) +++ XoopsModules/smallworld/trunk/smallworld/include/functions.php 2012-02-16 20:41:09 UTC (rev 9004) @@ -761,8 +761,8 @@ { $bn = basename($url); if ($bn != 'blank.gif' - && $bn != 'blank.png' - && $bn != 'blank.jpg' + || $bn != 'blank.png' + || $bn != 'blank.jpg' ) { if (ini_get('allow_url_fopen')) { Modified: XoopsModules/smallworld/trunk/smallworld/js/smallworld.js =================================================================== --- XoopsModules/smallworld/trunk/smallworld/js/smallworld.js 2012-02-16 12:44:19 UTC (rev 9003) +++ XoopsModules/smallworld/trunk/smallworld/js/smallworld.js 2012-02-16 20:41:09 UTC (rev 9004) @@ -64,6 +64,7 @@ // Function to make friend invitations form into ui dialog xoops_smallworld(function() { + xoops_smallworld('#friendInvitations_box').css('display','none'); if (hasmessages > 0) { if (xoops_smallworld('#friendInvitations_box').length) { // implies *not* zero xoops_smallworld('#friendInvitations_box').show(); @@ -72,12 +73,14 @@ inline:true, onCleanup:function() { xoops_smallworld('#friendInvitations_box').hide(); + xoops_smallworld('#friendInvitations_box').css('display','none'); }, href:"#friendInvitations_box" }); }; xoops_smallworld('#smallworldrequestlink').live('click',function() { //xoops_smallworld('#friendInvitations_box').dialog( "close" ); + xoops_smallworld('#friendInvitations_box').css('display','none'); xoops_smallworld.colorbox.close(); }); } Modified: XoopsModules/smallworld/trunk/smallworld/preloads/core.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/preloads/core.php 2012-02-16 12:44:19 UTC (rev 9003) +++ XoopsModules/smallworld/trunk/smallworld/preloads/core.php 2012-02-16 20:41:09 UTC (rev 9004) @@ -21,104 +21,105 @@ defined('XOOPS_ROOT_PATH') or die('Restricted access'); include_once(XOOPS_ROOT_PATH."/modules/smallworld/class/class_collector.php"); include_once(XOOPS_ROOT_PATH."/modules/smallworld/include/functions.php"); -class SmallworldCorePreload extends XoopsPreloadItem{ - function eventCoreHeaderAddmeta(){ - global $xoTheme,$xoopsUser,$xoopsConfig; - if ($xoopsUser) { - $module_handler =& xoops_gethandler('module'); - $module = $module_handler->getByDirname('smallworld'); - $config_handler =& xoops_gethandler('config'); - if ($module) { - $moduleConfig =& $config_handler->getConfigsByCat(0, $module->getVar('mid')); - } - //Check Language - $lang = $xoopsConfig['language']; - // check geolocation style - if(isset($moduleConfig['geolocate'])) { - $geolocate = $moduleConfig['geolocate']; - } - $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/base/jquery.ui.all.css'); - $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/smallworld.css'); - $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/apprise.css'); - $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery-1.5.1.min.js'); - $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery-ui-1.8.11.custom.js'); - - $xoops_url= XOOPS_URL; - $myid = $xoopsUser->getVar('uid'); - // 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'); - } - // Check if USER is smallworld-registered user - $chkUser = new SmallWorldUser; - $ChkProf = $chkUser->CheckIfProfile($myid); - - // Check if there are requests pending - $count_invit = count($chkUser->getRequests($myid)); - - // Get module config for validation and place in javascript - $validate = $moduleConfig['validationstrenght']; - - // 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 = smallworld_GetModuleOption('smallworldmandatoryfields', $repmodule='smallworld'); - $smallworldUV = implode(',', $useverification); - //echo var_dump($smallworldUV); - - // Get users messages count based on users followerArray - $getUserMsgNum = smallworld_getCountFriendMessagesEtc (); - -$script= <<<SCRIPT - - var smallworld_url="$xoops_url/modules/smallworld/"; - var smallworld_uploaddir = "$xoops_url/uploads/avatars/"; - var xoops_smallworld = jQuery.noConflict(); - var myID = $myid; - var userHasProfile = $ChkProf; - var smallworldTakeOverLinks = $takeoverlinks; - var geoL = $geolocate; - var geocomplete = ''; - var smallworldVerString = "$smallworldUV"; - var smallworlduseverification = new Array(); - smallworlduseverification = smallworldVerString.split(","); - var hasmessages = $count_invit; - var smallworldvalidationstrenght = $validate; - var smallworld_getFriendsMsgComCount = $getUserMsgNum; - var $ = jQuery(); -SCRIPT; - $xoTheme->addScript('','',$script); - $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/smallworld.js'); - $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.validate.js'); - $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.validation.functions.js'); - - $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.stepy.js'); - $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.elastic.source.js'); - $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.countdown.js'); - $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.innerfade.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'); - } - - // Include geolocate styling - if ($geolocate != 1) { - $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/geoname.js'); - $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/geoname_now.js'); - } else { - $xoTheme->addScript("http://maps.google.com/maps/api/js?sensor=false&language="._LANGCODE); - $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/ui.geo_autocomplete.js'); - $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/ui.geo_autocomplete_now.js'); - } +class SmallworldCorePreload extends XoopsPreloadItem +{ + + function eventCoreHeaderAddmeta() + { + global $xoTheme,$xoopsUser,$xoopsConfig; + if ($xoopsUser) { + $module_handler =& xoops_gethandler('module'); + $module = $module_handler->getByDirname('smallworld'); + $config_handler =& xoops_gethandler('config'); + if ($module) { + $moduleConfig =& $config_handler->getConfigsByCat(0, $module->getVar('mid')); + } + //Check Language + $lang = $xoopsConfig['language']; + // check geolocation style + if(isset($moduleConfig['geolocate'])) { + $geolocate = $moduleConfig['geolocate']; + } + $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/base/jquery.ui.all.css'); + $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/smallworld.css'); + $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/apprise.css'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery-1.5.1.min.js'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery-ui-1.8.11.custom.js'); + + $xoops_url= XOOPS_URL; + $myid = $xoopsUser->getVar('uid'); + // 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'); + } - } // End if XoopsUser + // Check if USER is smallworld-registered user + $chkUser = new SmallWorldUser; + $ChkProf = $chkUser->CheckIfProfile($myid); + + // Check if there are requests pending + $count_invit = count($chkUser->getRequests($myid)); + + // Get module config for validation and place in javascript + $validate = $moduleConfig['validationstrenght']; + + // 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 = smallworld_GetModuleOption('smallworldmandatoryfields', $repmodule='smallworld'); + $smallworldUV = implode(',', $useverification); + + // Get users messages count based on users followerArray + $getUserMsgNum = smallworld_getCountFriendMessagesEtc (); + + $script = "var smallworld_url = '" . $xoops_url . "/modules/smallworld/" . "';\n"; + $script .= "var smallworld_uploaddir = '" . $xoops_url . "/uploads/avatars/" . "';\n"; + $script .= "var xoops_smallworld = jQuery.noConflict();\n"; + $script .= "var myID = " . $myid . ";\n"; + $script .= "var userHasProfile = " . $ChkProf . ";\n"; + $script .= "var smallworldTakeOverLinks = " . $takeoverlinks . ";\n"; + $script .= "var geoL = " . $geolocate . ";\n"; + $script .= "var geocomplete = '';\n"; + $script .= "var smallworldVerString = '" . $smallworldUV . "';\n"; + $script .= "var smallworlduseverification = new Array();\n"; + $script .= "smallworlduseverification = smallworldVerString.split(',');\n"; + $script .= "var hasmessages = " . $count_invit . ";\n"; + $script .= "var smallworldvalidationstrenght = " . $validate . ";\n"; + $script .= "var smallworld_getFriendsMsgComCount = " . $getUserMsgNum . ";\n"; + $script .= "var $ = jQuery();\n"; + + $xoTheme->addScript('','',$script); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/smallworld.js'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.validate.js'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.validation.functions.js'); + + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.stepy.js'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.elastic.source.js'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.countdown.js'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.innerfade.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'); + } + + // Include geolocate styling + if ($geolocate != 1) { + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/geoname.js'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/geoname_now.js'); + } else { + $xoTheme->addScript("http://maps.google.com/maps/api/js?sensor=false&language="._LANGCODE); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/ui.geo_autocomplete.js'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/ui.geo_autocomplete_now.js'); + } + + } // End if XoopsUser } function isActive() { Modified: XoopsModules/smallworld/trunk/smallworld/xoops_version.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/xoops_version.php 2012-02-16 12:44:19 UTC (rev 9003) +++ XoopsModules/smallworld/trunk/smallworld/xoops_version.php 2012-02-16 20:41:09 UTC (rev 9004) @@ -36,7 +36,7 @@ $modversion['min_php'] = '5.2'; $modversion['min_xoops'] = '2.5'; $modversion['min_admin'] = '1.1'; -$modversion['min_db'] = array('mysql' => '5.0.7', 'mysqli' => '5.0.7'); +$modversion['min_db'] = array('mysql' => '5.0.5', 'mysqli' => '5.0.5'); $modversion['system_menu'] = 1; $modversion['official'] = 0; $modversion['image'] = "images/smallworld.png"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dj...@us...> - 2012-02-18 19:16:59
|
Revision: 9013 http://xoops.svn.sourceforge.net/xoops/?rev=9013&view=rev Author: djculex Date: 2012-02-18 19:16:52 +0000 (Sat, 18 Feb 2012) Log Message: ----------- - NEW: function to choose random image from uploads and place in update post (djculex) - Bugfix: Added check for preloads javascript vars to see if vars is already defined (djculex) - Bugfix: html_entity_decode is not set in returning image link or post from image uploads (djculex) - Bugfix: Spelling error in english/main.php (tanks -> thanks) (djculex) - Bugfix: on close upload new images do (location.href = 'editimages.php';) instead of index.php - Bugfix: css url() pointing to wrong folder (djculex) - Bugfix: Removed empty <td></td> - Bugfix: moved ui-anim_basic_16x16.gif to ..images/ - Change: Changed update text when upload new images to use image and default uploaded new text (djculex) Modified Paths: -------------- XoopsModules/smallworld/trunk/smallworld/css/smallworld.css XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt XoopsModules/smallworld/trunk/smallworld/docs/credits.txt XoopsModules/smallworld/trunk/smallworld/image_edit_submit.php XoopsModules/smallworld/trunk/smallworld/include/functions.php XoopsModules/smallworld/trunk/smallworld/js/smallworld.js XoopsModules/smallworld/trunk/smallworld/language/english/main.php XoopsModules/smallworld/trunk/smallworld/preloads/core.php XoopsModules/smallworld/trunk/smallworld/templates/smallworld_userprofile_regtemplate.html Added Paths: ----------- XoopsModules/smallworld/trunk/smallworld/images/ui-anim_basic_16x16.gif Modified: XoopsModules/smallworld/trunk/smallworld/css/smallworld.css =================================================================== --- XoopsModules/smallworld/trunk/smallworld/css/smallworld.css 2012-02-18 17:05:36 UTC (rev 9012) +++ XoopsModules/smallworld/trunk/smallworld/css/smallworld.css 2012-02-18 19:16:52 UTC (rev 9013) @@ -628,7 +628,7 @@ /*-------- JqueryUI items ---------*/ .ui-autocomplete-loading { -background: white url('images/ui-anim_basic_16x16.gif') right center no-repeat; +background: white url('../images/ui-anim_basic_16x16.gif') right center no-repeat; } /*-------- Partner search box -------*/ Modified: XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt =================================================================== --- XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt 2012-02-18 17:05:36 UTC (rev 9012) +++ XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt 2012-02-18 19:16:52 UTC (rev 9013) @@ -42,6 +42,18 @@ - Bugfix: Miscount in todays most active users in admin (djculex) - Change: min mysql set to 5.0.5 instead of 5.0.7 (djculex) +18. February +- NEW: function to choose random image from uploads and place in update post (djculex) +- Bugfix: Added check for preloads javascript vars to see if vars is already defined (djculex) +- Bugfix: html_entity_decode is not set in returning image link or post from image uploads (djculex) +- Bugfix: Spelling error in english/main.php (tanks -> thanks) (djculex) +- Bugfix: on close upload new images do (location.href = 'editimages.php';) instead of index.php +- Bugfix: css url() pointing to wrong folder (djculex) +- Bugfix: Removed empty <td></td> +- Bugfix: moved ui-anim_basic_16x16.gif to ..images/ +- Change: Changed update text when upload new images to use image and default uploaded new text (djculex) + + ------------------------------ Changelog v.1.10 RC ------------------------------ Modified: XoopsModules/smallworld/trunk/smallworld/docs/credits.txt =================================================================== --- XoopsModules/smallworld/trunk/smallworld/docs/credits.txt 2012-02-18 17:05:36 UTC (rev 9012) +++ XoopsModules/smallworld/trunk/smallworld/docs/credits.txt 2012-02-18 19:16:52 UTC (rev 9013) @@ -4,7 +4,7 @@ Development first aid for keeping ready for blue move by Mamba -Testing and feedback especially by Mariane, Pavlina & Mamba +Testing and feedback especially by Mariane, Pavlina, Dante7237, Mcron & Mamba Credit also to original plugins that I have moderated to fix this project Modified: XoopsModules/smallworld/trunk/smallworld/image_edit_submit.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/image_edit_submit.php 2012-02-18 17:05:36 UTC (rev 9012) +++ XoopsModules/smallworld/trunk/smallworld/image_edit_submit.php 2012-02-18 19:16:52 UTC (rev 9013) @@ -28,8 +28,14 @@ $userID = $xoopsUser->getVar('uid'); $user = new XoopsUser($userID); $username = $user->getVar('uname'); + $ri = smallworld_getRndImg($userID); + if ($ri != '') { + $riUrl = XOOPS_URL."/uploads/albums_smallworld/".$userID."/".$ri; + } - $update = "........"._SMALLWORLD_UPLOADEDSOMEIMAGES.XOOPS_URL."/modules/smallworld/galleryshow.php?username=".$username; + $update = "........" . _SMALLWORLD_UPLOADEDSOMEIMAGES + . "<br/>".$riUrl; + $upd->Insert_Update($userID, $update); $db->handleImageEdit (); ?> \ No newline at end of file Added: XoopsModules/smallworld/trunk/smallworld/images/ui-anim_basic_16x16.gif =================================================================== (Binary files differ) Property changes on: XoopsModules/smallworld/trunk/smallworld/images/ui-anim_basic_16x16.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Modified: XoopsModules/smallworld/trunk/smallworld/include/functions.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/include/functions.php 2012-02-18 17:05:36 UTC (rev 9012) +++ XoopsModules/smallworld/trunk/smallworld/include/functions.php 2012-02-18 19:16:52 UTC (rev 9013) @@ -233,8 +233,9 @@ '<a href="\\1">lala</a>', $text); $text = preg_replace('/([[:space:]()[{}])(www.[-a-zA-Z0-9@:%_\+.~#?&\/\/=]+)/i', '\\1<img class="smallworldAttImg" src="//\\2"><a class="smallworldAttImgTxt" href="//\\2">'._SMALLWORLD_CLICKIMAGETHUMB.'</a><br>', $text); + $text = html_entity_decode($text,ENT_QUOTES,"UTF-8"); } else { - $text = html_entity_decode($text); + $text = html_entity_decode($text,ENT_QUOTES,"UTF-8"); $text = " " . $text; $text = preg_replace('/(((f|ht){1}tp:\/\/)[-a-zA-Z0-9@:%_\+.~#?&\/\/=]+)/i', '<a href="\\1">\\1</a>', $text); @@ -806,4 +807,25 @@ } else { return ''; } - } \ No newline at end of file + } + + /** + * @do db query for images upload last 5 minutes by spec. userid and return random + * @param int $userid + * @returns string + */ + function smallworld_getRndImg($userid) + { + global $xoopsDB; + $sql = "SELECT imgname FROM " . $xoopsDB->prefix('smallworld_images') . " WHERE userid = " . $userid + . " AND time BETWEEN UNIX_TIMESTAMP( ) - 3000 AND UNIX_TIMESTAMP() ORDER BY rand() limit 1"; + $result = $xoopsDB->queryF($sql); + while ($r = $xoopsDB->fetchArray($result)) { + $img = $r['imgname']; + } + if (!empty($img)) { + return $img; + } else { + return false; + } + } \ No newline at end of file Modified: XoopsModules/smallworld/trunk/smallworld/js/smallworld.js =================================================================== --- XoopsModules/smallworld/trunk/smallworld/js/smallworld.js 2012-02-18 17:05:36 UTC (rev 9012) +++ XoopsModules/smallworld/trunk/smallworld/js/smallworld.js 2012-02-18 19:16:52 UTC (rev 9013) @@ -117,7 +117,7 @@ xoops_smallworld('#file_upload').hide(); }, onClosed:function() { - location.href = 'index.php'; + location.href = 'editimages.php'; }, href:"#file_upload", onComplete : function() { Modified: XoopsModules/smallworld/trunk/smallworld/language/english/main.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/language/english/main.php 2012-02-18 17:05:36 UTC (rev 9012) +++ XoopsModules/smallworld/trunk/smallworld/language/english/main.php 2012-02-18 19:16:52 UTC (rev 9013) @@ -100,7 +100,7 @@ define("_SMALLWORLD_NOTYETUSER_BOXTEXT","In order to use this module, you'll need to fill out an extra profile-form. <br><br>Press ok to continue to registration or press cancel<br><br>to go back to your index page."); define("_SMALLWORLD_NOTYETREGISTERED_TITLE","Continue to finish setup"); -define ("_SMALLWORLD_TEXTBEFORESUBMIT","Continue to save your information to the database.<br><br>After this you are able to visit your page,<br>and other users pages.<br><br>Tank you for your time."); +define ("_SMALLWORLD_TEXTBEFORESUBMIT","Continue to save your information to the database.<br><br>After this you are able to visit your page,<br>and other users pages.<br><br>Thank you for your time."); define("_SMALLWORLD_FRIENDSINVITATIONS","Friendship requests"); define("_SMALLWORLD_DATERECIEVED","Date"); define("_SMALLWORLD_ACCEPT","Accept"); Modified: XoopsModules/smallworld/trunk/smallworld/preloads/core.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/preloads/core.php 2012-02-18 17:05:36 UTC (rev 9012) +++ XoopsModules/smallworld/trunk/smallworld/preloads/core.php 2012-02-18 19:16:52 UTC (rev 9013) @@ -74,24 +74,31 @@ // Get users messages count based on users followerArray $getUserMsgNum = smallworld_getCountFriendMessagesEtc (); - - $script = "var smallworld_url = '" . $xoops_url . "/modules/smallworld/" . "';\n"; - $script .= "var smallworld_uploaddir = '" . $xoops_url . "/uploads/avatars/" . "';\n"; - $script .= "var xoops_smallworld = jQuery.noConflict();\n"; - $script .= "var myID = " . $myid . ";\n"; - $script .= "var userHasProfile = " . $ChkProf . ";\n"; - $script .= "var smallworldTakeOverLinks = " . $takeoverlinks . ";\n"; - $script .= "var geoL = " . $geolocate . ";\n"; - $script .= "var geocomplete = '';\n"; - $script .= "var smallworldVerString = '" . $smallworldUV . "';\n"; - $script .= "var smallworlduseverification = new Array();\n"; - $script .= "smallworlduseverification = smallworldVerString.split(',');\n"; - $script .= "var hasmessages = " . $count_invit . ";\n"; - $script .= "var smallworldvalidationstrenght = " . $validate . ";\n"; - $script .= "var smallworld_getFriendsMsgComCount = " . $getUserMsgNum . ";\n"; - $script .= "var $ = jQuery();\n"; - $xoTheme->addScript('','',$script); + + // Set javascript vars but only if not already defined. + // Check prevents multible loads + $script = "if (myID === undefined) {"."\n"; + $script .= "var smallworld_url = '" . $xoops_url . "/modules/smallworld/" . "';\n"; + $script .= "var smallworld_uploaddir = '" . $xoops_url . "/uploads/avatars/" . "';\n"; + $script .= "var xoops_smallworld = jQuery.noConflict();\n"; + $script .= "var myID = " . $myid . ";\n"; + $script .= "var userHasProfile = " . $ChkProf . ";\n"; + $script .= "var smallworldTakeOverLinks = " . $takeoverlinks . ";\n"; + $script .= "var geoL = " . $geolocate . ";\n"; + $script .= "var geocomplete = '';\n"; + $script .= "var smallworldVerString = '" . $smallworldUV . "';\n"; + $script .= "var smallworlduseverification = new Array();\n"; + $script .= "smallworlduseverification = smallworldVerString.split(',');\n"; + $script .= "var hasmessages = " . $count_invit . ";\n"; + $script .= "var smallworldvalidationstrenght = " . $validate . ";\n"; + $script .= "var smallworld_getFriendsMsgComCount = " . $getUserMsgNum . ";\n"; + $script .= "var $ = jQuery();\n"; + $script .= "} else {"."\n"; + $script .= "\n"; + $script .= "}"."\n"; + $xoTheme->addScript('','',$script); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/smallworld.js'); $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.validate.js'); $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.validation.functions.js'); Modified: XoopsModules/smallworld/trunk/smallworld/templates/smallworld_userprofile_regtemplate.html =================================================================== --- XoopsModules/smallworld/trunk/smallworld/templates/smallworld_userprofile_regtemplate.html 2012-02-18 17:05:36 UTC (rev 9012) +++ XoopsModules/smallworld/trunk/smallworld/templates/smallworld_userprofile_regtemplate.html 2012-02-18 19:16:52 UTC (rev 9013) @@ -217,7 +217,7 @@ <{section name=i loop=$present_country_img}> <{$present_country_img[i]}> <{/section}> - </td><td style="right:2px" id="cityflag"></td> + </td> </div> </tr> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dj...@us...> - 2012-02-20 05:15:22
|
Revision: 9032 http://xoops.svn.sourceforge.net/xoops/?rev=9032&view=rev Author: djculex Date: 2012-02-20 05:15:13 +0000 (Mon, 20 Feb 2012) Log Message: ----------- - NEW: Finished automated message when upload images (showing link, random image from array) (djculex) - Bugfix: Discovered jquery was 1.5.1 -> Updated to 1.7.1 - Bugfix: Jquery 1.7.1 revealed bugs in show more/less on updates (djculex) - Changed: css, jquery for new addions Modified Paths: -------------- XoopsModules/smallworld/trunk/smallworld/css/smallworld.css XoopsModules/smallworld/trunk/smallworld/docs/lang_diff.txt XoopsModules/smallworld/trunk/smallworld/image_edit_submit.php XoopsModules/smallworld/trunk/smallworld/include/functions.php XoopsModules/smallworld/trunk/smallworld/js/smallworld.js XoopsModules/smallworld/trunk/smallworld/language/english/main.php XoopsModules/smallworld/trunk/smallworld/preloads/core.php Removed Paths: ------------- XoopsModules/smallworld/trunk/smallworld/js/jquery-1.5.1.min.js Modified: XoopsModules/smallworld/trunk/smallworld/css/smallworld.css =================================================================== --- XoopsModules/smallworld/trunk/smallworld/css/smallworld.css 2012-02-20 00:45:39 UTC (rev 9031) +++ XoopsModules/smallworld/trunk/smallworld/css/smallworld.css 2012-02-20 05:15:13 UTC (rev 9032) @@ -806,6 +806,17 @@ text-align: center; } +.smallworldUplImgTxt { + font-size: 11px; + position: relative; + text-align: center; +} + +#smallworldUplImgLnk { + display: block; + font-size: 9px; +} + .smallworld_sttext b{ color:#006699; } Modified: XoopsModules/smallworld/trunk/smallworld/docs/lang_diff.txt =================================================================== --- XoopsModules/smallworld/trunk/smallworld/docs/lang_diff.txt 2012-02-20 00:45:39 UTC (rev 9031) +++ XoopsModules/smallworld/trunk/smallworld/docs/lang_diff.txt 2012-02-20 05:15:13 UTC (rev 9032) @@ -15,6 +15,10 @@ + var _smallworldCommentsMoreMore = "..Show more"; + var _smallworldCommentsMoreLess = "..Show less"; +htdocs/modules/smallworld/english/main.php +* _SMALLWORLD_UPLOADEDSOMEIMAGES +* _SMALLWORLD_CLICKIMAGETHUMB + =============================== 2011/12/24: Version 1.00 RC1 =============================== Modified: XoopsModules/smallworld/trunk/smallworld/image_edit_submit.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/image_edit_submit.php 2012-02-20 00:45:39 UTC (rev 9031) +++ XoopsModules/smallworld/trunk/smallworld/image_edit_submit.php 2012-02-20 05:15:13 UTC (rev 9032) @@ -33,8 +33,7 @@ $riUrl = XOOPS_URL."/uploads/albums_smallworld/".$userID."/".$ri; } - $update = "........" . _SMALLWORLD_UPLOADEDSOMEIMAGES - . "<br/>".$riUrl; + $update = "UPLIMAGE" . " " . $riUrl; $upd->Insert_Update($userID, $update); $db->handleImageEdit (); Modified: XoopsModules/smallworld/trunk/smallworld/include/functions.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/include/functions.php 2012-02-20 00:45:39 UTC (rev 9031) +++ XoopsModules/smallworld/trunk/smallworld/include/functions.php 2012-02-20 05:15:13 UTC (rev 9032) @@ -224,16 +224,42 @@ // If url is image link return <img> function smallworld_tolink($text) { + global $xoopsUser; $ext = substr($text,-4,4); $ext2 = substr($text,-5,5); + + $userID = $xoopsUser->getVar('uid'); + $user = new XoopsUser($userID); + $username = $user->getVar('uname'); + $gallery = XOOPS_URL."/modules/smallworld/galleryshow.php?username=".$username; + 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', - '<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<img class="smallworldAttImg" src="//\\2"><a class="smallworldAttImgTxt" href="//\\2">'._SMALLWORLD_CLICKIMAGETHUMB.'</a><br>', $text); - $text = html_entity_decode($text,ENT_QUOTES,"UTF-8"); + if (strpos($text, 'UPLIMAGE') !== false ) { + $text = str_replace('UPLIMAGE', '', $text); + $text = preg_replace('/(((f|ht){1}tp:\/\/)[-a-zA-Z0-9@:%_\+.~#?&\/\/=]+)/i', + '<span class="smallworldUplImgTxt"><br/><img class="smallworldAttImg" src="\\1"><br><br><a id="smallworldUplImgLnk" href="' + . $gallery . '" target="_SELF">' + . $username . _SMALLWORLD_UPLOADEDSOMEIMAGES + . '</a><br></span>', $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<span class="smallworldUplImgTxt"><br/><img class="smallworldAttImg" src="//\\2"><br><br><a id="smallworldUplImgLnk" href="' + . $gallery . '" target="_SELF">' + . $username . _SMALLWORLD_UPLOADEDSOMEIMAGES + . '</a><br></span>', $text + ); + $text = html_entity_decode($text,ENT_QUOTES,"UTF-8"); + } else { + $text = preg_replace('/(((f|ht){1}tp:\/\/)[-a-zA-Z0-9@:%_\+.~#?&\/\/=]+)/i', + '<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<img class="smallworldAttImg" src="//\\2"><a class="smallworldAttImgTxt" href="//\\2">'._SMALLWORLD_CLICKIMAGETHUMB.'</a><br>', $text); + $text = html_entity_decode($text,ENT_QUOTES,"UTF-8"); + } } else { $text = html_entity_decode($text,ENT_QUOTES,"UTF-8"); $text = " " . $text; Deleted: XoopsModules/smallworld/trunk/smallworld/js/jquery-1.5.1.min.js =================================================================== --- XoopsModules/smallworld/trunk/smallworld/js/jquery-1.5.1.min.js 2012-02-20 00:45:39 UTC (rev 9031) +++ XoopsModules/smallworld/trunk/smallworld/js/jquery-1.5.1.min.js 2012-02-20 05:15:13 UTC (rev 9032) @@ -1,16 +0,0 @@ -/*! - * jQuery JavaScript Library v1.5.1 - * http://jquery.com/ - * - * Copyright 2011, John Resig - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * Includes Sizzle.js - * http://sizzlejs.com/ - * Copyright 2011, The Dojo Foundation - * Released under the MIT, BSD, and GPL Licenses. - * - * Date: Wed Feb 23 13:55:29 2011 -0500 - */ -(function(a,b){function cg(a){return d.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cd(a){if(!bZ[a]){var b=d("<"+a+">").appendTo("body"),c=b.css("display");b.remove();if(c==="none"||c==="")c="block";bZ[a]=c}return bZ[a]}function cc(a,b){var c={};d.each(cb.concat.apply([],cb.slice(0,b)),function(){c[this]=a});return c}function bY(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function bX(){try{return new a.XMLHttpRequest}catch(b){}}function bW(){d(a).unload(function(){for(var a in bU)bU[a](0,1)})}function bQ(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var e=a.dataTypes,f={},g,h,i=e.length,j,k=e[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1)for(h in a.converters)typeof h==="string"&&(f[h.toLowerCase()]=a.converters[h]);l=k,k=e[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=f[m]||f["* "+k];if(!n){p=b;for(o in f){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=f[j[1]+" "+k];if(p){o=f[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&d.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function bP(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function bO(a,b,c,e){if(d.isArray(b)&&b.length)d.each(b,function(b,f){c||bq.test(a)?e(a,f):bO(a+"["+(typeof f==="object"||d.isArray(f)?b:"")+"]",f,c,e)});else if(c||b==null||typeof b!=="object")e(a,b);else if(d.isArray(b)||d.isEmptyObject(b))e(a,"");else for(var f in b)bO(a+"["+f+"]",b[f],c,e)}function bN(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bH,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l==="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=bN(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=bN(a,c,d,e,"*",g));return l}function bM(a){return function(b,c){typeof b!=="string"&&(c=b,b="*");if(d.isFunction(c)){var e=b.toLowerCase().split(bB),f=0,g=e.length,h,i,j;for(;f<g;f++)h=e[f],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function bo(a,b,c){var e=b==="width"?bi:bj,f=b==="width"?a.offsetWidth:a.offsetHeight;if(c==="border")return f;d.each(e,function(){c||(f-=parseFloat(d.css(a,"padding"+this))||0),c==="margin"?f+=parseFloat(d.css(a,"margin"+this))||0:f-=parseFloat(d.css(a,"border"+this+"Width"))||0});return f}function ba(a,b){b.src?d.ajax({url:b.src,async:!1,dataType:"script"}):d.globalEval(b.text||b.textContent||b.innerHTML||""),b.parentNode&&b.parentNode.removeChild(b)}function _(a){return"getElementsByTagName"in a?a.getElementsByTagName("*"):"querySelectorAll"in a?a.querySelectorAll("*"):[]}function $(a,b){if(b.nodeType===1){var c=b.nodeName.toLowerCase();b.clearAttributes(),b.mergeAttributes(a);if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(d.expando)}}function Z(a,b){if(b.nodeType===1&&d.hasData(a)){var c=d.expando,e=d.data(a),f=d.data(b,e);if(e=e[c]){var g=e.events;f=f[c]=d.extend({},e);if(g){delete f.handle,f.events={};for(var h in g)for(var i=0,j=g[h].length;i<j;i++)d.event.add(b,h+(g[h][i].namespace?".":"")+g[h][i].namespace,g[h][i],g[h][i].data)}}}}function Y(a,b){return d.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function O(a,b,c){if(d.isFunction(b))return d.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return d.grep(a,function(a,d){return a===b===c});if(typeof b==="string"){var e=d.grep(a,function(a){return a.nodeType===1});if(J.test(b))return d.filter(b,e,!c);b=d.filter(b,e)}return d.grep(a,function(a,e){return d.inArray(a,b)>=0===c})}function N(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function F(a,b){return(a&&a!=="*"?a+".":"")+b.replace(r,"`").replace(s,"&")}function E(a){var b,c,e,f,g,h,i,j,k,l,m,n,o,q=[],r=[],s=d._data(this,"events");if(a.liveFired!==this&&s&&s.live&&!a.target.disabled&&(!a.button||a.type!=="click")){a.namespace&&(n=new RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)")),a.liveFired=this;var t=s.live.slice(0);for(i=0;i<t.length;i++)g=t[i],g.origType.replace(p,"")===a.type?r.push(g.selector):t.splice(i--,1);f=d(a.target).closest(r,a.currentTarget);for(j=0,k=f.length;j<k;j++){m=f[j];for(i=0;i<t.length;i++){g=t[i];if(m.selector===g.selector&&(!n||n.test(g.namespace))&&!m.elem.disabled){h=m.elem,e=null;if(g.preType==="mouseenter"||g.preType==="mouseleave")a.type=g.preType,e=d(a.relatedTarget).closest(g.selector)[0];(!e||e!==h)&&q.push({elem:h,handleObj:g,level:m.level})}}}for(j=0,k=q.length;j<k;j++){f=q[j];if(c&&f.level>c)break;a.currentTarget=f.elem,a.data=f.handleObj.data,a.handleObj=f.handleObj,o=f.handleObj.origHandler.apply(f.elem,arguments);if(o===!1||a.isPropagationStopped()){c=f.level,o===!1&&(b=!1);if(a.isImmediatePropagationStopped())break}}return b}}function C(a,c,e){var f=d.extend({},e[0]);f.type=a,f.originalEvent={},f.liveFired=b,d.event.handle.call(c,f),f.isDefaultPrevented()&&e[0].preventDefault()}function w(){return!0}function v(){return!1}function g(a){for(var b in a)if(b!=="toJSON")return!1;return!0}function f(a,c,f){if(f===b&&a.nodeType===1){f=a.getAttribute("data-"+c);if(typeof f==="string"){try{f=f==="true"?!0:f==="false"?!1:f==="null"?null:d.isNaN(f)?e.test(f)?d.parseJSON(f):f:parseFloat(f)}catch(g){}d.data(a,c,f)}else f=b}return f}var c=a.document,d=function(){function I(){if(!d.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(I,1);return}d.ready()}}var d=function(a,b){return new d.fn.init(a,b,g)},e=a.jQuery,f=a.$,g,h=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,i=/\S/,j=/^\s+/,k=/\s+$/,l=/\d/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=navigator.userAgent,w,x=!1,y,z="then done fail isResolved isRejected promise".split(" "),A,B=Object.prototype.toString,C=Object.prototype.hasOwnProperty,D=Array.prototype.push,E=Array.prototype.slice,F=String.prototype.trim,G=Array.prototype.indexOf,H={};d.fn=d.prototype={constructor:d,init:function(a,e,f){var g,i,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!e&&c.body){this.context=c,this[0]=c.body,this.selector="body",this.length=1;return this}if(typeof a==="string"){g=h.exec(a);if(!g||!g[1]&&e)return!e||e.jquery?(e||f).find(a):this.constructor(e).find(a);if(g[1]){e=e instanceof d?e[0]:e,k=e?e.ownerDocument||e:c,j=m.exec(a),j?d.isPlainObject(e)?(a=[c.createElement(j[1])],d.fn.attr.call(a,e,!0)):a=[k.createElement(j[1])]:(j=d.buildFragment([g[1]],[k]),a=(j.cacheable?d.clone(j.fragment):j.fragment).childNodes);return d.merge(this,a)}i=c.getElementById(g[2]);if(i&&i.parentNode){if(i.id!==g[2])return f.find(a);this.length=1,this[0]=i}this.context=c,this.selector=a;return this}if(d.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return d.makeArray(a,this)},selector:"",jquery:"1.5.1",length:0,size:function(){return this.length},toArray:function(){return E.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var e=this.constructor();d.isArray(a)?D.apply(e,a):d.merge(e,a),e.prevObject=this,e.context=this.context,b==="find"?e.selector=this.selector+(this.selector?" ":"")+c:b&&(e.selector=this.selector+"."+b+"("+c+")");return e},each:function(a,b){return d.each(this,a,b)},ready:function(a){d.bindReady(),y.done(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(E.apply(this,arguments),"slice",E.call(arguments).join(","))},map:function(a){return this.pushStack(d.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:D,sort:[].sort,splice:[].splice},d.fn.init.prototype=d.fn,d.extend=d.fn.extend=function(){var a,c,e,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i==="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!=="object"&&!d.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j<k;j++)if((a=arguments[j])!=null)for(c in a){e=i[c],f=a[c];if(i===f)continue;l&&f&&(d.isPlainObject(f)||(g=d.isArray(f)))?(g?(g=!1,h=e&&d.isArray(e)?e:[]):h=e&&d.isPlainObject(e)?e:{},i[c]=d.extend(l,h,f)):f!==b&&(i[c]=f)}return i},d.extend({noConflict:function(b){a.$=f,b&&(a.jQuery=e);return d},isReady:!1,readyWait:1,ready:function(a){a===!0&&d.readyWait--;if(!d.readyWait||a!==!0&&!d.isReady){if(!c.body)return setTimeout(d.ready,1);d.isReady=!0;if(a!==!0&&--d.readyWait>0)return;y.resolveWith(c,[d]),d.fn.trigger&&d(c).trigger("ready").unbind("ready")}},bindReady:function(){if(!x){x=!0;if(c.readyState==="complete")return setTimeout(d.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",A,!1),a.addEventListener("load",d.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",A),a.attachEvent("onload",d.ready);var b=!1;try{b=a.frameElement==null}catch(e){}c.documentElement.doScroll&&b&&I()}}},isFunction:function(a){return d.type(a)==="function"},isArray:Array.isArray||function(a){return d.type(a)==="array"},isWindow:function(a){return a&&typeof a==="object"&&"setInterval"in a},isNaN:function(a){return a==null||!l.test(a)||isNaN(a)},type:function(a){return a==null?String(a):H[B.call(a)]||"object"},isPlainObject:function(a){if(!a||d.type(a)!=="object"||a.nodeType||d.isWindow(a))return!1;if(a.constructor&&!C.call(a,"constructor")&&!C.call(a.constructor.prototype,"isPrototypeOf"))return!1;var c;for(c in a){}return c===b||C.call(a,c)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw a},parseJSON:function(b){if(typeof b!=="string"||!b)return null;b=d.trim(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return a.JSON&&a.JSON.parse?a.JSON.parse(b):(new Function("return "+b))();d.error("Invalid JSON: "+b)},parseXML:function(b,c,e){a.DOMParser?(e=new DOMParser,c=e.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b)),e=c.documentElement,(!e||!e.nodeName||e.nodeName==="parsererror")&&d.error("Invalid XML: "+b);return c},noop:function(){},globalEval:function(a){if(a&&i.test(a)){var b=c.head||c.getElementsByTagName("head")[0]||c.documentElement,e=c.createElement("script");d.support.scriptEval()?e.appendChild(c.createTextNode(a)):e.text=a,b.insertBefore(e,b.firstChild),b.removeChild(e)}},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,e){var f,g=0,h=a.length,i=h===b||d.isFunction(a);if(e){if(i){for(f in a)if(c.apply(a[f],e)===!1)break}else for(;g<h;)if(c.apply(a[g++],e)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(var j=a[0];g<h&&c.call(j,g,j)!==!1;j=a[++g]){}return a},trim:F?function(a){return a==null?"":F.call(a)}:function(a){return a==null?"":(a+"").replace(j,"").replace(k,"")},makeArray:function(a,b){var c=b||[];if(a!=null){var e=d.type(a);a.length==null||e==="string"||e==="function"||e==="regexp"||d.isWindow(a)?D.call(c,a):d.merge(c,a)}return c},inArray:function(a,b){if(b.indexOf)return b.indexOf(a);for(var c=0,d=b.length;c<d;c++)if(b[c]===a)return c;return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length==="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];a.length=d;return a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,b,c){var d=[],e;for(var f=0,g=a.length;f<g;f++)e=b(a[f],f,c),e!=null&&(d[d.length]=e);return d.concat.apply([],d)},guid:1,proxy:function(a,c,e){arguments.length===2&&(typeof c==="string"?(e=a,a=e[c],c=b):c&&!d.isFunction(c)&&(e=c,c=b)),!c&&a&&(c=function(){return a.apply(e||this,arguments)}),a&&(c.guid=a.guid=a.guid||c.guid||d.guid++);return c},access:function(a,c,e,f,g,h){var i=a.length;if(typeof c==="object"){for(var j in c)d.access(a,j,c[j],f,g,e);return a}if(e!==b){f=!h&&f&&d.isFunction(e);for(var k=0;k<i;k++)g(a[k],c,f?e.call(a[k],k,g(a[k],c)):e,h);return a}return i?g(a[0],c):b},now:function(){return(new Date).getTime()},_Deferred:function(){var a=[],b,c,e,f={done:function(){if(!e){var c=arguments,g,h,i,j,k;b&&(k=b,b=0);for(g=0,h=c.length;g<h;g++)i=c[g],j=d.type(i),j==="array"?f.done.apply(f,i):j==="function"&&a.push(i);k&&f.resolveWith(k[0],k[1])}return this},resolveWith:function(d,f){if(!e&&!b&&!c){c=1;try{while(a[0])a.shift().apply(d,f)}catch(g){throw g}finally{b=[d,f],c=0}}return this},resolve:function(){f.resolveWith(d.isFunction(this.promise)?this.promise():this,arguments);return this},isResolved:function(){return c||b},cancel:function(){e=1,a=[];return this}};return f},Deferred:function(a){var b=d._Deferred(),c=d._Deferred(),e;d.extend(b,{then:function(a,c){b.done(a).fail(c);return this},fail:c.done,rejectWith:c.resolveWith,reject:c.resolve,isRejected:c.isResolved,promise:function(a){if(a==null){if(e)return e;e=a={}}var c=z.length;while(c--)a[z[c]]=b[z[c]];return a}}),b.done(c.cancel).fail(b.cancel),delete b.cancel,a&&a.call(b,b);return b},when:function(a){var b=arguments.length,c=b<=1&&a&&d.isFunction(a.promise)?a:d.Deferred(),e=c.promise();if(b>1){var f=E.call(arguments,0),g=b,h=function(a){return function(b){f[a]=arguments.length>1?E.call(arguments,0):b,--g||c.resolveWith(e,f)}};while(b--)a=f[b],a&&d.isFunction(a.promise)?a.promise().then(h(b),c.reject):--g;g||c.resolveWith(e,f)}else c!==a&&c.resolve(a);return e},uaMatch:function(a){a=a.toLowerCase();var b=r.exec(a)||s.exec(a)||t.exec(a)||a.indexOf("compatible")<0&&u.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}d.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.subclass=this.subclass,a.fn.init=function b(b,c){c&&c instanceof d&&!(c instanceof a)&&(c=a(c));return d.fn.init.call(this,b,c,e)},a.fn.init.prototype=a.fn;var e=a(c);return a},browser:{}}),y=d._Deferred(),d.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){H["[object "+b+"]"]=b.toLowerCase()}),w=d.uaMatch(v),w.browser&&(d.browser[w.browser]=!0,d.browser.version=w.version),d.browser.webkit&&(d.browser.safari=!0),G&&(d.inArray=function(a,b){return G.call(b,a)}),i.test(" ")&&(j=/^[\s\xA0]+/,k=/[\s\xA0]+$/),g=d(c),c.addEventListener?A=function(){c.removeEventListener("DOMContentLoaded",A,!1),d.ready()}:c.attachEvent&&(A=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",A),d.ready())});return d}();(function(){d.support={};var b=c.createElement("div");b.style.display="none",b.innerHTML=" <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";var e=b.getElementsByTagName("*"),f=b.getElementsByTagName("a")[0],g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=b.getElementsByTagName("input")[0];if(e&&e.length&&f){d.support={leadingWhitespace:b.firstChild.nodeType===3,tbody:!b.getElementsByTagName("tbody").length,htmlSerialize:!!b.getElementsByTagName("link").length,style:/red/.test(f.getAttribute("style")),hrefNormalized:f.getAttribute("href")==="/a",opacity:/^0.55$/.test(f.style.opacity),cssFloat:!!f.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,deleteExpando:!0,optDisabled:!1,checkClone:!1,noCloneEvent:!0,noCloneChecked:!0,boxModel:null,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableHiddenOffsets:!0},i.checked=!0,d.support.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,d.support.optDisabled=!h.disabled;var j=null;d.support.scriptEval=function(){if(j===null){var b=c.documentElement,e=c.createElement("script"),f="script"+d.now();try{e.appendChild(c.createTextNode("window."+f+"=1;"))}catch(g){}b.insertBefore(e,b.firstChild),a[f]?(j=!0,delete a[f]):j=!1,b.removeChild(e),b=e=f=null}return j};try{delete b.test}catch(k){d.support.deleteExpando=!1}!b.addEventListener&&b.attachEvent&&b.fireEvent&&(b.attachEvent("onclick",function l(){d.support.noCloneEvent=!1,b.detachEvent("onclick",l)}),b.cloneNode(!0).fireEvent("onclick")),b=c.createElement("div"),b.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";var m=c.createDocumentFragment();m.appendChild(b.firstChild),d.support.checkClone=m.cloneNode(!0).cloneNode(!0).lastChild.checked,d(function(){var a=c.createElement("div"),b=c.getElementsByTagName("body")[0];if(b){a.style.width=a.style.paddingLeft="1px",b.appendChild(a),d.boxModel=d.support.boxModel=a.offsetWidth===2,"zoom"in a.style&&(a.style.display="inline",a.style.zoom=1,d.support.inlineBlockNeedsLayout=a.offsetWidth===2,a.style.display="",a.innerHTML="<div style='width:4px;'></div>",d.support.shrinkWrapBlocks=a.offsetWidth!==2),a.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>";var e=a.getElementsByTagName("td");d.support.reliableHiddenOffsets=e[0].offsetHeight===0,e[0].style.display="",e[1].style.display="none",d.support.reliableHiddenOffsets=d.support.reliableHiddenOffsets&&e[0].offsetHeight===0,a.innerHTML="",b.removeChild(a).style.display="none",a=e=null}});var n=function(a){var b=c.createElement("div");a="on"+a;if(!b.attachEvent)return!0;var d=a in b;d||(b.setAttribute(a,"return;"),d=typeof b[a]==="function"),b=null;return d};d.support.submitBubbles=n("submit"),d.support.changeBubbles=n("change"),b=e=f=null}})();var e=/^(?:\{.*\}|\[.*\])$/;d.extend({cache:{},uuid:0,expando:"jQuery"+(d.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?d.cache[a[d.expando]]:a[d.expando];return!!a&&!g(a)},data:function(a,c,e,f){if(d.acceptData(a)){var g=d.expando,h=typeof c==="string",i,j=a.nodeType,k=j?d.cache:a,l=j?a[d.expando]:a[d.expando]&&d.expando;if((!l||f&&l&&!k[l][g])&&h&&e===b)return;l||(j?a[d.expando]=l=++d.uuid:l=d.expando),k[l]||(k[l]={},j||(k[l].toJSON=d.noop));if(typeof c==="object"||typeof c==="function")f?k[l][g]=d.extend(k[l][g],c):k[l]=d.extend(k[l],c);i=k[l],f&&(i[g]||(i[g]={}),i=i[g]),e!==b&&(i[c]=e);if(c==="events"&&!i[c])return i[g]&&i[g].events;return h?i[c]:i}},removeData:function(b,c,e){if(d.acceptData(b)){var f=d.expando,h=b.nodeType,i=h?d.cache:b,j=h?b[d.expando]:d.expando;if(!i[j])return;if(c){var k=e?i[j][f]:i[j];if(k){delete k[c];if(!g(k))return}}if(e){delete i[j][f];if(!g(i[j]))return}var l=i[j][f];d.support.deleteExpando||i!=a?delete i[j]:i[j]=null,l?(i[j]={},h||(i[j].toJSON=d.noop),i[j][f]=l):h&&(d.support.deleteExpando?delete b[d.expando]:b.removeAttribute?b.removeAttribute(d.expando):b[d.expando]=null)}},_data:function(a,b,c){return d.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=d.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),d.fn.extend({data:function(a,c){var e=null;if(typeof a==="undefined"){if(this.length){e=d.data(this[0]);if(this[0].nodeType===1){var g=this[0].attributes,h;for(var i=0,j=g.length;i<j;i++)h=g[i].name,h.indexOf("data-")===0&&(h=h.substr(5),f(this[0],h,e[h]))}}return e}if(typeof a==="object")return this.each(function(){d.data(this,a)});var k=a.split(".");k[1]=k[1]?"."+k[1]:"";if(c===b){e=this.triggerHandler("getData"+k[1]+"!",[k[0]]),e===b&&this.length&&(e=d.data(this[0],a),e=f(this[0],a,e));return e===b&&k[1]?this.data(k[0]):e}return this.each(function(){var b=d(this),e=[k[0],c];b.triggerHandler("setData"+k[1]+"!",e),d.data(this,a,c),b.triggerHandler("changeData"+k[1]+"!",e)})},removeData:function(a){return this.each(function(){d.removeData(this,a)})}}),d.extend({queue:function(a,b,c){if(a){b=(b||"fx")+"queue";var e=d._data(a,b);if(!c)return e||[];!e||d.isArray(c)?e=d._data(a,b,d.makeArray(c)):e.push(c);return e}},dequeue:function(a,b){b=b||"fx";var c=d.queue(a,b),e=c.shift();e==="inprogress"&&(e=c.shift()),e&&(b==="fx"&&c.unshift("inprogress"),e.call(a,function(){d.dequeue(a,b)})),c.length||d.removeData(a,b+"queue",!0)}}),d.fn.extend({queue:function(a,c){typeof a!=="string"&&(c=a,a="fx");if(c===b)return d.queue(this[0],a);return this.each(function(b){var e=d.queue(this,a,c);a==="fx"&&e[0]!=="inprogress"&&d.dequeue(this,a)})},dequeue:function(a){return this.each(function(){d.dequeue(this,a)})},delay:function(a,b){a=d.fx?d.fx.speeds[a]||a:a,b=b||"fx";return this.queue(b,function(){var c=this;setTimeout(function(){d.dequeue(c,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var h=/[\n\t\r]/g,i=/\s+/,j=/\r/g,k=/^(?:href|src|style)$/,l=/^(?:button|input)$/i,m=/^(?:button|input|object|select|textarea)$/i,n=/^a(?:rea)?$/i,o=/^(?:radio|checkbox)$/i;d.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"},d.fn.extend({attr:function(a,b){return d.access(this,a,b,!0,d.attr)},removeAttr:function(a,b){return this.each(function(){d.attr(this,a,""),this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(d.isFunction(a))return this.each(function(b){var c=d(this);c.addClass(a.call(this,b,c.attr("class")))});if(a&&typeof a==="string"){var b=(a||"").split(i);for(var c=0,e=this.length;c<e;c++){var f=this[c];if(f.nodeType===1)if(f.className){var g=" "+f.className+" ",h=f.className;for(var j=0,k=b.length;j<k;j++)g.indexOf(" "+b[j]+" ")<0&&(h+=" "+b[j]);f.className=d.trim(h)}else f.className=a}}return this},removeClass:function(a){if(d.isFunction(a))return this.each(function(b){var c=d(this);c.removeClass(a.call(this,b,c.attr("class")))});if(a&&typeof a==="string"||a===b){var c=(a||"").split(i);for(var e=0,f=this.length;e<f;e++){var g=this[e];if(g.nodeType===1&&g.className)if(a){var j=(" "+g.className+" ").replace(h," ");for(var k=0,l=c.length;k<l;k++)j=j.replace(" "+c[k]+" "," ");g.className=d.trim(j)}else g.className=""}}return this},toggleClass:function(a,b){var c=typeof a,e=typeof b==="boolean";if(d.isFunction(a))return this.each(function(c){var e=d(this);e.toggleClass(a.call(this,c,e.attr("class"),b),b)});return this.each(function(){if(c==="string"){var f,g=0,h=d(this),j=b,k=a.split(i);while(f=k[g++])j=e?j:!h.hasClass(f),h[j?"addClass":"removeClass"](f)}else if(c==="undefined"||c==="boolean")this.className&&d._data(this,"__className__",this.className),this.className=this.className||a===!1?"":d._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ";for(var c=0,d=this.length;c<d;c++)if((" "+this[c].className+" ").replace(h," ").indexOf(b)>-1)return!0;return!1},val:function(a){if(!arguments.length){var c=this[0];if(c){if(d.nodeName(c,"option")){var e=c.attributes.value;return!e||e.specified?c.value:c.text}if(d.nodeName(c,"select")){var f=c.selectedIndex,g=[],h=c.options,i=c.type==="select-one";if(f<0)return null;for(var k=i?f:0,l=i?f+1:h.length;k<l;k++){var m=h[k];if(m.selected&&(d.support.optDisabled?!m.disabled:m.getAttribute("disabled")===null)&&(!m.parentNode.disabled||!d.nodeName(m.parentNode,"optgroup"))){a=d(m).val();if(i)return a;g.push(a)}}if(i&&!g.length&&h.length)return d(h[f]).val();return g}if(o.test(c.type)&&!d.support.checkOn)return c.getAttribute("value")===null?"on":c.value;return(c.value||"").replace(j,"")}return b}var n=d.isFunction(a);return this.each(function(b){var c=d(this),e=a;if(this.nodeType===1){n&&(e=a.call(this,b,c.val())),e==null?e="":typeof e==="number"?e+="":d.isArray(e)&&(e=d.map(e,function(a){return a==null?"":a+""}));if(d.isArray(e)&&o.test(this.type))this.checked=d.inArray(c.val(),e)>=0;else if(d.nodeName(this,"select")){var f=d.makeArray(e);d("option",this).each(function(){this.selected=d.inArray(d(this).val(),f)>=0}),f.length||(this.selectedIndex=-1)}else this.value=e}})}}),d.extend({attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,e,f){if(!a||a.nodeType===3||a.nodeType===8||a.nodeType===2)return b;if(f&&c in d.attrFn)return d(a)[c](e);var g=a.nodeType!==1||!d.isXMLDoc(a),h=e!==b;c=g&&d.props[c]||c;if(a.nodeType===1){var i=k.test(c);if(c==="selected"&&!d.support.optSelected){var j=a.parentNode;j&&(j.selectedIndex,j.parentNode&&j.parentNode.selectedIndex)}if((c in a||a[c]!==b)&&g&&!i){h&&(c==="type"&&l.test(a.nodeName)&&a.parentNode&&d.error("type property can't be changed"),e===null?a.nodeType===1&&a.removeAttribute(c):a[c]=e);if(d.nodeName(a,"form")&&a.getAttributeNode(c))return a.getAttributeNode(c).nodeValue;if(c==="tabIndex"){var o=a.getAttributeNode("tabIndex");return o&&o.specified?o.value:m.test(a.nodeName)||n.test(a.nodeName)&&a.href?0:b}return a[c]}if(!d.support.style&&g&&c==="style"){h&&(a.style.cssText=""+e);return a.style.cssText}h&&a.setAttribute(c,""+e);if(!a.attributes[c]&&(a.hasAttribute&&!a.hasAttribute(c)))return b;var p=!d.support.hrefNormalized&&g&&i?a.getAttribute(c,2):a.getAttribute(c);return p===null?b:p}h&&(a[c]=e);return a[c]}});var p=/\.(.*)$/,q=/^(?:textarea|input|select)$/i,r=/\./g,s=/ /g,t=/[^\w\s.|`]/g,u=function(a){return a.replace(t,"\\$&")};d.event={add:function(c,e,f,g){if(c.nodeType!==3&&c.nodeType!==8){try{d.isWindow(c)&&(c!==a&&!c.frameElement)&&(c=a)}catch(h){}if(f===!1)f=v;else if(!f)return;var i,j;f.handler&&(i=f,f=i.handler),f.guid||(f.guid=d.guid++);var k=d._data(c);if(!k)return;var l=k.events,m=k.handle;l||(k.events=l={}),m||(k.handle=m=function(){return typeof d!=="undefined"&&!d.event.triggered?d.event.handle.apply(m.elem,arguments):b}),m.elem=c,e=e.split(" ");var n,o=0,p;while(n=e[o++]){j=i?d.extend({},i):{handler:f,data:g},n.indexOf(".")>-1?(p=n.split("."),n=p.shift(),j.namespace=p.slice(0).sort().join(".")):(p=[],j.namespace=""),j.type=n,j.guid||(j.guid=f.guid);var q=l[n],r=d.event.special[n]||{};if(!q){q=l[n]=[];if(!r.setup||r.setup.call(c,g,p,m)===!1)c.addEventListener?c.addEventListener(n,m,!1):c.attachEvent&&c.attachEvent("on"+n,m)}r.add&&(r.add.call(c,j),j.handler.guid||(j.handler.guid=f.guid)),q.push(j),d.event.global[n]=!0}c=null}},global:{},remove:function(a,c,e,f){if(a.nodeType!==3&&a.nodeType!==8){e===!1&&(e=v);var g,h,i,j,k=0,l,m,n,o,p,q,r,s=d.hasData(a)&&d._data(a),t=s&&s.events;if(!s||!t)return;c&&c.type&&(e=c.handler,c=c.type);if(!c||typeof c==="string"&&c.charAt(0)==="."){c=c||"";for(h in t)d.event.remove(a,h+c);return}c=c.split(" ");while(h=c[k++]){r=h,q=null,l=h.indexOf(".")<0,m=[],l||(m=h.split("."),h=m.shift(),n=new RegExp("(^|\\.)"+d.map(m.slice(0).sort(),u).join("\\.(?:.*\\.)?")+"(\\.|$)")),p=t[h];if(!p)continue;if(!e){for(j=0;j<p.length;j++){q=p[j];if(l||n.test(q.namespace))d.event.remove(a,r,q.handler,j),p.splice(j--,1)}continue}o=d.event.special[h]||{};for(j=f||0;j<p.length;j++){q=p[j];if(e.guid===q.guid){if(l||n.test(q.namespace))f==null&&p.splice(j--,1),o.remove&&o.remove.call(a,q);if(f!=null)break}}if(p.length===0||f!=null&&p.length===1)(!o.teardown||o.teardown.call(a,m)===!1)&&d.removeEvent(a,h,s.handle),g=null,delete t[h]}if(d.isEmptyObject(t)){var w=s.handle;w&&(w.elem=null),delete s.events,delete s.handle,d.isEmptyObject(s)&&d.removeData(a,b,!0)}}},trigger:function(a,c,e){var f=a.type||a,g=arguments[3];if(!g){a=typeof a==="object"?a[d.expando]?a:d.extend(d.Event(f),a):d.Event(f),f.indexOf("!")>=0&&(a.type=f=f.slice(0,-1),a.exclusive=!0),e||(a.stopPropagation(),d.event.global[f]&&d.each(d.cache,function(){var b=d.expando,e=this[b];e&&e.events&&e.events[f]&&d.event.trigger(a,c,e.handle.elem)}));if(!e||e.nodeType===3||e.nodeType===8)return b;a.result=b,a.target=e,c=d.makeArray(c),c.unshift(a)}a.currentTarget=e;var h=d._data(e,"handle");h&&h.apply(e,c);var i=e.parentNode||e.ownerDocument;try{e&&e.nodeName&&d.noData[e.nodeName.toLowerCase()]||e["on"+f]&&e["on"+f].apply(e,c)===!1&&(a.result=!1,a.preventDefault())}catch(j){}if(!a.isPropagationStopped()&&i)d.event.trigger(a,c,i,!0);else if(!a.isDefaultPrevented()){var k,l=a.target,m=f.replace(p,""),n=d.nodeName(l,"a")&&m==="click",o=d.event.special[m]||{};if((!o._default||o._default.call(e,a)===!1)&&!n&&!(l&&l.nodeName&&d.noData[l.nodeName.toLowerCase()])){try{l[m]&&(k=l["on"+m],k&&(l["on"+m]=null),d.event.triggered=!0,l[m]())}catch(q){}k&&(l["on"+m]=k),d.event.triggered=!1}}},handle:function(c){var e,f,g,h,i,j=[],k=d.makeArray(arguments);c=k[0]=d.event.fix(c||a.event),c.currentTarget=this,e=c.type.indexOf(".")<0&&!c.exclusive,e||(g=c.type.split("."),c.type=g.shift(),j=g.slice(0).sort(),h=new RegExp("(^|\\.)"+j.join("\\.(?:.*\\.)?")+"(\\.|$)")),c.namespace=c.namespace||j.join("."),i=d._data(this,"events"),f=(i||{})[c.type];if(i&&f){f=f.slice(0);for(var l=0,m=f.length;l<m;l++){var n=f[l];if(e||h.test(n.namespace)){c.handler=n.handler,c.data=n.data,c.handleObj=n;var o=n.handler.apply(this,k);o!==b&&(c.result=o,o===!1&&(c.preventDefault(),c.stopPropagation()));if(c.isImmediatePropagationStopped())break}}}return c.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(a){if(a[d.expando])return a;var e=a;a=d.Event(e);for(var f=this.props.length,g;f;)g=this.props[--f],a[g]=e[g];a.target||(a.target=a.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),!a.relatedTarget&&a.fromElement&&(a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement);if(a.pageX==null&&a.clientX!=null){var h=c.documentElement,i=c.body;a.pageX=a.clientX+(h&&h.scrollLeft||i&&i.scrollLeft||0)-(h&&h.clientLeft||i&&i.clientLeft||0),a.pageY=a.clientY+(h&&h.scrollTop||i&&i.scrollTop||0)-(h&&h.clientTop||i&&i.clientTop||0)}a.which==null&&(a.charCode!=null||a.keyCode!=null)&&(a.which=a.charCode!=null?a.charCode:a.keyCode),!a.metaKey&&a.ctrlKey&&(a.metaKey=a.ctrlKey),!a.which&&a.button!==b&&(a.which=a.button&1?1:a.button&2?3:a.button&4?2:0);return a},guid:1e8,proxy:d.proxy,special:{ready:{setup:d.bindReady,teardown:d.noop},live:{add:function(a){d.event.add(this,F(a.origType,a.selector),d.extend({},a,{handler:E,guid:a.handler.guid}))},remove:function(a){d.event.remove(this,F(a.origType,a.selector),a)}},beforeunload:{setup:function(a,b,c){d.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}}},d.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},d.Event=function(a){if(!this.preventDefault)return new d.Event(a);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?w:v):this.type=a,this.timeStamp=d.now(),this[d.expando]=!0},d.Event.prototype={preventDefault:function(){this.isDefaultPrevented=w;var a=this.originalEvent;a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=w;var a=this.originalEvent;a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=w,this.stopPropagation()},isDefaultPrevented:v,isPropagationStopped:v,isImmediatePropagationStopped:v};var x=function(a){var b=a.relatedTarget;try{if(b!==c&&!b.parentNode)return;while(b&&b!==this)b=b.parentNode;b!==this&&(a.type=a.data,d.event.handle.apply(this,arguments))}catch(e){}},y=function(a){a.type=a.data,d.event.handle.apply(this,arguments)};d.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){d.event.special[a]={setup:function(c){d.event.add(this,b,c&&c.selector?y:x,a)},teardown:function(a){d.event.remove(this,b,a&&a.selector?y:x)}}}),d.support.submitBubbles||(d.event.special.submit={setup:function(a,b){if(this.nodeName&&this.nodeName.toLowerCase()!=="form")d.event.add(this,"click.specialSubmit",function(a){var b=a.target,c=b.type;(c==="submit"||c==="image")&&d(b).closest("form").length&&C("submit",this,arguments)}),d.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,c=b.type;(c==="text"||c==="password")&&d(b).closest("form").length&&a.keyCode===13&&C("submit",this,arguments)});else return!1},teardown:function(a){d.event.remove(this,".specialSubmit")}});if(!d.support.changeBubbles){var z,A=function(a){var b=a.type,c=a.value;b==="radio"||b==="checkbox"?c=a.checked:b==="select-multiple"?c=a.selectedIndex>-1?d.map(a.options,function(a){return a.selected}).join("-"):"":a.nodeName.toLowerCase()==="select"&&(c=a.selectedIndex);return c},B=function B(a){var c=a.target,e,f;if(q.test(c.nodeName)&&!c.readOnly){e=d._data(c,"_change_data"),f=A(c),(a.type!=="focusout"||c.type!=="radio")&&d._data(c,"_change_data",f);if(e===b||f===e)return;if(e!=null||f)a.type="change",a.liveFired=b,d.event.trigger(a,arguments[1],c)}};d.event.special.change={filters:{focusout:B,beforedeactivate:B,click:function(a){var b=a.target,c=b.type;(c==="radio"||c==="checkbox"||b.nodeName.toLowerCase()==="select")&&B.call(this,a)},keydown:function(a){var b=a.target,c=b.type;(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(c==="checkbox"||c==="radio")||c==="select-multiple")&&B.call(this,a)},beforeactivate:function(a){var b=a.target;d._data(b,"_change_data",A(b))}},setup:function(a,b){if(this.type==="file")return!1;for(var c in z)d.event.add(this,c+".specialChange",z[c]);return q.test(this.nodeName)},teardown:function(a){d.event.remove(this,".specialChange");return q.test(this.nodeName)}},z=d.event.special.change.filters,z.focus=z.beforeactivate}c.addEventListener&&d.each({focus:"focusin",blur:"focusout"},function(a,b){function c(a){a=d.event.fix(a),a.type=b;return d.event.handle.call(this,a)}d.event.special[b]={setup:function(){this.addEventListener(a,c,!0)},teardown:function(){this.removeEventListener(a,c,!0)}}}),d.each(["bind","one"],function(a,c){d.fn[c]=function(a,e,f){if(typeof a==="object"){for(var g in a)this[c](g,e,a[g],f);return this}if(d.isFunction(e)||e===!1)f=e,e=b;var h=c==="one"?d.proxy(f,function(a){d(this).unbind(a,h);return f.apply(this,arguments)}):f;if(a==="unload"&&c!=="one")this.one(a,e,f);else for(var i=0,j=this.length;i<j;i++)d.event.add(this[i],a,h,e);return this}}),d.fn.extend({unbind:function(a,b){if(typeof a!=="object"||a.preventDefault)for(var e=0,f=this.length;e<f;e++)d.event.remove(this[e],a,b);else for(var c in a)this.unbind(c,a[c]);return this},delegate:function(a,b,c,d){return this.live(b,c,d,a)},undelegate:function(a,b,c){return arguments.length===0?this.unbind("live"):this.die(b,null,c,a)},trigger:function(a,b){return this.each(function(){d.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){var c=d.Event(a);c.preventDefault(),c.stopPropagation(),d.event.trigger(c,b,this[0]);return c.result}},toggle:function(a){var b=arguments,c=1;while(c<b.length)d.proxy(a,b[c++]);return this.click(d.proxy(a,function(e){var f=(d._data(this,"lastToggle"+a.guid)||0)%c;d._data(this,"lastToggle"+a.guid,f+1),e.preventDefault();return b[f].apply(this,arguments)||!1}))},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var D={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};d.each(["live","die"],function(a,c){d.fn[c]=function(a,e,f,g){var h,i=0,j,k,l,m=g||this.selector,n=g?this:d(this.context);if(typeof a==="object"&&!a.preventDefault){for(var o in a)n[c](o,e,a[o],m);return this}d.isFunction(e)&&(f=e,e=b),a=(a||"").split(" ");while((h=a[i++])!=null){j=p.exec(h),k="",j&&(k=j[0],h=h.replace(p,""));if(h==="hover"){a.push("mouseenter"+k,"mouseleave"+k);continue}l=h,h==="focus"||h==="blur"?(a.push(D[h]+k),h=h+k):h=(D[h]||h)+k;if(c==="live")for(var q=0,r=n.length;q<r;q++)d.event.add(n[q],"live."+F(h,m),{data:e,selector:m,handler:f,origType:h,origHandler:f,preType:l});else n.unbind("live."+F(h,m),f)}return this}}),d.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),function(a,b){d.fn[b]=function(a,c){c==null&&(c=a,a=null);return arguments.length>0?this.bind(b,a,c):this.trigger(b)},d.attrFn&&(d.attrFn[b]=!0)}),function(){function u(a,b,c,d,e,f){for(var g=0,h=d.length;g<h;g++){var i=d[g];if(i){var j=!1;i=i[a];while(i){if(i.sizcache===c){j=d[i.sizset];break}if(i.nodeType===1){f||(i.sizcache=c,i.sizset=g);if(typeof b!=="string"){if(i===b){j=!0;break}}else if(k.filter(b,[i]).length>0){j=i;break}}i=i[a]}d[g]=j}}}function t(a,b,c,d,e,f){for(var g=0,h=d.length;g<h;g++){var i=d[g];if(i){var j=!1;i=i[a];while(i){if(i.sizcache===c){j=d[i.sizset];break}i.nodeType===1&&!f&&(i.sizcache=c,i.sizset=g);if(i.nodeName.toLowerCase()===b){j=i;break}i=i[a]}d[g]=j}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,e=0,f=Object.prototype.toString,g=!1,h=!0,i=/\\/g,j=/\W/;[0,0].sort(function(){h=!1;return 0});var k=function(b,d,e,g){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!=="string")return e;var i,j,n,o,q,r,s,t,u=!0,w=k.isXML(d),x=[],y=b;do{a.exec(""),i=a.exec(y);if(i){y=i[3],x.push(i[1]);if(i[2]){o=i[3];break}}}while(i);if(x.length>1&&m.exec(b))if(x.length===2&&l.relative[x[0]])j=v(x[0]+x[1],d);else{j=l.relative[x[0]]?[d]:k(x.shift(),d);while(x.length)b=x.shift(),l.relative[b]&&(b+=x.shift()),j=v(b,j)}else{!g&&x.length>1&&d.nodeType===9&&!w&&l.match.ID.test(x[0])&&!l.match.ID.test(x[x.length-1])&&(q=k.find(x.shift(),d,w),d=q.expr?k.filter(q.expr,q.set)[0]:q.set[0]);if(d){q=g?{expr:x.pop(),set:p(g)}:k.find(x.pop(),x.length===1&&(x[0]==="~"||x[0]==="+")&&d.parentNode?d.parentNode:d,w),j=q.expr?k.filter(q.expr,q.set):q.set,x.length>0?n=p(j):u=!1;while(x.length)r=x.pop(),s=r,l.relative[r]?s=x.pop():r="",s==null&&(s=d),l.relative[r](n,s,w)}else n=x=[]}n||(n=j),n||k.error(r||b);if(f.call(n)==="[object Array]")if(u)if(d&&d.nodeType===1)for(t=0;n[t]!=null;t++)n[t]&&(n[t]===!0||n[t].nodeType===1&&k.contains(d,n[t]))&&e.push(j[t]);else for(t=0;n[t]!=null;t++)n[t]&&n[t].nodeType===1&&e.push(j[t]);else e.push.apply(e,n);else p(n,e);o&&(k(o,h,e,g),k.uniqueSort(e));return e};k.uniqueSort=function(a){if(r){g=h,a.sort(r);if(g)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},k.matches=function(a,b){return k(a,null,null,b)},k.matchesSelector=function(a,b){return k(b,null,null,[a]).length>0},k.find=function(a,b,c){var d;if(!a)return[];for(var e=0,f=l.order.length;e<f;e++){var g,h=l.order[e];if(g=l.leftMatch[h].exec(a)){var j=g[1];g.splice(1,1);if(j.substr(j.length-1)!=="\\"){g[1]=(g[1]||"").replace(i,""),d=l.find[h](g,b,c);if(d!=null){a=a.replace(l.match[h],"");break}}}}d||(d=typeof b.getElementsByTagName!=="undefined"?b.getElementsByTagName("*"):[]);return{set:d,expr:a}},k.filter=function(a,c,d,e){var f,g,h=a,i=[],j=c,m=c&&c[0]&&k.isXML(c[0]);while(a&&c.length){for(var n in l.filter)if((f=l.leftMatch[n].exec(a))!=null&&f[2]){var o,p,q=l.filter[n],r=f[1];g=!1,f.splice(1,1);if(r.substr(r.length-1)==="\\")continue;j===i&&(i=[]);if(l.preFilter[n]){f=l.preFilter[n](f,j,d,i,e,m);if(f){if(f===!0)continue}else g=o=!0}if(f)for(var s=0;(p=j[s])!=null;s++)if(p){o=q(p,f,s,j);var t=e^!!o;d&&o!=null?t?g=!0:j[s]=!1:t&&(i.push(p),g=!0)}if(o!==b){d||(j=i),a=a.replace(l.match[n],"");if(!g)return[];break}}if(a===h)if(g==null)k.error(a);else break;h=a}return j},k.error=function(a){throw"Syntax error, unrecognized expression: "+a};var l=k.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b==="string",d=c&&!j.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1){}a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&k.filter(b,a,!0)},">":function(a,b){var c,d=typeof b==="string",e=0,f=a.length;if(d&&!j.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d&&k.filter(b,a,!0)}},"":function(a,b,c){var d,f=e++,g=u;typeof b==="string"&&!j.test(b)&&(b=b.toLowerCase(),d=b,g=t),g("parentNode",b,f,a,d,c)},"~":function(a,b,c){var d,f=e++,g=u;typeof b==="string"&&!j.test(b)&&(b=b.toLowerCase(),d=b,g=t),g("previousSibling",b,f,a,d,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!=="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!=="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!=="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(i,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(i,"")},TAG:function(a,b){return a[1].replace(i,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||k.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&k.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(i,"");!f&&l.attrMap[g]&&(a[1]=l.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(i,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=k(b[3],null,null,c);else{var g=k.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(l.match.POS.test(b[0])||l.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!k(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){return"text"===a.getAttribute("type")},radio:function(a){return"radio"===a.type},checkbox:function(a){return"checkbox"===a.type},file:function(a){return"file"===a.type},password:function(a){return"password"===a.type},submit:function(a){return"submit"===a.type},image:function(a){return"image"===a.type},reset:function(a){return"reset"===a.type},button:function(a){return"button"===a.type||a.nodeName.toLowerCase()==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=l.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||k.getText([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h<i;h++)if(g[h]===a)return!1;return!0}k.error(e)},CHILD:function(a,b){var c=b[1],d=a;switch(c){case"only":case"first":while(d=d.previousSibling)if(d.nodeType===1)return!1;if(c==="first")return!0;d=a;case"last":while(d=d.nextSibling)if(d.nodeType===1)return!1;return!0;case"nth":var e=b[2],f=b[3];if(e===1&&f===0)return!0;var g=b[0],h=a.parentNode;if(h&&(h.sizcache!==g||!a.nodeIndex)){var i=0;for(d=h.firstChild;d;d=d.nextSibling)d.nodeType===1&&(d.nodeIndex=++i);h.sizcache=g}var j=a.nodeIndex-f;return e===0?j===0:j%e===0&&j/e>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=l.attrHandle[c]?l.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=l.setFilters[e];if(f)return f(a,c,b,d)}}},m=l.match.POS,n=function(a,b){return"\\"+(b-0+1)};for(var o in l.match)l.match[o]=new RegExp(l.match[o].source+/(?![^\[]*\])(?![^\(]*\))/.source),l.leftMatch[o]=new RegExp(/(^(?:.|\r|\n)*?)/.source+l.match[o].source.replace(/\\(\d+)/g,n));var p=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(q){p=function(a,b){var c=0,d=b||[];if(f.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length==="number")for(var e=a.length;c<e;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var r,s;c.documentElement.compareDocumentPosition?r=function(a,b){if(a===b){g=!0;return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1}:(r=function(a,b){var c,d,e=[],f=[],h=a.parentNode,i=b.parentNode,j=h;if(a===b){g=!0;return 0}if(h===i)return s(a,b);if(!h)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return s(e[k],f[k]);return k===c?s(a,f[k],-1):s(e[k],b,1)},s=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),k.getText=function(a){var b="",c;for(var d=0;a[d];d++)c=a[d],c.nodeType===3||c.nodeType===4?b+=c.nodeValue:c.nodeType!==8&&(b+=k.getText(c.childNodes));return b},function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name='"+d+"'/>",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(l.find.ID=function(a,c,d){if(typeof c.getElementById!=="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!=="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},l.filter.ID=function(a,b){var c=typeof a.getAttributeNode!=="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(l.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!=="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(l.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=k,b=c.createElement("div"),d="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){k=function(b,e,f,g){e=e||c;if(!g&&!k.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return p(e.getElementsByTagName(b),f);if(h[2]&&l.find.CLASS&&e.getElementsByClassName)return p(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return p([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return p([],f);if(i.id===h[3])return p([i],f)}try{return p(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var m=e,n=e.getAttribute("id"),o=n||d,q=e.parentNode,r=/^\s*[+~]/.test(b);n?o=o.replace(/'/g,"\\$&"):e.setAttribute("id",o),r&&q&&(e=e.parentNode);try{if(!r||q)return p(e.querySelectorAll("[id='"+o+"'] "+b),f)}catch(s){}finally{n||m.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)k[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector,d=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(e){d=!0}b&&(k.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!k.isXML(a))try{if(d||!l.match.PSEUDO.test(c)&&!/!=/.test(c))return b.call(a,c)}catch(e){}return k(c,null,null,[a]).length>0})}(),function(){var a=c.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";if(a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;l.order.splice(1,0,"CLASS"),l.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!=="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?k.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?k.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:k.contains=function(){return!1},k.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var v=function(a,b){var c,d=[],e="",f=b.nodeType?[b]:b;while(c=l.match.PSEUDO.exec(a))e+=c[0],a=a.replace(l.match.PSEUDO,"");a=l.relative[a]?a+"*":a;for(var g=0,h=f.length;g<h;g++)k(a,f[g],d);return k.filter(e,d)};d.find=k,d.expr=k.selectors,d.expr[":"]=d.expr.filters,d.unique=k.uniqueSort,d.text=k.getText,d.isXMLDoc=k.isXML,d.contains=k.contains}();var G=/Until$/,H=/^(?:parents|prevUntil|prevAll)/,I=/,/,J=/^.[^:#\[\.,]*$/,K=Array.prototype.slice,L=d.expr.match.POS,M={children:!0,contents:!0,next:!0,prev:!0};d.fn.extend({find:function(a){var b=this.pushStack("","find",a),c=0;for(var e=0,f=this.length;e<f;e++){c=b.length,d.find(a,this[e],b);if(e>0)for(var g=c;g<b.length;g++)for(var h=0;h<c;h++)if(b[h]===b[g]){b.splice(g--,1);break}}return b},has:function(a){var b=d(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(d.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(O(this,a,!1),"not",a)},filter:function(a){return this.pushStack(O(this,a,!0),"filter",a)},is:function(a){return!!a&&d.filter(a,this).length>0},closest:function(a,b){var c=[],e,f,g=this[0];if(d.isArray(a)){var h,i,j={},k=1;if(g&&a.length){for(e=0,f=a.length;e<f;e++)i=a[e],j[i]||(j[i]=d.expr.match.POS.test(i)?d(i,b||this.context):i);while(g&&g.ownerDocument&&g!==b){for(i in j)h=j[i],(h.jquery?h.index(g)>-1:d(g).is(h))&&c.push({selector:i,elem:g,level:k});g=g.parentNode,k++}}return c}var l=L.test(a)?d(a,b||this.context):null;for(e=0,f=this.length;e<f;e++){g=this[e];while(g){if(l?l.index(g)>-1:d.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b)break}}c=c.length>1?d.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a||typeof a==="string")return d.inArray(this[0],a?d(a):this.parent().children());return d.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a==="string"?d(a,b):d.makeArray(a),e=d.merge(this.get(),c);return this.pushStack(N(c[0])||N(e[0])?e:d.unique(e))},andSelf:function(){return this.add(this.prevObject)}}),d.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return d.dir(a,"parentNode")},parentsUntil:function(a,b,c){return d.dir(a,"parentNode",c)},next:function(a){return d.nth(a,2,"nextSibling")},prev:function(a){return d.nth(a,2,"previousSibling")},nextAll:function(a){return d.dir(a,"nextSibling")},prevAll:function(a){return d.dir(a,"previousSibling")},nextUntil:function(a,b,c){return d.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return d.dir(a,"previousSibling",c)},siblings:function(a){return d.sibling(a.parentNode.firstChild,a)},children:function(a){return d.sibling(a.firstChild)},contents:function(a){return d.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:d.makeArray(a.childNodes)}},function(a,b){d.fn[a]=function(c,e){var f=d.map(this,b,c),g=K.call(arguments);G.test(a)||(e=c),e&&typeof ... [truncated message content] |
From: <dj...@us...> - 2012-02-20 18:28:06
|
Revision: 9037 http://xoops.svn.sourceforge.net/xoops/?rev=9037&view=rev Author: djculex Date: 2012-02-20 18:27:56 +0000 (Mon, 20 Feb 2012) Log Message: ----------- - Bugfix: changed selector name .finish to .smallworld_finish - Bugfix: Changed multible return false; to e.preventDefault(); - Changed: claning up code etc Modified Paths: -------------- XoopsModules/smallworld/trunk/smallworld/class/mail.php XoopsModules/smallworld/trunk/smallworld/css/smallworld.css XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt XoopsModules/smallworld/trunk/smallworld/img_upload.php XoopsModules/smallworld/trunk/smallworld/js/ajaxupload.3.5.js XoopsModules/smallworld/trunk/smallworld/js/jquery.stepy.js XoopsModules/smallworld/trunk/smallworld/js/smallworld.js XoopsModules/smallworld/trunk/smallworld/js/wall.js XoopsModules/smallworld/trunk/smallworld/templates/smallworld_userprofile_edittemplate.html XoopsModules/smallworld/trunk/smallworld/templates/smallworld_userprofile_regtemplate.html Modified: XoopsModules/smallworld/trunk/smallworld/class/mail.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/class/mail.php 2012-02-20 15:00:38 UTC (rev 9036) +++ XoopsModules/smallworld/trunk/smallworld/class/mail.php 2012-02-20 18:27:56 UTC (rev 9037) @@ -35,7 +35,7 @@ */ function sendMails ($fromUserID, $toUserID, $event, $link=null, array $data) { - global $xoopsConfig, $xoopsUser; + global $xoopsConfig, $xoopsUser; $date = date('m-d-Y H:i:s',time()); $mail = new XoopsMultiMailer; $wall = new Wall_Updates; Modified: XoopsModules/smallworld/trunk/smallworld/css/smallworld.css =================================================================== --- XoopsModules/smallworld/trunk/smallworld/css/smallworld.css 2012-02-20 15:00:38 UTC (rev 9036) +++ XoopsModules/smallworld/trunk/smallworld/css/smallworld.css 2012-02-20 18:27:56 UTC (rev 9037) @@ -348,16 +348,16 @@ } a.button-back { float: left; } -a.button-next, .finish { float: right; } +a.button-next, .smallworld_finish { float: right; } -input.finish { border-style: none; cursor: pointer; padding: 3px 9px; } +input.smallworld_finish { border-style: none; cursor: pointer; padding: 3px 9px; } -a.button-back, a.button-next, .finish { +a.button-back, a.button-next, .smallworld_finish { background-color: #AAA; color: #FFF; padding: 5px 10px; text-decoration: none; border-radius: 4px; -khtml-border-radius: 4px; -moz-border-radius: 4px; -opera-border-radius: 4px; -webkit-border-radius: 4px; } -a.button-back:hover, a.button-next:hover, .finish:hover { background-color: #69C; } +a.button-back:hover, a.button-next:hover, .smallworld_finish:hover { background-color: #69C; } fieldset.step { border: 1px solid #DDD; Modified: XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt =================================================================== --- XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt 2012-02-20 15:00:38 UTC (rev 9036) +++ XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt 2012-02-20 18:27:56 UTC (rev 9037) @@ -53,6 +53,14 @@ - Bugfix: moved ui-anim_basic_16x16.gif to ..images/ - Change: Changed update text when upload new images to use image and default uploaded new text (djculex) +20. February +- NEW: Finished automated message when upload images (showing link, random image from array) (djculex) +- Bugfix: Discovered jquery was 1.5.1 -> Updated to 1.7.1 +- Bugfix: Jquery 1.7.1 revealed bugs in show more/less on updates (djculex) +- Bugfix: changed selector name .finish to .smallworld_finish +- Bugfix: Changed multible return false; to e.preventDefault(); +- Changed: css, jquery for new addions +- Changed: claning up code etc ------------------------------ Changelog v.1.10 RC Modified: XoopsModules/smallworld/trunk/smallworld/img_upload.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/img_upload.php 2012-02-20 15:00:38 UTC (rev 9036) +++ XoopsModules/smallworld/trunk/smallworld/img_upload.php 2012-02-20 18:27:56 UTC (rev 9037) @@ -26,15 +26,14 @@ include_once(XOOPS_ROOT_PATH."/modules/smallworld/class/class_collector.php"); if ($xoopsUser) { - global $xoTheme; - - $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.fileupload-uix.js'); - $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.fileupload-ui.js'); - $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'); + global $xoTheme; + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.fileupload-uix.js'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.fileupload-ui.js'); + $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/js/ajaxupload.3.5.js =================================================================== --- XoopsModules/smallworld/trunk/smallworld/js/ajaxupload.3.5.js 2012-02-20 15:00:38 UTC (rev 9036) +++ XoopsModules/smallworld/trunk/smallworld/js/ajaxupload.3.5.js 2012-02-20 18:27:56 UTC (rev 9037) @@ -324,7 +324,8 @@ setTimeout(function(){ // we will wait 3 seconds for dialog to open self.justClicked = false; - }, 3000); + }, 3000); + return false; }); this._input = input; Modified: XoopsModules/smallworld/trunk/smallworld/js/jquery.stepy.js =================================================================== --- XoopsModules/smallworld/trunk/smallworld/js/jquery.stepy.js 2012-02-20 15:00:38 UTC (rev 9036) +++ XoopsModules/smallworld/trunk/smallworld/js/jquery.stepy.js 2012-02-20 18:27:56 UTC (rev 9037) @@ -131,7 +131,7 @@ }); var xoops_smallworldtitles = xoops_smallworldtitlesWrapper.children(), - finish = xoops_smallworldthis.children('.finish'); + finish = xoops_smallworldthis.children('.smallworld_finish'); xoops_smallworldtitles.first().addClass('current-step'); @@ -219,7 +219,7 @@ if (next.length) { next.click(); } else { - var finish = buttons.children('input.finish'); + var finish = buttons.children('input.smallworld_finish'); if (finish.length) { finish.click(); Modified: XoopsModules/smallworld/trunk/smallworld/js/smallworld.js =================================================================== --- XoopsModules/smallworld/trunk/smallworld/js/smallworld.js 2012-02-20 15:00:38 UTC (rev 9036) +++ XoopsModules/smallworld/trunk/smallworld/js/smallworld.js 2012-02-20 18:27:56 UTC (rev 9037) @@ -12,7 +12,7 @@ * author 2011 Culex - homepage.: http://culex.dk & email.: cu...@cu... */ xoops_smallworld(function() { - //Attach function for avatar + //Attach function for avatar attachAvatarOpen (); // Get page url and page title (index.php) @@ -20,149 +20,149 @@ var smallworld_PageName = smallworld_pageUrl.substring(smallworld_pageUrl.lastIndexOf('/') + 1); // 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(); - 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" - }); - }; - }); + xoops_smallworld('#smallworld_statistics_lnk').live('click',function(e) { + e.preventDefault(); + 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" + }); + }; + }); - // 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({ - innerWidth:"75%", - height:"70%", - inline:true, - onComplete: function() { - smallworld_DoValStart (); - }, - onCleanup:function() { - xoops_smallworld('#smallworld_regform1').hide(); - }, - onClosed:function() { - location.href = 'index.php'; - }, - href:"#smallworld_regform1" - }); - }; - }); + // 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({ + innerWidth:"75%", + height:"70%", + inline:true, + onComplete: function() { + smallworld_DoValStart (); + }, + 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() { + // Function to make friend invitations form into ui dialog + xoops_smallworld(function() { xoops_smallworld('#friendInvitations_box').css('display','none'); - 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(); - xoops_smallworld('#friendInvitations_box').css('display','none'); - }, - href:"#friendInvitations_box" - }); - }; - xoops_smallworld('#smallworldrequestlink').live('click',function() { - //xoops_smallworld('#friendInvitations_box').dialog( "close" ); + 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(); + xoops_smallworld('#friendInvitations_box').css('display','none'); + }, + href:"#friendInvitations_box" + }); + }; + xoops_smallworld('#smallworldrequestlink').live('click',function() { xoops_smallworld('#friendInvitations_box').css('display','none'); - xoops_smallworld.colorbox.close(); - }); - } - }); + xoops_smallworld.colorbox.close(); + }); + } + }); // Function to make Edit image descriptions form into ui dialog - 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" - }); - }; - }); + 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(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 = 'editimages.php'; - }, - href:"#file_upload", - onComplete : function() { - xoops_smallworld(this).colorbox.resize(); - } - }); - }; - }); + // Function to make File upload form into ui dialog + 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 = 'editimages.php'; + }, + href:"#file_upload", + onComplete : function() { + xoops_smallworld(this).colorbox.resize(); + } + }); + }; + }); - // Function to make Div with id page into ui dialog - 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" - }); - }; - }); + // Function to make Div with id page into ui dialog + 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 - if (userHasProfile === 0) { - var buttons = {}; - buttons[_smallworldContinueToReg] = function() { - location.href = smallworld_url+'register.php'; - } - buttons[_smallworldCancel] = function() { - xoops_smallworld( this ).dialog( "close" ); - } - xoops_smallworld('#smallworld_notyetregistered').dialog({ - minWidth: 500, - show: "blind", - hide: "explode", - width: "550px", - buttons: buttons - }); - } + // If user does not have a profile in smallworld then goto register. + // If user has already a profile then goto edit profile dialog + if (userHasProfile === 0) { + var buttons = {}; + buttons[_smallworldContinueToReg] = function() { + location.href = smallworld_url+'register.php'; + } + buttons[_smallworldCancel] = function() { + xoops_smallworld( this ).dialog( "close" ); + } + xoops_smallworld('#smallworld_notyetregistered').dialog({ + minWidth: 500, + show: "blind", + hide: "explode", + width: "550px", + buttons: buttons + }); + } // Attach jquery-ui datepicker to form. xoops_smallworld("#birthday" ).datepicker({ @@ -198,23 +198,23 @@ // formToWizzard.js xoops_smallworld(function() { xoops_smallworld('#smallworld_profileform').stepy({ - backLabel: SmallworldValidationBackButton, - block: true, - errorImage: true, - nextLabel: SmallworldValidationForwardButton, - legend: true, - description: true, - titleClick: false + backLabel: SmallworldValidationBackButton, + block: true, + errorImage: true, + nextLabel: SmallworldValidationForwardButton, + legend: true, + description: true, + titleClick: false }); }); - // Attach geolocate autocomplete to forms - if (geoL === 1) { - xoops_smallworld('#birthplace').geo_autocomplete(); - xoops_smallworld('#present_city').geo_autocomplete_now(); - } else { - // do something or not - } + // Attach geolocate autocomplete to forms + if (geoL === 1) { + xoops_smallworld('#birthplace').geo_autocomplete(); + xoops_smallworld('#present_city').geo_autocomplete_now(); + } else { + // do something or not + } // Make Textareas elastic xoops_smallworld(function() { @@ -223,7 +223,8 @@ xoops_smallworld('#smallworld_update').css('max-width', xoops_smallworld('#smallworld_wall_container').outerWidth() - 30 + 'px'); }); - // Toggle the form 'partner' if choosen status is married, in relationship, complicated + + // Toggle the form 'partner' if choosen status is married, in relationship, complicated xoops_smallworld(function() { if (xoops_smallworld("#relationship").val == '2') { xoops_smallworld('#partner').fadeOut('slow'); @@ -231,7 +232,7 @@ } xoops_smallworld("#relationship").live('change',function() { var val = xoops_smallworld(this).val(); - if(val != '2') { + if (val != '2') { xoops_smallworld('#partner').fadeIn('slow'); xoops_smallworld('.partner').show(); } else { @@ -244,24 +245,25 @@ // Search for partner in smallworld users or accept username xoops_smallworld(function() { xoops_smallworld("#partner").autocomplete({ - source: smallworld_url+ 'partnersearch.php', - minLength:1, - open: function(event, ui){ - xoops_smallworld("ul.ui-autocomplete li a").each(function(){ - var htmlString = xoops_smallworld(this).html().replace(/</g, '<'); - htmlString = htmlString.replace(/>/g, '>'); - xoops_smallworld(this).html(htmlString); - xoops_smallworld('.ui-autocomplete.ui-menu').width(200); - }); - } + source: smallworld_url+ 'partnersearch.php', + minLength:1, + open: function(event, ui){ + xoops_smallworld("ul.ui-autocomplete li a").each(function(){ + var htmlString = xoops_smallworld(this).html().replace(/</g, '<'); + htmlString = htmlString.replace(/>/g, '>'); + xoops_smallworld(this).html(htmlString); + xoops_smallworld('.ui-autocomplete.ui-menu').width(200); + }); + } }); }); // Keep the searchform empty when clicked xoops_smallworld("input#smallworld_searchform").click(function(event) { - // Erase text from inside textarea + event.preventDefault(); + // Erase text from inside textarea xoops_smallworld(this).val(""); - // Disable text erase + // Disable text erase xoops_smallworld(this).unbind(event); }); @@ -269,49 +271,49 @@ xoops_smallworld(function() { xoops_smallworld("#smallworld_searchform").focus().select(); xoops_smallworld("#smallworld_searchform").autocomplete({ - source: smallworld_url+ 'search.php', - minLength:1, - open: function(event, ui){ - xoops_smallworld("ul.ui-autocomplete li a").each(function(){ - var htmlString = xoops_smallworld(this).html().replace(/</g, '<'); - htmlString = htmlString.replace(/>/g, '>'); - xoops_smallworld(this).html(htmlString); - xoops_smallworld('.ui-autocomplete.ui-menu').width(275); - }); - }, - select: function(event,ui){ - location.href= smallworld_url+'userprofile.php?username='+ui.item.value; - } + source: smallworld_url+ 'search.php', + minLength:1, + open: function(event, ui){ + xoops_smallworld("ul.ui-autocomplete li a").each(function(){ + var htmlString = xoops_smallworld(this).html().replace(/</g, '<'); + htmlString = htmlString.replace(/>/g, '>'); + xoops_smallworld(this).html(htmlString); + xoops_smallworld('.ui-autocomplete.ui-menu').width(275); + }); + }, + select: function(event,ui){ + location.href= smallworld_url+'userprofile.php?username='+ui.item.value; + } }); }); // Function to reset gender, relationshipstatus,politics an religion select:Selected in forms after send and in pagerefresh xoops_smallworld(function() { - if (smallworld_PageName == 'register.php' || smallworld_PageName == 'editprofile.php') { - var sw_data; - xoops_smallworld.ajax({ - url: smallworld_url+"include/getSelects.php?"+ Math.random(), - cache: false, - dataType: "json", - success: function(sw_data) { - xoops_smallworld("select[name=gender] option[value="+sw_data.gender+"]").attr("selected", true); - xoops_smallworld("select[name=relationship] option[value="+sw_data.relat+"]").attr("selected", true); - if (sw_data.relat == 2) { - xoops_smallworld("#partner").hide(); - xoops_smallworld("p.partner").hide(); + if (smallworld_PageName == 'register.php' || smallworld_PageName == 'editprofile.php') { + var sw_data; + xoops_smallworld.ajax({ + url: smallworld_url+"include/getSelects.php?"+ Math.random(), + cache: false, + dataType: "json", + success: function(sw_data) { + xoops_smallworld("select[name=gender] option[value="+sw_data.gender+"]").attr("selected", true); + xoops_smallworld("select[name=relationship] option[value="+sw_data.relat+"]").attr("selected", true); + if (sw_data.relat == 2) { + xoops_smallworld("#partner").hide(); + xoops_smallworld("p.partner").hide(); + } + if (sw_data.relat != 2) { + xoops_smallworld("#partner").show(); + xoops_smallworld("p.partner").show(); + } + xoops_smallworld("select[name=politic] option[value="+sw_data.politic+"]").attr("selected", true); + xoops_smallworld("select[name=religion] option[value="+sw_data.religion+"]").attr("selected", true); + }, + error: function(xhr, status, thrown) { + alert(xhr+" "+status+" "+thrown); } - if (sw_data.relat != 2) { - xoops_smallworld("#partner").show(); - xoops_smallworld("p.partner").show(); - } - xoops_smallworld("select[name=politic] option[value="+sw_data.politic+"]").attr("selected", true); - xoops_smallworld("select[name=religion] option[value="+sw_data.religion+"]").attr("selected", true); - }, - error: function(xhr, status, thrown) { - alert(xhr+" "+status+" "+thrown); - } - }); - } + }); + } }); @@ -320,51 +322,60 @@ xoops_smallworld("input[name=updatePublic] option[value='private']").attr('checked', false); }); - // Functions to add fields in screenname, email, education and jobs - xoops_smallworld('#emailAdd').live('click',function(){ - var num = xoops_smallworld('input[name="emailtype[]"]').length - 1; // how many "duplicatable" input fields we currently have - var newNum = (num + 1); // the numeric ID of the new input field being added + + // Functions to add fields in screenname, email, education and jobs + xoops_smallworld('#emailAdd').live('click',function(e){ + e.preventDefault(); + // how many "duplicatable" input fields we currently have + var num = xoops_smallworld('input[name="emailtype[]"]').length - 1; + + // the numeric ID of the new input field being added + var newNum = (num + 1); xoops_smallworld('span#email:last').clone(true).insertBefore(this).find('input').val('').attr('id','email-'+newNum); - //xoops_smallworld('span#email:last').clone(true).insertBefore(this).find('input').val(''); - xoops_smallworld('span#emailremove:last').clone(true).insertBefore(this); + xoops_smallworld('span#emailremove:last').clone(true).insertBefore(this); }); /* Screen names for facebook etc */ - xoops_smallworld('#screennameAdd').live('click',function(){ - xoops_smallworld('span#screenname:last').clone(true).insertBefore(this).find('input').val(''); - xoops_smallworld('span#screennameremove:last').clone(true).insertBefore(this); + xoops_smallworld('#screennameAdd').live('click',function(e){ + e.preventDefault(); + xoops_smallworld('span#screenname:last').clone(true).insertBefore(this).find('input').val(''); + xoops_smallworld('span#screennameremove:last').clone(true).insertBefore(this); }); /* School */ - xoops_smallworld('#schoolAdd').live('click',function(){ - xoops_smallworld('div#school:last').clone(true).insertBefore(this).find('input').val(''); - xoops_smallworld('span#schoolremove:last').clone(true).insertBefore(this); + xoops_smallworld('#schoolAdd').live('click',function(e){ + e.preventDefault(); + xoops_smallworld('div#school:last').clone(true).insertBefore(this).find('input').val(''); + xoops_smallworld('span#schoolremove:last').clone(true).insertBefore(this); }); /* Jobs - also remove datepicker from :last and apply on NEW :last */ - xoops_smallworld('#jobAdd').live('click',function(){ - xoops_smallworld('div#job:last').clone(true).insertBefore(this).find('input').val(''); - xoops_smallworld('span#jobremove:last').clone(true).insertBefore(this); - xoops_smallworld('.jobstart').removeClass("hasDatepicker").attr('id',"").datepicker(); - xoops_smallworld('.jobstop').removeClass("hasDatepicker").attr('id',"").datepicker(); + xoops_smallworld('#jobAdd').live('click',function(e){ + e.preventDefault(); + xoops_smallworld('div#job:last').clone(true).insertBefore(this).find('input').val(''); + xoops_smallworld('span#jobremove:last').clone(true).insertBefore(this); + xoops_smallworld('.jobstart').removeClass("hasDatepicker").attr('id',"").datepicker(); + xoops_smallworld('.jobstop').removeClass("hasDatepicker").attr('id',"").datepicker(); }); // Registerform saveprofile - xoops_smallworld(".finish").click(function() { + xoops_smallworld(".smallworld_finish").click(function(e) { + e.preventDefault(); var dataString = xoops_smallworld("#smallworld_profileform").serialize(); - if(dataString == '') { + if (dataString == '') { } else { xoops_smallworld.ajax({ type: "POST", + dataType: 'json', + cache: false, url: smallworld_url+"submit.php", data: dataString, success: function(){ - location.href = smallworld_url+'index.php'; + //location.href = smallworld_url+'index.php'; } }); } - return false; }); // Description for images save @@ -417,8 +428,9 @@ }); // Attach on clik open education & work (..more) dialogues - xoops_smallworld('#_smallworld_workmore').live('click',function(){ - if (xoops_smallworld('#workfull').length) { // implies *not* zero + xoops_smallworld('#_smallworld_workmore').live('click',function(event){ + event.preventDefault(); + if (xoops_smallworld('#workfull').length) { // implies *not* zero xoops_smallworld('#workfull').show(); xoops_smallworld.fn.colorbox({ width:"450", @@ -431,12 +443,13 @@ }, href:"#workfull" }); - }; + }; }); // Show educations in dialog when clicked on more - xoops_smallworld('#_smallworld_educationmore').live('click',function(){ - if (xoops_smallworld('#educationfull').length) { // implies *not* zero + xoops_smallworld('#_smallworld_educationmore').live('click',function(event){ + event.preventDefault(); + if (xoops_smallworld('#educationfull').length) { // implies *not* zero xoops_smallworld('#educationfull').show(); xoops_smallworld.fn.colorbox({ width:"450", @@ -449,12 +462,13 @@ }, href:"#educationfull" }); - }; + }; }); // Show more info in dialog - xoops_smallworld('#_SMALLWORLD_MOREINFO').live('click',function(){ - if (xoops_smallworld('#interestsandmore').length) { // implies *not* zero + xoops_smallworld('#_SMALLWORLD_MOREINFO').live('click',function(event){ + event.preventDefault(); + if (xoops_smallworld('#interestsandmore').length) { // implies *not* zero xoops_smallworld('#interestsandmore').show(); xoops_smallworld.fn.colorbox({ width:"600", @@ -467,37 +481,39 @@ }, href:"#interestsandmore" }); - }; + }; }); //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", - }); + xoops_smallworld('#_smallworld_birthplace_maplink').live('click',function(event){ + event.preventDefault(); + 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", + }); - }; + }; }); //Function to show images in present location input - xoops_smallworld('#_smallworld_present_maplink').live('click',function(){ - if (xoops_smallworld('#_smallworld_present_map').length) { // implies *not* zero + xoops_smallworld('#_smallworld_present_maplink').live('click',function(event){ + event.preventDefault(); + if (xoops_smallworld('#_smallworld_present_map').length) { // implies *not* zero xoops_smallworld('#_smallworld_present_map').show(); xoops_smallworld.fn.colorbox({ innerWidth:"550px", @@ -516,9 +532,8 @@ }, href:"#_smallworld_present_map" }); - }; - - }); + }; + }); // Function to rewrite urls used in xoops core for directing to profile.php @@ -536,20 +551,21 @@ }); } - xoops_smallworld('#smallworld_stats_scroller').innerfade({ - animationtype: 'fade', - speed: 1200, - timeout: 10000, - type: 'sequence', - containerheight: '50px' - }); + xoops_smallworld('#smallworld_stats_scroller').innerfade({ + animationtype: 'fade', + speed: 1200, + timeout: 10000, + type: 'sequence', + containerheight: '50px' + }); // Return jSon with count of friends smallworld_getCountFriendMessagesEtcJS(); // Sharing bookmarks defines xoops_smallworld(function () { - xoops_smallworld('.share').live('click',function() { + xoops_smallworld('.share').live('click',function(e) { + e.preventDefault(); var id = xoops_smallworld(this).attr('id'); var ref = xoops_smallworld('span[name="' + id + '"]').attr('rel'); var desc = xoops_smallworld('span[name="' + id + '"]').attr('rel1'); @@ -597,7 +613,8 @@ } }); - xoops_smallworld('.smallworld_CommentShowMore').click(function() { + xoops_smallworld('.smallworld_CommentShowMore').click(function(e) { + e.preventDefault(); if (xoops_smallworld(this).text()==showText) { xoops_smallworld(this).text(hideText); } else { @@ -605,7 +622,6 @@ } xoops_smallworld(this).parent().prev('div.smallworld_commentcontainer').children('div:gt(1)').slideToggle('slow'); }); - return false; }); } @@ -655,7 +671,8 @@ // counter = name of item to count items // Culex april 2011 function removelnk (shooter, target,counter) { - xoops_smallworld(shooter).live('click',function() { + xoops_smallworld(shooter).live('click',function(event) { + event.preventDefault(); if (counter == 'email') { var i = xoops_smallworld("input[name='emailtype[]']").length; } @@ -673,7 +690,6 @@ } if(i > 1) { // if you have at least 1 input on the form xoops_smallworld(this).parent().prev().andSelf().remove(); //remove the last input - return false; i--; //deduct 1 from i so if i = 3, after i--, i will be i = 2 } }); @@ -697,7 +713,7 @@ success: function(response){ xoops_smallworld('#resultMsg').html(response.msg); xoops_smallworld('#friendship').html(response.msgChange); - return false; + return false; } }); } @@ -721,7 +737,7 @@ xoops_smallworld('#followfriend').html(response.msgChange); xoops_smallworld('#resultMsgFollow').html(response.msg); xoops_smallworld('#resultMsgFollow').dialog({show: "size",hide:"scale"}); - return false; + return false; } }); } @@ -737,8 +753,10 @@ //xoops_smallworld('#comnMsg').show(); //alert (response.msg); xoops_smallworld('tr#'+targetID).hide(); - xoops_smallworld('#friendship').html(response.msgChange); - return false; + if (response != null && response != '') { + xoops_smallworld('#friendship').html(response.msgChange); + } + return false; } }); } @@ -754,25 +772,28 @@ cache: false, dataType: "json", success: function(data) { - var newcnt = data.NewUserMsgCount; - var diff = newcnt-smallworld_getFriendsMsgComCount; - - if (diff < 0) { - var text = smallworldDeletedMessages + diff; - xoops_smallworld('#smallworld_messagecounter_id').html(text); - xoops_smallworld('#smallworld_messagecounter_id').show(); - } - - if (diff == 0) { - var text = ''; - xoops_smallworld('#smallworld_messagecounter_id').empty(); - xoops_smallworld('#smallworld_messagecounter_id').hide(); - } - if (diff > 0) { - var text = smallworldNewMessages + diff; - xoops_smallworld('#smallworld_messagecounter_id').html(text); - xoops_smallworld('#smallworld_messagecounter_id').show(); - } + if (data != null && data != '') { + var newcnt = data.NewUserMsgCount; + var diff = newcnt-smallworld_getFriendsMsgComCount; + + if (diff < 0) { + var text = smallworldDeletedMessages + diff; + xoops_smallworld('#smallworld_messagecounter_id').html(text); + xoops_smallworld('#smallworld_messagecounter_id').show(); + } + + if (diff == 0) { + var text = ''; + xoops_smallworld('#smallworld_messagecounter_id').empty(); + xoops_smallworld('#smallworld_messagecounter_id').hide(); + } + if (diff > 0) { + var text = smallworldNewMessages + diff; + xoops_smallworld('#smallworld_messagecounter_id').html(text); + xoops_smallworld('#smallworld_messagecounter_id').show(); + } + } + return false; } }); setTimeout('smallworld_getCountFriendMessagesEtcJS()',10000); @@ -884,30 +905,30 @@ 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 + 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/js/wall.js =================================================================== --- XoopsModules/smallworld/trunk/smallworld/js/wall.js 2012-02-20 15:00:38 UTC (rev 9036) +++ XoopsModules/smallworld/trunk/smallworld/js/wall.js 2012-02-20 18:27:56 UTC (rev 9037) @@ -3,7 +3,8 @@ xoops_smallworld(document).ready(function() { // Update Status - xoops_smallworld(".smallworld_update_button").click(function() { + xoops_smallworld(".smallworld_update_button").click(function(e) { + e.preventDefault(); var updateval = xoops_smallworld("#smallworld_update").val(); var privatestat = xoops_smallworld('input[name=updatePublic]:checked').val(); var dataString = "update=" + updateval + "&priv=" + privatestat; @@ -27,11 +28,11 @@ } }); } - return false; }); //commment Submint - xoops_smallworld('.smallworld_comment_button').live("click",function() { + xoops_smallworld('.smallworld_comment_button').live("click",function(e) { + e.preventDefault(); var ID = xoops_smallworld(this).attr("id"); var comment= xoops_smallworld("#smallworld_ctextarea"+ID).val(); var dataString = 'comment='+ comment + '&msg_id=' + ID; @@ -51,18 +52,18 @@ } }); } - return false; }); // commentopen - xoops_smallworld('.smallworld_commentopen').live("click",function() { + xoops_smallworld('.smallworld_commentopen').live("click",function(e) { + e.preventDefault(); var ID = xoops_smallworld(this).attr("id"); xoops_smallworld("#smallworld_commentbox"+ID).slideToggle('slow'); - return false; }); // delete comment - xoops_smallworld('.smallworld_stcommentdelete').live("click",function() { + xoops_smallworld('.smallworld_stcommentdelete').live("click",function(e) { + e.preventDefault(); var ID = xoops_smallworld(this).attr("id"); var msgowner = xoops_smallworld(this).attr("rel"); var dataString = 'smallworld_com_id='+ ID + '&msgowner='+msgowner; @@ -78,10 +79,10 @@ } }); } - return false; }); // delete update - xoops_smallworld('.smallworld_stdelete').live("click",function() { + xoops_smallworld('.smallworld_stdelete').live("click",function(e) { + e.preventDefault(); var ID = xoops_smallworld(this).attr("id"); var msgowner = xoops_smallworld(this).attr("rel"); var dataString = 'smallworld_msg_id='+ ID + '&msgowner='+msgowner; @@ -97,13 +98,13 @@ } }); } - return false; }); }); xoops_smallworld(document).ready(function() { xoops_smallworld('.smallworld_msg_counter:last').show(); - xoops_smallworld('.smallworld_msg_counter').live('click', function() { + xoops_smallworld('.smallworld_msg_counter').live('click', function(e) { + e.preventDefault(); xoops_smallworld('#smallworld_moremsg_ajax').show(); var lastmsg = xoops_smallworld(this).attr("id"); var page = xoops_smallworld(this).attr("rel"); @@ -132,7 +133,6 @@ } smallworldCheckNumDivs(); - return false; }); }); @@ -140,7 +140,8 @@ // Calls up.php or down.php xoops_smallworld(document).ready(function() { xoops_smallworld(".smallworld_stcomment_vote").live('click', - function() { + function(e) { + e.preventDefault(); var id = xoops_smallworld(this).attr("id"); var name = xoops_smallworld(this).attr("name"); var type = xoops_smallworld(this).attr("type"); @@ -179,13 +180,13 @@ } }); } - return false; }); }); xoops_smallworld(document).ready(function() { xoops_smallworld(".smallworld_comment_complaint").live('click', - function() { + function(e) { + e.preventDefault(); var id = xoops_smallworld(this).attr("id"); var name = xoops_smallworld(this).attr("name"); var against_user = xoops_smallworld(this).attr("a_user"); @@ -207,8 +208,6 @@ } }); } - - return false; }); }); \ No newline at end of file Modified: XoopsModules/smallworld/trunk/smallworld/templates/smallworld_userprofile_edittemplate.html =================================================================== --- XoopsModules/smallworld/trunk/smallworld/templates/smallworld_userprofile_edittemplate.html 2012-02-20 15:00:38 UTC (rev 9036) +++ XoopsModules/smallworld/trunk/smallworld/templates/smallworld_userprofile_edittemplate.html 2012-02-20 18:27:56 UTC (rev 9037) @@ -361,7 +361,7 @@ </table> </fieldset> <input type="hidden" name="function" value="edit" /> - <input type="submit" id="smallworld_save1" value="<{$smallworld_save}>" class="finish"/> + <input type="submit" id="smallworld_save1" value="<{$smallworld_save}>" class="smallworld_finish"/> </form> Modified: XoopsModules/smallworld/trunk/smallworld/templates/smallworld_userprofile_regtemplate.html =================================================================== --- XoopsModules/smallworld/trunk/smallworld/templates/smallworld_userprofile_regtemplate.html 2012-02-20 15:00:38 UTC (rev 9036) +++ XoopsModules/smallworld/trunk/smallworld/templates/smallworld_userprofile_regtemplate.html 2012-02-20 18:27:56 UTC (rev 9037) @@ -366,7 +366,7 @@ </tr> </table> </fieldset> - <input type="submit" id="smallworld_save1" value="<{$smallworld_save}>" class="finish"/> + <input type="submit" id="smallworld_save1" value="<{$smallworld_save}>" class="smallworld_finish"/> <input type="hidden" name="function" value="save" /> </form> <{/if}> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dj...@us...> - 2012-02-23 19:24:20
|
Revision: 9052 http://xoops.svn.sourceforge.net/xoops/?rev=9052&view=rev Author: djculex Date: 2012-02-23 19:24:13 +0000 (Thu, 23 Feb 2012) Log Message: ----------- docs/changelog.txt logging RC 4 - Bugfix: Sharing on facebook is returning false. - Bugfix: Share text is sanitizing in wrong type - Change: Adding special facebook metas - Change: adjusting bits and pieces Modified Paths: -------------- XoopsModules/smallworld/trunk/smallworld/class/wall.php XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt XoopsModules/smallworld/trunk/smallworld/include/functions.php XoopsModules/smallworld/trunk/smallworld/js/smallworld.js XoopsModules/smallworld/trunk/smallworld/preloads/core.php XoopsModules/smallworld/trunk/smallworld/smallworldshare.php XoopsModules/smallworld/trunk/smallworld/templates/smallworld_share.html Modified: XoopsModules/smallworld/trunk/smallworld/class/wall.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/class/wall.php 2012-02-23 18:35:33 UTC (rev 9051) +++ XoopsModules/smallworld/trunk/smallworld/class/wall.php 2012-02-23 19:24:13 UTC (rev 9052) @@ -355,7 +355,7 @@ global $xoopsUser, $xoopsDB, $moduleConfig; $query = "SELECT M.msg_id, M.uid_fk, M.message, M.created, M.priv, U.username FROM " . $xoopsDB->prefix('smallworld_messages')." M, ".$xoopsDB->prefix('smallworld_user') - . " U WHERE M.uid_fk=U.userid and M.uid_fk='".$ownerID."' and M.priv = 0"; + . " U WHERE M.uid_fk=U.userid and M.uid_fk='".$ownerID."' and M.priv = 0"; $query .= " AND M.msg_id = '".$updid."'"; $query .= " order by created DESC LIMIT 1"; $result=$xoopsDB->queryF($query); Modified: XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt =================================================================== --- XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt 2012-02-23 18:35:33 UTC (rev 9051) +++ XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt 2012-02-23 19:24:13 UTC (rev 9052) @@ -1,6 +1,16 @@ ------------------------------ -Changelog v.1.11 RC +Changelog v.1.11 RC 4 ------------------------------ +23 February 2012 +- Bugfix: Sharing on facebook is returning false. +- Bugfix: Share text is sanitizing in wrong type +- Change: Adding special facebook metas +- Change: adjusting bits and pieces + + +------------------------------ +Changelog v.1.11 RC 3 +------------------------------ 9. february 2012 - Bugfix: Takeover links not using XOOPS_URL correct (djculex) - Bugfix: Created function smallworld_getImageSize to test if allow_url_fopen = on else try cUrl else return default for image sizes (djculex) @@ -63,7 +73,7 @@ - Changed: claning up code etc ------------------------------ -Changelog v.1.10 RC +Changelog v.1.10 RC 2 ------------------------------ 8. februar 2012 @@ -122,7 +132,7 @@ - will attempt to use the fopen method first, then curl, then socket (djculex) ------------------------------ -Changelog v.1.00 RC +Changelog v.1.00 RC 1 ------------------------------ 21. januar 2012 Modified: XoopsModules/smallworld/trunk/smallworld/include/functions.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/include/functions.php 2012-02-23 18:35:33 UTC (rev 9051) +++ XoopsModules/smallworld/trunk/smallworld/include/functions.php 2012-02-23 19:24:13 UTC (rev 9052) @@ -268,11 +268,10 @@ $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); + '\\1<a href="\\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); + $text = str_replace('UPLIMAGE', '', $text); } return $text; } Modified: XoopsModules/smallworld/trunk/smallworld/js/smallworld.js =================================================================== --- XoopsModules/smallworld/trunk/smallworld/js/smallworld.js 2012-02-23 18:35:33 UTC (rev 9051) +++ XoopsModules/smallworld/trunk/smallworld/js/smallworld.js 2012-02-23 19:24:13 UTC (rev 9052) @@ -564,8 +564,8 @@ // Sharing bookmarks defines xoops_smallworld(function () { - xoops_smallworld('.share').live('click',function(e) { - e.preventDefault(); + xoops_smallworld('.share').live('click',function() { + // e.preventDefault(); var id = xoops_smallworld(this).attr('id'); var ref = xoops_smallworld('span[name="' + id + '"]').attr('rel'); var desc = xoops_smallworld('span[name="' + id + '"]').attr('rel1'); Modified: XoopsModules/smallworld/trunk/smallworld/preloads/core.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/preloads/core.php 2012-02-23 18:35:33 UTC (rev 9051) +++ XoopsModules/smallworld/trunk/smallworld/preloads/core.php 2012-02-23 19:24:13 UTC (rev 9052) @@ -40,10 +40,12 @@ // check geolocation style if(isset($moduleConfig['geolocate'])) { $geolocate = $moduleConfig['geolocate']; - } + } + $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/base/jquery.ui.all.css'); $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/smallworld.css'); - $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/apprise.css'); + $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/apprise.css'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery-1.7.1.min.js'); $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery-ui-1.8.11.custom.js'); @@ -77,8 +79,8 @@ // Set javascript vars but only if not already defined. - // Check prevents multible loads - $script = "if (myID === undefined) {"."\n"; + // Check prevents multible loads + $script = "if (myID === undefined) {"."\n"; $script .= "var smallworld_url = '" . $xoops_url . "/modules/smallworld/" . "';\n"; $script .= "var smallworld_uploaddir = '" . $xoops_url . "/uploads/avatars/" . "';\n"; $script .= "var xoops_smallworld = jQuery.noConflict();\n"; Modified: XoopsModules/smallworld/trunk/smallworld/smallworldshare.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/smallworldshare.php 2012-02-23 18:35:33 UTC (rev 9051) +++ XoopsModules/smallworld/trunk/smallworld/smallworldshare.php 2012-02-23 19:24:13 UTC (rev 9052) @@ -24,6 +24,7 @@ include_once(XOOPS_ROOT_PATH."/modules/smallworld/include/functions.php"); include_once(XOOPS_ROOT_PATH."/modules/smallworld/class/class_collector.php"); global $xoopsUser, $xoTheme,$xoopsConfig,$xoopsTpl; +//$xoopsLogger->activated = true; if (isset($_GET['updid']) AND isset($_GET['ownerid'])) { $updID = $_GET['updid']; $ownerID = $_GET['ownerid']; @@ -33,7 +34,6 @@ } $perm = smallworldCheckPriv ($updID); - echo $perm; if ($perm != 1) { // Things to do with wall $Wall = new Wall_Updates(); @@ -43,7 +43,8 @@ foreach ($updatesarray as $data) { $wm['msg_id'] = $data['msg_id']; $wm['orimessage'] = str_replace(array("\r", "\n"), '',Smallworld_stripWordsKeepUrl($data['message'])); - $wm['message'] = smallworld_tolink(htmlentities($data['message'])); + $wm['message'] = str_replace(array('<','>'),array('<','>'),$data['message']); + $wm['message'] = Smallworld_cleanup($wm['message']); $wm['created'] = smallworld_time_stamp($data['created']); $wm['username'] = $data['username']; $wm['uid_fk'] = $data['uid_fk']; @@ -57,35 +58,40 @@ $wm['avatar_size'] = smallworld_getImageSize(80, 100, $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']; + $desc = str_replace('UPLIMAGE', '', html_entity_decode($data['message'],ENT_QUOTES)); $xoopsTpl->assign('xoops_pagetitle', $wm['usernameTitle']); if(isset($xoTheme) && is_object($xoTheme)) { - $xoTheme->addMeta( 'meta', 'description', $wm['orimessage']); - $xoTheme->addMeta( 'meta', 'title', $wm['usernameTitle']); + $xoTheme->addMeta( 'meta', 'description', $desc); + $xoTheme->addMeta( 'meta', 'title', $wm['usernameTitle']); + $xoTheme->addMeta( 'meta', 'author', $wm['username']); + $xoTheme->addMeta( 'meta', 'og:title', $wm['usernameTitle']); + $xoTheme->addMeta( 'meta', 'og:url', XOOPS_URL . "/modules/smallworld/index.php"); + $xoTheme->addMeta( 'meta', 'og:site_name', $xoopsConfig['sitename']); + $xoTheme->addMeta( 'meta', 'og:description', $desc); + $xoTheme->addMeta( 'meta', 'og:image', $wm['avatar_link']); + $xoTheme->addMeta( 'meta', 'og:updated_time',$data['created']); } $xoopsTpl->append('walldata', $wm); } } else { - $wm['msg_id'] = $updID; - $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; - $wm['uid_fk'] = 0; - $wm['priv'] = 1; - $wm['avatar'] = ""; - $wm['avatar_link'] = XOOPS_URL.'/modules/smallworld/images/smallworld.png'; - $wm['avatar_size'] = smallworld_getImageSize(80, 100, $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)) { - $xoTheme->addMeta( 'meta', 'description', $wm['orimessage']); - $xoTheme->addMeta( 'meta', 'title', $wm['usernameTitle']); - } - $xoopsTpl->append('walldata', $wm); + $xoTheme->addMeta( 'meta', 'og:image', XOOPS_URL.'/modules/smallworld/images/smallworld.png'); } - - + + if (!$xoopsUser) { + // Set javascript vars but only if not already defined. + // Check prevents multible loads + $script = "if (xoops_smallworld === undefined) {"."\n"; + $script .= "var xoops_smallworld = jQuery.noConflict();\n"; + $script .= "var $ = jQuery();\n"; + $script .= "} else {"."\n"; + $script .= "\n"; + $script .= "}"."\n"; + + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery-1.7.1.min.js'); + $xoTheme->addScript('','',$script); + } + + $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'); Modified: XoopsModules/smallworld/trunk/smallworld/templates/smallworld_share.html =================================================================== --- XoopsModules/smallworld/trunk/smallworld/templates/smallworld_share.html 2012-02-23 18:35:33 UTC (rev 9051) +++ XoopsModules/smallworld/trunk/smallworld/templates/smallworld_share.html 2012-02-23 19:24:13 UTC (rev 9052) @@ -1,6 +1,3 @@ -<head> -<meta property="og:image" content="http://davidwalsh.name/wp-content/themes/klass/img/facebooklogo.png"/> -</head> <body> <div id="example1" class="smallworld_content"> <table class="smallworld_biotable"> @@ -12,7 +9,6 @@ <br> <div id="smallworld_wall_container"> - <div id="smallworld_content"> <{foreach item=post from=$walldata}> <script type="text/javascript"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dj...@us...> - 2012-03-01 11:26:06
|
Revision: 9083 http://xoops.svn.sourceforge.net/xoops/?rev=9083&view=rev Author: djculex Date: 2012-03-01 11:25:55 +0000 (Thu, 01 Mar 2012) Log Message: ----------- - Bugfix: Emails containg -._ after @ not accepted by validation - Bugfix: Colorboxes containing info wich is empty showing - Bugfix: Validation returning true - Bugfix: Rankimages isset even if not existing giving error - Bugfix: el not defined in ajaxupload. Fixed by returning false if not defined Modified Paths: -------------- XoopsModules/smallworld/trunk/smallworld/class/profile.php XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt XoopsModules/smallworld/trunk/smallworld/include/functions.php XoopsModules/smallworld/trunk/smallworld/js/ajaxupload.3.5.js XoopsModules/smallworld/trunk/smallworld/js/jquery.stepy.js XoopsModules/smallworld/trunk/smallworld/js/jquery.validate.js XoopsModules/smallworld/trunk/smallworld/js/smallworld.js XoopsModules/smallworld/trunk/smallworld/templates/getlastcom.html XoopsModules/smallworld/trunk/smallworld/templates/smallworld_userprofile_template.html Modified: XoopsModules/smallworld/trunk/smallworld/class/profile.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/class/profile.php 2012-03-01 09:37:56 UTC (rev 9082) +++ XoopsModules/smallworld/trunk/smallworld/class/profile.php 2012-03-01 11:25:55 UTC (rev 9083) @@ -65,7 +65,11 @@ $country = $r['birthplace_country']; $rank = $user->rank(); $rank_title = $rank['title']; - $rank_image = "<img align='center' src='".XOOPS_UPLOAD_URL."/".$rank['image']."'></img>"; + if (isset($rank['image'])) { + $rank_image = "<img align='center' src='".XOOPS_UPLOAD_URL."/".$rank['image']."'></img>"; + } else { + $rank_image = ''; + } $commentsrating = "<img src='".XOOPS_URL."/modules/smallworld/images/like.png' height='10px'width='10px'"."/></img> ".$usersratedplus; $commentsrating .= " <img src='".XOOPS_URL."/modules/smallworld/images/dislike.png' height='10px'width='10px'"."/></img> ".$usersratedminus; $lastlogin = $user->getVar('last_login'); Modified: XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt =================================================================== --- XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt 2012-03-01 09:37:56 UTC (rev 9082) +++ XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt 2012-03-01 11:25:55 UTC (rev 9083) @@ -7,6 +7,12 @@ - Change: Adding special facebook metas - Change: adjusting bits and pieces +01 Marts 2012 +- Bugfix: Emails containg -._ after @ not accepted by validation +- Bugfix: Colorboxes containing info wich is empty showing +- Bugfix: Validation returning true +- Bugfix: Rankimages isset even if not existing giving error +- Bugfix: el not defined in ajaxupload. Fixed by returning false if not defined ------------------------------ Changelog v.1.11 RC 3 Modified: XoopsModules/smallworld/trunk/smallworld/include/functions.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/include/functions.php 2012-03-01 09:37:56 UTC (rev 9082) +++ XoopsModules/smallworld/trunk/smallworld/include/functions.php 2012-03-01 11:25:55 UTC (rev 9083) @@ -54,7 +54,7 @@ // Sanitize string function Smallworld_cleanup_string($text) { - $text = htmlspecialchars($text, ENT_QUOTES); + // $text = htmlspecialchars($text, ENT_QUOTES); $myts = MyTextSanitizer::getInstance(); $text = $myts->displayTarea($text, 1, 1, 1, 1); $text = str_replace("\n\r", "\n", $text); Modified: XoopsModules/smallworld/trunk/smallworld/js/ajaxupload.3.5.js =================================================================== --- XoopsModules/smallworld/trunk/smallworld/js/ajaxupload.3.5.js 2012-03-01 09:37:56 UTC (rev 9082) +++ XoopsModules/smallworld/trunk/smallworld/js/ajaxupload.3.5.js 2012-03-01 11:25:55 UTC (rev 9083) @@ -33,6 +33,9 @@ * Attaches event to a dom element */ function addEvent(el, type, fn){ + if (el === undefined) { + return false; + } if (w.addEventListener){ el.addEventListener(type, fn, false); } else if (w.attachEvent){ Modified: XoopsModules/smallworld/trunk/smallworld/js/jquery.stepy.js =================================================================== --- XoopsModules/smallworld/trunk/smallworld/js/jquery.stepy.js 2012-03-01 09:37:56 UTC (rev 9082) +++ XoopsModules/smallworld/trunk/smallworld/js/jquery.stepy.js 2012-03-01 11:25:55 UTC (rev 9083) @@ -91,7 +91,7 @@ title = (step.attr('title') != '' ) ? step.attr('title') : '--'; // Culex hack to prevent titles being undefined - if (title = 'undefined') { + if (title == undefined) { title = ''; } Modified: XoopsModules/smallworld/trunk/smallworld/js/jquery.validate.js =================================================================== --- XoopsModules/smallworld/trunk/smallworld/js/jquery.validate.js 2012-03-01 09:37:56 UTC (rev 9082) +++ XoopsModules/smallworld/trunk/smallworld/js/jquery.validate.js 2012-03-01 11:25:55 UTC (rev 9083) @@ -85,6 +85,7 @@ return true; } else {}; } + return false; } }; xoops_smallworld.fn.validated = function(callback){ Modified: XoopsModules/smallworld/trunk/smallworld/js/smallworld.js =================================================================== --- XoopsModules/smallworld/trunk/smallworld/js/smallworld.js 2012-03-01 09:37:56 UTC (rev 9082) +++ XoopsModules/smallworld/trunk/smallworld/js/smallworld.js 2012-03-01 11:25:55 UTC (rev 9083) @@ -692,7 +692,7 @@ xoops_smallworld(this).parent().prev().andSelf().remove(); //remove the last input i--; //deduct 1 from i so if i = 3, after i--, i will be i = 2 } - }); + }); } @@ -839,7 +839,7 @@ 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;", + 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+"'/>" }); }); Modified: XoopsModules/smallworld/trunk/smallworld/templates/getlastcom.html =================================================================== --- XoopsModules/smallworld/trunk/smallworld/templates/getlastcom.html 2012-03-01 09:37:56 UTC (rev 9082) +++ XoopsModules/smallworld/trunk/smallworld/templates/getlastcom.html 2012-03-01 11:25:55 UTC (rev 9083) @@ -12,7 +12,7 @@ <b><{$comments[i].username}></b> </a> <{$comments[i].comment}></div> <div class="smallworld_stcommenttime"><{$comments[i].time}></div> - <{if $post.username == $myusername}> + <{if $comments[i].username == $myusername}> <div class="smallworld_stcommentvote"> <span id ="smallworld_votenum"><{$comments[i].vote_up}></span> <img class="smallworld_voteimg" src = "images/like.png" /> Modified: XoopsModules/smallworld/trunk/smallworld/templates/smallworld_userprofile_template.html =================================================================== --- XoopsModules/smallworld/trunk/smallworld/templates/smallworld_userprofile_template.html 2012-03-01 09:37:56 UTC (rev 9082) +++ XoopsModules/smallworld/trunk/smallworld/templates/smallworld_userprofile_template.html 2012-03-01 11:25:55 UTC (rev 9083) @@ -305,7 +305,8 @@ <fieldset> <label><{$smarty.const._SMALLWORLD_WORKFULL_TITLE}></label><br/> <{section name=i loop=$workfull}> - <table border="0" class="smallworld_table" cellspacing="0" cellpadding="0"> + <{if $workfull[i].employer != ''}> + <table border="0" class="smallworld_table" cellspacing="0" cellpadding="0"> <p class="smallworld_clonebreaker"> <tr> <td><{$smarty.const._SMALLWORLD_EMPLOYER}></td> @@ -332,6 +333,9 @@ <td><{$workfull[i].description}></td> </tr> </table> + <{else}> + <{$smarty.const._SMALLWORLD_ALL_FIELDS_DISABLED}> + <{/if}> </p> <{/section}> </fieldset> @@ -341,6 +345,7 @@ <fieldset> <label><{$smarty.const._SMALLWORLD_SCHOOLFULL_TITLE}></label><br/> <{section name=i loop=$educationfull}> + <{if $educationfull[i].school_type != ''}> <table border="0" class="smallworld_table" cellspacing="0" cellpadding="0"> <tr> <p class="smallworld_clonebreaker"></tr> @@ -364,6 +369,9 @@ <td><{$educationfull[i].schoolstop}></td> </tr> </table> + <{else}> + <{$smarty.const._SMALLWORLD_ALL_FIELDS_DISABLED}> + <{/if}> </p> <{/section}> </fieldset> @@ -409,14 +417,14 @@ <h3><label><{$smarty.const._SMALLWORLD_BELIEFS}></label></h3> </tr> - <{if !in_array('politicalview',$flds)}> + <{if !in_array('politicalview',$flds) || $politic == ''}> <{else}> <tr> <td><{$smarty.const._SMALLWORLD_POLITICWORD}>:</td> <td><{$politic}></td> </tr> <{/if}> - <{if !in_array('religiousview',$flds)}> + <{if !in_array('religiousview',$flds) || $religion == ''}> <{else}> <tr> <td><{$smarty.const._SMALLWORLD_RELIGIONWORD}>:</td> @@ -433,50 +441,55 @@ !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 + $favbook != '' && $favmusic != '' && + $favmovie != '' && $favshows != '' && $favinterests != '' + }> + <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) || $favbook == ''}> + <{else}> + <tr> + <td><{$smarty.const._SMALLWORLD_FAVOURITEBOOKS}>:</td> + <td><{$favbook}></td> + </tr> + <{/if}> + + <{if !in_array('favouritemusic',$flds) || $favmusic == ''}> + <{else}> + <tr> + <td><{$smarty.const._SMALLWORLD_FAVOURITEMUSIC}>:</td> + <td><{$favmusic}></td> + </tr> + <{/if}> + + <{if !in_array('favouritemovies',$flds) || $favmovie == ''}> + <{else}> + <tr> + <td><{$smarty.const._SMALLWORLD_FAVOURITEMOVIE}>:</td> + <td><{$favmovie}></td> + </tr> + <{/if}> + <{if !in_array('favouritetvshows',$flds) || $favshows == ''}> + <{else}> + <tr> + <td><{$smarty.const._SMALLWORLD_FAVOURITETVSHOW}>:</td> + <td><{$favtvshow}></td> + </tr> + <{/if}> + <{if !in_array('interests',$flds) || $favinterests == ''}> + <{else}> + <tr> + <td><{$smarty.const._SMALLWORLD_FAVOURITEINTERESTS}>:</td> + <td><{$favinterests}></td> + </tr> + <{/if}> + </table> + </fieldset> + <{/if}> <{/if}> <{if @@ -491,44 +504,52 @@ </tr> <{if !in_array('emails',$flds)}> <{else}> - <tr> - <td><{$smarty.const._SMALLWORLD_EMAIL}>:</td> - <td> - <{section name=i loop=$email}> - <span class="smallworld_website"><a href="mailto:<{$email[i]}>"><{$email[i]}></a></span><br> - <{/section}> - <br><br> - </td> - </tr> + <{if $email|@count gt 0}> + <tr> + <td><{$smarty.const._SMALLWORLD_EMAIL}>:</td> + <td> + <{section name=i loop=$email}> + <span class="smallworld_website"><a href="mailto:<{$email[i]}>"><{$email[i]}></a></span><br> + <{/section}> + <br><br> + </td> + </tr> + <{/if}> <{/if}> <{if !in_array('screennames',$flds)}> <{else}> - <tr> - <td><{$smarty.const._SMALLWORLD_SCREENNAMES}>:</td> - <td> - <{foreach item=post from=$screenname}> - <{$post.link}><{$post.screenname}></a></span><br> - <{/foreach}> - <br><br> - </td> - </tr> + <{if $screenname|@count gt 0}> + <tr> + <td><{$smarty.const._SMALLWORLD_SCREENNAMES}>:</td> + <td> + <{foreach item=post from=$screenname}> + <{$post.link}><{$post.screenname}></a></span><br> + <{/foreach}> + <br><br> + </td> + </tr> + <{/if}> <{/if}> <{if !in_array('landphone',$flds)}> <{else}> - <tr> + <{if $phone != ''}> + <tr> <td><{$smarty.const._SMALLWORLD_PHONE}>:</td> <td><{$phone}></td> </tr> + <{/if}> <{/if}> <{if !in_array('mobile',$flds)}> <{else}> + <{if $mobile != ''}> <tr> <td><{$smarty.const._SMALLWORLD_GSM}>:</td> <td><{$mobile}></td> </tr> <{/if}> + <{/if}> </table> </fieldset> <{/if}> @@ -540,6 +561,7 @@ !in_array('website',$flds) }> <{else}> + <{if $adress != '' && $country != '' && $website != ''}> <fieldset> <table border="0" class="smallworld_table" cellspacing="0" cellpadding="0"> <tr><h3><label><{$smarty.const._SMALLWORLD_ADRESS}></label></h3></tr> @@ -568,6 +590,7 @@ <{/if}> </table> </fieldset> + <{/if}> <{/if}> </div> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dj...@us...> - 2012-03-07 03:53:21
|
Revision: 9103 http://xoops.svn.sourceforge.net/xoops/?rev=9103&view=rev Author: djculex Date: 2012-03-07 03:53:13 +0000 (Wed, 07 Mar 2012) Log Message: ----------- - Bugfix: Crossdomain problem in ajax. Fixed by assigning var to function replaced Xoops_IRl based on request url. - Bugfix: preloads are multible loaded. - Bugfix: Merging a few css files into smallworld.css - Bugfix: Correction language/danish/js/bookmark.js - Bugfix: Calculating age in profile was (-1 year) when month == this month. Now only if day < this day - Bugfix: added some return false; or e.preventDefault; to js functions - Change: Preparing test for adding js / css to templates via function based on request page Modified Paths: -------------- XoopsModules/smallworld/trunk/smallworld/Get_Count.php XoopsModules/smallworld/trunk/smallworld/css/galleriffic-5.css XoopsModules/smallworld/trunk/smallworld/css/smallworld.css XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt XoopsModules/smallworld/trunk/smallworld/editprofile.php XoopsModules/smallworld/trunk/smallworld/galleryshow.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/danish/js/jquery.ui.datepicker-language.js XoopsModules/smallworld/trunk/smallworld/language/danish/js/variables.js XoopsModules/smallworld/trunk/smallworld/preloads/core.php XoopsModules/smallworld/trunk/smallworld/register.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_userprofile_template.html XoopsModules/smallworld/trunk/smallworld/userprofile.php Modified: XoopsModules/smallworld/trunk/smallworld/Get_Count.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/Get_Count.php 2012-03-06 17:45:59 UTC (rev 9102) +++ XoopsModules/smallworld/trunk/smallworld/Get_Count.php 2012-03-07 03:53:13 UTC (rev 9103) @@ -23,8 +23,9 @@ include_once(XOOPS_ROOT_PATH."/modules/smallworld/include/functions.php"); include_once(XOOPS_ROOT_PATH."/modules/smallworld/class/class_collector.php"); -global $xoopsUser, $xoopsLogger, $xoopsDB; -$xoopsLogger->activated = false; +global $xoopsUser, $xoopsLogger, $xoopsDB, $xoopsTpl; +$xoopsLogger->activated = true; +$xoopsTpl->caching = 0; $_COOKIE[session_name()] = session_id(); if ($xoopsUser) { if($_GET['SmallworldGetUserMsgCount']) { Modified: XoopsModules/smallworld/trunk/smallworld/css/galleriffic-5.css =================================================================== --- XoopsModules/smallworld/trunk/smallworld/css/galleriffic-5.css 2012-03-06 17:45:59 UTC (rev 9102) +++ XoopsModules/smallworld/trunk/smallworld/css/galleriffic-5.css 2012-03-07 03:53:13 UTC (rev 9103) @@ -214,3 +214,116 @@ clear: both; padding-bottom: 20px; } + +html, body { +} +body{ +} +a{ + +} +a:focus, a:hover, a:active { +} +p, li { +} +h1, h2 { +} +h1 { +} +h2 { +} +pre { + font-size: 1.2em; + line-height: 1.2em; + overflow-x: auto; +} +div#page { + width: 900px; + background-color: #fff; + margin: 0 auto; + text-align: left; + border-color: #ddd; + border-style: none solid solid; + border-width: medium 1px 1px; +} +div#container { + padding: 20px; +} +div#ads { + clear: both; + padding: 12px 0 12px 66px; +} +div#footer { + clear: both; + color: #777; + margin: 0 auto; + padding: 20px 0 40px; + text-align: center; +} +#body{ + +} +a{ + +} +h2 { + +} +div#page { + +} +div#footer { + +} +div.caption-container { + +} +div.image-title { + font-weight: bold; + font-size: 1.4em; +} +div.image-desc { + border-style: solid; + border-width: 1px; + font-size: 1em; + height: 300px; + line-height: 1.3em; + padding-bottom: 12px; + padding-left: 15px; + padding-top: 12px; + overflow-x:none; + overflow-y:scroll; +} + +div.download { + margin-top: 8px; + font-size:1.0em; + margin-left: 33%; +} +div.photo-index { + + font-size:1.1em; +} +div.navigation a.prev { + background-image: url('../images/prevPageArrow.gif'); +} +div.navigation a.next { + background-image: url('../images/nextPageArrow.gif'); +} +div.loader { + background-image: url('../images/loader.gif'); +} +div.slideshow img { + +} +ul.thumbs li.selected a.thumb { + +} +div.pagination a:hover { + + font-size:1.0em; +} +div.pagination span.current { + + font-size:1.0em; +} \ No newline at end of file Modified: XoopsModules/smallworld/trunk/smallworld/css/smallworld.css =================================================================== --- XoopsModules/smallworld/trunk/smallworld/css/smallworld.css 2012-03-06 17:45:59 UTC (rev 9102) +++ XoopsModules/smallworld/trunk/smallworld/css/smallworld.css 2012-03-07 03:53:13 UTC (rev 9103) @@ -1296,4 +1296,136 @@ display: block; } -/* ------------ Tooltips ---------- */ +/* ------------ Aprice ---------- */ +.appriseOverlay + { + position:fixed; + top:0; + left:0; + background:rgba(0, 0, 0, 0.3); + display:none; + } +.appriseOuter + { + background:#eee; + border:1px solid #fff; + box-shadow:0px 3px 7px #333; + -moz-box-shadow:0px 3px 7px #333; + -webkit-box-shadow:0px 3px 7px #333; + -moz-border-radius:4px; + -webkit-border-radius:4px; + border-radius:4px; + -khtml-border-radius:4px; + position:absolute; + z-index:99999999; + min-width:200px; + min-height:50px; + max-width:75%; + position:fixed; + display:none; + } +.appriseInner + { + padding:20px; + color:#333; + text-shadow:0px 1px 0px #fff; + } +.appriseInner button + { + border:1px solid #bbb; + -moz-border-radius:3px; + -webkit-border-radius:3px; + border-radius:3px; + -khtml-border-radius:3px; + background: -moz-linear-gradient(100% 100% 90deg, #eee, #d5d5d5); + background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#eee), to(#d5d5d5)); + background: -webkit-linear-gradient(#eee, #d5d5d5); + background: -o-linear-gradient(#eee, #d5d5d5); + color:#232d3d; + font-size:12px; + font-weight:bold; + padding:4px 10px; + margin:0 3px; + text-shadow:0px 1px 0px #fff; + cursor:pointer; + box-shadow:0px 1px 2px #ccc; + -moz-box-shadow:0px 1px 2px #ccc; + -webkit-box-shadow:0px 1px 2px #ccc; + } +.appriseInner button:hover + { + color:#d85054; + } +.aButtons, .aInput + { + margin:20px 10px 0px 10px; + text-align:center; + } +.aTextbox + { + border:1px solid #aaa; + -moz-border-radius:4px; + -webkit-border-radius:4px; + border-radius:4px; + -khtml-border-radius:4px; + box-shadow:0px 1px 0px #fff; + -moz-box-shadow:0px 1px 0px #fff; + -webkit-box-shadow:0px 1px 0px #fff; + width:180px; + font-size:12px; + font-weight:bold; + padding:5px 10px; + } + +/* ------------------ Colorbox ---------------- */ +/* + 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;} Modified: XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt =================================================================== --- XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt 2012-03-06 17:45:59 UTC (rev 9102) +++ XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt 2012-03-07 03:53:13 UTC (rev 9103) @@ -14,6 +14,15 @@ - Bugfix: Rankimages isset even if not existing giving error - Bugfix: el not defined in ajaxupload. Fixed by returning false if not defined +07 Marts 2012 +- Bugfix: Crossdomain problem in ajax. Fixed by assigning var to function replaced Xoops_IRl based on request url. +- Bugfix: preloads are multible loaded. +- Bugfix: Merging a few css files into smallworld.css +- Bugfix: Correction language/danish/js/bookmark.js +- Bugfix: Calculating age in profile was (-1 year) when month == this month. Now only if day < this day +- Bugfix: added some return false; or e.preventDefault; to js functions +- Change: Preparing test for adding js / css to templates via function based on request page + ------------------------------ Changelog v.1.11 RC 3 ------------------------------ Modified: XoopsModules/smallworld/trunk/smallworld/editprofile.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/editprofile.php 2012-03-06 17:45:59 UTC (rev 9102) +++ XoopsModules/smallworld/trunk/smallworld/editprofile.php 2012-03-07 03:53:13 UTC (rev 9103) @@ -318,7 +318,7 @@ $xoopsTpl->assign('smallworld_user_website',$r['website']); $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/smallworld.css'); } } else { redirect_header("register.php", 1); Modified: XoopsModules/smallworld/trunk/smallworld/galleryshow.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/galleryshow.php 2012-03-06 17:45:59 UTC (rev 9102) +++ XoopsModules/smallworld/trunk/smallworld/galleryshow.php 2012-03-07 03:53:13 UTC (rev 9103) @@ -27,15 +27,12 @@ if ($xoopsUser) { $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/galleriffic-5.css'); - $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/basic.css'); - $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/black.css'); $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.galleriffic.js'); $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.history.js'); $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'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.colorbox.js'); $id = $xoopsUser->getVar('uid'); $check = new SmallWorldUser; Modified: XoopsModules/smallworld/trunk/smallworld/include/functions.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/include/functions.php 2012-03-06 17:45:59 UTC (rev 9102) +++ XoopsModules/smallworld/trunk/smallworld/include/functions.php 2012-03-07 03:53:13 UTC (rev 9103) @@ -145,9 +145,14 @@ $yearDiff = date("Y") - $year; $monthDiff = date("m") - $month; $dayDiff = date("d") - $day; - if ($dayDiff < 0 || $monthDiff < 0) { - $yearDiff--; + if ($MonthDiff == 0){ + if($DayDiff < 0) { + $YearDiff--; + } } + if ($MonthDiff < 0){ + $YearDiff--; + } return $yearDiff; } @@ -853,4 +858,211 @@ } else { return false; } - } \ No newline at end of file + } + + /** + * @Set css and js includes in pages based on $p = page + * @param string $p + * @returns void + */ + function smallworld_includeHeader($p='') + { + global $xoTheme,$xoopsUser,$xoopsConfig; + if ($xoopsUser) { + $module_handler =& xoops_gethandler('module'); + $module = $module_handler->getByDirname('smallworld'); + $config_handler =& xoops_gethandler('config'); + if ($module) { + $moduleConfig =& $config_handler->getConfigsByCat(0, $module->getVar('mid')); + } + //Check Language + $lang = $xoopsConfig['language']; + // check geolocation style + if(isset($moduleConfig['geolocate'])) { + $geolocate = $moduleConfig['geolocate']; + } + $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/base/jquery.ui.all.css'); + $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/smallworld.css'); + $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/apprise.css'); + + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery-1.7.1.min.js'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery-ui-1.8.11.custom.js'); + + $xoops_url= XOOPS_URL; + $myid = $xoopsUser->getVar('uid'); + // GET various variables from language folder + if (file_exists(XOOPS_ROOT_PATH.'/modules/smallworld/language/'.$lang.'/js/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'); + } + + // Check if USER is smallworld-registered user + $chkUser = new SmallWorldUser; + $ChkProf = $chkUser->CheckIfProfile($myid); + + // Check if there are requests pending + $count_invit = count($chkUser->getRequests($myid)); + + // Get module config for validation and place in javascript + $validate = $moduleConfig['validationstrenght']; + + // 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 = smallworld_GetModuleOption('smallworldmandatoryfields', $repmodule='smallworld'); + $smallworldUV = implode(',', $useverification); + + // Get users messages count based on users followerArray + $getUserMsgNum = smallworld_getCountFriendMessagesEtc (); + + + // Set javascript vars but only if not already defined. + // Check prevents multible loads + $script = "if (myID === undefined) {"."\n"; + $script .= "var smallworld_url = '" . $xoops_url . "/modules/smallworld/" . "';\n"; + $script .= "var smallworld_uploaddir = '" . $xoops_url . "/uploads/avatars/" . "';\n"; + $script .= "var xoops_smallworld = jQuery.noConflict();\n"; + $script .= "var myID = " . $myid . ";\n"; + $script .= "var userHasProfile = " . $ChkProf . ";\n"; + $script .= "var smallworldTakeOverLinks = " . $takeoverlinks . ";\n"; + $script .= "var geoL = " . $geolocate . ";\n"; + $script .= "var geocomplete = '';\n"; + $script .= "var smallworldVerString = '" . $smallworldUV . "';\n"; + $script .= "var smallworlduseverification = new Array();\n"; + $script .= "smallworlduseverification = smallworldVerString.split(',');\n"; + $script .= "var hasmessages = " . $count_invit . ";\n"; + $script .= "var smallworldvalidationstrenght = " . $validate . ";\n"; + $script .= "var smallworld_getFriendsMsgComCount = " . $getUserMsgNum . ";\n"; + $script .= "var $ = jQuery();\n"; + $script .= "} else {"."\n"; + $script .= "\n"; + $script .= "}"."\n"; + $xoTheme->addScript('','',$script); + + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/smallworld.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.colorbox.js'); + $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/colorbox.css'); + + + if ($p == 'register' || $p == 'editprofile') { + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.validate.js'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.validation.functions.js'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.stepy.js'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.elastic.source.js'); + // Include geolocate styling + if ($geolocate != 1) { + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/geoname.js'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/geoname_now.js'); + } else { + $xoTheme->addScript("http://maps.google.com/maps/api/js?sensor=false&language="._LANGCODE); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/ui.geo_autocomplete.js'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/ui.geo_autocomplete_now.js'); + } + if (file_exists(XOOPS_ROOT_PATH.'/modules/smallworld/language/' + . $lang . '/js/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' + ); + } + } + if ($p == 'index') { + $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/ajaxupload.3.5.js'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.avatar_helper.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.elastic.source.js'); + // Include geolocate styling + if ($geolocate != 1) { + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/geoname.js'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/geoname_now.js'); + } else { + $xoTheme->addScript("http://maps.google.com/maps/api/js?sensor=false&language="._LANGCODE); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/ui.geo_autocomplete.js'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/ui.geo_autocomplete_now.js'); + } + + } + if ($p == 'gallery') { + $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/galleriffic-5.css'); + $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/basic.css'); + $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/black.css'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.galleriffic.js'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.history.js'); + $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.elastic.source.js'); + } + + if ($p == 'imageupload') { + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.fileupload-uix.js'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.fileupload-ui.js'); + $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'); + } + + if ($p == 'userprofile' || $p == 'friends') { + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/apprise-1.5.full.js'); + $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/jquery.fileupload-ui.css'); + $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/oembed.css'); + $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/ajaxupload.3.5.js'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.avatar_helper.js'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.bookmark.js'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.elastic.source.js'); + // Include geolocate styling + if ($geolocate != 1) { + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/geoname.js'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/geoname_now.js'); + } else { + $xoTheme->addScript("http://maps.google.com/maps/api/js?sensor=false&language="._LANGCODE); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/ui.geo_autocomplete.js'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/ui.geo_autocomplete_now.js'); + } + + } + + if ($p == 'perma' || $p == 'share') { + $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.elastic.source.js'); + } + + }//end if user +} + + /** + * @Get url of smallworld + * @returns string + */ + function smallworld_getHostRequest() + { + $protocol = strpos(strtolower($_SERVER['SERVER_PROTOCOL']),'https') === FALSE ? 'http' : 'https'; + $host = $_SERVER['HTTP_HOST']; + $script = $_SERVER['SCRIPT_NAME']; + $params = $_SERVER['QUERY_STRING']; + $currentUrl = $protocol . '://' . $host; + return $currentUrl; + } \ No newline at end of file Modified: XoopsModules/smallworld/trunk/smallworld/index.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/index.php 2012-03-06 17:45:59 UTC (rev 9102) +++ XoopsModules/smallworld/trunk/smallworld/index.php 2012-03-07 03:53:13 UTC (rev 9103) @@ -143,7 +143,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/smallworld.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-03-06 17:45:59 UTC (rev 9102) +++ XoopsModules/smallworld/trunk/smallworld/js/smallworld.js 2012-03-07 03:53:13 UTC (rev 9103) @@ -196,7 +196,8 @@ // Steps for registration and submitbutton name using // formToWizzard.js - xoops_smallworld(function() { + if (xoops_smallworld("#smallworld_profileform").length > 0) { + xoops_smallworld(function() { xoops_smallworld('#smallworld_profileform').stepy({ backLabel: SmallworldValidationBackButton, block: true, @@ -207,22 +208,37 @@ titleClick: false }); }); + } // Attach geolocate autocomplete to forms - if (geoL === 1) { - xoops_smallworld('#birthplace').geo_autocomplete(); - xoops_smallworld('#present_city').geo_autocomplete_now(); - } else { - // do something or not - } + xoops_smallworld(function() { + if (geoL === 1) { + if (xoops_smallworld("#birthplace").length > 0) { + xoops_smallworld('#birthplace').geo_autocomplete(); + } + if (xoops_smallworld("#present_city").length > 0){ + xoops_smallworld('#present_city').geo_autocomplete_now(); + } + } else { + // do something or not + } + }); + // Make Textareas elastic - xoops_smallworld(function() { - xoops_smallworld('.favourites, .smallworld_comment, #smallworld_update, #smallworld_update_profile').elastic(); - xoops_smallworld('.smallworld_comment').css('max-width', xoops_smallworld('.smallworld_stcommentbody').outerWidth() - 90 + 'px'); - xoops_smallworld('#smallworld_update').css('max-width', xoops_smallworld('#smallworld_wall_container').outerWidth() - 30 + 'px'); + if (xoops_smallworld(".favourites").length > 0 || + xoops_smallworld(".smallworld_comment").length > 0 || + xoops_smallworld("#smallworld_update").length > 0 || + xoops_smallworld("#smallworld_update_profile").length > 0 + ) + { + xoops_smallworld(function() { + xoops_smallworld('.favourites, .smallworld_comment, #smallworld_update, #smallworld_update_profile').elastic(); + xoops_smallworld('.smallworld_comment').css('max-width', xoops_smallworld('.smallworld_stcommentbody').outerWidth() - 90 + 'px'); + xoops_smallworld('#smallworld_update').css('max-width', xoops_smallworld('#smallworld_wall_container').outerWidth() - 30 + 'px'); - }); + }); + } // Toggle the form 'partner' if choosen status is married, in relationship, complicated xoops_smallworld(function() { @@ -564,8 +580,8 @@ // Sharing bookmarks defines xoops_smallworld(function () { - xoops_smallworld('.share').live('click',function() { - // e.preventDefault(); + xoops_smallworld('.share').live('click',function(e) { + e.preventDefault(); var id = xoops_smallworld(this).attr('id'); var ref = xoops_smallworld('span[name="' + id + '"]').attr('rel'); var desc = xoops_smallworld('span[name="' + id + '"]').attr('rel1'); @@ -900,6 +916,7 @@ xoops_smallworld('#smallworld_profileform-next-0').show(); xoops_smallworld('#smallworld_profileform-next-1').show(); } + return false; } function attachAvatarOpen () { @@ -931,4 +948,5 @@ }; }); //close click }); + return false; } \ No newline at end of file Modified: XoopsModules/smallworld/trunk/smallworld/language/danish/js/jquery.ui.datepicker-language.js =================================================================== --- XoopsModules/smallworld/trunk/smallworld/language/danish/js/jquery.ui.datepicker-language.js 2012-03-06 17:45:59 UTC (rev 9102) +++ XoopsModules/smallworld/trunk/smallworld/language/danish/js/jquery.ui.datepicker-language.js 2012-03-07 03:53:13 UTC (rev 9103) @@ -1,29 +1,24 @@ /* http://keith-wood.name/datepick.html Danish localisation for jQuery Datepicker. - Written by Jan Christensen ( del...@gm...). */ -(function($) { - $.datepick.regional['da'] = { - monthNames: ['Januar','Februar','Marts','April','Maj','Juni', + Written by Culex <cu...@cu...> */ +jQuery(function(xoops_smallworld){ + xoops_smallworld.datepicker.regional['da-DK'] = { + closeText: 'Luk', closeStatus: 'Luk uden ændringer', + prevText: '<Forrige', prevStatus: 'Vis forrige måned', + prevJumpText: '<<', prevJumpStatus: '', + currentText: 'Idag', currentStatus: 'Vis aktuel måned', + monthNames: ['Januar','Februar','Marts','April','Maj','Juni', 'Juli','August','September','Oktober','November','December'], - monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun', + monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun', 'Jul','Aug','Sep','Okt','Nov','Dec'], dayNames: ['Søndag','Mandag','Tirsdag','Onsdag','Torsdag','Fredag','Lørdag'], dayNamesShort: ['Søn','Man','Tir','Ons','Tor','Fre','Lør'], dayNamesMin: ['Sø','Ma','Ti','On','To','Fr','Lø'], - dateFormat: 'dd-mm-yyyy', firstDay: 0, - renderer: $.datepick.defaultRenderer, - prevText: '<Forrige', prevStatus: 'Vis forrige måned', - prevJumpText: '<<', prevJumpStatus: '', - nextText: 'Næste>', nextStatus: 'Vis næste måned', - nextJumpText: '>>', nextJumpStatus: '', - currentText: 'Idag', currentStatus: 'Vis aktuel måned', - todayText: 'Idag', todayStatus: 'Vis aktuel måned', - clearText: 'Nulstil', clearStatus: 'Nulstil den aktuelle dato', - closeText: 'Luk', closeStatus: 'Luk uden ændringer', - yearStatus: 'Vis et andet år', monthStatus: 'Vis en anden måned', - weekText: 'Uge', weekStatus: 'Årets uge', - dayStatus: 'Vælg D, M d', defaultStatus: 'Vælg en dato', - isRTL: false - }; - $.datepick.setDefaults($.datepick.regional['da']); -})(jQuery); \ No newline at end of file + weekHeader: 'Ug', + dateFormat: 'dd-mm-yyyy', + firstDay: 0, + isRTL: false, + showMonthAfterYear: false, + yearSuffix: ''}; + xoops_smallworld.datepicker.setDefaults(xoops_smallworld.datepicker.regional['da-DK']); +}); Modified: XoopsModules/smallworld/trunk/smallworld/language/danish/js/variables.js =================================================================== --- XoopsModules/smallworld/trunk/smallworld/language/danish/js/variables.js 2012-03-06 17:45:59 UTC (rev 9102) +++ XoopsModules/smallworld/trunk/smallworld/language/danish/js/variables.js 2012-03-07 03:53:13 UTC (rev 9103) @@ -10,6 +10,9 @@ var _smallworldCancel = "Afbryd"; var _smallworldClose = "Luk"; +var _smallworldCommentsMoreMore = "..Vis mere"; +var _smallworldCommentsMoreLess = "..vis mindre"; + var SmallworldGenderError = "Vælg dit køn"; var SmallworldBirthdayError = "Vælg din fødselsdag"; var SmallworldEmailError = "Skriv venligst mindst eén email"; Modified: XoopsModules/smallworld/trunk/smallworld/preloads/core.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/preloads/core.php 2012-03-06 17:45:59 UTC (rev 9102) +++ XoopsModules/smallworld/trunk/smallworld/preloads/core.php 2012-03-07 03:53:13 UTC (rev 9103) @@ -43,17 +43,15 @@ } $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/base/jquery.ui.all.css'); - $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/smallworld.css'); - $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/apprise.css'); + $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/smallworld.css'); $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery-1.7.1.min.js'); $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery-ui-1.8.11.custom.js'); - $xoops_url= XOOPS_URL; $myid = $xoopsUser->getVar('uid'); // 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'); + if (file_exists(XOOPS_ROOT_PATH.'/modules/smallworld/language/'.$xoopsConfig['language'].'/js/variables.js')) { + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/language/'.$xoopsConfig['language'].'/js/variables.js'); } else { $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/language/english/js/variables.js'); } @@ -77,9 +75,16 @@ // Get users messages count based on users followerArray $getUserMsgNum = smallworld_getCountFriendMessagesEtc (); - + // Check if request url is with www or without + $urltest = smallworld_getHostRequest(); + $xoops_url = XOOPS_URL; + if (!strstr($urltest, 'www.')) { + $xoops_url = str_replace( 'www.', '', $xoops_url ); + } + // Set javascript vars but only if not already defined. - // Check prevents multible loads + // Check prevents multible loads + $script = "if (myID === undefined) {"."\n"; $script .= "var smallworld_url = '" . $xoops_url . "/modules/smallworld/" . "';\n"; $script .= "var smallworld_uploaddir = '" . $xoops_url . "/uploads/avatars/" . "';\n"; @@ -106,13 +111,14 @@ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.validation.functions.js'); $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.stepy.js'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.oembed.js'); $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.elastic.source.js'); $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.countdown.js'); $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.innerfade.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'); + if ( file_exists(XOOPS_ROOT_PATH.'/modules/smallworld/language/'.$xoopsConfig['language'].'/js/jquery.ui.datepicker-language.js')) { + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/language/'.$xoopsConfig['language'].'/js/jquery.ui.datepicker-language.js'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/language/'.$xoopsConfig['language'].'/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'); Modified: XoopsModules/smallworld/trunk/smallworld/register.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/register.php 2012-03-06 17:45:59 UTC (rev 9102) +++ XoopsModules/smallworld/trunk/smallworld/register.php 2012-03-07 03:53:13 UTC (rev 9103) @@ -289,7 +289,7 @@ $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'); + $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/smallworld.css'); } } else { redirect_header(XOOPS_URL . "/user.php", 1, _NOPERM); Modified: XoopsModules/smallworld/trunk/smallworld/templates/getlastcom.html =================================================================== --- XoopsModules/smallworld/trunk/smallworld/templates/getlastcom.html 2012-03-06 17:45:59 UTC (rev 9102) +++ XoopsModules/smallworld/trunk/smallworld/templates/getlastcom.html 2012-03-07 03:53:13 UTC (rev 9103) @@ -38,7 +38,7 @@ </div> <{/section}> <script type="text/javascript"> -xoops_smallworld(document).ready(function() { +xoops_smallworld(document).ready(function(){ smallworldCheckNumDivs(); attachAvatarOpen(); }); Modified: XoopsModules/smallworld/trunk/smallworld/templates/getlastmsg.html =================================================================== --- XoopsModules/smallworld/trunk/smallworld/templates/getlastmsg.html 2012-03-06 17:45:59 UTC (rev 9102) +++ XoopsModules/smallworld/trunk/smallworld/templates/getlastmsg.html 2012-03-07 03:53:13 UTC (rev 9103) @@ -121,7 +121,7 @@ <br><br> <{/foreach}> <script type="text/javascript"> -xoops_smallworld(document).ready(function() { +xoops_smallworld(document).ready(function(){ smallworldCheckNumDivs(); attachAvatarOpen(); }); Modified: XoopsModules/smallworld/trunk/smallworld/templates/getmore.html =================================================================== --- XoopsModules/smallworld/trunk/smallworld/templates/getmore.html 2012-03-06 17:45:59 UTC (rev 9102) +++ XoopsModules/smallworld/trunk/smallworld/templates/getmore.html 2012-03-07 03:53:13 UTC (rev 9103) @@ -115,7 +115,7 @@ <a href="javascript:void(0)" class="smallworld_msg_counter" rel="<{$pagename}>" id="<{$post.msg_id}>">MORE</a> <br><br> <script type="text/javascript"> -xoops_smallworld(document).ready(function() { +xoops_smallworld(document).ready(function(){ smallworldCheckNumDivs(); attachAvatarOpen(); }); Modified: XoopsModules/smallworld/trunk/smallworld/templates/smallworld_userprofile_template.html =================================================================== --- XoopsModules/smallworld/trunk/smallworld/templates/smallworld_userprofile_template.html 2012-03-06 17:45:59 UTC (rev 9102) +++ XoopsModules/smallworld/trunk/smallworld/templates/smallworld_userprofile_template.html 2012-03-07 03:53:13 UTC (rev 9103) @@ -292,7 +292,9 @@ <div id="smallworld_inspection_desc"><{$smarty.const._SMALLWORLD_INSPEC_DESC}> <p id = "clock-<{$ownerofpage}>"></p> <script type='text/javascript'> - xoops_smallworld('#clock-<{$ownerofpage}>').countdown({onExpiry:smallworldRefresh,until: +<{$inspecttime}>}); + xoops_smallworld(document).ready(function(){ + xoops_smallworld('#clock-<{$ownerofpage}>').countdown({onExpiry:smallworldRefresh,until: +<{$inspecttime}>}); + }); </script> </div> </div> Modified: XoopsModules/smallworld/trunk/smallworld/userprofile.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/userprofile.php 2012-03-06 17:45:59 UTC (rev 9102) +++ XoopsModules/smallworld/trunk/smallworld/userprofile.php 2012-03-07 03:53:13 UTC (rev 9103) @@ -220,7 +220,7 @@ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.avatar_helper.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'); + $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/smallworld.css'); //Check Language $lang = $xoopsConfig['language']; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dj...@us...> - 2012-03-07 17:09:29
|
Revision: 9107 http://xoops.svn.sourceforge.net/xoops/?rev=9107&view=rev Author: djculex Date: 2012-03-07 17:09:19 +0000 (Wed, 07 Mar 2012) Log Message: ----------- Modified Paths: -------------- XoopsModules/smallworld/trunk/smallworld/include/functions.php XoopsModules/smallworld/trunk/smallworld/preloads/core.php Modified: XoopsModules/smallworld/trunk/smallworld/include/functions.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/include/functions.php 2012-03-07 16:36:39 UTC (rev 9106) +++ XoopsModules/smallworld/trunk/smallworld/include/functions.php 2012-03-07 17:09:19 UTC (rev 9107) @@ -145,13 +145,13 @@ $yearDiff = date("Y") - $year; $monthDiff = date("m") - $month; $dayDiff = date("d") - $day; - if ($MonthDiff == 0){ - if($DayDiff < 0) { - $YearDiff--; + if ($monthDiff == 0){ + if($dayDiff < 0) { + $yearDiff--; } } - if ($MonthDiff < 0){ - $YearDiff--; + if ($monthDiff < 0){ + $yearDiff--; } return $yearDiff; } Modified: XoopsModules/smallworld/trunk/smallworld/preloads/core.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/preloads/core.php 2012-03-07 16:36:39 UTC (rev 9106) +++ XoopsModules/smallworld/trunk/smallworld/preloads/core.php 2012-03-07 17:09:19 UTC (rev 9107) @@ -35,8 +35,6 @@ if ($module) { $moduleConfig =& $config_handler->getConfigsByCat(0, $module->getVar('mid')); } - //Check Language - $lang = $xoopsConfig['language']; // check geolocation style if(isset($moduleConfig['geolocate'])) { $geolocate = $moduleConfig['geolocate']; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dj...@us...> - 2012-03-07 18:43:31
|
Revision: 9108 http://xoops.svn.sourceforge.net/xoops/?rev=9108&view=rev Author: djculex Date: 2012-03-07 18:43:19 +0000 (Wed, 07 Mar 2012) Log Message: ----------- - Bugfix: After pressing 'more' - avatar size in comment is wrong - Various css theme includes removed Modified Paths: -------------- XoopsModules/smallworld/trunk/smallworld/include/functions.php XoopsModules/smallworld/trunk/smallworld/js/smallworld.js XoopsModules/smallworld/trunk/smallworld/loadmore.php XoopsModules/smallworld/trunk/smallworld/templates/getmore.html Modified: XoopsModules/smallworld/trunk/smallworld/include/functions.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/include/functions.php 2012-03-07 17:09:19 UTC (rev 9107) +++ XoopsModules/smallworld/trunk/smallworld/include/functions.php 2012-03-07 18:43:19 UTC (rev 9108) @@ -882,8 +882,7 @@ $geolocate = $moduleConfig['geolocate']; } $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/base/jquery.ui.all.css'); - $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/smallworld.css'); - $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/apprise.css'); + $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/smallworld.css'); $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery-1.7.1.min.js'); $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery-ui-1.8.11.custom.js'); @@ -945,10 +944,9 @@ $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.colorbox.js'); - $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/colorbox.css'); - if ($p == 'register' || $p == 'editprofile') { + if ($p == 'register' || $p == 'editprofile' || $p == '') { $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.validate.js'); $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.validation.functions.js'); $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.stepy.js'); @@ -980,8 +978,9 @@ ); } } - if ($p == 'index') { + if ($p == 'index' || $p == '') { $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.oembed.js'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.countdown.js'); $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'); @@ -999,7 +998,7 @@ } } - if ($p == 'gallery') { + if ($p == 'gallery' || $p == '') { $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/galleriffic-5.css'); $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/basic.css'); $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/black.css'); @@ -1010,7 +1009,7 @@ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.elastic.source.js'); } - if ($p == 'imageupload') { + if ($p == 'imageupload' || $p == '') { $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.fileupload-uix.js'); $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.fileupload-ui.js'); $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.fileupload.js'); @@ -1018,7 +1017,7 @@ $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/jquery.fileupload-ui.css'); } - if ($p == 'userprofile' || $p == 'friends') { + if ($p == 'userprofile' || $p == 'friends' || $p == '') { $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/apprise-1.5.full.js'); $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/jquery.fileupload-ui.css'); $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/oembed.css'); @@ -1040,7 +1039,7 @@ } - if ($p == 'perma' || $p == 'share') { + if ($p == 'perma' || $p == 'share' || $p == '') { $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'); Modified: XoopsModules/smallworld/trunk/smallworld/js/smallworld.js =================================================================== --- XoopsModules/smallworld/trunk/smallworld/js/smallworld.js 2012-03-07 17:09:19 UTC (rev 9107) +++ XoopsModules/smallworld/trunk/smallworld/js/smallworld.js 2012-03-07 18:43:19 UTC (rev 9108) @@ -567,13 +567,15 @@ }); } - xoops_smallworld('#smallworld_stats_scroller').innerfade({ - animationtype: 'fade', - speed: 1200, - timeout: 10000, - type: 'sequence', - containerheight: '50px' - }); + if (xoops_smallworld("#smallworld_stats_scroller").length > 0) { + xoops_smallworld('#smallworld_stats_scroller').innerfade({ + animationtype: 'fade', + speed: 1200, + timeout: 10000, + type: 'sequence', + containerheight: '50px' + }); + } // Return jSon with count of friends smallworld_getCountFriendMessagesEtcJS(); Modified: XoopsModules/smallworld/trunk/smallworld/loadmore.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/loadmore.php 2012-03-07 17:09:19 UTC (rev 9107) +++ XoopsModules/smallworld/trunk/smallworld/loadmore.php 2012-03-07 18:43:19 UTC (rev 9108) @@ -45,8 +45,10 @@ $tpl->assign('isadminuser', 'YES'); } - $myavatar = $Wall->Gravatar($id); - $myavatarlink = smallworld_getAvatarLink($id, $myavatar); + $myavatar = $Wall->Gravatar($id); + $myavatarlink = smallworld_getAvatarLink($id, $myavatar); + $myavatar_size = smallworld_getImageSize(80, 100, $myavatarlink); + $myavatar_highwide = smallworld_imageResize($myavatar_size[0], $myavatar_size[1], 35); $followers = Smallworld_array_flatten($Wall->getFollowers($id),0); if ($page == 'index') { @@ -112,5 +114,6 @@ $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/getmore.html'); ?> Modified: XoopsModules/smallworld/trunk/smallworld/templates/getmore.html =================================================================== --- XoopsModules/smallworld/trunk/smallworld/templates/getmore.html 2012-03-07 17:09:19 UTC (rev 9107) +++ XoopsModules/smallworld/trunk/smallworld/templates/getmore.html 2012-03-07 18:43:19 UTC (rev 9108) @@ -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' <{$comm[i].avatar_highwide}>/> + <img src="<{$myavatarlink}>" class='smallworld_small_face' <{$myavatar_highwide}>/> </div> <div class="smallworld_stcommenttext" > <form method="post" action=""> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dj...@us...> - 2012-03-11 14:49:16
|
Revision: 9120 http://xoops.svn.sourceforge.net/xoops/?rev=9120&view=rev Author: djculex Date: 2012-03-11 14:49:10 +0000 (Sun, 11 Mar 2012) Log Message: ----------- Bugfix: in language files changed uppercase start.PNG to start.png Modified Paths: -------------- XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt XoopsModules/smallworld/trunk/smallworld/language/danish/main.php XoopsModules/smallworld/trunk/smallworld/language/english/main.php Modified: XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt =================================================================== --- XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt 2012-03-10 21:51:24 UTC (rev 9119) +++ XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt 2012-03-11 14:49:10 UTC (rev 9120) @@ -1,4 +1,10 @@ ------------------------------ +Changelog v.1.11 RC 5 +------------------------------ +11 Marts 2012 +- Bugfix: in language files changed uppercase start.PNG to start.png + +------------------------------ Changelog v.1.11 RC 4 ------------------------------ 23 February 2012 Modified: XoopsModules/smallworld/trunk/smallworld/language/danish/main.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/language/danish/main.php 2012-03-10 21:51:24 UTC (rev 9119) +++ XoopsModules/smallworld/trunk/smallworld/language/danish/main.php 2012-03-11 14:49:10 UTC (rev 9120) @@ -241,7 +241,7 @@ define ("_SMALLWORLD_MORE", ".. mere"); /* -------------- Upload formular -------------------- */ -define ('_SMALLWORLD_UPLOAD_HOWTO', 'Alle billeder fra dit album er vist her, og du kan bruge dette værktøj til at uploade eller slette billeder <br>Tryk på den grønne upload fil(er), Vælg dine billeder og uploade enten: < br> 1) En efter en - brug <img src="images/icon_start.PNG" style="display: inline-block;height:13px;"/>ikon.<br> 2) Vælg flere ved gennemsyn eller Drag * filer over på den grønne upload (* virker pt. ikke i IE) og tryk på Start alle <br> Bemærk: Hvis du vælger andre filtyper end billedfiler vil scriptet afbryde. Billedstørrelsen er højst 5 MBytes <br> '); +define ('_SMALLWORLD_UPLOAD_HOWTO', 'Alle billeder fra dit album er vist her, og du kan bruge dette værktøj til at uploade eller slette billeder <br>Tryk på den grønne upload fil(er), Vælg dine billeder og uploade enten: < br> 1) En efter en - brug <img src="images/icon_start.png" style="display: inline-block;height:13px;"/>ikon.<br> 2) Vælg flere ved gennemsyn eller Drag * filer over på den grønne upload (* virker pt. ikke i IE) og tryk på Start alle <br> Bemærk: Hvis du vælger andre filtyper end billedfiler vil scriptet afbryde. Billedstørrelsen er højst 5 MBytes <br> '); define ('_SMALLWORLD_UPLOADTITLE', 'Billedtitel'); define ('_SMALLWORLD_UPLOADDESC', 'Billedbeskrivelse'); define ('_SMALLWORLD_UPLOAD_TITLE', 'Upload billeder til dit album'); Modified: XoopsModules/smallworld/trunk/smallworld/language/english/main.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/language/english/main.php 2012-03-10 21:51:24 UTC (rev 9119) +++ XoopsModules/smallworld/trunk/smallworld/language/english/main.php 2012-03-11 14:49:10 UTC (rev 9120) @@ -241,7 +241,7 @@ define("_SMALLWORLD_MORE","..more"); /*-------------- Upload form --------------------*/ -define('_SMALLWORLD_UPLOAD_HOWTO','All images from your album is shown here, and you can use this tool to upload or delete images<br><br>Press the green upload file(s), Select your pictures and upload eighter:<br>1) One by one using the <img src="images/icon_start.PNG" style="display: inline-block;height:13px;"/> icon.<br>2) Select multible by browsing or Drag* files onto the green upload (* does currently not work in IE) and press start all<br><br>Note: If you choose other filetypes than image files the script wil break. Image size is maximum 5 MBytes<br><br>'); +define('_SMALLWORLD_UPLOAD_HOWTO','All images from your album is shown here, and you can use this tool to upload or delete images<br><br>Press the green upload file(s), Select your pictures and upload eighter:<br>1) One by one using the <img src="images/icon_start.png" style="display: inline-block;height:13px;"/> icon.<br>2) Select multible by browsing or Drag* files onto the green upload (* does currently not work in IE) and press start all<br><br>Note: If you choose other filetypes than image files the script wil break. Image size is maximum 5 MBytes<br><br>'); define('_SMALLWORLD_UPLOADTITLE','Image title'); define('_SMALLWORLD_UPLOADDESC','Image description'); define('_SMALLWORLD_UPLOAD_TITLE','Upload images to your image album'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |