From: <dj...@us...> - 2012-06-25 13:55:07
|
Revision: 9708 http://xoops.svn.sourceforge.net/xoops/?rev=9708&view=rev Author: djculex Date: 2012-06-25 13:55:01 +0000 (Mon, 25 Jun 2012) Log Message: ----------- - Bugfix: Replace country code by image using geonames plugin Vs country text using google maps Modified Paths: -------------- XoopsModules/smallworld/trunk/smallworld/class/profile.php Modified: XoopsModules/smallworld/trunk/smallworld/class/profile.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/class/profile.php 2012-06-24 21:17:44 UTC (rev 9707) +++ XoopsModules/smallworld/trunk/smallworld/class/profile.php 2012-06-25 13:55:01 UTC (rev 9708) @@ -30,6 +30,12 @@ function ShowUser ($id) { global $xoopsUser, $xoTheme, $xoopsTpl, $arr04, $arr05, $xoopsDB; if ($xoopsUser) { + + $module_handler =& xoops_gethandler('module'); + $module = $module_handler->getByDirname('smallworld'); + $config_handler =& xoops_gethandler('config'); + $moduleConfig =& $config_handler->getConfigsByCat(0, $module->getVar('mid')); + $user = new XoopsUser($id); $myName = $xoopsUser->getUnameFromId($xoopsUser->getVar('uid')); // My name $db = new SmallWorldDB; @@ -62,7 +68,11 @@ $education = "<a href='javascript:void(0)' id='_smallworld_educationmore'>".$educationArray[0]." ("._SMALLWORLD_MORE.")</a>"; $lng = $r['birthplace_lng']; $latt = $r['birthplace_lat']; - $country = $r['birthplace_country']; + if($moduleConfig['geolocate'] != 1) { + $country = "<img src='".$r['birthplace_country']."'/>"; + } else { + $country = $r['birthplace_country']; + } $rank = $user->rank(); $rank_title = $rank['title']; if (isset($rank['image'])) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |