Lisa Fewell (liabunny) wrote in s2component,
Lisa Fewell
liabunny
s2component

Editing the Profile Component

Ok, here's a tutorial to edit your profile component, and how to add in the instant messenger and livejournal stuff...



First off, here's the basic code to edit your profile component, which zzyzx posted here.




function print_profile(Page p) {

print_comp_header("PROFILE COMPONENT TITLE");
"""
<table cellspacing="0" cellpadding="0" border="0">
<tr>
<td width="50%" align="center">
<div class="shortLine"><img src="http://www.livejournal.com/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></div>
<div class="shortLine"><img src="http://www.livejournal.com/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></div>
</td>
<td align="center"><a href="http://www.livejournal.com/allpics.bml?user=USERNAME">$p.journal.default_pic </a></td>
<td width="50%" align="center">
<div class="shortLine"><img src="http://www.livejournal.com/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></div>
<div class="shortLine"><img src="http://www.livejournal.com/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></div>
</td>
</tr>
<tr>
<td colspan="3" class="compContent">
<div><b>User:</b> <span class='ljuser' style='white-space:nowrap;'><a href='http://www.livejournal.com/userinfo.bml?user=USERNAME'><img src='http://stat.livejournal.com/img/userinfo.gif' alt='userinfo' width='17' height='17' style='vertical-align:bottom;border:0;' /></a><a href='http://www.livejournal.com/users/USERNAME/'><b>USERNAME</b></a></span></div>
<div><b>Name:</b> NAME</div>
<div><b>Website:</b> <a href="WEBSITE URL">WEBSITE NAME</a></div>
<div><b>Age:</b> AGE</div>
<div><b>Location:</b> LOCATION</div>

##### If you choose to add in the IM/LJ stuff, it will go right here #####

</td>
</tr>
</table>
""";
print_comp_footer();
}


Ok, so now that you've got that, if you want to add the instant message/live journal stuff, you will need to add this in where the red text is in the code above...



<table style="width: 100%;">
<tr><th colspan="2">Instant Messengers</th></tr>

<tr><td><a href="http://edit.yahoo.com/config/send_webmesg?.target=YOUR YAHOO NAME">
<img src="URL FOR YAHOO IMAGE GOES HERE" alt="Message me" style="border: 0;" /></a></td>
<td style="text-align: right;">
<a href="http://profiles.yahoo.com/YOUR YAHOO NAME">my Profile</a><br />
<a href="http://edit.yahoo.com/config/set_buddygrp?.src=&.cmd=a&.bg=Friends&.bdl=YOUR YAHOO NAME">+Add me</a><br />
<a href="http://edit.yahoo.com/config/send_webmesg?.target=YOUR YAHOO NAME">Message me</a><br />
<a href="http://photos.yahoo.com/YOUR YAHOO NAME">my Photos</a><br /></td></tr>

<tr><td colspan="2">
<div class="medLine"><img src="http://www.livejournal.com/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></div>
<div class="ltLine"><img src="http://www.livejournal.com/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></div></td></tr>

<tr><td><a href="http://wwp.icq.com/scripts/contact.dll?msgto=YOUR ICQ NUMBER">
<img src="URL FOR ICQ IMAGE GOES HERE" alt="Message me" style="border: 0;" /></a></td>
<td style="text-align: right;">
<a href="http://wwp.icq.com/whitepages/about_me/1,,,00.html?Uin=YOUR ICQ NUMBER">my Profile</a><br />
<a href="http://wwp.icq.com/scripts/search.dll?to=YOUR ICQ NUMBER">+Add me</a><br />
<a href="http://wwp.icq.com/scripts/contact.dll?msgto=YOUR ICQ NUMBER">Message me</a><br /></td></tr>

<tr><td colspan="2">
<div class="medLine"><img src="http://www.livejournal.com/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></div>
<div class="ltLine"><img src="http://www.livejournal.com/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></div></td></tr>

<tr><td><a href="aim:goim?screenname=YOUR AIM SCREENNAME&message=I'm+an+LJ+junkie+too!">
<img src="URL FOR AIM IMAGE GOES HERE" alt="Message me" style="border: 0;" /></a></td>
<td style="text-align: right;">
<a href="aim:addbuddy?screenname=YOUR AIM SCREENNAME">+add me</a><br />
<a href="aim:goim?screenname=YOUR AIM SCREENNAME&message=I'm+an+LJ+junkie+too!">message me</a><br /></td></tr>

<tr><th colspan="2">LiveJournal</th></tr>
<tr><td><a href="http://www.livejournal.com/friends/add.bml?user=YOUR USERNAME">
<img src="URL FOR ADD USER IMAGE GOES HERE" alt="Add me" style="border: 0;" /></a></td>
<td style="text-align: right;"><a href="http://www.livejournal.com/friends/add.bml?user=YOUR USERNAME">+add me</a></td></tr>

<tr><td colspan="2">
<div class="medLine"><img src="http://www.livejournal.com/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></div>
<div class="ltLine"><img src="http://www.livejournal.com/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></div></td></tr>

<tr><td><a href="http://www.livejournal.com/todo/?user=YOUR USERNAME">
<img src="URL FOR TODO LIST IMAGE GOES HERE" alt="my Todo list" style="border: 0;" /></a></td>
<td style="text-align: right;"><a href="http://www.livejournal.com/todo/?user=YOUR USERNAME">my to do list</a></td></tr>

<tr><td colspan="2">
<div class="medLine"><img src="http://www.livejournal.com/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></div>
<div class="ltLine"><img src="http://www.livejournal.com/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></div></td></tr>

<tr><td><a href="http://www.livejournal.com/tools/memories.bml?user=YOUR USERNAME">
<img src="URL FOR MEMORIES IMAGE GOES HERE" alt="my Memories" style="border: 0;" /></a></td>
<td style="text-align: right;"><a href="http://www.livejournal.com/tools/memories.bml?user=YOUR USERNAME">my memories</a></td></tr>

<tr><td colspan="2">
<div class="medLine"><img src="http://www.livejournal.com/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></div>
<div class="ltLine"><img src="http://www.livejournal.com/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></div></td></tr>

<tr><td><a href="http://www.livejournal.com/tools/tellafriend.bml?user=YOUR USERNAME">
<img src="URL FOR TELL A FRIEND IMAGE GOES HERE" alt="Tell someone about me" style="border: 0;" /></a></td>
<td style="text-align: right;"><a href="http://www.livejournal.com/tools/tellafriend.bml?user=YOUR USERNAME">tell someone about me</a>
</td>
</tr>
</table>





If I caught them all, I put in capital letters where you need to change it to your username.

Here's some images you can use:




To get the images, upload them to your own webspace and put their urls in this code.

Last thing... let me know if it doesn't work right. I proofread all this a couple of times, but still may have missed something. And I only used the AIM section in the instant messengers, so I went back and added in the Yahoo and ICQ ones, so let me know if they don't work right, I didn't test it out with them in it.



edit: Sorry, for some reason this post wound up with a weird error I had to go back in and fix. This happened with this post in component_help and I fixed it, but forgot that I had it posted here as well. Anyway, it's all fixed now.

I have also uploaded some pictures you can use and put them in the post, but I do ask that you save them and upload them to your own webspace. I'm using free hosting and it only allows so much bandwith.
  • Post a new comment

    Error

    default userpic
  • 26 comments