Zzyzx Wolfe (zzyzx) wrote in component_help,
Zzyzx Wolfe
zzyzx
component_help

Profile Component

I was looking at the previous code and wanted to try some things out, so I found a way to shorten it. This doesn't have the contact info stuff, though.

Also, in this version, the image colors are automatic so you don't have to replace the image tags for the rounded corners, and it retains the side dashes.


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"><img src="USER PIC URL" alt="USER PIC ALT" width="95" height="95" border="1" vspace="4" class="userpic" /></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>
			</td>
		</tr>	
	</table>
    """;
  print_comp_footer();
}
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

  • 14 comments