View Single Post
  #1  
Old 30th July 2008, 23:33
Nilsons Nilsons is offline
Senior Member
 
Join Date: Dec 2007
Latvia
Posts: 40
Default Contact (icq,msn,yahoo,aim,skype)
Add to database
Code:
ALTER TABLE `users` ADD `icq` VARCHAR( 255 ) NOT NULL AFTER `website` ;
ALTER TABLE `users` ADD `msn` VARCHAR( 255 ) NOT NULL AFTER `icq` ;
ALTER TABLE `users` ADD `aim` VARCHAR( 255 ) NOT NULL AFTER `msn` ;
ALTER TABLE `users` ADD `yahoo` VARCHAR( 255 ) NOT NULL AFTER `aim` ;
ALTER TABLE `users` ADD `skype` VARCHAR( 255 ) NOT NULL AFTER `yahoo` ;
In my.php search
Code:
<a href=http://photobucket.com/>photobucket</a>.",1);
after add
Code:
print("<tr><td class=\"tablecat\" colspan=\"2\" align=left>Contacts</td></tr>\n");

tr(" ", "    <table cellSpacing=\"3\" cellPadding=\"0\" width=\"100%\" border=\"0\">
            <tr>
        <td style=\"font-size: 11px; font-style: normal; font-variant: normal; font-weight: normal; font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif\" colspan=2>
        If you want, that other visitors could contact quickly you, specify the data in following systems of fast messages</td>
      </tr>
      <tr>
        <td style=\"font-size: 11px; font-style: normal; font-variant: normal; font-weight: normal; font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif\">
        Namber ICQ

        <img alt src=pic/contact/icq.gif width=\"17\" height=\"17\">
        <input maxLength=\"30\" size=\"25\" name=\"icq\" value=\"" . htmlspecialchars($CURUSER["icq"]) . "\" ></td>
        <td style=\"font-size: 11px; font-style: normal; font-variant: normal; font-weight: normal; font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif\">
        Name in AIM

        <img alt src=pic/contact/aim.gif width=\"17\" height=\"17\">
        <input maxLength=\"30\" size=\"25\" name=\"aim\" value=\"" . htmlspecialchars($CURUSER["aim"]) . "\" ></td>
      </tr>
      <tr>
        <td style=\"font-size: 11px; font-style: normal; font-variant: normal; font-weight: normal; font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif\">
        Youre MSN

        <img alt src=pic/contact/msn.gif width=\"17\" height=\"17\">
        <input maxLength=\"50\" size=\"25\" name=\"msn\" value=\"" . htmlspecialchars($CURUSER["msn"]) . "\" ></td>
        <td style=\"font-size: 11px; font-style: normal; font-variant: normal; font-weight: normal; font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif\">
        Name in Yahoo!

        <img alt src=pic/contact/yahoo.gif width=\"17\" height=\"17\">
        <input maxLength=\"30\" size=\"25\" name=\"yahoo\" value=\"" . htmlspecialchars($CURUSER["yahoo"]) . "\" ></td>
      </tr>
      <tr>
        <td style=\"font-size: 11px; font-style: normal; font-variant: normal; font-weight: normal; font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif\">
        Name in Skype

        <img alt src=pic/contact/skype.gif width=\"17\" height=\"17\">
        <input maxLength=\"32\" size=\"25\" name=\"skype\" value=\"" . htmlspecialchars($CURUSER["skype"]) . "\" ></td>
        <td style=\"font-size: 11px; font-style: normal; font-variant: normal; font-weight: normal; font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif\">
         </td>
      </tr>
    </table>",1);
in takepfroedit search
Code:
/*
if ($privacy != "normal" && $privacy != "low" && $privacy != "strong")
    bark("whoops");

$updateset[] = "privacy = '$privacy'";
*/
before add
Code:
$icq = unesc($_POST["icq"]);
if (strlen($icq) > 10)
    bark("Sorry, Namber icq too long  (Max - 10)");
$updateset[] = "icq = " . sqlesc($icq);

$msn = unesc($_POST["msn"]);
if (strlen($msn) > 30)
    bark("Sorry, Yours msn too long  (Max - 30)");
$updateset[] = "msn = " . sqlesc($msn);

$aim = unesc($_POST["aim"]);
if (strlen($aim) > 30)
    bark("Sorry, Yours aim too long  (Max - 30)");
$updateset[] = "aim = " . sqlesc($aim);

$yahoo = unesc($_POST["yahoo"]);
if (strlen($yahoo) > 30)
    bark("Sorry, Yours yahoo too long   (Max - 30)");
$updateset[] = "yahoo = " . sqlesc($yahoo);

$skype = unesc($_POST["skype"]);
if (strlen($skype) > 20)
    bark("Sorry, Yours skype too long  (Max - 20)");
$updateset[] = "skype = " . sqlesc($skype);
open userdetails.php and search
Code:
$addr</td></tr>n");
after add
Code:
?>
<tr>
<td class=tablea>Contact</td><td class=tablea align=left>
<?
if ($user["icq"])
    print("<img src=http://web.icq.com/whitepages/online?icq=$user[icq]&img=5  alt=icq border=0 /> $user[icq] 
\n");
if ($user["msn"])
    print("<img src=pic/contact/msn.gif alt=msn border=0 /> $user[msn]
\n");
if ($user["aim"])
    print("<img src=pic/contact/aim.gif alt=aim border=0 /> $user[aim]
\n");
if ($user["yahoo"])
    print("<img src=pic/contact/yahoo.gif alt=yahoo border=0 /> $user[yahoo]
\n");
if ($user["skype"])
    print("<img src=pic/contact/skype.gif alt-skype border=0 /> $user[skype]\n");
?>  
</td>
</tr>
<?

or


Code:
if ($user["icq"])
print("<tr><td class=tableb>ICQ</td><td class=tablea align=left><img src=http://web.icq.com/whitepages/online?icq=$user[icq]&img=5  alt=icq border=0 /> $user[icq] </td></tr>\n");  
if ($user["msn"])
print("<tr><td class=tableb>MSN</td><td class=tablea align=left><img src=pic/contact/msn.gif alt=msn border=0 /> $user[msn]</td></tr>\n");
if ($user["aim"])
    print("<tr><td class=tableb>AIM</td><td class=tablea align=left><img src=pic/contact/aim.gif alt=aim border=0 /> $user[aim]</td></tr>\n");
if ($user["yahoo"])
print("<tr><td class=tableb>Yahoo</td><td class=tablea align=left><img src=pic/contact/yahoo.gif alt=yahoo border=0 /> $user[yahoo]</td></tr>\n");
if ($user["skype"])
print("<tr><td class=tableb>Skype</td><td class=tablea align=left><img src=pic/contact/skype.gif alt-skype border=0 /> $user[skype]</td></tr>\n");
in pic folder add pictures

Click the image to open in full size.
Click the image to open in full size.
Click the image to open in full size.
Click the image to open in full size.
Click the image to open in full size.

Last edited by joeroberts; 31st July 2008 at 05:13.
Reply With Quote
The Following User Says Thank You to Nilsons For This Useful Post:
daniixxl (13th October 2010)