mark: A photo of Mark kneeling on top of the Taal Volcano in the Philippines. It was a long hike. (Default)
Mark Smith ([staff profile] mark) wrote in [site community profile] changelog2009-04-01 04:51 am

[dw-free] Adapt Lynx scheme to handle logged in/logged out views

[commit: http://hg.dwscoalition.org/dw-free/rev/b54d4c810683]

http://bugs.dwscoalition.org/show_bug.cgi?id=588

Add logged in/logged out functionality to Lynx site scheme footer.

Patch by [staff profile] denise.

Files modified:
  • cgi-bin/bml/scheme/lynx.look
--------------------------------------------------------------------------------
diff -r 24c7ee121bf3 -r b54d4c810683 cgi-bin/bml/scheme/lynx.look
--- a/cgi-bin/bml/scheme/lynx.look	Wed Apr 01 04:42:20 2009 +0000
+++ b/cgi-bin/bml/scheme/lynx.look	Wed Apr 01 04:51:27 2009 +0000
@@ -44,14 +44,29 @@ _code?>
 %%BODY%%
 
 <hr />
+<?_code
+{
+    my $remote = LJ::get_remote();
+    my $ret;
 
-<p>[ <a href='<?siteroot?>/'><?_ml lynx.nav.home _ml?></a> | <a href='<?siteroot?>/update.bml'><?_ml lynx.nav.update _ml?></a> | <?_code
-   use strict;
-   if (my $u = LJ::get_remote()) {
-        my $baseurl = $u->journal_base();
-        return "<a href='$baseurl/'>$ML{'lynx.nav.recent'}</a> | <a href='$baseurl/read/'>$ML{'lynx.nav.friends'}</a> | ";
-   }
-_code?><a href='<?siteroot?>/login.bml'><?_ml lynx.nav.login _ml?></a>/<a href='<?siteroot?>/logout.bml'><?_ml lynx.nav.logout _ml?></a> | <a href='<?siteroot?>/site/search.bml'><?_ml lynx.nav.search _ml?></a> | <a href='<?siteroot?>/manage/settings/'><?_ml lynx.nav.siteopts _ml?></a> | <a href='<?siteroot?>/site/'><?_ml lynx.nav.sitemap _ml?></a> ]</p>
+    $ret .= "<p>[ <a href='<?siteroot?>/'><?_ml lynx.nav.home _ml?></a> | <a href='<?siteroot?>/update'><?_ml lynx.nav.update _ml?></a> | ";
+
+    if ( $remote ) {
+         my $baseurl = $remote->journal_base();
+         $ret .= "<a href='$baseurl/'>$ML{'lynx.nav.recent'}</a> | <a href='$baseurl/read/'>$ML{'lynx.nav.friends'}</a> | ";
+         $ret .= "<a href='<?siteroot?>/logout'><?_ml lynx.nav.logout _ml?></a> " . $remote->ljuser_display . " | ";
+    } else {
+         $ret .= "<a href='<?siteroot?>/login'><?_ml lynx.nav.login _ml?></a> | ";
+    }
+
+    $ret .= "<a href='<?siteroot?>/site/search'><?_ml lynx.nav.search _ml?></a> | ";
+    $ret .= "<a href='<?siteroot?>/manage/settings/'><?_ml lynx.nav.siteopts _ml?></a> | ";
+    $ret .= "<a href='<?siteroot?>/site/'><?_ml lynx.nav.sitemap _ml?></a> ]</p>";
+
+    return $ret;
+}
+
+_code?>
 <?breadcrumbs?>
 <?_code
 {
--------------------------------------------------------------------------------

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org