Author Topic: Msn/YIM/personal text/about yourself.......  (Read 12813 times)

0 Members and 1 Guest are viewing this topic.

Offline beseech

  • Full Member
  • ***
  • Posts: 150
    • View Profile
Msn/YIM/personal text/about yourself.......
« on: July 07, 2005, 02:37:18 PM »
its possible added all this stuff on user profile ????

Offline ascanio

  • Hero Member
  • *****
  • Posts: 569
    • View Profile
    • http://www.surfourspace.net
Re: Msn/YIM/personal text/about yourself.......
« Reply #1 on: July 07, 2005, 04:16:36 PM »
 :arrow: Files to edit:

includes/db_field_definitions.php
lang/<your language>/main.php
templates/<your templates>/member_profile.html
templates/<your templates>/register_form.html
templates/<your templates>/member_editprofile.html


Step 1 Open db_field_definitions.php:

Country Select:
Code: [Select]
$additional_user_fields['user_description'] = array($lang['user_description'], "text", 0);
$additional_user_fields['user_msn'] = array($lang['user_msn'], "text", 1);
$additional_user_fields['user_yim'] = array($lang['user_yim'], "text", 1);

Close and save


Add before ?> :

Code: [Select]
$lang['user_msn'] = "MSN:";
$lang['user_yim'] = "Yahoo:";
$lang['user_description'] = "Yahoo:";
Step 3 Open register_form.html:
Find:

Code: [Select]
<tr>
   <td class="row1"><b>{lang_email}</b></td>
   <td class="row1"><input type="text" name="user_email" size="30" class="input" value="{user_email}" /></td>
</tr>


Add after:

Code: [Select]
<tr>
    <td class="row1"><b>{lang_user_msn}</b></td>
  <td class="row1">{user_msn} </td>
</tr>

do the same with the yim and description fields
also u need to modify:
templates/<your templates>/member_editprofile.html
templates/<your templates>/member_profile.html
then in ur database u need to creat those fields msn,yim,description into the user table

Offline beseech

  • Full Member
  • ***
  • Posts: 150
    • View Profile
Re: Msn/YIM/personal text/about yourself.......
« Reply #2 on: August 31, 2005, 04:10:46 PM »
this isn't work ... :S

Offline badass

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Msn/YIM/personal text/about yourself.......
« Reply #3 on: August 31, 2005, 07:38:59 PM »
has any one else  tried this???? and confirm it working??
it sounds cool

Offline Egly

  • Jr. Member
  • **
  • Posts: 71
    • View Profile
Re: Msn/YIM/personal text/about yourself.......
« Reply #4 on: August 31, 2005, 07:56:23 PM »
Yes i tried it and it works fine.

The most important thing to do is the last line:
"then in ur database u need to creat those fields msn,yim,description into the user table"

this you can do in myphpadmin.
It took me a while, but now it works well here: http://www.amberger-fotogalerie.de

Offline beseech

  • Full Member
  • ***
  • Posts: 150
    • View Profile
Re: Msn/YIM/personal text/about yourself.......
« Reply #5 on: August 31, 2005, 10:51:43 PM »
hmmmm :S but this still the same...



TheOracle

  • Guest
Re: Msn/YIM/personal text/about yourself.......
« Reply #6 on: September 01, 2005, 01:16:44 AM »
The reason why it isn't working is because of :

Quote

$lang['user_msn'] = "MSN:";
$lang['user_yim'] = "Yahoo:";
$lang['user_description'] = "Yahoo:";


in db_field_definitions.php file and must rather be added in lang/<your_lang>/main.php file above that tag.

Then, you must register each of these three $lang strings from includes/page_header.php file.

Offline Xyu BAM

  • Full Member
  • ***
  • Posts: 145
    • View Profile
Re: Msn/YIM/personal text/about yourself.......
« Reply #7 on: September 01, 2005, 01:29:22 AM »
Then, you must register each of these three $lang strings from includes/page_header.php file.
You are wrong.
Аs long as these variables being used in db_field_definitions.php they automaticaly be registerd as template tags. No needed any additional changes to the code.

And it seems ascanio missed Step 2, actualy the explanation part, which supposed to state
Quote
Step 2.
Open lang/<yourlanguage>/main.php

Add before ?> :

Code: [Select]
$lang['user_msn'] = "MSN:";
$lang['user_yim'] = "Yahoo:";
$lang['user_description'] = "Yahoo:";

TheOracle

  • Guest
Re: Msn/YIM/personal text/about yourself.......
« Reply #8 on: September 01, 2005, 01:45:31 AM »
Sure - whatever - I'm wrong.  :roll:

