From: <dj...@us...> - 2012-01-30 17:51:52
|
Revision: 8837 http://xoops.svn.sourceforge.net/xoops/?rev=8837&view=rev Author: djculex Date: 2012-01-30 17:51:44 +0000 (Mon, 30 Jan 2012) Log Message: ----------- - function to resize avatar proportionally - Adjusted some css - attached colorbox to all avatars & update images - Some missing Js includes - some missing language defines Modified Paths: -------------- XoopsModules/smallworld/trunk/smallworld/admin/div_useradmin.php XoopsModules/smallworld/trunk/smallworld/admin/main.php XoopsModules/smallworld/trunk/smallworld/admin/useradmin.php XoopsModules/smallworld/trunk/smallworld/class/profile.php XoopsModules/smallworld/trunk/smallworld/comment_ajax.php XoopsModules/smallworld/trunk/smallworld/css/smallworld.css XoopsModules/smallworld/trunk/smallworld/friends.php XoopsModules/smallworld/trunk/smallworld/include/functions.php XoopsModules/smallworld/trunk/smallworld/index.php XoopsModules/smallworld/trunk/smallworld/js/jquery.avatar_helper.js XoopsModules/smallworld/trunk/smallworld/js/smallworld.js XoopsModules/smallworld/trunk/smallworld/language/english/main.php XoopsModules/smallworld/trunk/smallworld/loadmore.php XoopsModules/smallworld/trunk/smallworld/message_ajax.php XoopsModules/smallworld/trunk/smallworld/permalink.php XoopsModules/smallworld/trunk/smallworld/smallworldshare.php XoopsModules/smallworld/trunk/smallworld/templates/admin_useradmin.html XoopsModules/smallworld/trunk/smallworld/templates/getlastcom.html XoopsModules/smallworld/trunk/smallworld/templates/getlastmsg.html XoopsModules/smallworld/trunk/smallworld/templates/getmore.html XoopsModules/smallworld/trunk/smallworld/templates/smallworld_admin.html XoopsModules/smallworld/trunk/smallworld/templates/smallworld_alluserstodiv.html XoopsModules/smallworld/trunk/smallworld/templates/smallworld_friends_template.html XoopsModules/smallworld/trunk/smallworld/templates/smallworld_index.html XoopsModules/smallworld/trunk/smallworld/templates/smallworld_permalink.html XoopsModules/smallworld/trunk/smallworld/templates/smallworld_share.html XoopsModules/smallworld/trunk/smallworld/templates/smallworld_userprofile_imgupload.html XoopsModules/smallworld/trunk/smallworld/templates/smallworld_userprofile_template.html XoopsModules/smallworld/trunk/smallworld/userprofile.php Modified: XoopsModules/smallworld/trunk/smallworld/admin/div_useradmin.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/admin/div_useradmin.php 2012-01-30 17:39:33 UTC (rev 8836) +++ XoopsModules/smallworld/trunk/smallworld/admin/div_useradmin.php 2012-01-30 17:51:44 UTC (rev 8837) @@ -36,6 +36,8 @@ $ai['username'] = $data['username']; $ai['realname'] = $data['realname']; $ai['userimage'] = smallworld_getAvatarLink ($data['userid'],$data['userimage']); + $ai['avatar_size'] = getimagesize($ai['userimage']); + $ai['avatar_highwide'] = smallworld_imageResize($ai['avatar_size'][0], $ai['avatar_size'][1], 50); $ai['ip'] = $data['ip']; $ai['complaint'] = $data['complaint']; $ai['inspect_start'] = $data['inspect_start']; @@ -54,6 +56,8 @@ $ani['username'] = $data['username']; $ani['realname'] = $data['realname']; $ani['userimage'] = smallworld_getAvatarLink ($data['userid'],$data['userimage']); + $ani['avatar_size'] = getimagesize($ani['userimage']); + $ani['avatar_highwide'] = smallworld_imageResize($ani['avatar_size'][0], $ani['avatar_size'][1], 50); $ani['ip'] = $data['ip']; $ani['complaint'] = $data['complaint']; $ani['inspect_start'] = ''; Modified: XoopsModules/smallworld/trunk/smallworld/admin/main.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/admin/main.php 2012-01-30 17:39:33 UTC (rev 8836) +++ XoopsModules/smallworld/trunk/smallworld/admin/main.php 2012-01-30 17:51:44 UTC (rev 8837) @@ -74,6 +74,8 @@ $ai['username'] = $data['username']; $ai['realname'] = $data['realname']; $ai['userimage'] = smallworld_getAvatarLink ($data['userid'],$data['userimage']); + $ai['avatar_size'] = getimagesize($ai['userimage']); + $ai['avatar_highwide'] = smallworld_imageResize($ai['avatar_size'][0], $ai['avatar_size'][1], 50); $ai['ip'] = $data['ip']; $ai['complaint'] = $data['complaint']; $ai['inspect_start'] = $data['inspect_start']; @@ -92,6 +94,8 @@ $ani['username'] = $data['username']; $ani['realname'] = $data['realname']; $ani['userimage'] = smallworld_getAvatarLink ($data['userid'],$data['userimage']); + $ani['avatar_size'] = getimagesize($ani['userimage']); + $ani['avatar_highwide'] = smallworld_imageResize($ani['avatar_size'][0], $ani['avatar_size'][1], 50); $ani['ip'] = $data['ip']; $ani['complaint'] = $data['complaint']; $ani['inspect_start'] = ''; Modified: XoopsModules/smallworld/trunk/smallworld/admin/useradmin.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/admin/useradmin.php 2012-01-30 17:39:33 UTC (rev 8836) +++ XoopsModules/smallworld/trunk/smallworld/admin/useradmin.php 2012-01-30 17:51:44 UTC (rev 8837) @@ -44,6 +44,8 @@ $ai['username'] = $data['username']; $ai['realname'] = $data['realname']; $ai['userimage'] = smallworld_getAvatarLink ($data['userid'],$data['userimage']); + $ai['avatar_size'] = getimagesize($ai['userimage']); + $ai['avatar_highwide'] = smallworld_imageResize($ai['avatar_size'][0], $ai['avatar_size'][1], 50); $ai['ip'] = $data['ip']; $ai['complaint'] = $data['complaint']; $ai['inspect_start'] = $data['inspect_start']; @@ -62,6 +64,8 @@ $ani['username'] = $data['username']; $ani['realname'] = $data['realname']; $ani['userimage'] = smallworld_getAvatarLink ($data['userid'],$data['userimage']); + $ani['avatar_size'] = getimagesize($ani['userimage']); + $ani['avatar_highwide'] = smallworld_imageResize($ani['avatar_size'][0], $ani['avatar_size'][1], 50); $ani['ip'] = $data['ip']; $ani['complaint'] = $data['complaint']; $ani['inspect_start'] = ''; Modified: XoopsModules/smallworld/trunk/smallworld/class/profile.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/class/profile.php 2012-01-30 17:39:33 UTC (rev 8836) +++ XoopsModules/smallworld/trunk/smallworld/class/profile.php 2012-01-30 17:51:44 UTC (rev 8837) @@ -87,7 +87,9 @@ $hisorher = _SMALLWORLD_HISHER; } $avatar = $Wall->Gravatar($id); - $user_img = "<img src='".smallworld_getAvatarLink($id, $avatar)."' id='smallworld_user_img' height='100px' width='100px'"."/></img>"; + $avatar_size = getimagesize(smallworld_getAvatarLink($id, $avatar)); + $avatar_highwide = smallworld_imageResize($avatar_size[0], $avatar_size[1], 100); + $user_img = "<img src='".smallworld_getAvatarLink($id, $avatar)."' id='smallworld_user_img' ".$avatar_highwide."/></img>"; $currentcity = $r['present_city']; $currlng = $r['present_lng']; Modified: XoopsModules/smallworld/trunk/smallworld/comment_ajax.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/comment_ajax.php 2012-01-30 17:39:33 UTC (rev 8836) +++ XoopsModules/smallworld/trunk/smallworld/comment_ajax.php 2012-01-30 17:51:44 UTC (rev 8837) @@ -59,6 +59,8 @@ $wc['myavatar_link']= $myavatarlink; $wc['cface'] = $Wall->Gravatar($data['uid_fk']); $wc['avatar_link'] = smallworld_getAvatarLink ($data['uid_fk'], $wc['cface']); + $wc['avatar_size'] = getimagesize($wc['myavatar_link']); + $wc['avatar_highwide'] = smallworld_imageResize($wc['avatar_size'][0], $wc['avatar_size'][1], 35); $wc['compl_msg_lnk'] = "<a href='".XOOPS_URL."/modules/smallworld/permalink.php?ownerid=".Smallworld_getOwnerFromComment($cdata['msg_id_fk']); $wc['compl_msg_lnk'] .= "&updid=".$cdata['msg_id_fk']."#".$cdata['com_id']."'>"._SMALLWORLD_COMP_MSG_LNK_DESC."</a>"; $wc['vote_up'] = $Wall->countVotesCom ('com', 'up', $data['msg_id_fk'],$data['com_id']); Modified: XoopsModules/smallworld/trunk/smallworld/css/smallworld.css =================================================================== --- XoopsModules/smallworld/trunk/smallworld/css/smallworld.css 2012-01-30 17:39:33 UTC (rev 8836) +++ XoopsModules/smallworld/trunk/smallworld/css/smallworld.css 2012-01-30 17:51:44 UTC (rev 8837) @@ -335,6 +335,10 @@ width:550px; } +#smallworld_user_img { + text-align:center; +} + /*-------- Register items ---------*/ #smallworld_divstepy-error { @@ -730,9 +734,9 @@ .smallworld_stimg{ float:left; - height:50px; + /*height:50px;*/ margin: 0 5px; - width:50px; + /*width:50px;*/ border:solid 1px #dedede; padding:3px; } @@ -800,8 +804,8 @@ .smallworld_stcommentimg { float:left; - height:35px; - width:35px; + /*height:35px;*/ + /*width:35px;*/ border:solid 1px #dedede; padding:2px; } @@ -814,7 +818,6 @@ padding:3px; display:block; font-size:11px; - width:80%; } .smallworld_stcommenttext b { @@ -840,7 +843,7 @@ .smallworld_commentupdate { background-color: #F2F2F2; padding: 5px; - width: 480px; + width: 100%; } .smallworld_comment { @@ -851,11 +854,13 @@ /* faceb image*/ .smallworld_small_face { - width:35px;height:35px + /*width:35px;*/ + /*height:35px*/ } .smallworld_big_face { - width:50px;height:50px + /*width:50px;*/ + /*height:50px*/ } #smallworld_flashmessage { Modified: XoopsModules/smallworld/trunk/smallworld/friends.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/friends.php 2012-01-30 17:39:33 UTC (rev 8836) +++ XoopsModules/smallworld/trunk/smallworld/friends.php 2012-01-30 17:51:44 UTC (rev 8837) @@ -118,6 +118,8 @@ $fp['friendname'] = Smallworld_getName($data['you']); $fp['avatar'] = $Wall->Gravatar($data['you']); $fp['avatar_link'] = smallworld_getAvatarLink ($data['you'], $fp['avatar']); + $fp['avatar_size'] = getimagesize($fp['avatar_link']); + $fp['avatar_highwide'] = smallworld_imageResize($fp['avatar_size'][0], $fp['avatar_size'][1], 50); $xoopsTpl->append('pendingfriends', $fp); } } else { @@ -130,6 +132,8 @@ $ff['friendname'] = Smallworld_getName($data['you']); $ff['avatar'] = $Wall->Gravatar($data['you']); $ff['avatar_link'] = smallworld_getAvatarLink ($data['you'], $ff['avatar']); + $ff['avatar_size'] = getimagesize($ff['avatar_link']); + $ff['avatar_highwide'] = smallworld_imageResize($ff['avatar_size'][0], $ff['avatar_size'][1], 50); $xoopsTpl->append('verifiedfriends', $ff); } } else { @@ -142,6 +146,8 @@ $fy['friendname'] = Smallworld_getName($data['you']); $fy['avatar'] = $Wall->Gravatar($data['you']); $fy['avatar_link'] = smallworld_getAvatarLink ($data['you'], $fy['avatar']); + $fy['avatar_size'] = getimagesize($fy['avatar_link']); + $fy['avatar_highwide'] = smallworld_imageResize($fy['avatar_size'][0], $fy['avatar_size'][1], 50); $xoopsTpl->append('followingyou', $fy); } } else { @@ -154,6 +160,8 @@ $fm['friendname'] = Smallworld_getName($data['me']); $fm['avatar'] = $Wall->Gravatar($data['me']); $fm['avatar_link'] = smallworld_getAvatarLink ($data['me'], $fm['avatar']); + $fm['avatar_size'] = getimagesize($fm['avatar_link']); + $fm['avatar_highwide'] = smallworld_imageResize($fm['avatar_size'][0], $fm['avatar_size'][1], 50); $xoopsTpl->append('followingme', $fm); } @@ -207,6 +215,8 @@ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/ajaxupload.3.5.js'); $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.avatar_helper.js'); $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.innerfade.js'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.colorbox.js'); + $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/colorbox.css'); } else { redirect_header(XOOPS_URL . "/user.php", 1, _NOPERM); Modified: XoopsModules/smallworld/trunk/smallworld/include/functions.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/include/functions.php 2012-01-30 17:39:33 UTC (rev 8836) +++ XoopsModules/smallworld/trunk/smallworld/include/functions.php 2012-01-30 17:51:44 UTC (rev 8837) @@ -322,10 +322,10 @@ if ($image == '' or $image=='Not specifiyed' AND $gender == '2') { $link = XOOPS_URL."/modules/smallworld/images/ano_man.png"; } - if ($image == 'blank.gif' or $image=='Not specifiyed' AND $gender == '0') { + if ($image == 'blank.gif' or $image=='Not specifiyed' AND $gender == '') { $link = XOOPS_URL."/modules/smallworld/images/genderless.png"; } - if ($image == '' or $image=='Not specifiyed' AND $gender == '0') { + if ($image == '' or $image=='Not specifiyed' AND $gender == '') { $link = XOOPS_URL."/modules/smallworld/images/genderless.png"; } return $link; @@ -660,4 +660,25 @@ } } + +//Function to resize images proportionally +// Using imagesize($imageurl) returns $img[0], $img[1] +// Target = new max height or width in px +function smallworld_imageResize($width, $height, $target) { + //takes the larger size of the width and height and applies the + //formula accordingly...this is so this script will work + //dynamically with any size image + if ($width > $height) { + $percentage = ($target / $width); + } else { + $percentage = ($target / $height); + } + //gets the new value and applies the percentage, then rounds the value + $width = round($width * $percentage); + $height = round($height * $percentage); + //returns the new sizes in html image tag format...this is so you + //can plug this function inside an image tag and just get the + + return "width=\"$width\" height=\"$height\""; +} ?> Modified: XoopsModules/smallworld/trunk/smallworld/index.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/index.php 2012-01-30 17:39:33 UTC (rev 8836) +++ XoopsModules/smallworld/trunk/smallworld/index.php 2012-01-30 17:51:44 UTC (rev 8837) @@ -58,6 +58,8 @@ $Wall = new Wall_Updates(); $myavatar = $Wall->Gravatar($id); $myavatarlink = smallworld_getAvatarLink($id, $myavatar); + $myavatar_size = getimagesize($myavatarlink); + $myavatar_highwide = smallworld_imageResize($myavatar_size[0], $myavatar_size[1], 50); //Get friends invitations $getInvitations = $check->getRequests ($id); @@ -79,6 +81,8 @@ $wm['priv'] = $data['priv']; $wm['avatar'] = $Wall->Gravatar($data['uid_fk']); $wm['avatar_link'] = smallworld_getAvatarLink ($data['uid_fk'], $wm['avatar']); + $wm['avatar_size'] = getimagesize($wm['avatar_link']); + $wm['avatar_highwide'] = smallworld_imageResize($wm['avatar_size'][0], $wm['avatar_size'][1], 50); $wm['vote_up'] = $Wall->countVotes ('msg', 'up', $data['msg_id']); $wm['vote_down'] = $Wall->countVotes ('msg', 'down', $data['msg_id']); $wm['compl_msg_lnk'] = "<a href='".XOOPS_URL."/modules/smallworld/permalink.php?ownerid=".$data['uid_fk']; @@ -101,7 +105,9 @@ $wc['uid'] = $cdata['uid_fk']; $wc['myavatar'] = $Wall->Gravatar($id); $wc['myavatar_link'] = $myavatarlink; - $wc['cface'] = $Wall->Gravatar($cdata['uid_fk']); + $wc['avatar_size'] = getimagesize($wc['myavatar_link']); + $wc['avatar_highwide'] = smallworld_imageResize($wc['avatar_size'][0], $wc['avatar_size'][1], 35); + $wc['cface'] = $Wall->Gravatar($cdata['uid_fk']); $wc['avatar_link'] = smallworld_getAvatarLink ($cdata['uid_fk'], $wc['cface']); $wc['compl_msg_lnk'] = "<a href='".XOOPS_URL."/modules/smallworld/permalink.php?ownerid=".Smallworld_getOwnerFromComment($cdata['msg_id_fk']); $wc['compl_msg_lnk'] .= "&updid=".$cdata['msg_id_fk']."#".$cdata['com_id']."'>"._SMALLWORLD_COMP_MSG_LNK_DESC."</a>"; @@ -122,6 +128,7 @@ $xoopsTpl->assign('check',1); $xoopsTpl->assign('myavatar',$myavatar); $xoopsTpl->assign('myavatarlink',$myavatarlink); + $xoopsTpl->assign('myavatar_highwide',$myavatar_highwide); $xoopsTpl->assign('friendinvitations',$getInvitations); } elseif ($profile == 0) { Modified: XoopsModules/smallworld/trunk/smallworld/js/jquery.avatar_helper.js =================================================================== --- XoopsModules/smallworld/trunk/smallworld/js/jquery.avatar_helper.js 2012-01-30 17:39:33 UTC (rev 8836) +++ XoopsModules/smallworld/trunk/smallworld/js/jquery.avatar_helper.js 2012-01-30 17:51:44 UTC (rev 8837) @@ -20,6 +20,7 @@ response = xoops_smallworld.parseJSON( response ); if(response[0]==="success"){ xoops_smallworld("#smallworld_user_img").attr("src", smallworld_uploaddir+response[1]); + xoops_smallworld("#smallworld_user_img").css('height', '100px'); xoops_smallworld('div .UploadNewAvatar').hide(); //xoops_smallworld('#smallworld_user_img').replaceWith('<img src="'+smallworld_uploaddir+file+'" id="smallworld_user_img" height="140px" width="100px"'+file); //xoops_smallworld('img#smallworld_user_img').appendTo('<img src="'+smallworld_uploaddir+file+'" id="smallworld_user_img" height="140px" width="100px"'+file).addClass('success'); Modified: XoopsModules/smallworld/trunk/smallworld/js/smallworld.js =================================================================== --- XoopsModules/smallworld/trunk/smallworld/js/smallworld.js 2012-01-30 17:39:33 UTC (rev 8836) +++ XoopsModules/smallworld/trunk/smallworld/js/smallworld.js 2012-01-30 17:51:44 UTC (rev 8837) @@ -12,7 +12,10 @@ * author 2011 Culex - homepage.: http://culex.dk & email.: cu...@cu... */ xoops_smallworld(function() { - // GET pop for statistics + //Attach function for avatar + attachAvatarOpen (); + + // GET pop for statistics xoops_smallworld('#smallworld_statistics_lnk').live('click',function() { if (xoops_smallworld('#smallworld_statistics_lnk').length) { // implies *not* zero xoops_smallworld('#smallworldStatsDiv').show(); @@ -375,6 +378,7 @@ // Open avatar imagen in new window on click xoops_smallworld(function() { xoops_smallworld('#smallworld_user_img').css('cursor', 'pointer'); + xoops_smallworld('#smallworld_user_img').css('margin', '0 10%'); xoops_smallworld('#smallworld_user_img').live('click',function(event) { var url = xoops_smallworld(this).attr('src'); image = "<img src ='"+url+"' />"; @@ -829,4 +833,35 @@ xoops_smallworld('#smallworld_profileform-next-0').show(); xoops_smallworld('#smallworld_profileform-next-1').show(); } +} + +function attachAvatarOpen () { + // Open comment and update avatar imagen in new window on click + xoops_smallworld(function() { + xoops_smallworld('.smallworld_big_face, .smallworld_small_face, .smallworldAttImg').css('cursor', 'pointer'); + xoops_smallworld('.smallworld_big_face, .smallworld_small_face, .smallworldAttImg').live('click',function(event) { + var url = xoops_smallworld(this).attr('src'); + image = "<img src ='"+url+"' />"; + xoops_smallworld('<div id="lookingglassuseravatar">'+image+'</div>').appendTo('body'); + event.preventDefault(); + if (xoops_smallworld('#lookingglassuseravatar').length) { // implies *not* zero + xoops_smallworld('#lookingglassuseravatar').show(); + xoops_smallworld.fn.colorbox({ + width:"auto", + height:"70%", + inline:true, + onCleanup:function() { + xoops_smallworld('#lookingglassuseravatar').hide(); + }, + onClosed:function() { + xoops_smallworld("#lookingglassuseravatar").remove(); + }, + onComplete : function() { + xoops_smallworld(this).colorbox.resize(); + }, + href:"#lookingglassuseravatar" + }); + }; + }); //close click + }); } \ No newline at end of file Modified: XoopsModules/smallworld/trunk/smallworld/language/english/main.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/language/english/main.php 2012-01-30 17:39:33 UTC (rev 8836) +++ XoopsModules/smallworld/trunk/smallworld/language/english/main.php 2012-01-30 17:51:44 UTC (rev 8837) @@ -251,6 +251,12 @@ define("_SMALLWORLD_WELCOME_TITLE","Welcome"); define("_SMALLWORLD_WELCOMETEXT",", welcome. Hope you'll enjoy your stay."); define("_SMALLWORLD_UPLOADEDSOMEIMAGES"," Uploaded some new pictures <br/>"); +define("_SMALLWORLD_IMAGES_START","Start"); +define("_SMALLWORLD_IMAGES_CANCEL","Cancel"); +define("_SMALLWORLD_IMAGES_DELETE","Delete"); +define("_SMALLWORLD_IMAGES_STARTALL","Start All"); +define("_SMALLWORLD_IMAGES_CANCELALL","Cancel All"); +define("_SMALLWORLD_IMAGES_DELETEALL","Delete All"); /*-------------- Image gallery -------------*/ define("_SMALLWORLD_ALBUMTITLETEXT","Close album"); Modified: XoopsModules/smallworld/trunk/smallworld/loadmore.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/loadmore.php 2012-01-30 17:39:33 UTC (rev 8836) +++ XoopsModules/smallworld/trunk/smallworld/loadmore.php 2012-01-30 17:51:44 UTC (rev 8837) @@ -69,6 +69,8 @@ $wm['priv'] = $data['priv']; $wm['avatar'] = $Wall->Gravatar($data['uid_fk']); $wm['avatar_link'] = smallworld_getAvatarLink ($data['uid_fk'], $wm['avatar']); + $wm['avatar_size'] = getimagesize($wm['avatar_link']); + $wm['avatar_highwide'] = smallworld_imageResize($wm['avatar_size'][0], $wm['avatar_size'][1], 50); $wm['compl_msg_lnk'] = "<a href='".XOOPS_URL."/modules/smallworld/permalink.php?ownerid=".$data['uid_fk']; $wm['compl_msg_lnk'] .= "&updid=".$data['msg_id']."'>"._SMALLWORLD_COMP_MSG_LNK_DESC."</a>"; $wm['vote_up'] = $Wall->countVotes ('msg', 'up', $data['msg_id']); @@ -93,6 +95,8 @@ $wc['uid'] = $cdata['uid_fk']; $wc['myavatar'] = $myavatar; $wc['myavatar_link']= $myavatarlink; + $wc['avatar_size'] = getimagesize($wc['myavatar_link']); + $wc['avatar_highwide'] = smallworld_imageResize($wc['avatar_size'][0], $wc['avatar_size'][1], 35); $wc['cface'] = $Wall->Gravatar($cdata['uid_fk']); $wc['avatar_link'] = smallworld_getAvatarLink ($cdata['uid_fk'], $wc['cface']); $wc['compl_msg_lnk'] = "<a href='".XOOPS_URL."/modules/smallworld/permalink.php?ownerid=".Smallworld_getOwnerFromComment($cdata['msg_id_fk']); Modified: XoopsModules/smallworld/trunk/smallworld/message_ajax.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/message_ajax.php 2012-01-30 17:39:33 UTC (rev 8836) +++ XoopsModules/smallworld/trunk/smallworld/message_ajax.php 2012-01-30 17:51:44 UTC (rev 8837) @@ -62,6 +62,8 @@ $wm['priv'] = $data['priv']; $wm['avatar'] = $Wall->Gravatar($data['uid_fk']); $wm['avatar_link'] = smallworld_getAvatarLink ($data['uid_fk'], $wm['avatar']); + $wm['avatar_size'] = getimagesize($wm['avatar_link']); + $wm['avatar_highwide'] = smallworld_imageResize($wm['avatar_size'][0], $wm['avatar_size'][1], 50); $wm['compl_msg_lnk'] = "<a href='".XOOPS_URL."/modules/smallworld/permalink.php?ownerid=".$data['uid_fk']; $wm['compl_msg_lnk'] .= "&updid=".$data['msg_id']."'>"._SMALLWORLD_COMP_MSG_LNK_DESC."</a>"; $wm['vote_up'] = $Wall->countVotes ('msg', 'up', $data['msg_id']); @@ -86,6 +88,8 @@ $wc['uid'] = $cdata['uid_fk']; $wc['myavatar'] = $myavatar; $wc['myavatar_link']= $myavatarlink; + $wc['avatar_size'] = getimagesize($wc['myavatar_link']); + $wc['avatar_highwide'] = smallworld_imageResize($wc['avatar_size'][0], $wc['avatar_size'][1], 35); $wc['cface'] = $Wall->Gravatar($cdata['uid_fk']); $wc['avatar_link'] = smallworld_getAvatarLink ($cdata['uid_fk'], $wc['cface']); $wc['compl_msg_lnk'] = "<a href='".XOOPS_URL."/modules/smallworld/permalink.php?ownerid=".Smallworld_getOwnerFromComment($cdata['msg_id_fk']); Modified: XoopsModules/smallworld/trunk/smallworld/permalink.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/permalink.php 2012-01-30 17:39:33 UTC (rev 8836) +++ XoopsModules/smallworld/trunk/smallworld/permalink.php 2012-01-30 17:51:44 UTC (rev 8837) @@ -56,6 +56,8 @@ $Wall = new Wall_Updates(); $myavatar = $Wall->Gravatar($id); $myavatarlink = smallworld_getAvatarLink($id, $myavatar); + $myavatar_size = getimagesize($myavatarlink); + $myavatar_highwide = smallworld_imageResize($myavatar_size[0], $myavatar_size[1], 50); // Follow array here $followers = Smallworld_array_flatten($Wall->getFollowers($id),0); @@ -74,6 +76,8 @@ $wm['priv'] = $data['priv']; $wm['avatar'] = $Wall->Gravatar($data['uid_fk']); $wm['avatar_link'] = smallworld_getAvatarLink ($data['uid_fk'], $wm['avatar']); + $wm['avatar_size'] = getimagesize($wm['avatar_link']); + $wm['avatar_highwide'] = smallworld_imageResize($wm['avatar_size'][0], $wm['avatar_size'][1], 50); $wm['vote_up'] = $Wall->countVotes ('msg', 'up', $data['msg_id']); $wm['vote_down'] = $Wall->countVotes ('msg', 'down', $data['msg_id']); $wm['sharelinkurl'] = XOOPS_URL."/modules/smallworld/smallworldshare.php?ownerid=".$data['uid_fk']; @@ -94,6 +98,8 @@ $wc['uid'] = $cdata['uid_fk']; $wc['myavatar'] = $Wall->Gravatar($id); $wc['myavatar_link'] = $myavatarlink; + $wc['avatar_size'] = getimagesize($wc['myavatar_link']); + $wc['avatar_highwide'] = smallworld_imageResize($wc['avatar_size'][0], $wc['avatar_size'][1], 35); $wc['cface'] = $Wall->Gravatar($cdata['uid_fk']); $wc['avatar_link'] = smallworld_getAvatarLink ($cdata['uid_fk'], $wc['cface']); $wc['vote_up'] = $Wall->countVotesCom ('com', 'up', $cdata['msg_id_fk'],$cdata['com_id']); @@ -112,6 +118,7 @@ $xoopsTpl->assign('check',1); $xoopsTpl->assign('myavatar',$myavatar); $xoopsTpl->assign('myavatarlink',$myavatarlink); + $xoopsTpl->assign('myavatar_highwide',$myavatar_highwide); } elseif ($profile == 0) { $check->chkUser (); } Modified: XoopsModules/smallworld/trunk/smallworld/smallworldshare.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/smallworldshare.php 2012-01-30 17:39:33 UTC (rev 8836) +++ XoopsModules/smallworld/trunk/smallworld/smallworldshare.php 2012-01-30 17:51:44 UTC (rev 8837) @@ -50,10 +50,12 @@ $wm['priv'] = $data['priv']; $wm['avatar'] = $Wall->Gravatar($data['uid_fk']); if (smallworld_GetModuleOption('smallworldbookmarkavatar', $repmodule='smallworld' !=1)) { - $wm['avatar_link'] = XOOPS_URL.'/modules/smallworld/images/smallworld.png'; + $wm['avatar_link'] = XOOPS_URL.'/modules/smallworld/images/smallworld.png'; } else { $wm['avatar_link'] = smallworld_getAvatarLink ($data['uid_fk'],$wm['avatar']); } + $wm['avatar_size'] = getimagesize($wm['avatar_link']); + $wm['avatar_highwide'] = smallworld_imageResize($wm['avatar_size'][0], $wm['avatar_size'][1], 50); $wm['usernameTitle'] = $wm['username']._SMALLWORLD_UPDATEONSITEMETA.$xoopsConfig['sitename']; $xoopsTpl->assign('xoops_pagetitle', $wm['usernameTitle']); if(isset($xoTheme) && is_object($xoTheme)) { @@ -72,6 +74,8 @@ $wm['priv'] = 1; $wm['avatar'] = ""; $wm['avatar_link'] = XOOPS_URL.'/modules/smallworld/images/smallworld.png'; + $wm['avatar_size'] = getimagesize($wm['avatar_link']); + $wm['avatar_highwide'] = smallworld_imageResize($wm['avatar_size'][0], $wm['avatar_size'][1], 50); $wm['usernameTitle'] = $wm['username']._SMALLWORLD_UPDATEONSITEMETA.$xoopsConfig['sitename']; $xoopsTpl->assign('xoops_pagetitle', $wm['usernameTitle']); if(isset($xoTheme) && is_object($xoTheme)) { Modified: XoopsModules/smallworld/trunk/smallworld/templates/admin_useradmin.html =================================================================== --- XoopsModules/smallworld/trunk/smallworld/templates/admin_useradmin.html 2012-01-30 17:39:33 UTC (rev 8836) +++ XoopsModules/smallworld/trunk/smallworld/templates/admin_useradmin.html 2012-01-30 17:51:44 UTC (rev 8837) @@ -15,7 +15,7 @@ <{foreach item=post from=$allusersinspect}> <tr> <td> - <img height="50px" width="60px" src="<{$post.userimage}>"/> + <img src="<{$post.userimage}>" <{$post.avatar_highwide}>/> </td> <td><{$post.username}></td> <td><{$post.realname}></td> @@ -77,7 +77,7 @@ <{foreach item=posts from=$allusersnoinspect}> <tr> <td> - <img height="50px" width="60px" src="<{$posts.userimage}>"/> + <img src="<{$posts.userimage}>" <{$posts.avatar_highwide}>/> </td> <td><{$posts.username}></td> <td><{$posts.realname}></td> Modified: XoopsModules/smallworld/trunk/smallworld/templates/getlastcom.html =================================================================== --- XoopsModules/smallworld/trunk/smallworld/templates/getlastcom.html 2012-01-30 17:39:33 UTC (rev 8836) +++ XoopsModules/smallworld/trunk/smallworld/templates/getlastcom.html 2012-01-30 17:51:44 UTC (rev 8837) @@ -1,7 +1,7 @@ <{section name=i loop=$comments}> <div class="smallworld_stcommentbody" id="smallworld_stcommentbody<{$comments[i].com_id}>"> <div class="smallworld_stcommentimg"> - <img src="<{$comments[i].avatar_link}>" class='smallworld_small_face'/> + <img src="<{$comments[i].avatar_link}>" class='smallworld_small_face' <{$comments[i].avatar_highwide}>/> </div> <div class="smallworld_stcommenttext"> <{if $isadminuser == 'YES' or $post.username == $myusername}> @@ -36,4 +36,7 @@ </div> <{/if}> </div> -<{/section}> \ No newline at end of file +<{/section}> +<script type="text/javascript"> +attachAvatarOpen(); +</script> \ No newline at end of file Modified: XoopsModules/smallworld/trunk/smallworld/templates/getlastmsg.html =================================================================== --- XoopsModules/smallworld/trunk/smallworld/templates/getlastmsg.html 2012-01-30 17:39:33 UTC (rev 8836) +++ XoopsModules/smallworld/trunk/smallworld/templates/getlastmsg.html 2012-01-30 17:51:44 UTC (rev 8837) @@ -11,7 +11,7 @@ <div class="smallworld_stbody" id="smallworld_stbody<{$post.msg_id}>"> <div class="smallworld_stimg"> - <img src="<{$post.avatar_link}>" class='smallworld_big_face'/> + <img src="<{$post.avatar_link}>" class='smallworld_big_face' <{$post.avatar_highwide}>/> </div> <div class="smallworld_sttext"> @@ -65,7 +65,7 @@ <{if $comm[i].msg_id_fk == $post.msg_id}> <div class="smallworld_stcommentbody" id="smallworld_stcommentbody<{$comm[i].com_id}>"/> <div class="smallworld_stcommentimg"> - <img src="<{$comm[i].avatar_link}>" class='smallworld_small_face'/> + <img src="<{$comm[i].avatar_link}>" class='smallworld_small_face' <{$comm[i].avatar_highwide}>/> </div> <div class="smallworld_stcommenttext"> <{if $isadminuser == 'YES' or $comm[i].username == $myusername}> @@ -107,7 +107,7 @@ <div class="smallworld_commentupdate" style='display:none' id='smallworld_commentbox<{$post.msg_id}>'> <div class="smallworld_stcommentimg"> - <img src="<{$myavatarlink}>" class='smallworld_small_face'/> + <img src="<{$myavatarlink}>" class='smallworld_small_face' <{$comm[i].avatar_highwide}>/> </div> <div class="smallworld_stcommenttext" > <form method="post" action=""> @@ -119,4 +119,7 @@ </div> </div> <br><br> -<{/foreach}> \ No newline at end of file +<{/foreach}> +<script type="text/javascript"> +attachAvatarOpen(); +</script> \ No newline at end of file Modified: XoopsModules/smallworld/trunk/smallworld/templates/getmore.html =================================================================== --- XoopsModules/smallworld/trunk/smallworld/templates/getmore.html 2012-01-30 17:39:33 UTC (rev 8836) +++ XoopsModules/smallworld/trunk/smallworld/templates/getmore.html 2012-01-30 17:51:44 UTC (rev 8837) @@ -9,7 +9,7 @@ </script> <div class="smallworld_stbody" id="smallworld_stbody<{$post.msg_id}>"> <div class="smallworld_stimg"> - <img src="<{$post.avatar_link}>" class='smallworld_big_face'/> + <img src="<{$post.avatar_link}>" class='smallworld_big_face' <{$post.avatar_highwide}> /> </div> <div class="smallworld_sttext"> @@ -51,7 +51,7 @@ <{if $comm[i].msg_id_fk == $post.msg_id}> <div class="smallworld_stcommentbody" id="smallworld_stcommentbody<{$comm[i].com_id}>"> <div class="smallworld_stcommentimg"> - <img src="<{$comm[i].avatar_link}>" class='smallworld_small_face'/> + <img src="<{$comm[i].avatar_link}>" class='smallworld_small_face' <{$comm[i].avatar_highwide}>/> </div> <div class="smallworld_stcommenttext"> <{if $isadminuser == 'YES' or $comm[i].username == $myusername}> @@ -95,7 +95,7 @@ </div> <!-- smallworld_commentcontainer --> <div class="smallworld_commentupdate" style='display:none' id='smallworld_commentbox<{$post.msg_id}>'> <div class="smallworld_stcommentimg"> - <img src="<{$myavatarlink}>" class='smallworld_small_face'/> + <img src="<{$myavatarlink}>" class='smallworld_small_face' <{$comm[i].avatar_highwide}>/> </div> <div class="smallworld_stcommenttext" > <form method="post" action=""> @@ -114,4 +114,7 @@ </div> <a href="javascript:void(0)" class="smallworld_msg_counter" rel="<{$pagename}>" id="<{$post.msg_id}>">MORE</a> <br><br> +<script type="text/javascript"> +attachAvatarOpen(); +</script> \ No newline at end of file Modified: XoopsModules/smallworld/trunk/smallworld/templates/smallworld_admin.html =================================================================== --- XoopsModules/smallworld/trunk/smallworld/templates/smallworld_admin.html 2012-01-30 17:39:33 UTC (rev 8836) +++ XoopsModules/smallworld/trunk/smallworld/templates/smallworld_admin.html 2012-01-30 17:51:44 UTC (rev 8837) @@ -98,7 +98,7 @@ <{foreach item=post from=$allusersinspect}> <tr> <td> - <img height="50px" width="60px" src="<{$post.userimage}>"/> + <img src="<{$post.userimage}>" <{$post.avatar_highwide}>/> </td> <td><{$post.username}></td> <td><{$post.realname}></td> @@ -160,7 +160,7 @@ <{foreach item=posts from=$allusersnoinspect}> <tr> <td> - <img height="50px" width="60px" src="<{$posts.userimage}>"/> + <img src="<{$posts.userimage}>" <{$posts.avatar_highwide}>/> </td> <td><{$posts.username}></td> <td><{$posts.realname}></td> Modified: XoopsModules/smallworld/trunk/smallworld/templates/smallworld_alluserstodiv.html =================================================================== --- XoopsModules/smallworld/trunk/smallworld/templates/smallworld_alluserstodiv.html 2012-01-30 17:39:33 UTC (rev 8836) +++ XoopsModules/smallworld/trunk/smallworld/templates/smallworld_alluserstodiv.html 2012-01-30 17:51:44 UTC (rev 8837) @@ -13,7 +13,7 @@ <{foreach item=post from=$allusersinspect}> <tr> <td> - <img height="50px" width="60px" src="<{$post.userimage}>"/> + <img src="<{$post.userimage}>" <{$post.avatar_highwide}>/> </td> <td><{$post.username}></td> <td><{$post.realname}></td> @@ -75,7 +75,7 @@ <{foreach item=posts from=$allusersnoinspect}> <tr> <td> - <img height="50px" width="60px" src="<{$posts.userimage}>"/> + <img src="<{$posts.userimage}>" <{$posts.avatar_highwide}>/> </td> <td><{$posts.username}></td> <td><{$posts.realname}></td> Modified: XoopsModules/smallworld/trunk/smallworld/templates/smallworld_friends_template.html =================================================================== --- XoopsModules/smallworld/trunk/smallworld/templates/smallworld_friends_template.html 2012-01-30 17:39:33 UTC (rev 8836) +++ XoopsModules/smallworld/trunk/smallworld/templates/smallworld_friends_template.html 2012-01-30 17:51:44 UTC (rev 8837) @@ -92,7 +92,7 @@ <{section name=i loop=$pendingfriends}> <div class="smallworld_friends_body"> <div class="smallworld_friendpageimg"> - <img src="<{$pendingfriends[i].avatar_link}>" class='smallworld_small_face'/> + <img src="<{$pendingfriends[i].avatar_link}>" class='smallworld_small_face' <{$pendingfriends[i].avatar_highwide}>/> </div> <div class="Friends_holder"> <a class="Friends_links" href="<{$xoops_url}>/modules/smallworld/userprofile.php?username=<{$pendingfriends[i].friendname}>"> @@ -114,7 +114,7 @@ <{section name=i loop=$verifiedfriends}> <div class="smallworld_friends_body"> <div class="smallworld_friendpageimg"> - <img src="<{$verifiedfriends[i].avatar_link}>" class='smallworld_small_face'/> + <img src="<{$verifiedfriends[i].avatar_link}>" class='smallworld_small_face' <{$verifiedfriends[i].avatar_highwide}>/> </div> <div class="Friends_holder"> <a class="Friends_links" href="<{$xoops_url}>/modules/smallworld/userprofile.php?username=<{$verifiedfriends[i].friendname}>"> @@ -135,7 +135,7 @@ <{section name=i loop=$followingyou}> <div class="smallworld_friends_body"> <div class="smallworld_friendpageimg"> - <img src="<{$followingyou[i].avatar_link}>" class='smallworld_small_face'/> + <img src="<{$followingyou[i].avatar_link}>" class='smallworld_small_face' <{$followingyou[i].avatar_highwide}>/> </div> <div class="Friends_holder"> <a class="Friends_links" href="<{$xoops_url}>/modules/smallworld/userprofile.php?username=<{$followingyou[i].friendname}>"> @@ -157,7 +157,7 @@ <{section name=i loop=$followingme}> <div class="smallworld_friends_body"> <div class="smallworld_friendpageimg"> - <img src="<{$followingme[i].avatar_link}>" class='smallworld_small_face'/> + <img src="<{$followingme[i].avatar_link}>" class='smallworld_small_face' <{$followingme[i].avatar_highwide}>/> </div> <div class="Friends_holder"> <a class="Friends_links" href="<{$xoops_url}>/modules/smallworld/userprofile.php?username=<{$followingme[i].friendname}>"> Modified: XoopsModules/smallworld/trunk/smallworld/templates/smallworld_index.html =================================================================== --- XoopsModules/smallworld/trunk/smallworld/templates/smallworld_index.html 2012-01-30 17:39:33 UTC (rev 8836) +++ XoopsModules/smallworld/trunk/smallworld/templates/smallworld_index.html 2012-01-30 17:51:44 UTC (rev 8837) @@ -9,7 +9,7 @@ <table class="smallworld_biotable"> <tr> <td> - <{$avatar}> + <{$avatar}> <div class="UploadNewAvatar" id="<{$ownerofpage}>" style="display:none"> <div id="smallworld_avatarupload" > <span>Upload File<span> @@ -97,7 +97,7 @@ }); </script> <div class="smallworld_stimg"> - <img src="<{$post.avatar_link}>" class='smallworld_big_face'/> + <img src="<{$post.avatar_link}>" class='smallworld_big_face' <{$post.avatar_highwide}>/> </div> <div class="smallworld_sttext"> @@ -138,7 +138,7 @@ <{if $comm[i].msg_id_fk == $post.msg_id}> <div class="smallworld_stcommentbody" id="smallworld_stcommentbody<{$comm[i].com_id}>"/> <div class="smallworld_stcommentimg"> - <img src="<{$comm[i].avatar_link}>" class='smallworld_small_face'/> + <img src="<{$comm[i].avatar_link}>" class='smallworld_small_face' <{$comm[i].avatar_highwide}>/> </div> <div class="smallworld_stcommenttext"> <{if $isadminuser == 'YES' or $comm[i].username == $myusername}> @@ -180,7 +180,7 @@ <div class="smallworld_commentupdate" style="display:none" id="smallworld_commentbox<{$post.msg_id}>"> <div class="smallworld_stcommentimg"> - <img src="<{$myavatarlink}>" class='smallworld_small_face'/> + <img src="<{$myavatarlink}>" class='smallworld_small_face' <{$myavatar_highwide}>/> </div> <div class="smallworld_stcommenttext" > <form method="post" action=""> Modified: XoopsModules/smallworld/trunk/smallworld/templates/smallworld_permalink.html =================================================================== --- XoopsModules/smallworld/trunk/smallworld/templates/smallworld_permalink.html 2012-01-30 17:39:33 UTC (rev 8836) +++ XoopsModules/smallworld/trunk/smallworld/templates/smallworld_permalink.html 2012-01-30 17:51:44 UTC (rev 8837) @@ -27,7 +27,7 @@ <div class="smallworld_stbody" id="smallworld_stbody<{$post.msg_id}>"> <div class="smallworld_stimg"> - <img src="<{$post.avatar_link}>" class='smallworld_big_face'/> + <img src="<{$post.avatar_link}>" class='smallworld_big_face' <{$post.avatar_highwide}>/> </div> <div class="smallworld_sttext"> @@ -66,7 +66,7 @@ <{if $comm[i].msg_id_fk == $post.msg_id}> <div class="smallworld_stcommentbody" id="smallworld_stcommentbody<{$comm[i].com_id}>"/> <div class="smallworld_stcommentimg"> - <img src="<{$comm[i].avatar_link}>" class='smallworld_small_face'/> + <img src="<{$comm[i].avatar_link}>" class='smallworld_small_face' <{$comm[i].avatar_highwide}>/> </div> <div class="smallworld_stcommenttext"> <{if $isadminuser == 'YES' or $comm[i].username == $myusername}> @@ -109,7 +109,7 @@ <div class="smallworld_commentupdate" style='display:none' id='smallworld_commentbox<{$post.msg_id}>'> <div class="smallworld_stcommentimg"> - <img src="<{$myavatarlink}>" class='smallworld_small_face'/> + <img src="<{$myavatarlink}>" class='smallworld_small_face' <{$myavatar_highwide}>/> </div> <div class="smallworld_stcommenttext" > <form method="post" action=""> Modified: XoopsModules/smallworld/trunk/smallworld/templates/smallworld_share.html =================================================================== --- XoopsModules/smallworld/trunk/smallworld/templates/smallworld_share.html 2012-01-30 17:39:33 UTC (rev 8836) +++ XoopsModules/smallworld/trunk/smallworld/templates/smallworld_share.html 2012-01-30 17:51:44 UTC (rev 8837) @@ -26,7 +26,7 @@ <div class="smallworld_stbody" id="smallworld_stbody<{$post.msg_id}>"> <div class="smallworld_stimg"> - <img src="<{$post.avatar_link}>" class='smallworld_big_face'/> + <img src="<{$post.avatar_link}>" class='smallworld_big_face' <{$post.avatar_highwide}>/> </div> <div class="smallworld_sttext"> Modified: XoopsModules/smallworld/trunk/smallworld/templates/smallworld_userprofile_imgupload.html =================================================================== --- XoopsModules/smallworld/trunk/smallworld/templates/smallworld_userprofile_imgupload.html 2012-01-30 17:39:33 UTC (rev 8836) +++ XoopsModules/smallworld/trunk/smallworld/templates/smallworld_userprofile_imgupload.html 2012-01-30 17:51:44 UTC (rev 8837) @@ -11,21 +11,21 @@ <td class="file_name"></td> <td class="file_size"></td> <td class="file_upload_progress"><div></div></td> - <td class="file_upload_start"><button>Start</button></td> - <td class="file_upload_cancel"><button>Cancel</button></td> + <td class="file_upload_start"><button><{$smarty.const._SMALLWORLD_IMAGES_START}></button></td> + <td class="file_upload_cancel"><button><{$smarty.const._SMALLWORLD_IMAGES_CANCEL}></button></td> </tr> <tr class="file_download_template" style="display:none;"> <td class="file_download_preview"></td> <td class="file_name"><a></a></td> <td class="file_size"></td> - <td class="file_download_delete" colspan="3"><button>Delete</button></td> + <td class="file_download_delete" colspan="3"><button><{$smarty.const._SMALLWORLD_IMAGES_DELETE}></button></td> </tr> </table> <div class="file_upload_overall_progress"><div style="display:none;"></div></div> <div class="file_upload_buttons"> - <button class="file_upload_start">Start All</button> - <button class="file_upload_cancel">Cancel All</button> - <button class="file_download_delete">Delete All</button> + <button class="file_upload_start"><{$smarty.const._SMALLWORLD_IMAGES_STARTALL}></button> + <button class="file_upload_cancel"><{$smarty.const._SMALLWORLD_IMAGES_CANCELALL}></button> + <button class="file_download_delete"><{$smarty.const._SMALLWORLD_IMAGES_DELETEALL}></button> </div> </div> <{/if}> Modified: XoopsModules/smallworld/trunk/smallworld/templates/smallworld_userprofile_template.html =================================================================== --- XoopsModules/smallworld/trunk/smallworld/templates/smallworld_userprofile_template.html 2012-01-30 17:39:33 UTC (rev 8836) +++ XoopsModules/smallworld/trunk/smallworld/templates/smallworld_userprofile_template.html 2012-01-30 17:51:44 UTC (rev 8837) @@ -20,7 +20,7 @@ <table class="smallworld_biotable"> <tr> <td> - <{$avatar}> + <{$avatar}> <{if $username == $myusername OR $isadminuser == 'YES'}> <div class="UploadNewAvatar" id="<{$ownerofpage}>" style="display:none"> <div id="smallworld_avatarupload" > @@ -175,7 +175,7 @@ <div class="smallworld_stbody" id="smallworld_stbody<{$post.msg_id}>"> <div class="smallworld_stimg"> - <img src="<{$post.avatar_link}>" class='smallworld_big_face'/> + <img src="<{$post.avatar_link}>" class='smallworld_big_face' <{$post.avatar_highwide}>/> </div> <div class="smallworld_sttext"> @@ -218,7 +218,7 @@ <{if $comm[i].msg_id_fk == $post.msg_id}> <div class="smallworld_stcommentbody" id="smallworld_stcommentbody<{$comm[i].com_id}>"/> <div class="smallworld_stcommentimg"> - <img src="<{$comm[i].avatar_link}>" class='smallworld_small_face'/> + <img src="<{$comm[i].avatar_link}>" class='smallworld_small_face' <{$comm[i].avatar_highwide}>/> </div> <div class="smallworld_stcommenttext"> <{if $comm[i].username == $myusername}> @@ -259,7 +259,7 @@ <div class="smallworld_commentupdate" style='display:none' id='smallworld_commentbox<{$post.msg_id}>'> <div class="smallworld_stcommentimg"> - <img src="<{$visitoravatarlink}>" class='smallworld_small_face'/> + <img src="<{$visitoravatarlink}>" class='smallworld_small_face' <{$visitoravatar_highwide}>/> </div> <div class="smallworld_stcommenttext" > <form method="post" action=""> Modified: XoopsModules/smallworld/trunk/smallworld/userprofile.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/userprofile.php 2012-01-30 17:39:33 UTC (rev 8836) +++ XoopsModules/smallworld/trunk/smallworld/userprofile.php 2012-01-30 17:51:44 UTC (rev 8837) @@ -95,8 +95,13 @@ $Wall = new Wall_Updates(); $myavatar = $Wall->Gravatar($id); //profile owners data $myavatarlink = smallworld_getAvatarLink($id, $myavatar); //profile owners data + $myavatar_size = getimagesize($myavatarlink); + $myavatar_highwide = smallworld_imageResize($myavatar_size[0], $myavatar_size[1], 50); + $visitorAvatar = $Wall->Gravatar($yourid); $visitorAvatarlink = smallworld_getAvatarLink($yourid, $visitorAvatar); + $visitorAvatar_size = getimagesize($visitorAvatarlink); + $visitorAvatar_highwide = smallworld_imageResize($visitorAvatar_size[0], $visitorAvatar_size[1], 50); // Follow array here $followers = $Wall->getFollowers($id); @@ -114,6 +119,8 @@ $wm['priv'] = $data['priv']; $wm['avatar'] = $Wall->Gravatar($data['uid_fk']); $wm['avatar_link'] = smallworld_getAvatarLink ($data['uid_fk'], $wm['avatar']); + $wm['avatar_size'] = getimagesize($wm['avatar_link']); + $wm['avatar_highwide'] = smallworld_imageResize($wm['avatar_size'][0], $wm['avatar_size'][1], 50); $wm['compl_msg_lnk'] = "<a href='".XOOPS_URL."/modules/smallworld/permalink.php?ownerid=".$data['uid_fk']; $wm['compl_msg_lnk'] .= "&updid=".$data['msg_id']."'>"._SMALLWORLD_COMP_MSG_LNK_DESC."</a>"; $wm['vote_up'] = $Wall->countVotes ('msg', 'up', $data['msg_id']); @@ -137,6 +144,8 @@ $wc['uid'] = $cdata['uid_fk']; $wc['myavatar'] = $myavatar; $wc['myavatar_link']= $myavatarlink; + $wc['avatar_size'] = getimagesize($wc['myavatar_link']); + $wc['avatar_highwide'] = smallworld_imageResize($wc['avatar_size'][0], $wc['avatar_size'][1], 35); $wc['cface'] = $Wall->Gravatar($cdata['uid_fk']); $wc['avatar_link'] = smallworld_getAvatarLink($cdata['uid_fk'],$wc['cface']); $wc['compl_msg_lnk'] = "<a href='".XOOPS_URL."/modules/smallworld/permalink.php?ownerid=".Smallworld_getOwnerFromComment($cdata['msg_id_fk']); @@ -188,8 +197,10 @@ $xoopsTpl->assign('friendinvitations',$getInvitations); $xoopsTpl->assign('myavatar',$myavatar); $xoopsTpl->assign('myavatarlink',$myavatarlink); + $xoopsTpl->assign('myavatar_highwide',$visitorAvatar_highwide); $xoopsTpl->assign('visitoravatar',$visitorAvatar); $xoopsTpl->assign('visitoravatarlink',$visitorAvatarlink); + $xoopsTpl->assign('visitoravatar_highwide',$visitorAvatar_highwide); $xoopsTpl->assign('myusername',$username); $xoopsTpl->assign('username',$Xusername); $xoopsTpl->assign('bdaynow',$birthday_today_text); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |