Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> v2.4 RN Issues
Author Message
neralex
Site Admin



Joined: Aug 22, 2007
Posts: 1775

PostPosted: Thu Aug 18, 2011 3:11 pm Reply with quote

hi!

why have the field $usrinfo['user_icq'] a empty space, when its empty in the database?

when i left the field empty is it after the saving in the DB empty but not in the userinfo.php. is the filed not filled, i become a " " as return.

Code:
      if ($ya_config['useinstantmessicq'] >= '1' AND (is_user($user) OR is_admin($admin))) {

         if ($usrinfo['user_icq'] == '') $usrinfo['user_icq'] = _YA_NA;
         echo '<tr><td width="30%" align="left">' . _ICQ . '</td><td width="70%" align="left"><strong>' . $usrinfo['user_icq'] . '</strong></td></tr>' ;
      }


WHY will it not to be empty?

Code:
if ($usrinfo['user_icq'] == '') $usrinfo['user_icq'] = _YA_NA;


Crying or Very sad
 
View user's profile Send private message
neralex







PostPosted: Thu Aug 18, 2011 4:52 pm Reply with quote

i checked this with urlencode and found a &nbsp; in the instant messanger strings, when the field was not filled. oO

i replaced this strange &nbsp; with str_replace. can anyone tell me, in wich file this code was written?

Code:
if ($ya_config['useinstantmessicq'] >= '1' AND (is_user($user) OR is_admin($admin))) {

// $usrinfo['user_icq'] = urlencode($usrinfo['user_icq']);
$usrinfo['user_icq'] = str_replace('&nbsp;', '', $usrinfo['user_icq']);
if ($usrinfo['user_icq'] == '') $usrinfo['user_icq'] = _YA_NA;
echo '<tr><td width="30%" align="left">' . _ICQ . '</td><td width="70%" align="left"><strong>' . $usrinfo['user_icq'] . '</strong></td></tr>' ;
}
 
montego
Site Admin



Joined: Aug 29, 2004
Posts: 9457
Location: Arizona

PostPosted: Sat Aug 20, 2011 7:54 am Reply with quote

neralex, the code is inserting the non-breaking space character on the page just for compliance purposes because it is wrapped in a <strong> tag.

On a side note, not really relevant in this case, if you have borders on your tables, each cell needs to have a value in order for the borders to be drawn by most browsers. Therefore, even if a <td> has no value, we have for years used the non-breaking space character to give it a value so the borders will be drawn properly.

_________________
Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
neralex







PostPosted: Wed Aug 24, 2011 3:10 pm Reply with quote

montego, i have modify the userinfo.php and changed icq, aim & co to myspace, twitter, facebook, soundcloud and g+. at the moment i have changed all bad tables to ul and li with css in the userinfo.php. but this not the problem!

i want to know, where is the place for this hardcoded &nbsp; not more...
 
kguske
Site Admin



Joined: Jun 04, 2004
Posts: 6437

PostPosted: Fri Aug 26, 2011 11:37 am Reply with quote

You see a &nbsp; on the ICQ field on which page? User info? If the value is blank, it will show "N/A" (defined by _YA_NA) rather than &nbsp;
Code:
         if ($usrinfo['user_icq'] == '') $usrinfo['user_icq'] = _YA_NA;

         echo '<tr><td width="30%" align="left">' . _ICQ . '</td><td width="70%" align="left"><strong>' . $usrinfo['user_icq'] . '</strong></td></tr>' ;

_________________
I search, therefore I exist...
Only registered users can see links on this board! Get registered or login!
 
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> v2.4 RN Issues

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©