xoops forums

maxxy

Quite a regular
Posted on: 2009/12/29 6:07
maxxy
maxxy (Show more)
Quite a regular
Posts: 286
Since: 2007/6/11
#1

Profile Module - Website Row is displayed even value is empty

xoops 2.42

the website row in template is displayed even when the url value is empty

should be hidden if the value is empty ..just like other field....

demo: https://xoops.org/modules/profile/userinfo.php?uid=62978

look at the website row..displayed even when its empty

any quick fix ?



is this related ? or had not yet been fixed

https://sourceforge.net/tracker/?func= ... roup_id=41586&atid=430840

ghia

Community Support Member
Posted on: 2009/12/29 11:32
ghia
ghia (Show more)
Community Support Member
Posts: 4954
Since: 2008/7/3 1
#2

Re: Profile Module - Website Row is displayed even value is empty

The fix is in the PHP code of 2.4.x, but if you want the suppression of empty websites, you must alter your template /modules/system/templates/user_info.html as in the first example.
<{if $user_websiteurl != ""}>
<
tr>
<
td class="head"><{$lang_website}></td>
<
td class="even"><{$user_websiteurl}></td>
</
tr>
<{/if}>

maxxy

Quite a regular
Posted on: 2009/12/29 13:13
maxxy
maxxy (Show more)
Quite a regular
Posts: 286
Since: 2007/6/11
#3

Re: Profile Module - Website Row is displayed even value is empty

i'm using profile module - modules/profiles
that does not fix it

any other suggestion ?

maxxy

Quite a regular
Posted on: 2009/12/30 4:40
maxxy
maxxy (Show more)
Quite a regular
Posts: 286
Since: 2007/6/11
#4

Re: Profile Module - Website Row is displayed even value is empty

anyone ?

had this same problem last without the profile module

https://xoops.org/modules/newbb/viewto ... id=276823#forumpost276823


Fixed by dugris in 2.018.1
http://xoops.svn.sourceforge.net/view ... ps?view=rev&revision=1246


not sure if this really has been fixed ?


right now using profile module

trabis

Core Developer
Posted on: 2009/12/30 14:06
trabis
trabis (Show more)
Core Developer
Posts: 2268
Since: 2006/9/1 1
#5

Re: Profile Module - Website Row is displayed even value is empty

Can you try this on class/field.php line 247
switch ($this->getVar('field_type')  ) {
            default:
            case 
"textbox":
                if ( 
$this->getVar('field_name') == 'url' && $value != '') {
                     return 
'<a href="' formatURL($value) . '" rel="external">' $value '</a>';
                   } else {
                     return 
$value;
                }
                break;

maxxy

Quite a regular
Posted on: 2009/12/30 14:49
maxxy
maxxy (Show more)
Quite a regular
Posts: 286
Since: 2007/6/11
#6

Re: Profile Module - Website Row is displayed even value is empty

Thank you..yes it works


hope this change can be commit to svn

can the mode help to change the title to Fixed

Mamba

Moderator
Posted on: 2009/12/30 23:33
Mamba
Mamba (Show more)
Moderator
Posts: 10825
Since: 2004/4/23
#7

Re: Profile Module - Website Row is displayed even value is empty

Quote:
hope this change can be commit to svn

It is now