Offline Beautiful Body Castings

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: Msn/YIM/personal text/about yourself.......
« Reply #9 on: June 17, 2006, 02:36:30 AM »
there were alot of other bugs in this too

and it wasnt very well explained

the td clas row1 and row2 needed to be modified to keep in theme with the rest of the page

the registration form didnt have any input boxes just teh {user_msn} etc so users couldnt enter their info

also in the db definitions file some 1 and 0 were in wrong place causing users who edit profile to need to enter all instant messenger ids even if they dont have any or it wouldnt save the other fields info to database

i have modified all this and it looks something like the following

find in member_profle.html (in your template folder)

Code: [Select]
<tr>
          <td class="row2"><b>{lang_icq}</b></td>
          <td class="row2">{if user_icq}<a href="http://wwp.icq.com/scripts/search.dll?to={user_icq}">{user_icq}</a> (<b>{user_icq_status}</b>){endif user_icq}</td>
        </tr>

and add the following below it

Code: [Select]
{if user_msn}<tr>
          <td class="row2"><b>{lang_user_msn}</b></td>
          <td class="row2"><A HREF="http://checker.tdknights.com:1337/message/msn/{user_msn}">{user_msn}
<IMG SRC="http://checker.tdknights.com:1337/msn/{user_msn}"
align="absmiddle" border="0" ALT="MSN Online Status Indicator"
onerror="this.onerror=null;this.src='http://tdknights.com/checker/msnunknown.gif';"></A></td>
        </tr>{endif user_msn}
{if user_yim}<tr>
          <td class="row2"><b>{lang_user_yim}</b></td>
          <td class="row2"><a href="http://profiles.yahoo.com/{user_yim}" target="_blank">{user_yim}</a> <a href="ymsgr:sendIM?{user_yim}">
<img border=0 src="http://opi.yahoo.com/online?u={user_yim}&m=g&t=2"></a></td>
        </tr>{endif user_yim}
{if user_aim}<tr>
          <td class="row2"><b>{lang_user_aim}</b></td>
          <td class="row2"><A HREF="aim:goim?screenname={user_aim}">{user_aim}
<IMG SRC="http://checker.tdknights.com:1337/aim/{user_aim}"
align="absmiddle" border="0" ALT="AIM Online Status Indicator"
onerror="this.onerror=null;this.src='http://tdknights.com/checker/aimunknown.gif';"></A></td>
        </tr>{endif user_aim}
<tr>
          <td class="row2" valign="top"><b>{lang_user_description}</b></td>
          <td class="row2">{user_description}</td>
        </tr>

find this in the member_editprofile.html page (also in ur templates folder)

Code: [Select]
<tr>
            <td class="row2"><b>{lang_icq}</b></td>
            <td class="row2"><input type="text" name="user_icq"  size="30" value="{user_icq}" class="input" /></td>
          </tr>

and place this under the above code

Code: [Select]
<tr>
            <td class="row1"><b>{lang_user_msn}</b></td>
            <td class="row1"><input type="text" name="user_msn"  size="30" value="{user_msn}" class="input" /></td>
          </tr>
  <tr>
            <td class="row2"><b>{lang_user_yim}</b></td>
            <td class="row2"><input type="text" name="user_yim"  size="30" value="{user_yim}" class="input" /></td>
          </tr>
  <tr>
            <td class="row1"><b>{lang_user_aim}</b></td>
            <td class="row1"><input type="text" name="user_aim"  size="30" value="{user_aim}" class="input" /></td>
          </tr>
  <tr>
            <td class="row2" valign="top"><b>{lang_user_description}</b></td>
            <td class="row2"><textarea name="user_description" cols="40" rows="6" class="input">{user_description}</textarea></td>
          </tr>

then find in the register_form.html
Code: [Select]
<tr>
            <td class="row1"><b>{lang_email}</b></td>
            <td class="row1"><input type="text" name="user_email" size="60" class="input" value="{user_email}" /></td>
          </tr>

and add the following below it
Code: [Select]
<tr>
    <td class="row2"><b>{lang_user_msn}</b></td>
<td class="row2"><input type="text" name="user_msn" size="60" class="input" value="{user_msn}" /> </td>
  </tr>
  <tr>
    <td class="row1"><b>{lang_user_yim}</b></td>
<td class="row1"><input type="text" name="user_yim" size="50" class="input" value="{user_msn}" /> </td>
  </tr>
  <tr>
    <td class="row1"><b>{lang_user_aim}</b></td>
