Dreamwidth on LJ
 
1st-Dec-2011 06:20 pm
Held hostage!  By calathea.
Is anyone able to tell me what the code is to get a user name to link to DW when posting in LJ? Google provides a thousand links for the reverse, naturally, but this has me stumped. Thanks in advance.
Comments 
1st-Dec-2011 06:20 am (UTC)
LiveJournal itself doesn't have a code to do what you describe. You can hack it together with the HTML below, substituting the desired username for 'example'

<span style='white-space: nowrap;'><a href='http://example.dreamwidth.org/profile'><img src='http://s.dreamwidth.org/img/silk/identity/user.png' alt='[personal profile] ' width='17' height='17' style='vertical-align: text-bottom; border: 0; padding-right: 1px;' /></a><a href='http://example.dreamwidth.org/'><b>example</b></a></span>

results in

[personal profile] example
1st-Dec-2011 06:25 am (UTC)
Woohoo! My hero! Thank you.

But god that's complicated. They couldn't possibly give us what we want, huh. ;-p
1st-Dec-2011 06:32 am (UTC)
Dreamwidth did some work to make it possible to link to other sites with their code. The HTML I shared is what Dreamwidth produces on a crosspost and can be looked up with the 'View Source' function in most browsers. It can also be used to link to a Twitter or Facebook user with minimal adaptation.
1st-Dec-2011 06:35 am (UTC)
This is a learning day for me! Thanks again.
1st-Dec-2011 06:25 am (UTC)
Alternately, you can use basic HTML if you don't want the special formatting. This is covered in the first bullet of this FAQ: http://www.livejournal.com/support/faqbrowse.bml?faqid=67
1st-Dec-2011 06:28 am (UTC)
Oh, yeah, that's what I've been doing up till now. I was just curious -- read consumed with it -- because I knew I'd seen proper links around the place, but could find no FAQ anywhere that said how to do it.
1st-Dec-2011 06:52 am (UTC)
You can copy an HTML snippet to do that on the Dreamwidth profile page for the user you need to link to.
This page was loaded Jul 10th 2014, 4:00 pm GMT.