Максим Червонный (fiskus_boulder) wrote in changelog,
Максим Червонный
fiskus_boulder
changelog

[livejournal] r18434: OPSC-305: added link "My Games"

Committer: mchervonniy
OPSC-305: added link "My Games"
U   trunk/bin/upgrading/s2layers/core1.s2
U   trunk/bin/upgrading/s2layers/digitalmultiplex/layout.s2
Modified: trunk/bin/upgrading/s2layers/core1.s2
===================================================================
--- trunk/bin/upgrading/s2layers/core1.s2	2011-03-02 09:58:02 UTC (rev 18433)
+++ trunk/bin/upgrading/s2layers/core1.s2	2011-03-02 10:10:05 UTC (rev 18434)
@@ -500,6 +500,9 @@
 
     var bool showspam
     "Set to true if need show only spam messages.";
+    
+    var bool view_my_games
+    "View my games on profilepage.";
 
     function print
     "The main entry point that LiveJournal calls. Layouts should override this to create HTML that's the
@@ -877,10 +880,10 @@
 "Gets the top-level [class[Page]] instance that LiveJournal ran the [method[Page.print()]] method on.";
 
 function builtin get_url(string user, string view) : string
-"Returns a URL to the specified view for the specified user. Views use the same names as elsewhere. (recent, friends, archive, month, userinfo)";
+"Returns a URL to the specified view for the specified user. Views use the same names as elsewhere. (recent, friends, archive, month, userinfo, usergames)";
 
 function builtin get_url(UserLite user, string view) : string
-"Returns a URL to the specified view for the specified user. Views use the same names as elsewhere. (recent, friends, archive, month, userinfo)";
+"Returns a URL to the specified view for the specified user. Views use the same names as elsewhere. (recent, friends, archive, month, userinfo, usergames)";
 
 function builtin string(int i) : string
 "Return the given integer as a string";
@@ -1196,6 +1199,12 @@
 }
 set text_spam_comment = "(Spam comment)";
 
+property string text_view_games {
+    des = "Text for view games on profile page";
+    example = "My Games";
+}
+set text_view_games = "My Games";
+
 property string text_tags_page_header {
     des = "Text for the header of the Tags page";
     example = "Visible Tags";
@@ -1281,6 +1290,13 @@
     example = "My Profile";
 }
 
+property string text_view_usergames {
+    des = "Text used to link to the 'My Games' view";
+    maxlength = 20;
+    "size" = 15;
+    example = "My Games";
+}
+
 property string text_view_memories {
     des = "Text used to link to the 'Memories' view";
     maxlength = 20;
@@ -1302,6 +1318,7 @@
 set text_view_friendsfriends_filter = "Friends of Friends (Custom filter)";
 set text_view_archive = "Archive";
 set text_view_userinfo = "User Info";
+set text_view_usergames = "My Games";
 set text_view_memories = "Memories";
 set text_view_month = "View Subjects";
 
@@ -2004,6 +2021,7 @@
     if ($viewid == "day") { return "Day"; }
     if ($viewid == "month") { return "Month"; }
     if ($viewid == "userinfo") { return $*text_view_userinfo; }
+    if ($viewid == "usergames") { return $*text_view_usergames; }
     if ($viewid == "entry") { return "Read Comments"; }
     if ($viewid == "reply") { return "Post Comment"; }
     if ($viewid == "tags") { return "Tags"; }

Modified: trunk/bin/upgrading/s2layers/digitalmultiplex/layout.s2
===================================================================
--- trunk/bin/upgrading/s2layers/digitalmultiplex/layout.s2	2011-03-02 09:58:02 UTC (rev 18433)
+++ trunk/bin/upgrading/s2layers/digitalmultiplex/layout.s2	2011-03-02 10:10:05 UTC (rev 18434)
@@ -280,6 +280,7 @@
     set text_sidebar_summary = "Page Summary";
     property use text_showspam;
     property use text_hidespam;
+    property use text_view_games;
 }
 propgroup sidebar {
     property string sidebar_width {
@@ -411,7 +412,11 @@
             $navigation = """$navigation<tr><td width="100%">$*text_sidebar_link_separator<a href="$page.view_url{$v}">""" +  lang_viewname($v) + "</a></td></tr>";
         }
     }
-    $navigation = $navigation + $website;
+    var string games;
+    if ($page.view_my_games) {
+        $games = """<tr><td>$*text_sidebar_link_separator<a href="$page.journal.website_url/profile#apps">$*text_view_games</a></td></tr>""";
+    }
+    $navigation = $navigation + $website + $games;
     if ($page->lay_sidebar_view_navigation() != "") {
         $navigation = $navigation + "<tr><td>&nbsp;</td></tr>";
         $navigation = $navigation + $page->lay_sidebar_view_navigation();

Tags: fiskus_boulder, livejournal, s2
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