Андрей (andy) wrote in changelog,
Андрей
andy
changelog

[ljcom] r10972: LJSUP-9743 (site schemes refactoring)

Committer: ailyin
LJSUP-9743 (site schemes refactoring)
A   trunk/cgi-bin/LJ/Hooks/SiteScheme.pm
U   trunk/cgi-bin/LJ/Nav.pm
A   trunk/cgi-bin/LJ/SiteScheme/
A   trunk/cgi-bin/LJ/SiteScheme/Dystopia.pm
A   trunk/cgi-bin/LJ/SiteScheme/Lanzelot.pm
A   trunk/cgi-bin/LJ/SiteScheme/NoNavigation.pm
U   trunk/cgi-bin/bml/scheme/dystopia.look
U   trunk/cgi-bin/bml/scheme/lanzelot.look
U   trunk/cgi-bin/bml/scheme/nonavigation.look
A   trunk/htdocs/stc/dystopia.css
A   trunk/templates/SiteScheme/
A   trunk/templates/SiteScheme/dystopia.tmpl
A   trunk/templates/SiteScheme/lanzelot.tmpl
A   trunk/templates/SiteScheme/nonavigation.tmpl
Added: trunk/cgi-bin/LJ/Hooks/SiteScheme.pm
===================================================================
--- trunk/cgi-bin/LJ/Hooks/SiteScheme.pm	                        (rev 0)
+++ trunk/cgi-bin/LJ/Hooks/SiteScheme.pm	2011-09-07 07:59:27 UTC (rev 10972)
@@ -0,0 +1,36 @@
+package LJ::Hooks::SiteScheme;+use strict;+use warnings;++my %lite_scheme_directories = map { $_ => 1 } qw( create postreg tour );++LJ::register_hook(+    'force_scheme' => sub {+        if ($LJ::IS_SSL) {+            return 'horizon_lite';+        }++        my $uri = LJ::Request->uri;++        my $directory = ( $uri =~ m{^/(\w*)} );+        return if $directory eq '';++        if ( $lite_scheme_directories{$directory} ) {+            return 'horizon_lite';+        }++        return;+    }+);++LJ::register_hook(+    'default_scheme' => sub {+        if ( LJ::SUP->is_remote_sup ) {+            return 'lanzelot';+        }++        return 'horizon';+    }+);++1;
\ No newline at end of file

Modified: trunk/cgi-bin/LJ/Nav.pm
===================================================================
--- trunk/cgi-bin/LJ/Nav.pm	2011-09-06 13:56:24 UTC (rev 10971)
+++ trunk/cgi-bin/LJ/Nav.pm	2011-09-07 07:59:27 UTC (rev 10972)
@@ -2,772 +2,421 @@
 
 package LJ::Nav;
 use strict;
-no warnings "redefine";
+use warnings;
 
+use LJ::Lang qw( ml );
+
 # return the list of menus and sub-items that make up the LJ nav bar
 # (class method)
 sub navbar {
-    my ($class, $remote, $scheme, $opts) = (@_);
-    $scheme = "default" unless defined $scheme;
+    my ( $class, $remote, $scheme, $opts ) = @_;
 
-    my @nav = LJ::run_hook("navbar", { 
-                remote      => $remote, 
-                authmod     => $class->authmod, 
-                siteroot    => $class->siteroot, 
-                fb_siteroot => $class->fb_siteroot,
-                });
-    return @nav if @nav;
+    # ensure that $remote is an LJ::User object
+    unless ( LJ::isu($remote) ) {
+        my $userid = FB::get_domain_userid($remote);
+        $remote = LJ::load_userid($userid);
+    }
 
-    my $method = $scheme . "_navbar";
-    @nav = $class->$method($remote, $opts);
-    LJ::run_hooks('modify_navbar', \@nav);
-    return @nav;
-}
+    $scheme ||= "default";
+    $opts   ||= {};
 
-sub authmod {
-    my $class = shift;
-    return $FB::SITEROOT ? FB::current_domain_plugin() : "";
-}
+    my @nav;
 
