Topic: Delete Profile/Messaging

How do I delete "Messaging" (Jabber, ICQ, AOL IM, Yahoo! Messenger) under the members profiles?

Re: Delete Profile/Messaging

going under profile - mesaging and deleting the placed nicknames doesn't function?

3 (edited by helpme 2006-03-14 10:40)

Re: Delete Profile/Messaging

I ment that I want to delete the hold category. None of my members uses it.

Re: Delete Profile/Messaging

This should just be a matter of deleting some code - open profile.php and delete:

        case 'messaging':
        {
            $form = extract_elements(array('jabber', 'icq', 'msn', 'aim', 'yahoo'));

            // If the ICQ UIN contains anything other than digits it's invalid
            if ($form['icq'] != '' && preg_match('/[^0-9]/', $form['icq']))
                message($lang_prof_reg['Bad ICQ']);

            break;
        }
            <div class="inform">
                <fieldset>
                <legend><?php echo $lang_profile['Section messaging'] ?></legend>
                    <div class="infldset">
                        <dl>
                            <dt><?php echo $lang_profile['Jabber'] ?>: </dt>
                            <dd><?php echo ($user['jabber'] !='') ? pun_htmlspecialchars($user['jabber']) : $lang_profile['Unknown']; ?></dd>
                            <dt><?php echo $lang_profile['ICQ'] ?>: </dt>
                            <dd><?php echo ($user['icq'] !='') ? $user['icq'] : $lang_profile['Unknown']; ?></dd>
                            <dt><?php echo $lang_profile['MSN'] ?>: </dt>
                            <dd><?php echo ($user['msn'] !='') ? pun_htmlspecialchars(($pun_config['o_censoring'] == '1') ? censor_words($user['msn']) : $user['msn']) : $lang_profile['Unknown']; ?></dd>
                            <dt><?php echo $lang_profile['AOL IM'] ?>: </dt>
                            <dd><?php echo ($user['aim'] !='') ? pun_htmlspecialchars(($pun_config['o_censoring'] == '1') ? censor_words($user['aim']) : $user['aim']) : $lang_profile['Unknown']; ?></dd>
                            <dt><?php echo $lang_profile['Yahoo'] ?>: </dt>
                            <dd><?php echo ($user['yahoo'] !='') ? pun_htmlspecialchars(($pun_config['o_censoring'] == '1') ? censor_words($user['yahoo']) : $user['yahoo']) : $lang_profile['Unknown']; ?></dd>
                        </dl>
                        <div class="clearer"></div>
                    </div>
                </fieldset>
            </div>
else if ($section == 'messaging')
    {

        $page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / '.$lang_common['Profile'];
        require PUN_ROOT.'header.php';

        generate_profile_menu('messaging');

?>
    <div class="blockform">
        <h2><span><?php echo pun_htmlspecialchars($user['username']).' - '.$lang_profile['Section messaging'] ?></span></h2>
        <div class="box">
            <form id="profile3" method="post" action="profile.php?section=messaging&id=<?php echo $id ?>">
                <div class="inform">
                    <fieldset>
                        <legend><?php echo $lang_profile['Contact details legend'] ?></legend>
                        <div class="infldset">
                            <input type="hidden" name="form_sent" value="1" />
                            <label><?php echo $lang_profile['Jabber'] ?><br /><input id="jabber" type="text" name="form[jabber]" value="<?php echo pun_htmlspecialchars($user['jabber']) ?>" size="40" maxlength="75" /><br /></label>
                            <label><?php echo $lang_profile['ICQ'] ?><br /><input id="icq" type="text" name="form[icq]" value="<?php echo $user['icq'] ?>" size="12" maxlength="12" /><br /></label>
                            <label><?php echo $lang_profile['MSN'] ?><br /><input id="msn" type="text" name="form[msn]" value="<?php echo pun_htmlspecialchars($user['msn']) ?>" size="40" maxlength="50" /><br /></label>
                            <label><?php echo $lang_profile['AOL IM'] ?><br /><input id="aim" type="text" name="form[aim]" value="<?php echo pun_htmlspecialchars($user['aim']) ?>" size="20" maxlength="30" /><br /></label>
                            <label><?php echo $lang_profile['Yahoo'] ?><br /><input id="yahoo" type="text" name="form[yahoo]" value="<?php echo pun_htmlspecialchars($user['yahoo']) ?>" size="20" maxlength="30" /><br /></label>
                        </div>
                    </fieldset>
                </div>
                <p><input type="submit" name="update" value="<?php echo $lang_common['Submit'] ?>" /><?php echo $lang_profile['Instructions'] ?></p>
            </form>
        </div>
    </div>
<?php

    }

Then open include/functions.php and delete:

<li<?php if ($page == 'messaging') echo ' class="isactive"'; ?>><a href="profile.php?section=messaging&id=<?php echo $id ?>"><?php echo $lang_profile['Section messaging'] ?></a></li>

Does that work for you?

P.S. If you want to be more perfectionist about it, you might also want to delete all the messaging stuff from the database, from the queries in profile.php, and from the lang files. I would, but I don't think that it's really necessary if you just want to get it done quickly.

Looking for a certain modification for your forum? Please take a look here before posting.