1 (edited by seva 2005-10-13 18:02)

Topic: usefull thing when u viewing profile

for what we can see empty fields ? for what these (Unknow) ? no usefull information
for example, if we add this to the code...

<?php if($user['jabber'] !=''): ?>
   <dt><?php echo $lang_profile['Jabber'] ?>:</dt>
   <dd><?php echo $user['jabber'] ?></dd>
<?php endif; ?>

... when we'll view users profiles, there will be no empty fields..

p.s.
i'm newbie here, don't bit me %))

Hm... every pixel has it's own destiny

Re: usefull thing when u viewing profile

This makes sense. Where can I add these? And for other messengers?

Parimal Satyal - Powermetal from Nepal

3

Re: usefull thing when u viewing profile

It can be used not only for messengers, for user information in general
Open profile.php, find <?php echo $lang_profile['Profile view'] ?>
Under, you could find all fields..
change everthing you want
for example,

<dt><?php echo $lang_profile['Login'] ?>: </dt>
                            <dd><?php echo pun_htmlspecialchars($user['username']) ?></dd>
                        <?php if($user['realname'] != ''): ?>
                            <dt><?php echo $lang_profile['Realname'] ?>: </dt>
                            <dd><?php echo pun_htmlspecialchars(($pun_config['o_censoring'] == '1') ? censor_words($user['realname']) : $user['realname']) ?></dd>
                        <?php endif;
                        if($user['last_visit'] != '0'): ?>
                            <dt><?php echo $lang_profile['Last online'] ?>: </dt>
                            <dd><?php echo format_time($user['last_visit']) ?></dd>
                        <?php endif;
                        if ($url != $lang_profile['Unknown']): ?>
                            <dt><?php echo $lang_profile['Website'] ?>: </dt>
                            <dd><?php echo $url ?> </dd>
                        <?php endif; ?>
                            <dt><?php echo $lang_profile['Birthday'] ?>: </dt>
                            <dd><?php echo $birthday ?></dd>
                        <?php if($user['location'] !=''): ?>
                            <dt><?php echo $lang_profile['Location'] ?>: </dt>
                            <dd><?php echo $user['location'] ?></dd>
                        <?php endif; ?>
                            <?php if($user['workplace'] !=''): ?>
                            <dt><?php echo $lang_profile['Work Place'] ?>: </dt>
                            <dd><?php echo $user['workplace'] ?></dd>
                        <?php endif; ?>
                        <?php if($user['jabber'] !=''): ?>
                            <dt><?php echo $lang_profile['Jabber'] ?>: </dt>
                            <dd><?php echo $user['jabber'] ?></dd>
                        <?php endif; ?>
                        <?php if($user['icq'] !=''): ?>
                            <dt><?php echo $lang_profile['ICQ'] ?>: </dt>
                            <dd><?php echo $user['icq'] ?></dd>
                        <?php endif; ?>
                        <?php if($user['locicq'] !=''): ?>
                            <dt><?php echo $lang_profile['Local ICQ'] ?>: </dt>
                            <dd><?php echo $user['locicq'] ?></dd>
                        <?php endif; ?>
......

etc...

Hm... every pixel has it's own destiny

4 (edited by livatlantis 2005-10-16 09:00)

Re: usefull thing when u viewing profile

Right, thanks!

I'll use this! And post here if it doens't work out. I'm not very good with PHP, lol tongue

Uh oh, do I add or replace? Currently, it's this:

<dt><?php echo $lang_profile['Jabber'] ?>: </dt>
                            <dd><?php echo ($user['jabber'] !='') ? pun_htmlspecialchars($user['jabber']) : $lang_profile['Unknown']; ?></dd>
Parimal Satyal - Powermetal from Nepal

Re: usefull thing when u viewing profile

I replace! It works! Thanks! smile

You can see it in action at http://www.powerofmetal.net/forum/profile.php?id=2
I editted for Messaging section and Name and Location fields.

Only AOL IM shows and there's no Location!

Great!!

Parimal Satyal - Powermetal from Nepal