-sub siteroot {
-    my $class = shift;
-    my $authmod = $class->authmod();
-    return $LJ::SITEROOT ? $LJ::SITEROOT : $authmod->remote_root;
-}
-
-sub fb_siteroot {
-    my $class = shift;
-    return $LJ::FB_SITEROOT ? $LJ::FB_SITEROOT : $FB::SITEROOT;
-}
-
-sub default_navbar {
-    my ($class, $remote, $opts) = @_;
-
-    my $authmod = $class->authmod();
-    my $siteroot = $class->siteroot();
-    my $fb_siteroot = $class->fb_siteroot();
-
-    my @nav = ();
-
-    if ($remote && ! $remote->identity) {
-        my $journal_base = ($remote->can('journal_base') ? $remote->journal_base : $authmod->journal_base($remote));
-        my $profile_url = ($remote->can('profile_url') ? $remote->profile_url : $authmod->profile_url($remote));
-
-        push @nav, { 'name' => BML::ml('xcolibur.nav.mylj'),
-                     'url' => "http://my.$LJ::DOMAIN/", accesskey => "" };
-
-        push @nav, { 'name' => BML::ml('xcolibur.nav.journal'),
-                     'url' => "$journal_base/", accesskey => "",
-                     'links' => [ { 'url' => "$siteroot/update.bml",
-                                    'text' => BML::ml('xcolibur.nav.journal.update'), },
-                                  { 'url' => "$journal_base/",
-                                    'text' => BML::ml('xcolibur.nav.journal.recent'), },
-                                  { 'url' => "$journal_base/calendar/",
-                                    'text' => BML::ml('xcolibur.nav.journal.archive'), },
-                                  { 'url' => "$journal_base/friends/",
-                                    'text' => BML::ml('xcolibur.nav.journal.friends'),
-                                    'extra' => "$siteroot/friends/filter.bml", },
-                                  { 'url' => $profile_url,
-                                    'text' => BML::ml('xcolibur.nav.journal.info'),
-                                    'extra' => "$profile_url" . "?mode=full", },
-                                  { 'url' => "$siteroot/tools/memories.bml?user=$remote->{'user'}",
-                                    'text' => BML::ml('xcolibur.nav.journal.memories'), },
-                                  { 'url' => "$siteroot/tools/recent_comments.bml",
-                                    'text' => BML::ml('xcolibur.nav.journal.comments'), },
-                                  ],
-                 };
-
-        if ($fb_siteroot) {
-            # scrapbook manage links
-            if ($remote && ($remote->get_cap('fb_can_upload') || $remote->get_cap('can_upload'))) {
-                push @nav, { 'name' => BML::ml('xcolibur.nav.scrapbook'),
-                             'url'  => "$fb_siteroot/manage/gals",
-                             'links' => [ { 'url' => "$fb_siteroot/manage/upload",
-                                            'text' => BML::ml('xcolibur.nav.scrapbook.upload'), },
-
-                                          { 'url' => "$fb_siteroot/manage/gals",
-                                            'text' => BML::ml('xcolibur.nav.scrapbook.galleries'), },
-
-                                          { 'url' => "$fb_siteroot/manage/gals?show=tags",
-                                            'text' => BML::ml('xcolibur.nav.scrapbook.tags'), },
-
-                                          { 'url' => "$fb_siteroot/manage/annotate",
-                                            'text' => BML::ml('xcolibur.nav.scrapbook.taggingtool'), },
-
-                                          { 'url' => "$fb_siteroot/manage/styles/",
-                                            'text' => BML::ml('xcolibur.nav.scrapbook.styles'), },
-
-                                          { 'url' => "$fb_siteroot/$remote->{'user'}/",
-                                            'text' => BML::ml('xcolibur.nav.scrapbook.view'), },
-                                          ],
-                         }
-            } else {
-                # free user, only have link to marketing page
-                push @nav, { 'name' => BML::ml('xcolibur.nav.scrapbook'),
-                             'url' => "$fb_siteroot/", };
-            }
-        }
-
-        # need to know whether or not to display manage styles link
-        my $can_style;
-
-        if (defined $remote->get_cap('lj_can_style')) {
-            # if lj_can_style is set then we're looking at a fotobilder user and we want to know
-            # if they can manage LJ styles
-            $can_style = $remote->get_cap('lj_can_style') ? 1 : 0;
-        } elsif ($remote->get_cap('styles')) {
-            # styles is set for both LJ and FB, and we're looking at LJ
-            $can_style = 1;
-        }
-
-        push @nav, { 'name' => BML::ml('xcolibur.nav.manage'),
-                     'url' => "$siteroot/manage/", accesskey => "M",
-                     'links' => [ { 'url' => "$siteroot/editjournal.bml",
-                                    'text' => BML::ml('xcolibur.nav.manage.entries'), },
-                                  { 'url' => "$siteroot/manage/profile/",
-                                    'text' => BML::ml('xcolibur.nav.manage.info') },
-                                  { 'text' => BML::ml('xcolibur.nav.manage.accountstatus'),
-                                    'url' =>  "$siteroot/manage/payments/" },
-
-                                  { 'url' => "$siteroot/friends/",
-                                    'text' => BML::ml('xcolibur.nav.manage.friends'), },
-                                  { 'url' => "$siteroot/editpics.bml",
-                                    'text' => BML::ml('xcolibur.nav.manage.userpics'), },
-
-                                  $LJ::DISABLED{tags} ? () :
-                                  { 'url' => "$siteroot/manage/tags.bml",
-                                    'text' => BML::ml('xcolibur.nav.manage.tags'), },
-
-                                  { 'url' => "$siteroot/changepassword.bml",
-                                    'text' => BML::ml('xcolibur.nav.manage.password'), },
-                                  $can_style ? (
-                                                { 'url' => "$siteroot/styles/",
-                                                  'text' => BML::ml('xcolibur.nav.manage.styles'), } ) : (),
-                                  { 'url' => "$siteroot/customize/",
-                                    'text' => BML::ml('xcolibur.nav.manage.customize'), },
-                                  { 'url' => "$siteroot/community/manage.bml",
-                                    'text' => BML::ml('xcolibur.nav.manage.community'), },
-                                  ($remote->can_use_sms ? (
-                                                           { 'url' => "$siteroot/manage/mobile.bml",
-                                                             'text' => BML::ml('xcolibur.nav.manage.mobile'), },
-                                                           ) : ()),
-                                  ],
-                              };
-    } elsif ($remote) {
-        my $journal_base = ($remote->can('journal_base') ? $remote->journal_base : undef);
-        my $profile_url = ($remote->can('profile_url') ? $remote->profile_url : undef);
-
-        push @nav, { 'name' => BML::ml('xcolibur.nav.journal'),
-                     'url' => "$journal_base/", accesskey => "",
-                     'links' => [
-                                 { 'url' => "$journal_base/friends/",
-                                   'text' => BML::ml('xcolibur.nav.journal.friends'),
-                                   'extra' => "$siteroot/friends/filter.bml", },
-                                 { 'url' => "$profile_url" . "?t=I",
-                                   'text' => BML::ml('xcolibur.nav.journal.info'), },
-                                 ],
-                     };
-        push @nav, { 'name' => BML::ml('xcolibur.nav.manage'),
-                     'url' => "$siteroot/manage/", accesskey => "M",
-                     'links' => [
-                                 { 'url' => "$siteroot/friends/",
-                                   'text' => BML::ml('xcolibur.nav.manage.friends'), },
-                                 { 'url' => "$siteroot/editpics.bml",
-                                   'text' => BML::ml('xcolibur.nav.manage.userpics'), },
-                                 ],
-                     };
-
+    if ( LJ::are_hooks('navbar') ) {
+        @nav = LJ::run_hook( 'navbar', { 'remote' => $remote } );
     } else {
-        push @nav, { 'name' => BML::ml('xcolibur.nav.welcome'),
-                     'url' => "$siteroot/tour/", accesskey => "w",
-                     'links' => [
-                                 { 'url' => "$siteroot/login.bml",
-                                   'text' => BML::ml('xcolibur.nav.welcome.login'), },
-                                 { 'url' => "$siteroot/create.bml",
-                                   'text' => BML::ml('xcolibur.nav.welcome.create'), },
-                                 { 'url' => "$siteroot/update.bml",
-                                   'text' => BML::ml('xcolibur.nav.welcome.update'), },
-                                 ],
-                     };
-
-        # I hate Mac IE.  They can't pick languages up here.  -- Brad.
-        my $ua = BML::get_client_header("User-Agent");
-        unless ($ua =~~ /MSIE 5.+Mac/) {
-            push @{$nav[-1]{links}}, { 'url' => "$siteroot/manage/settings/?cat=display",
-                                    'text' => "English • Español • Deutsch • Русский • →",
-                                       'id' => "Setlang", },
-        }
+        @nav = $class->default_navbar( $remote, $opts );
+        LJ::run_hooks( 'modify_navbar', \@nav );
     }
 
-    # FIXME: FB won't respect $LJ::DISABLED flags
-    push @nav, { 'name' => BML::ml('xcolibur.nav.search'),
-                 'url' => LJ::run_hook("remote_should_see_vertical_nav") ? "$siteroot/explore/" : "$siteroot/site/search.bml",
-                 'accesskey' => "",
-                 'links' => [
-                             { 'url' => "$siteroot/random.bml",
-                               'text' => BML::ml('xcolibur.nav.search.random'), },
-                             $LJ::DISABLED{'directory'} ? () :
-                             (
-                              { 'url' => "$siteroot/directory.bml",
-                                'text' => BML::ml('xcolibur.nav.search.directory'), }
-                              ),
-                             { 'url' => "$siteroot/interests.bml",
-                               'text' => BML::ml('xcolibur.nav.search.interests'), },
-                             $LJ::DISABLED{'directory'} ? () :
-                             (
-                              { 'url' => "$siteroot/directorysearch.bml",
-                                'text' => BML::ml('xcolibur.nav.search.directory.search'), }
-                              ),
-                             $LJ::DISABLED{'schools'} ? () :
-                             (
-                              { 'url' => "$siteroot/schools/",
-                                'text' => BML::ml('xcolibur.nav.search.schools'), }
-                              ),
-                             { 'url' => "$siteroot/syn/",
-                               'text' => BML::ml('xcolibur.nav.search.feeds'), },
-                             ],
-             };
+    my @nav_filtered;
+    foreach my $section (@nav) {
+        next if exists $section->{'enabled'} && !$section->{'enabled'};
+        delete $section->{'enabled'};
 
-    push @nav, { 'name' => BML::ml('xcolibur.nav.giftshop'),
-                 'url' => "$siteroot/shop/", accesskey => "G",
-                 'links' => [
-                             { 'url' => "$siteroot/shop/index.bml?class=gifts",
-                               'text' => BML::ml('xcolibur.nav.giftshop.gifts'), },
-                             { 'url' => "$siteroot/shop/index.bml?class=merchandise",
-                               'text' => BML::ml('xcolibur.nav.giftshop.merchandise'), },
-                             { 'url' => "$siteroot/shop/index.bml?class=paidaccount",
-                               'text' => BML::ml('xcolibur.nav.giftshop.paidaccts'), },
-                             { 'url' => "$siteroot/shop/index.bml?class=bonusfeatures",
-                               'text' => BML::ml('xcolibur.nav.giftshop.addons'), },
-                             ],
-                 };
+        if ( my $links = $section->{'links'} ) {
+            my @links_filtered;
 
-
-    push @nav, { 'name' => BML::ml('xcolibur.nav.about'),
-                 'url' => "$siteroot/site/about.bml", accesskey => "A",
-                 'links' => [ { 'url' => "$siteroot/support/faqbrowse.bml?faqcat=about",
-                                'text' => BML::ml('xcolibur.nav.about.general'), },
-                              { 'url' => "$siteroot/press/",
-                                'text' => BML::ml('xcolibur.nav.about.press'), },
-                              { 'url' => "$siteroot/download/",
-                                'text' => BML::ml('xcolibur.nav.about.download'), },
-                              { 'url' => "http://news.livejournal.com/",
-                                'text' => BML::ml("xcolibur.nav.about.sitenews"), },
-                              { 'url' => "$siteroot/paidaccounts/",
-                                'text' => BML::ml('xcolibur.nav.about.paidaccounts'), },
-                              ],
-             };
-
-    my $extid = $remote ? $remote->identity : undef;
-
-    push @nav, { 'name' => BML::ml('xcolibur.nav.help'),
-                 'url' => "$siteroot/support/", accesskey => "H",
-                 'links' => [
-                             { 'url' => "$siteroot/support/",
-                               'text' => BML::ml("xcolibur.nav.help.ask"), },
-                             $extid ? () :
-                             { 'url' => "$siteroot/lostinfo.bml",
-                               'text' => BML::ml('xcolibur.nav.help.lostpassword'), },
-                             { 'url' => "$siteroot/support/faq.bml",
-                               'text' => BML::ml('xcolibur.nav.help.faq'), },
-                             { 'url' => "$siteroot/site/",
-                               'text' => BML::ml('xcolibur.nav.footer.sitemap'), },
-                             { 'url' => "$siteroot/manage/settings/?cat=display",
-                               'text' => BML::ml('xcolibur.nav.siteopts'), },
-                             { 'url' => "$siteroot/feedback/",
-                               'text' => BML::ml('xcolibur.nav.help.contact'), },
-                             ],
-                         };
-
-    return @nav;
-}
-
-sub horizon_navbar {
-    my ($class, $remote, $opts) = @_;
-
-    my $authmod = $class->authmod();
-    my $siteroot = $class->siteroot();
-    my $fb_siteroot = $class->fb_siteroot();
-
-    my @nav = ();
-
-    if ($opts->{'barenav'}) {
-        if (LJ::run_hook("remote_should_see_vertical_nav")) {
-            push @nav, { name => BML::ml('horizon.barenav.explore'), url => "$siteroot/explore/" };
-
-            my @verticals = LJ::Vertical->load_all;
-            foreach my $vert (@verticals) {
-                push @nav, {
-                    name => $vert->{display_name},
-                    url => $vert->{url},
-                };
+            foreach my $link (@$links) {
+                next if exists $link->{'enabled'} && !$link->{'enabled'};
+                delete $link->{'enabled'};
+                push @links_filtered, $link;
             }
 
-            push @nav, { name => BML::ml('horizon.barenav.post'), url => "$siteroot/update.bml" };
-        } else {
-            push @nav, { 'name' => BML::ml('horizon.barenav.create'), 'url' => "$siteroot/create.bml" };
-            push @nav, { 'name' => BML::ml('horizon.barenav.post'),   'url' => "$siteroot/update.bml" };
-            push @nav, { 'name' => BML::ml('horizon.barenav.explore'), 'url' => "$siteroot/site/search.bml" };
-            push @nav, { 'name' => BML::ml('horizon.barenav.giftshop'), 'url' => "$siteroot/shop/" };
+            $section->{'links'} = \@links_filtered;
         }
 
-        return @nav;
+        push @nav_filtered, $section;
     }
 
-    # If they're logged in, see if they have access to upgraded features and find their journal URL
-    my $can_upload = 0;
-    my $makepoll = 0;
-    my $journal_base;
-    my $profile_url;
-    my $scheme;
+    return @nav_filtered;
+}
 
-    if ($remote) {
-        $can_upload = $remote->get_cap("fb_can_upload") || $remote->get_cap("can_upload");
-        $makepoll = $remote->get_cap("makepoll");
-        $journal_base = $remote->can('journal_base') ? $remote->journal_base : $authmod->journal_base($remote);
-        $profile_url = $remote->can('profile_url') ? $remote->profile_url : $authmod->profile_url($remote);
-        $scheme = BML::get_scheme();
-    }
+# note that in practice, this never gets called; see LJ::Hooks::Nav instead :p
+sub default_navbar {
+    my ( $class, $remote, $opts ) = @_;
 
-    push @nav, { 'name' => BML::ml('horizon.nav.home'),
-                 'id' => "horizon-menu-home",
-                 'url' => "$siteroot/"
-             };
+    my $siteroot    = $LJ::SITEROOT;
+    my $fb_siteroot = $LJ::FB_SITEROOT;
 
-    push @nav, { 'name' => BML::ml('horizon.nav.journal'),
-                 'id' => "horizon-menu-journal",
-                 'url' => "$journal_base/",
-                 'links' => [
-                              { 'url' => "$siteroot/update.bml",
-                                'text' => BML::ml('horizon.nav.journal.postentry'), },
-                              { 'url' => "$siteroot/editjournal.bml",
-                                'text' => BML::ml('horizon.nav.journal.editentry'), },
-                              { 'url' => "$siteroot/customize/",
-                                'text' => BML::ml('horizon.nav.journal.changetheme'), },
-                              { 'url' => "$siteroot/customize/options.bml",
-                                'text' => BML::ml('horizon.nav.journal.customizetheme'), },
-                              { 'url' => "$siteroot/tools/recent_comments.bml",
-                                'text' => BML::ml('horizon.nav.journal.comments'), },
-                              { 'url' => "$siteroot/manage/tags.bml",
-                                'text' => BML::ml('horizon.nav.journal.managetags'), },
-                              { 'url' => "$siteroot/manage/settings/?cat=display",
-                                'text' => BML::ml('horizon.nav.journal.settings'), },
-                              ],
-             };
-    LJ::run_hooks('add_journal_links', \@nav, 'horizon', $remote);
+    my $remote_loggedin = $remote ? 1 : 0;
+    my $remote_personal = $remote && $remote->is_personal ? 1 : 0;
+    my $remote_identity = $remote && $remote->is_identity ? 1 : 0;
 
-    my $userpic_text = "";
+    my ( $journal_base, $profile_url, $memories_url ) = ( '', '', '' );
     if ($remote) {
-        my $userpic_count = $remote->get_userpic_count;
-        my $userpic_max = $remote->userpic_quota;
-        $userpic_text = $userpic_count >= $userpic_max ? " ".BML::ml('horizon.nav.photos.getmore') : " ".BML::ml('horizon.nav.photos.piccount', { piccount => $userpic_count, picmax => $userpic_max });
-    }
+        $journal_base = $remote->journal_base;
+        $profile_url  = $remote->profile_url;
 
-    push @nav, { 'name' => BML::ml('horizon.nav.profile'),
-                 'id' => "horizon-menu-profile",
-                 'url' => $profile_url,
-                 'links' => [
-                              { 'url' => "$siteroot/manage/profile/",
-                                'text' => BML::ml('horizon.nav.profile.edit'), },
-                              { 'url' => "$siteroot/editpics.bml",
-                                'text' => BML::ml('horizon.nav.profile.manageuserpic').$userpic_text, },
-                              { 'url' => "$siteroot/schools/manage.bml",
-                                'text' => BML::ml('horizon.nav.profile.manageschools'), },
-                              { 'url' => "$siteroot/tools/memories.bml",
-                                'text' => BML::ml('horizon.nav.profile.memories2'), },
-                              { 'url' => "$siteroot/manage/notes.bml",
-                                'text' => BML::ml('horizon.nav.profile.aliases'), },
-                              ],
-             };
-
-    my @friends_links = (
-        { 'url' => "$siteroot/friends/edit.bml",
-          'text' => BML::ml('horizon.nav.friends.manage'), },
-        { 'url' => "$siteroot/friends/editgroups.bml",
-          'text' => BML::ml('horizon.nav.friends.managegroups'), },
-        { 'url' => "$siteroot/friends/filter.bml",
-          'text' => BML::ml('horizon.nav.friends.filter'), },
-        { 'url' => "$siteroot/friends/invite.bml",
-          'text' => BML::ml('horizon.nav.friends.invite'), },
-    );
-    push @friends_links, (
-        { 'url' => "$siteroot/friends/holidaypromotion.bml",
-          'text' => BML::ml('horizon.nav.friends.invite2paid'), },
-    ) if ($remote && UNIVERSAL::isa($remote, 'LJ::User') && ($remote->in_class('perm') || $remote->in_class('paid')));
-    push @friends_links, (
-        { 'url' => "$siteroot/friends/",
-          'text' => BML::ml('horizon.nav.friends.other'), },
-    );
-    unshift @friends_links, { url => "$siteroot/friends/find.bml", text => BML::ml('horizon.nav.friends.find') }
-        if LJ::is_enabled("octazen");
-
-    push @nav, { 'name' => BML::ml('horizon.nav.friends'),
-                 'id' => "horizon-menu-friends",
-                 'url' => "$journal_base/friends/",
-                 'links' => \@friends_links,
-             };
-
-    ### This needs to be cached first before it hits production
-    # my $pending_invites = 0;
-    # $pending_invites = scalar @{LJ::get_pending_invites($remote)} if $remote;
-
-    push @nav, { 'name' => BML::ml('horizon.nav.comm'),
-                 'id' => "horizon-menu-communities",
-                 'url' => "$siteroot/community/manage.bml",
-                 'links' => [
-                              { 'url' => "$siteroot/update.bml",
-                                'text' => BML::ml('horizon.nav.comm.postentry'), },
-                              { 'url' => "$siteroot/manage/invites.bml",
-                                'text' => BML::ml('horizon.nav.comm.manageinvites'), },
-                              { 'url' => "$siteroot/community/create.bml",
-                                'text' => BML::ml('horizon.nav.comm.create'), },
-                              ],
-             };
-
-    if ($fb_siteroot) {
-        # scrapbook manage links
-        push @nav, { 'name' => BML::ml('horizon.nav.scrapbook'),
-                     'id' => "horizon-menu-scrapbook",
-                     'url'  => $can_upload ? "$fb_siteroot/" . $remote->user . "/" : "$siteroot/didyouknow/scrapbook.bml",
-                     'links' => [
-                                  { 'url' => $can_upload ? "$fb_siteroot/manage/upload" : "$siteroot/didyouknow/scrapbook.bml",
-                                    'class' => !$can_upload ? "disabled" : "", 'text' => BML::ml('horizon.nav.scrapbook.upload'), },
-                                  { 'url' => $can_upload ? "$fb_siteroot/manage/gals" : "$siteroot/didyouknow/scrapbook.bml",
-                                    'class' => !$can_upload ? "disabled" : "", 'text' => BML::ml('horizon.nav.scrapbook.managegalleries'), },
-                                  { 'url' => $can_upload ? "$fb_siteroot/manage/gals?show=tags" : "$siteroot/didyouknow/scrapbook.bml",
-                                    'class' => !$can_upload ? "disabled" : "", 'text' => BML::ml('horizon.nav.scrapbook.managetaggalleries'), },
-                                  { 'url' => $can_upload ? "$fb_siteroot/manage/styles/" : "$siteroot/didyouknow/scrapbook.bml",
-                                    'class' => !$can_upload ? "disabled" : "", 'text' => BML::ml('horizon.nav.scrapbook.customize'), },
-                                  ],
-                 };
-        unshift @{$nav[5]->{links}}, { 'url' => "$siteroot/didyouknow/scrapbook.bml", 'text' => BML::ml('horizon.nav.photos.whatis') } unless $can_upload;
+        $memories_url =
+            "$siteroot/tools/memories.bml?user=" . $remote->username;
     }
 
-    if (LJ::is_enabled("browse", $remote)) {
-        my @browse_links;
-        my @cats = LJ::Browse->load_for_nav;
-        foreach my $cat (@cats) {
-            push @browse_links, {
-                url => $cat->{url},
-                text => $cat->{pretty_name},
-            };
-        }
-
-        push @browse_links, {
-            url => ($remote && $remote->get_cap("directory")) ? "$siteroot/directorysearch.bml" : "$siteroot/didyouknow/advancedsearch.bml",
-            class => (!$remote || !$remote->get_cap("directory")) ? "disabled" : "",
-            text => BML::ml('horizon.nav.find.directory'),
-        };
-
-        push @nav, { 'name' => BML::ml('horizon.nav.find'),
-                     'id' => "horizon-menu-explore",
-                     'url' => "$siteroot/browse/",
-                     'links' => \@browse_links,
-                 };
-
-    } elsif (LJ::run_hook("remote_should_see_vertical_nav")) {
-        my @find_links;
-        my @verticals = LJ::Vertical->load_all;
-        foreach my $vert (@verticals) {
-            push @find_links, {
-                url => $vert->{url},
-                text => $vert->{display_name},
-            };
-        }
-        push @find_links, {
-            url => ($remote && $remote->get_cap("directory")) ? "$siteroot/directorysearch.bml" : "$siteroot/didyouknow/advancedsearch.bml",
-            class => (!$remote || !$remote->get_cap("directory")) ? "disabled" : "",
-            text => BML::ml('horizon.nav.find.directory'),
-        };
-
-        push @nav, { 'name' => BML::ml('horizon.nav.find'),
-                     'id' => "horizon-menu-explore",
-                     'url' => "$siteroot/explore/",
-                     'links' => \@find_links,
-                 };
-    } else {
-        push @nav, { 'name' => BML::ml('horizon.nav.find'),
-                     'id' => "horizon-menu-explore",
-                     'url' => "$siteroot/site/search.bml",
-                     'links' => [
-                         { 'url' => "$siteroot/interests.bml",
-                           'text' => BML::ml('horizon.nav.find.byinterest'), },
-                         { 'url' => ($remote && $remote->get_cap("directory")) ? "$siteroot/directory.bml" : "$siteroot/didyouknow/advancedsearch.bml",
-                           'class' => (!$remote || !$remote->get_cap("directory")) ? "disabled" : "", 'text' => BML::ml('horizon.nav.find.byregion'), },
-                         { 'url' => "$siteroot/schools/",
-                           'text' => BML::ml('horizon.nav.find.byschool'), },
-                         { 'url' => "$siteroot/syn/",
-                           'text' => BML::ml('horizon.nav.find.browsefeeds'), },
-                         { 'url' => ($remote && $remote->get_cap("directory")) ? "$siteroot/directorysearch.bml" : "$siteroot/didyouknow/advancedsearch.bml",
-                           'class' => (!$remote || !$remote->get_cap("directory")) ? "disabled" : "", 'text' => BML::ml('horizon.nav.find.moreoptions'), },
-                     ],
-        };
+    my $remote_can_upload_photos = 0;
+    if (    $fb_siteroot
+         && $remote_personal
+         && $remote->get_cap('fb_can_upload') )
+    {
+        $remote_can_upload_photos = 1;
     }
 
-    push @nav, { 'name' => BML::ml('horizon.nav.admin'),
-                 'id' => "horizon-menu-admin",
-                 'url' => "$siteroot/admin/",
-                 'links' => [ { 'url' => "$siteroot/admin/console/",
-                                'text' => 'Console', },
-                              { 'url' => "$siteroot/admin/accounts/acctedit.bml?user=" . ($remote && $remote->user),
-                                'text' => BML::ml('horizon.nav.admin.acctedit'), },
-                              { 'url' => "$siteroot/admin/priv/",
-                                'text' => BML::ml('horizon.nav.admin.editprivs'), },
-                              { 'url' => "$siteroot/admin/capedit.bml",
-                                'text' => BML::ml('horizon.nav.admin.editcaps'), },
-                              { 'url' => "$siteroot/admin/propedit.bml",
-                                'text' => BML::ml('horizon.nav.admin.editprops'), },
-                              { 'url' => "$siteroot/admin/subscriptions.bml",
-                                'text' => BML::ml('horizon.nav.admin.subscriptions'), },
-                              { 'url' => "$siteroot/admin/events.bml",
-                                'text' => BML::ml('horizon.nav.admin.events'), },
-                              ],
-             } if $LJ::IS_DEV_SERVER;
+    my $remote_can_style = $remote && $remote->get_cap('styles') ? 1 : 0;
+    my $remote_can_sms   = $remote && $remote->can_use_sms       ? 1 : 0;
 
-    return @nav;
-}
-
-sub vertigo_navbar {
-    my ($class, $remote, $opts) = @_;
-
-    my $authmod = $class->authmod();
-    my $siteroot = $class->siteroot();
-    my $fb_siteroot = $class->fb_siteroot();
-
-    my @nav = ();
-
-    if ($opts->{'barenav'}) {
-        if (LJ::run_hook("remote_should_see_vertical_nav")) {
-            push @nav, { name => BML::ml('horizon.barenav.explore'), url => "$siteroot/explore/" };
-
-            my @verticals = LJ::Vertical->load_all;
-            foreach my $vert (@verticals) {
-                push @nav, {
-                    name => $vert->{display_name},
-                    url => $vert->{url},
-                };
-            }
-
-            push @nav, { name => BML::ml('horizon.barenav.post'), url => "$siteroot/update.bml" };
-        } else {
-            push @nav, { 'name' => BML::ml('horizon.barenav.create'), 'url' => "$siteroot/create.bml" };
-            push @nav, { 'name' => BML::ml('horizon.barenav.post'),   'url' => "$siteroot/update.bml" };
-            push @nav, { 'name' => BML::ml('horizon.barenav.explore'), 'url' => "$siteroot/site/search.bml" };
-            push @nav, { 'name' => BML::ml('horizon.barenav.giftshop'), 'url' => "$siteroot/shop/" };
-        }
-
-        return @nav;
+    my $search_url = "$siteroot/site/search.bml";
+    if ( LJ::run_hook('remote_should_see_vertical_nav') ) {
+        $search_url = "$siteroot/explore/";
     }
 
-    if ($opts->{'horizontal'}) {
-        push @nav, { 'name' => BML::ml('vertigo.header.home'), 'url' => "$siteroot/" };
-        push @nav, { 'name' => BML::ml('vertigo.header.sitemap'), 'url' => "$siteroot/site/" };
-        push @nav, { 'name' => BML::ml('vertigo.header.viewing'), 'url' => "$siteroot/manage/settings/?cat=display" };
-        return @nav;
-    }
+    return (
 
-    # If they're logged in, see if they have access to upgraded features and find their journal URL
-    my $can_upload = 0;
-    my $makepoll = 0;
-    my $journal_base;
-    my $profile_url;
-    my $scheme;
+        ### PERSONAL ACCOUNT LINKS: Portal, Journal, ScrapBook, Manage ###
 
-    if ($remote) {
-        $can_upload = $remote->get_cap("fb_can_upload") || $remote->get_cap("can_upload");
-        $makepoll = $remote->get_cap("makepoll");
-        $journal_base = $remote->can('journal_base') ? $remote->journal_base : $authmod->journal_base($remote);
-        $profile_url = $remote->can('profile_url') ? $remote->profile_url : $authmod->profile_url($remote);
-        $scheme = BML::get_scheme();
-    }
+        {
+            'name' => ml('xcolibur.nav.mylj'),
+            'url' => "http://my.$LJ::DOMAIN/",
+            'accesskey' => '',
+            'enabled' => $remote_personal,
+        },
 
-    push @nav, { 'name' => BML::ml('vertigo.nav.journal'),
-                 'id' => "vertigo-menu-journal",
-                 'url' => "$journal_base/",
-                 'links' => [
-                              { 'url' => "$siteroot/update.bml",
-                                'text' => BML::ml('vertigo.nav.journal.postentry'), },
-                              { 'url' => "$siteroot/editjournal.bml",
-                                'text' => BML::ml('vertigo.nav.journal.editentry'), },
-                              { 'url' => "$siteroot/customize/",
-                                'text' => BML::ml('vertigo.nav.journal.changetheme'), },
-                              { 'url' => "$siteroot/customize/options.bml",
-                                'text' => BML::ml('vertigo.nav.journal.customizetheme'), },
-                              { 'url' => "$siteroot/tools/recent_comments.bml",
-                                'text' => BML::ml('vertigo.nav.journal.comments'), },
-                              { 'url' => "$siteroot/manage/tags.bml",
-                                'text' => BML::ml('vertigo.nav.journal.managetags'), },
-                              ],
-             };
+        {
+            'name' => ml('xcolibur.nav.journal'),
+            'url' => "$journal_base/",
+            'accesskey' => "",
+            'enabled' => $remote_personal,
+            'links' => [
+                {
+                    'url' => "$siteroot/update.bml",
+                    'text' => ml('xcolibur.nav.journal.update'),
+                },
+                {
+                    'url' => "$journal_base/",
+                    'text' => ml('xcolibur.nav.journal.recent'),
+                },
+                {
+                    'url' => "$journal_base/calendar/",
+                    'text' => ml('xcolibur.nav.journal.archive'),
+                },
+                {
+                    'url' => "$journal_base/friends/",
+                    'text' => ml('xcolibur.nav.journal.friends'),
+                    'extra' => "$siteroot/friends/filter.bml",
+                },
+                {
+                    'url' => $profile_url,
+                    'text' => ml('xcolibur.nav.journal.info'),
+                    'extra' => "$profile_url" . "?mode=full",
+                },
+                {
+                    'url' => $memories_url,
+                    'text' => ml('xcolibur.nav.journal.memories'),
+                },
+                {
+                    'url' => "$siteroot/tools/recent_comments.bml",
+                    'text' => ml('xcolibur.nav.journal.comments'),
+                },
+            ],
+        },
 
-    LJ::run_hooks('add_journal_links', \@nav, 'vertigo', $remote);
+        {
+            # ScrapBook version A: remote is capable of accessing it
+            'name' => ml('xcolibur.nav.scrapbook'),
+            'url'  => "$fb_siteroot/manage/gals",
+            'enabled' => $remote_can_upload_photos,
+            'links' => [
+                {
+                    'url' => "$fb_siteroot/manage/upload",
+                    'text' => ml('xcolibur.nav.scrapbook.upload'),
+                },
+                {
+                    'url' => "$fb_siteroot/manage/gals",
+                    'text' => ml('xcolibur.nav.scrapbook.galleries'),
+                },
+                {
+                    'url' => "$fb_siteroot/manage/gals?show=tags",
+                    'text' => ml('xcolibur.nav.scrapbook.tags'),
+                },
+                {
+                    'url' => "$fb_siteroot/manage/annotate",
+                    'text' => ml('xcolibur.nav.scrapbook.taggingtool'),
+                },
+                {
+                    'url' => "$fb_siteroot/manage/styles/",
+                    'text' => ml('xcolibur.nav.scrapbook.styles'),
+                },
+                {
+                    'url' => "$fb_siteroot/$remote->{'user'}/",
+                    'text' => ml('xcolibur.nav.scrapbook.view'),
+                },
+            ],
+        },
 
-    my $userpic_text = "";
-    if ($remote) {
-        my $userpic_count = $remote->get_userpic_count;
-        my $userpic_max = $remote->userpic_quota;
-        $userpic_text = $userpic_count >= $userpic_max ? " ".BML::ml('vertigo.nav.photos.getmore') : " ".BML::ml('vertigo.nav.photos.piccount', { piccount => $userpic_count, picmax => $userpic_max });
-    }
+        {
+            # ScrapBook version A: remote is not capable of accessing it,
+            # let's show some advertisement
+            'name' => ml('xcolibur.nav.scrapbook'),
+            'url' => "$fb_siteroot/",
+            'enabled' => $remote_personal && !$remote_can_upload_photos,
+        },
 
-    push @nav, { 'name' => BML::ml('vertigo.nav.profile'),
-                 'id' => "vertigo-menu-profile",
-                 'url' => $profile_url,
-                 'links' => [
-                              { 'url' => "$siteroot/manage/profile/",
-                                'text' => BML::ml('vertigo.nav.profile.edit'), },
-                              { 'url' => "$siteroot/editpics.bml",
-                                'text' => BML::ml('vertigo.nav.profile.manageuserpic').$userpic_text, },
-                              { 'url' => "$siteroot/schools/manage.bml",
-                                'text' => BML::ml('vertigo.nav.profile.manageschools'), },
-                              { 'url' => "$siteroot/tools/memories.bml",
-                                'text' => BML::ml('vertigo.nav.profile.memories'), },
-                              { 'url' => "$siteroot/manage/notes.bml",
-                                'text' => BML::ml('vertigo.nav.profile.notes'), },
-                              ],
-             };
+        {
+            'name' => ml('xcolibur.nav.manage'),
+            'url' => "$siteroot/manage/",
+            'accesskey' => 'M',
+            'enabled' => $remote_personal,
+            'links' => [
+                {
+                    'url' => "$siteroot/editjournal.bml",
+                    'text' => ml('xcolibur.nav.manage.entries'),
+                },
+                {
+                    'url' => "$siteroot/manage/profile/",
+                    'text' => ml('xcolibur.nav.manage.info'),
+                },
+                {
+                    'text' => ml('xcolibur.nav.manage.accountstatus'),
+                    'url' =>  "$siteroot/manage/payments/",
+                },
+                {
+                    'url' => "$siteroot/friends/",
+                    'text' => ml('xcolibur.nav.manage.friends'),
+                },
+                {
+                    'url' => "$siteroot/editpics.bml",
+                    'text' => ml('xcolibur.nav.manage.userpics'),
+                },
+                {
+                    'url' => "$siteroot/manage/tags.bml",
+                    'text' => ml('xcolibur.nav.manage.tags'),
+                    'enabled' => LJ::is_enabled('tags'),
+                },
+                {
+                    'url' => "$siteroot/changepassword.bml",
+                    'text' => ml('xcolibur.nav.manage.password'),
+                },
+                {
+                    'url' => "$siteroot/styles/",
+                    'text' => ml('xcolibur.nav.manage.styles'),
+                    'enabled' => $remote_can_style,
+                },
+                {
+                    'url' => "$siteroot/customize/",
+                    'text' => ml('xcolibur.nav.manage.customize'),
+                },
+                {
+                    'url' => "$siteroot/community/manage.bml",
+                    'text' => ml('xcolibur.nav.manage.community'),
+                },
+                {
+                    'url' => "$siteroot/manage/mobile.bml",
+                    'text' => ml('xcolibur.nav.manage.mobile'),
+                    'enabled' => $remote_can_sms,
+                },
+            ],
+        },
 
-    my @friends_links = (
-        { 'url' => "$siteroot/friends/edit.bml",
-          'text' => BML::ml('vertigo.nav.friends.manage'), },
-        { 'url' => "$siteroot/friends/editgroups.bml",
-          'text' => BML::ml('vertigo.nav.friends.managegroups'), },
-        { 'url' => "$siteroot/friends/filter.bml",
-          'text' => BML::ml('vertigo.nav.friends.filter'), },
-        { 'url' => "$siteroot/friends/invite.bml",
-          'text' => BML::ml('vertigo.nav.friends.invite'), },
-    );
-    push @friends_links, (
-        { 'url' => "$siteroot/friends/holidaypromotion.bml",
-          'text' => BML::ml('horizon.nav.friends.invite2paid'), },
-    ) if ($remote && ($remote->in_class('perm') || $remote->in_class('paid')));
-    push @friends_links, (
-        { 'url' => "$siteroot/friends/",
-          'text' => BML::ml('vertigo.nav.friends.other'), },
-    );
-    unshift @friends_links, { url => "$siteroot/friends/find.bml", text => BML::ml('vertigo.nav.friends.find') }
-        if LJ::is_enabled("octazen");
+        ### IDENTITY ACCOUNT LINKS: Journal, Manage ###
 
-    push @nav, { 'name' => BML::ml('vertigo.nav.friends'),
-                 'id' => "vertigo-menu-friends",
-                 'url' => "$journal_base/friends/",
-                 'links' => \@friends_links,
-             };
+        {
+            'name' => ml('xcolibur.nav.journal'),
+            'url' => "$journal_base/",
+            'accesskey' => '',
+            'enabled' => $remote_identity,
+            'links' => [
+                {
+                    'url' => "$journal_base/friends/",
+                    'text' => ml('xcolibur.nav.journal.friends'),
+                    'extra' => "$siteroot/friends/filter.bml",
+                },
+                {
+                    'url' => "$profile_url?t=I",
+                    'text' => ml('xcolibur.nav.journal.info'),
+                },
+            ],
+        },
 
-    ### This needs to be cached first before it hits production
-    # my $pending_invites = 0;
-    # $pending_invites = scalar @{LJ::get_pending_invites($remote)} if $remote;
+        {
+            'name' => ml('xcolibur.nav.manage'),
+            'url' => "$siteroot/manage/",
+            'accesskey' => 'M',
+            'enabled' => $remote_identity,
+            'links' => [
+                {
+                    'url' => "$siteroot/friends/",
+                    'text' => ml('xcolibur.nav.manage.friends'),
+                },
+                {
+                    'url' => "$siteroot/editpics.bml",
+                    'text' => ml('xcolibur.nav.manage.userpics'),
+                },
+            ],
+        },
 
-    push @nav, { 'name' => BML::ml('vertigo.nav.comm'),
-                 'id' => "vertigo-menu-communities",
-                 'url' => "$siteroot/community/manage.bml",
-                 'links' => [
-                              { 'url' => "$siteroot/community/create.bml",
-                                'text' => BML::ml('vertigo.nav.comm.create'), },
-                              { 'url' => "$siteroot/manage/invites.bml",
-                                'text' => BML::ml('vertigo.nav.comm.manageinvites'), },
-                              ],
-             };
+        ### ANONYMOUS VISITOR LINKS: Welcome ###
 
-    if ($fb_siteroot) {
-        # scrapbook manage links
-        push @nav, { 'name' => BML::ml('vertigo.nav.scrapbook'),
-                     'id' => "vertigo-menu-scrapbook",
-                     'url'  => $can_upload ? "$fb_siteroot/" . $remote->user . "/" : "$siteroot/didyouknow/scrapbook.bml",
-                     'links' => [
-                                  { 'url' => $can_upload ? "$fb_siteroot/manage/upload" : "$siteroot/didyouknow/scrapbook.bml",
-                                    'class' => !$can_upload ? "disabled" : "", 'text' => BML::ml('vertigo.nav.scrapbook.upload'), },
-                                  { 'url' => $can_upload ? "$fb_siteroot/manage/gals" : "$siteroot/didyouknow/scrapbook.bml",
-                                    'class' => !$can_upload ? "disabled" : "", 'text' => BML::ml('vertigo.nav.scrapbook.managegalleries'), },
-                                  { 'url' => $can_upload ? "$fb_siteroot/manage/gals?show=tags" : "$siteroot/didyouknow/scrapbook.bml",
-                                    'class' => !$can_upload ? "disabled" : "", 'text' => BML::ml('vertigo.nav.scrapbook.managetaggalleries'), },
-                                  { 'url' => $can_upload ? "$fb_siteroot/manage/styles/" : "$siteroot/didyouknow/scrapbook.bml",
-                                    'class' => !$can_upload ? "disabled" : "", 'text' => BML::ml('vertigo.nav.scrapbook.customize'), },
-                                  ],
-                 };
-        unshift @{$nav[5]->{links}}, { 'url' => "$siteroot/didyouknow/scrapbook.bml", 'text' => BML::ml('vertigo.nav.photos.whatis') } unless $can_upload;
-    }
+        {
+            'name' => ml('xcolibur.nav.welcome'),
+            'url' => "$siteroot/tour/",
+            'accesskey' => 'w',
+            'enabled' => !$remote_loggedin,
+            'links' => [
+                {
+                    'url' => "$siteroot/login.bml",
+                    'text' => ml('xcolibur.nav.welcome.login'),
+                },
+                {
+                    'url' => "$siteroot/create.bml",
+                    'text' => ml('xcolibur.nav.welcome.create'),
+                },
+                {
+                    'url' => "$siteroot/update.bml",
+                    'text' => ml('xcolibur.nav.welcome.update'),
+                },
+            ],
+        },
 
-    if (LJ::is_enabled("browse", $remote)) {
-        my @browse_links;
-        my @cats = LJ::Browse->load_for_nav;
-        foreach my $cat (@cats) {
-            push @browse_links, {
-                url => $cat->{url},
-                text => $cat->{pretty_name},
-            };
-        }
-        push @browse_links, {
-            url => ($remote && $remote->get_cap("directory")) ? "$siteroot/directorysearch.bml" : "$siteroot/didyouknow/advancedsearch.bml",
-            class => (!$remote || !$remote->get_cap("directory")) ? "disabled" : "",
-            text => BML::ml('vertigo.nav.find.directory'),
-        };
+        ### COMMON LINKS: Search, Shop, About, Help ###
 
-        push @nav, { 'name' => BML::ml('vertigo.nav.find'),
-                     'id' => "vertigo-menu-explore",
-                     'url' => "$siteroot/browse/",
-                     'links' => \@browse_links,
-        };
+        {
+            'name' => ml('xcolibur.nav.search'),
+            'url' => $search_url,
+            'accesskey' => '',
+            'links' => [
+                {
+                    'url' => "$siteroot/random.bml",
+                    'text' => ml('xcolibur.nav.search.random'),
+                },
+                {
+                    'url' => "$siteroot/directory.bml",
+                    'text' => ml('xcolibur.nav.search.directory'),
+                    'enabled' => LJ::is_enabled('directory'),
+                },
+                {
+                    'url' => "$siteroot/interests.bml",
+                    'text' => ml('xcolibur.nav.search.interests'),
+                },
+                {
+                    'url' => "$siteroot/directorysearch.bml",
+                    'text' => ml('xcolibur.nav.search.directory.search'),
+                    'enabled' => LJ::is_enabled('directory'),
+                },
+                {
+                    'url' => "$siteroot/schools/",
+                    'text' => ml('xcolibur.nav.search.schools'),
+                    'enabled' => LJ::is_enabled('schools'),
+                },
+                {
+                    'url' => "$siteroot/syn/",
+                    'text' => ml('xcolibur.nav.search.feeds'),
+                },
+            ],
+        },
 
-    } elsif (LJ::run_hook("remote_should_see_vertical_nav")) {
-        my @find_links;
-        my @verticals = LJ::Vertical->load_all;
-        foreach my $vert (@verticals) {
-            push @find_links, {
-                url => $vert->{url},
-                text => $vert->{display_name},
-            };
-        }
-        push @find_links, {
-            url => ($remote && $remote->get_cap("directory")) ? "$siteroot/directorysearch.bml" : "$siteroot/didyouknow/advancedsearch.bml",
-            class => (!$remote || !$remote->get_cap("directory")) ? "disabled" : "",
-            text => BML::ml('vertigo.nav.find.directory'),
-        };
+        {
+            'name' => ml('xcolibur.nav.giftshop'),
+            'url' => "$siteroot/shop/",
+            'accesskey' => "G",
+            'links' => [
+                {
+                    'url' => "$siteroot/shop/index.bml?class=gifts",
+                    'text' => ml('xcolibur.nav.giftshop.gifts'),
+                },
+                {
+                    'url' => "$siteroot/shop/index.bml?class=merchandise",
+                    'text' => ml('xcolibur.nav.giftshop.merchandise'),
+                },
+                {
+                    'url' => "$siteroot/shop/index.bml?class=paidaccount",
+                    'text' => ml('xcolibur.nav.giftshop.paidaccts'),
+                },
+                {
+                    'url' => "$siteroot/shop/index.bml?class=bonusfeatures",
+                    'text' => ml('xcolibur.nav.giftshop.addons'),
+                },
+            ],
+        },
 
-        push @nav, { 'name' => BML::ml('vertigo.nav.find'),
-                     'id' => "vertigo-menu-explore",
-                     'url' => "$siteroot/explore/",
-                     'links' => \@find_links,
-                 };
-    } else {
-        push @nav, { 'name' => BML::ml('vertigo.nav.find'),
-                     'id' => "vertigo-menu-explore",
-                     'url' => "$siteroot/site/search.bml",
-                     'links' => [
-                         { 'url' => "$siteroot/interests.bml",
-                           'text' => BML::ml('vertigo.nav.find.byinterest'), },
-                         { 'url' => ($remote && $remote->get_cap("directory")) ? "$siteroot/directory.bml" : "$siteroot/didyouknow/advancedsearch.bml",
-                           'class' => (!$remote || !$remote->get_cap("directory")) ? "disabled" : "", 'text' => BML::ml('vertigo.nav.find.byregion'), },
-                         { 'url' => "$siteroot/schools/",
-                           'text' => BML::ml('vertigo.nav.find.byschool'), },
-                         { 'url' => "$siteroot/syn/",
-                           'text' => BML::ml('vertigo.nav.find.browsefeeds'), },
-                         { 'url' => ($remote && $remote->get_cap("directory")) ? "$siteroot/directorysearch.bml" : "$siteroot/didyouknow/advancedsearch.bml",
-                           'class' => (!$remote || !$remote->get_cap("directory")) ? "disabled" : "", 'text' => BML::ml('vertigo.nav.find.moreoptions'), },
-                     ],
-        };
-    }
+        {
+            'name' => ml('xcolibur.nav.about'),
+            'url' => "$siteroot/site/about.bml",
+            'accesskey' => 'A',
+            'links' => [
+                {
+                    'url' => "$siteroot/support/faqbrowse.bml?faqcat=about",
+                    'text' => ml('xcolibur.nav.about.general'),
+                },
+                {
+                    'url' => "$siteroot/press/",
+                    'text' => ml('xcolibur.nav.about.press'),
+                },
+                {
+                    'url' => "$siteroot/download/",
+                    'text' => ml('xcolibur.nav.about.download'),
+                },
+                {
+                    'url' => "http://news.livejournal.com/",
+                    'text' => ml("xcolibur.nav.about.sitenews"),
+                },
+                {
+                    'url' => "$siteroot/paidaccounts/",
+                    'text' => ml('xcolibur.nav.about.paidaccounts'),
+                },
+            ],
+        },
 
-    push @nav, { 'name' => BML::ml('horizon.nav.admin'),
-                 'id' => "horizon-menu-admin",
-                 'url' => "$siteroot/admin/",
-                 'links' => [ { 'url' => "$siteroot/admin/console/",
-                                'text' => 'Console', },
-                              { 'url' => "$siteroot/admin/accounts/acctedit.bml?user=" . ($remote && $remote->user),
-                                'text' => BML::ml('horizon.nav.admin.acctedit'), },
-                              { 'url' => "$siteroot/admin/priv/",
-                                'text' => BML::ml('horizon.nav.admin.editprivs'), },
-                              { 'url' => "$siteroot/admin/capedit.bml",
-                                'text' => BML::ml('horizon.nav.admin.editcaps'), },
-                              { 'url' => "$siteroot/admin/propedit.bml",
-                                'text' => BML::ml('horizon.nav.admin.editprops'), },
-                              { 'url' => "$siteroot/admin/subscriptions.bml",
-                                'text' => BML::ml('horizon.nav.admin.subscriptions'), },
-                              { 'url' => "$siteroot/admin/events.bml",
-                                'text' => BML::ml('horizon.nav.admin.events'), },
-                              ],
-             } if $LJ::IS_DEV_SERVER;
-
-    return @nav;
+        {
+            'name' => ml('xcolibur.nav.help'),
+            'url' => "$siteroot/support/",
+            'accesskey' => 'H',
+            'links' => [
+                {
+                    'url' => "$siteroot/support/",
+                    'text' => ml("xcolibur.nav.help.ask"),
+                },
+                {
+                    'url' => "$siteroot/lostinfo.bml",
+                    'text' => ml('xcolibur.nav.help.lostpassword'),
+                    'enabled' => !$remote_identity,
+                },
+                {
+                    'url' => "$siteroot/support/faq.bml",
+                    'text' => ml('xcolibur.nav.help.faq'),
+                },
+                {
+                    'url' => "$siteroot/site/",
+                    'text' => ml('xcolibur.nav.footer.sitemap'),
+                },
+                {
+                    'url' => "$siteroot/manage/settings/?cat=display",
+                    'text' => ml('xcolibur.nav.siteopts'),
+                },
+                {
+                    'url' => "$siteroot/feedback/",
+                    'text' => ml('xcolibur.nav.help.contact'),
+                },
+            ],
+        },
+    );
 }
 
 1;

Added: trunk/cgi-bin/LJ/SiteScheme/Dystopia.pm
===================================================================
--- trunk/cgi-bin/LJ/SiteScheme/Dystopia.pm	                        (rev 0)
+++ trunk/cgi-bin/LJ/SiteScheme/Dystopia.pm	2011-09-07 07:59:27 UTC (rev 10972)
@@ -0,0 +1,364 @@
+package LJ::SiteScheme::Dystopia;
+use strict;
+use warnings;
+
+use base qw( LJ::SiteScheme );
+
+use LJ::Lang qw( ml );
+
+sub code {'dystopia'}
+
+sub need_res {
+    LJ::need_res(qw( stc/lj_base-app.css stc/dystopia.css ));
+
+    if ($LJ::USE_ADS) {
+        LJ::need_res('stc/ad_base.css');
+    }
+}
+
+sub template_params {
+    my ( $class, $args ) = @_;
+
+    my $remote = LJ::get_remote();
+    my $uri    = LJ::Request->uri;
+
+    my $remote_username = '';
+    if ($remote) {
+        $remote_username = $remote->username;
+    }
+
+    my ( $parentcrumb_title, $parentcrumb_link ) = ( '', '' );
+    if ( LJ::get_active_crumb() ne '' ) {
+        my $parentcrumb = LJ::get_parent_crumb();
+        ( $parentcrumb_title, $parentcrumb_link ) = @$parentcrumb;
+    }
+
+    my $show_lang_map = !LJ::Request->cookie('langpref');
+
+    my $ml_hello = '';
+    if ($remote) {
+        $ml_hello =
+            ml( 'dystopia.hello_loggedin',
+            { 'username' => $remote->username },
+            );
+    } else {
+        $ml_hello = ml('dystopia.hello_anonymous');
+    }
+
+    my $cprod_dystopianav =
+        LJ::CProd->inline( $remote, 'inline' => 'DystopiaNav', );
+
+    my ( $base, $profile_url, $memories_url ) = ( '', '', '' );
+    if ($remote) {
+        $base        = $remote->journal_base;
+        $profile_url = $remote->pr...
 (truncated)
Tags: andy, css, ljcom, look, pm, tmpl
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments