From: <dj...@us...> - 2012-01-26 17:03:53
|
Revision: 8816 http://xoops.svn.sourceforge.net/xoops/?rev=8816&view=rev Author: djculex Date: 2012-01-26 17:03:42 +0000 (Thu, 26 Jan 2012) Log Message: ----------- - show only "show more in profile" if any fields to show - Show fields allowed by admin in profile - Added language define if all fields are disabled Modified Paths: -------------- XoopsModules/smallworld/trunk/smallworld/language/english/main.php XoopsModules/smallworld/trunk/smallworld/templates/smallworld_userprofile_template.html XoopsModules/smallworld/trunk/smallworld/userprofile.php Modified: XoopsModules/smallworld/trunk/smallworld/language/english/main.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/language/english/main.php 2012-01-26 15:33:48 UTC (rev 8815) +++ XoopsModules/smallworld/trunk/smallworld/language/english/main.php 2012-01-26 17:03:42 UTC (rev 8816) @@ -24,6 +24,7 @@ /*------------ General items -------- */ define("_SMALLWORLD_SYSERROR","System Error!"); define("_SMALLWORLD_SYSNAME","Smallworld"); +define("_SMALLWORLD_ALL_FIELDS_DISABLED","No personal info available"); /*----------- Personal info ------------------*/ define("_SMALLWORLD_AVATAR","Current Image"); Modified: XoopsModules/smallworld/trunk/smallworld/templates/smallworld_userprofile_template.html =================================================================== --- XoopsModules/smallworld/trunk/smallworld/templates/smallworld_userprofile_template.html 2012-01-26 15:33:48 UTC (rev 8815) +++ XoopsModules/smallworld/trunk/smallworld/templates/smallworld_userprofile_template.html 2012-01-26 17:03:42 UTC (rev 8816) @@ -140,11 +140,13 @@ <{$heorshe}> <{$smarty.const._SMALLWORLD_ISEMPLOYEDBY}> <{$work}> <{$smarty.const._SMALLWORLD_AND}> <{$smarty.const._SMALLWORLD_ATTENDED}> <{$education}>. <br/><br/> + <{if $flds[0] != ''}> <fieldset> <label><{$smarty.const._SMALLWORLD_ADDITIONALINFO}> <{$username}></label> <{$aboutme}> <br><br><a href='javascript:void(0)' class="smallworld_moreinfo" id='_SMALLWORLD_MOREINFO'><{$smarty.const._SMALLWORLD_MOREINFO}></a><br><br> </fieldset> + <{/if}> </div> <{/if}> <{if $isuserafriend == 'no'}> @@ -368,6 +370,28 @@ </div> <div id="interestsandmore" title="<{$smarty.const._SMALLWORLD_INTERESTS_TITLE}>" > + <{if + !in_array('religiousview',$flds) && + !in_array('politicalview',$flds) && + !in_array('favouritebooks',$flds) && + !in_array('favouritemusic',$flds) && + !in_array('favouritemovies',$flds) && + !in_array('favouritetvshows',$flds) && + !in_array('interests',$flds) && + !in_array('emails',$flds) && !in_array('screennames',$flds) && + !in_array('mobile',$flds) && !in_array('landphone',$flds) && + !in_array('streetadress',$flds) && + !in_array('country',$flds) && + !in_array('website',$flds) + }> + <fieldset> + <table border="0" class="smallworld_table" cellspacing="0" cellpadding="0"> + <tr> + <td><label><{$smarty.const._SMALLWORLD_ALL_FIELDS_DISABLED}></label></td> + </tr> + </table> + </fieldset> + <{else}> <fieldset> <table border="0" class="smallworld_table" cellspacing="0" cellpadding="0"> <tr> @@ -375,64 +399,98 @@ </tr> </table> </fieldset> + <{/if}> + <{if !in_array('religiousview',$flds) && !in_array('politicalview',$flds)}> + <{else}> <fieldset> <table border="0" class="smallworld_table" cellspacing="0" cellpadding="0"> <tr> <h3><label><{$smarty.const._SMALLWORLD_BELIEFS}></label></h3> </tr> - + + <{if !in_array('politicalview',$flds)}> + <{else}> <tr> <td><{$smarty.const._SMALLWORLD_POLITICWORD}>:</td> <td><{$politic}></td> </tr> - + <{/if}> + <{if !in_array('religiousview',$flds)}> + <{else}> <tr> <td><{$smarty.const._SMALLWORLD_RELIGIONWORD}>:</td> <td><{$religion}></td> </tr> + <{/if}> </table> </fieldset> + <{/if}> + <{if + !in_array('favouritebooks',$flds) && !in_array('favouritemusic',$flds) && + !in_array('favouritemovies',$flds) && !in_array('favouritetvshows',$flds) && + !in_array('interests',$flds) + }> + <{else}> <fieldset> <table border="0" class="smallworld_table" cellspacing="0" cellpadding="0"> <tr> <h3><label><{$smarty.const._SMALLWORLD_FAVOURITETHINGS}></label></h3> </tr> - + <{if !in_array('favouritebooks',$flds)}> + <{else}> <tr> <td><{$smarty.const._SMALLWORLD_FAVOURITEBOOKS}>:</td> <td><{$favbook}></td> </tr> + <{/if}> + <{if !in_array('favouritemusic',$flds)}> + <{else}> <tr> <td><{$smarty.const._SMALLWORLD_FAVOURITEMUSIC}>:</td> <td><{$favmusic}></td> </tr> + <{/if}> + <{if !in_array('favouritemovies',$flds)}> + <{else}> <tr> <td><{$smarty.const._SMALLWORLD_FAVOURITEMOVIE}>:</td> <td><{$favmovie}></td> </tr> - + <{/if}> + <{if !in_array('favouritetvshows',$flds)}> + <{else}> <tr> <td><{$smarty.const._SMALLWORLD_FAVOURITETVSHOW}>:</td> <td><{$favtvshow}></td> </tr> - + <{/if}> + <{if !in_array('interests',$flds)}> + <{else}> <tr> <td><{$smarty.const._SMALLWORLD_FAVOURITEINTERESTS}>:</td> <td><{$favinterests}></td> </tr> + <{/if}> </table> </fieldset> + <{/if}> + <{if + !in_array('emails',$flds) && !in_array('screennames',$flds) && + !in_array('mobile',$flds) && !in_array('landphone',$flds) + }> + <{else}> <fieldset> <table border="0" class="smallworld_table" cellspacing="0" cellpadding="0"> <tr> <h3><label><{$smarty.const._SMALLWORLD_CONTACTS}></label></h3> </tr> - + <{if !in_array('emails',$flds)}> + <{else}> <tr> <td><{$smarty.const._SMALLWORLD_EMAIL}>:</td> <td> @@ -442,7 +500,9 @@ <br><br> </td> </tr> - + <{/if}> + <{if !in_array('screennames',$flds)}> + <{else}> <tr> <td><{$smarty.const._SMALLWORLD_SCREENNAMES}>:</td> <td> @@ -452,38 +512,63 @@ <br><br> </td> </tr> - + <{/if}> + + <{if !in_array('landphone',$flds)}> + <{else}> <tr> <td><{$smarty.const._SMALLWORLD_PHONE}>:</td> <td><{$phone}></td> </tr> + <{/if}> + <{if !in_array('mobile',$flds)}> + <{else}> <tr> <td><{$smarty.const._SMALLWORLD_GSM}>:</td> <td><{$mobile}></td> </tr> + <{/if}> </table> </fieldset> + <{/if}> + + <{if + !in_array('streetadress',$flds) && + !in_array('country',$flds) && + !in_array('website',$flds) + }> + <{else}> <fieldset> <table border="0" class="smallworld_table" cellspacing="0" cellpadding="0"> <tr><h3><label><{$smarty.const._SMALLWORLD_ADRESS}></label></h3></tr> + <{if !in_array('streetadress',$flds)}> + <{else}> <tr> <td><{$smarty.const._SMALLWORLD_ADRESS}>:</td> <td><{$realname}><br><{$adress}></td> </tr> + <{/if}> + <{if !in_array('country',$flds)}> + <{else}> <tr> <td><{$smarty.const._SMALLWORLD_COUNTRY}>:</td> <td><{$country}></td> </tr> + <{/if}> + <{if !in_array('website',$flds)}> + <{else}> <tr> <td><br><br><{$smarty.const._SMALLWORLD_WEBSITE}>:</td> <td><br><br><span class="smallworld_website"><a href="<{$website}>" target="_BLANK"><{$website}></a></span></td> </tr> + <{/if}> </table> </fieldset> + <{/if}> </div> <div id="_smallworld_birthplace_map" title="<{$birthcity}>/<{$country}>"> Modified: XoopsModules/smallworld/trunk/smallworld/userprofile.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/userprofile.php 2012-01-26 15:33:48 UTC (rev 8815) +++ XoopsModules/smallworld/trunk/smallworld/userprofile.php 2012-01-26 17:03:42 UTC (rev 8816) @@ -194,6 +194,7 @@ $xoopsTpl->assign('username',$Xusername); $xoopsTpl->assign('bdaynow',$birthday_today_text); $xoopsTpl->assign('isfollowing',$fl[0]); + $xoopsTpl->assign('flds',smallworld_GetModuleOption('smallworldusethesefields', $repmodule='smallworld')); } else { $check->chkUser (); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |