[dw-free] Add link-to-me module on profile
[commit: http://hg.dwscoalition.org/dw-free/rev/584e08e4370d]
http://bugs.dwscoalition.org/show_bug.cgi?id=1356
Add c&p-able code to link to a user or community, at the bottom of their
profile page.
Patch by
denise.
Files modified:
http://bugs.dwscoalition.org/show_bug.cgi?id=1356
Add c&p-able code to link to a user or community, at the bottom of their
profile page.
Patch by
![[staff profile]](https://www.dreamwidth.org/img/silk/identity/user_staff.png)
Files modified:
- htdocs/userinfo.bml
- htdocs/userinfo.bml.text
-------------------------------------------------------------------------------- diff -r f3ccf2c22211 -r 584e08e4370d htdocs/userinfo.bml --- a/htdocs/userinfo.bml Mon Jul 06 01:26:29 2009 +0800 +++ b/htdocs/userinfo.bml Mon Jul 06 01:29:30 2009 +0800 @@ -922,6 +922,40 @@ body<= } ################################################################################ +##### LINKING MODULE + + if ( $u->is_individual || $u->is_community ) { + + my $local_link .= "<user name=\"" . $u->username . "\">"; + my $remote_link .= $u->ljuser_display; + + + my $link_body = "<div style='font-style:italic;'>" . BML::ml( '.linking.about' ) . "</div>"; + $link_body .= BML::ml( '.linking.local', { sitename => $LJ::SITENAMESHORT }) . LJ::html_text({ + name => 'local', + id => 'local', + size => 50, + maxlength => 100, + value => $local_link, + }) . "<br />"; + $link_body .= "$ML{'.linking.anywhere'} " . LJ::html_text({ + name => 'local', + id => 'local', + size => 50, + maxlength => 550, + value => $remote_link, + }) . "<br />"; + + $ret .= $content_block->( + section_name => 'linking', + section_name_ml => '.label.linking', + body => $link_body, + hidable => 1, + ); + } + + +################################################################################ ##### END $ret .= q{ <div class='ljclear'></div> }; diff -r f3ccf2c22211 -r 584e08e4370d htdocs/userinfo.bml.text --- a/htdocs/userinfo.bml.text Mon Jul 06 01:26:29 2009 +0800 +++ b/htdocs/userinfo.bml.text Mon Jul 06 01:29:30 2009 +0800 @@ -246,6 +246,8 @@ .label.last_fm_user2=Last.fm user: +.label.linking=Linking + .label.location=Location: .label.maintainers=Maintainers ([[num]]): @@ -309,6 +311,12 @@ .label.website=Website: .label.yahooid=Yahoo! ID: + +.linking.about=To link to this user, copy this code: + +.linking.local=On [[sitename]]: + +.linking.anywhere=Elsewhere: .members.header=Members --------------------------------------------------------------------------------