<td class="row1"><input type="text" name="user_aim" size="50" class="input" value="{user_msn}" /> </td>
  </tr>
  <tr>
    <td class="row2"><b>{lang_user_description}</b></td>
<td class="row2"><textarea name="user_description" class="input" cols="40" rows="6">{user_description}</textarea> </td>
  </tr>


ok now go to your languages folder and open main.php

add this at the bottom above the ?>
Code: [Select]
//Yahoo msn and user info mod
$lang['user_msn'] = "MSN:";
$lang['user_yim'] = "YIM:";
$lang['user_aim'] = "AIM:";
$lang['user_description'] = "Bio:";
//Yahoo msn and user info mod end

and finally open db_field_definitions.php in the includes folder

and at the bottom add the following above the ?>

Code: [Select]
//Yahoo msn and user info mod
$additional_user_fields['user_description'] = array($lang['user_description'], "text", 1);
$additional_user_fields['user_msn'] = array($lang['user_msn'], "text", 0);
$additional_user_fields['user_yim'] = array($lang['user_yim'], "text", 0);
$additional_user_fields['user_aim'] = array($lang['user_aim'], "text", 0);
//Yahoo msn and user info mod end

now your done editing, all you need to do is open your database and go to the users table and add the following rows
user_description
user_msn
user_yim
user_aim
user_description

each should be set to varchar and 255 and thats it

upload all the files you edited, test and your done


NOW SOMETHING EXTRA JUST ADDED

if you are wanting these valuse to also show next to comments users make modify the following

open the file details.php in the main fodler and find the following

Code: [Select]
$comment_user_icq_button = "";
and add this below it
Code: [Select]
//Show messenger details in comments
  $comment_user_yim = $user_row[$i]['user_yim'];
  $comment_user_msn = $user_row[$i]['user_msn'];
  $comment_user_aim = $user_row[$i]['user_aim'];
  //Show messenger details in comments end

then open comment_bit.html in your templates folder and find
Code: [Select]
{comment_user_homepage_button}
{comment_user_icq_button}

then add the following code below it

Code: [Select]
{if comment_user_yim}
<a href="ymsgr:sendIM?{comment_user_yim}" target="_blank"><img src="{template_url}/images/yim.gif" width="15" height="9" border="0" alt="{comment_user_yim}" /></a>{endif comment_user_yim}
{if comment_user_msn}<A HREF="http://checker.tdknights.com:1337/message/msn/{comment_user_msn}"><img src="{template_url}/images/msn.gif" width="16" height="16" border="0" alt="{comment_user_msn}" /></a>{endif comment_user_msn}
{if comment_user_aim}<A HREF="aim:goim?screenname={comment_user_aim}"><img src="{template_url}/images/aim.gif" width="18" height="18" border="0" alt="{comment_user_aim}" /></a>{endif comment_user_yim}

now go to your templates folder and open the images folder put in the three files enclosed with this poste (zip file enclosed contains 3 images)

upload them to your host and your done

any help email me and ill be glad to help

You can see all of the mods i have in action on my gallery at http://www.AlgonacPartyCentral.com go to the gallery link and enjoy
« Last Edit: June 17, 2006, 04:41:16 AM by APC2006 »

Offline Beautiful Body Castings

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: Msn/YIM/personal text/about yourself.......
« Reply #10 on: June 26, 2006, 04:17:02 AM »
need help with this

i modified this and added it like i mentioned but if a user enters an email address in the section for yahoo id or aim id etc instead of it linking to the  thing i have set it for it trys to convert it to an email link automatically

what code where does this and why i need to correct this as it comes up all broken and displays half the link code as text

anyone know how to stop this happening or how toi make it so people cant enter email addresses in them boxes when registering or editing profile

Mikey

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Msn/YIM/personal text/about yourself.......
« Reply #11 on: June 26, 2006, 07:15:56 AM »
maybe I missunderstood you, but neither Yahoo, nor AIM messengers need email address, they use regular usernames and that what you should be entering in the fields, not email addresses.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Beautiful Body Castings

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: Msn/YIM/personal text/about yourself.......
« Reply #12 on: June 26, 2006, 07:25:27 AM »
yes i know that

but some users of my gallery are not as intelligent as you or i and have typed in email addresses

it is a pain in the ass to go through each user and change this, they even dissregard the message telling them not to enter emails

so i wanted a way to stop it either stop them from entering an email into those fields or preferably to stop those fields from being converted into an email link automatically

i saw the function in the file functions.php that converts text that contains @ into a link but i want it to do that only for say their email address and when they type an email in a comment or something ONLY not if they accidently type an email into the messenger fields

Mikey