madeon (madeon) wrote in changelog,
madeon
madeon
changelog

[livejournal] r19961: LJSUP-9307: Recent chages in delayed ent...

Committer: sbelyaev
LJSUP-9307: Recent chages in delayed entries
U   branches/delayed_entries/cgi-bin/LJ/DelayedEntry.pm
U   branches/delayed_entries/cgi-bin/LJ/S2/MonthPage.pm
U   branches/delayed_entries/cgi-bin/LJ/S2/RecentPage.pm
U   branches/delayed_entries/cgi-bin/LJ/S2.pm
U   branches/delayed_entries/cgi-bin/bml/scheme/global.look
U   branches/delayed_entries/htdocs/stc/lj_base.css
U   branches/delayed_entries/htdocs/talkread.bml
Modified: branches/delayed_entries/cgi-bin/LJ/DelayedEntry.pm
===================================================================
--- branches/delayed_entries/cgi-bin/LJ/DelayedEntry.pm	2011-09-05 09:54:52 UTC (rev 19960)
+++ branches/delayed_entries/cgi-bin/LJ/DelayedEntry.pm	2011-09-05 10:03:18 UTC (rev 19961)
@@ -6,7 +6,6 @@
 use DateTime;
 use Storable;
 use POSIX;
-use Data::Dumper;
 use LJ::User;
 
 sub create {

Modified: branches/delayed_entries/cgi-bin/LJ/S2/MonthPage.pm
===================================================================
--- branches/delayed_entries/cgi-bin/LJ/S2/MonthPage.pm	2011-09-05 09:54:52 UTC (rev 19960)
+++ branches/delayed_entries/cgi-bin/LJ/S2/MonthPage.pm	2011-09-05 10:03:18 UTC (rev 19961)
@@ -194,6 +194,7 @@
             'comments' => $comments,
             'userpic' => $userpic,
             'permalink_url' => $permalink,
+            'delayedid' => $entry_obj->is_delayed ? $entry_obj->delayedid : undef,
         });
 
         push @{$day_entries{$day}}, $entry;

Modified: branches/delayed_entries/cgi-bin/LJ/S2/RecentPage.pm
===================================================================
--- branches/delayed_entries/cgi-bin/LJ/S2/RecentPage.pm	2011-09-05 09:54:52 UTC (rev 19960)
+++ branches/delayed_entries/cgi-bin/LJ/S2/RecentPage.pm	2011-09-05 10:03:18 UTC (rev 19961)
@@ -364,14 +364,14 @@
             'show_postlink' => 0,
         });
         
-        my $tags =  $delayed_entry->get_tags;
-        $tags = $tags->{$delayed_entry->delayedid} if $tags;
+        my $entry_tags =  $delayed_entry->get_tags;
+        $entry_tags = $entry_tags->{$delayed_entry->delayedid} if $entry_tags;
         
         my @tags = (); 
-        if ($tags) {
-            my @keys = keys %$tags;
+        if ($entry_tags) {
+            my @keys = keys %$entry_tags;
             foreach my $key (@keys) {
-                push @tags, Tag($delayed_entry->journal, $key => $tags->{$key});
+                push @tags, Tag($delayed_entry->journal, $key => $entry_tags->{$key});
             }
         }
         
@@ -387,7 +387,7 @@
             'comments' => $comments,
             'new_day' => 1,
             'end_day' => 0,   # if true, set later
-            'tags' => $tags,
+            'tags' => \@tags,
             'userpic' => $delayed_entry->userpic,
             'permalink_url' => "d$delayedid.html",
             'sticky' => $delayed_entry->is_sticky,

Modified: branches/delayed_entries/cgi-bin/LJ/S2.pm
===================================================================
--- branches/delayed_entries/cgi-bin/LJ/S2.pm	2011-09-05 09:54:52 UTC (rev 19960)
+++ branches/delayed_entries/cgi-bin/LJ/S2.pm	2011-09-05 10:03:18 UTC (rev 19961)
@@ -1972,18 +1972,19 @@
         $e->{text_must_print_trusted} = 1 if $e->{text} =~ m!<(script|object|applet|embed|iframe)\b!i;
             
         if ($entry->is_sticky()) {
+           $e->{'sticky'} = 1;
            $e->{'sticky_icon'} = Image_std("sticky-entry");
         }
     } else {
         my $entry = LJ::DelayedEntry->get_entry_by_id( $e->{journal}->{_u}, 
                                                         $e->{delayedid} );
         if ( $entry->is_sticky) {
+            $e->{'sticky'} = 1;
             $e->{'sticky_icon'} = Image_std("sticky-entry");
         }
-
+        $e->{'delayed'} = 1;
         $e->{'delayed_icon'} = Image_std("delayed-entry");
     }
-
     return $e;
 }
 
@@ -2119,11 +2120,11 @@
 
     unless ($LJ::S2::RES_MADE++) {
         $LJ::S2::RES_CACHE = {
-            'security-protected' => Image("$LJ::IMGPREFIX/icon_protected.gif", 14, 15, $ctx->[S2::PROPS]->{'text_icon_alt_protected'}),
-            'security-private' => Image("$LJ::IMGPREFIX/icon_private.gif", 16, 16, $ctx->[S2::PROPS]->{'text_icon_alt_private'}),
-            'security-groups' => Image("$LJ::IMGPREFIX/icon_groups.gif", 19, 16, $ctx->[S2::PROPS]->{'text_icon_alt_groups'}),
-            'sticky-entry' => Image("$LJ::IMGPREFIX/icon_sticky.gif", 11, 15, $ctx->[S2::PROPS]->{'text_icon_alt_sticky'}),
-            'delayed-entry' => Image("$LJ::IMGPREFIX/icon_delayed.gif", 11, 15, $ctx->[S2::PROPS]->{'text_icon_alt_delayed'}),
+            'security-protected' => Image("$LJ::IMGPREFIX/icon_protected.gif", 14, 15, $ctx->[S2::PROPS]->{'text_icon_alt_protected'}, 'title' => $ctx->[S2::PROPS]->{'text_icon_alt_protected'}),
+            'security-private' => Image("$LJ::IMGPREFIX/icon_private.gif", 16, 16, $ctx->[S2::PROPS]->{'text_icon_alt_private'}, 'title' => $ctx->[S2::PROPS]->{'text_icon_alt_private'}),
+            'security-groups' => Image("$LJ::IMGPREFIX/icon_groups.gif", 19, 16, $ctx->[S2::PROPS]->{'text_icon_alt_groups'}, 'title' => $ctx->[S2::PROPS]->{'text_icon_alt_groups'}),
+            'sticky-entry' => Image("$LJ::IMGPREFIX/icon_sticky.png", 13, 15, $ctx->[S2::PROPS]->{'text_icon_alt_sticky'}, 'title' => $ctx->[S2::PROPS]->{'text_icon_alt_sticky'}),
+            'delayed-entry' => Image("$LJ::IMGPREFIX/icon_delayed.png", 13, 15, $ctx->[S2::PROPS]->{'text_icon_alt_delayed'}, 'title' => $ctx->[S2::PROPS]->{'text_icon_alt_delayed'}),
         };
     }
     return $LJ::S2::RES_CACHE->{$name};

Modified: branches/delayed_entries/cgi-bin/bml/scheme/global.look
===================================================================
--- branches/delayed_entries/cgi-bin/bml/scheme/global.look	2011-09-05 09:54:52 UTC (rev 19960)
+++ branches/delayed_entries/cgi-bin/bml/scheme/global.look	2011-09-05 10:03:18 UTC (rev 19961)
@@ -3,11 +3,11 @@
 loginboxstyle=>{Ss}background: url(/img/userinfo.gif) no-repeat; background-color: #fff; background-position: 0px 1px; padding-left: 18px; color: #00C; font-weight: bold;
 commloginboxstyle=>{Ss}background: url(/img/community.gif) no-repeat; background-color: #fff; background-position: 0px 2px; padding-left: 19px; color: #00C; font-weight: bold;
 
-TYPESTICKY=>{Ss}<img src="<?imgprefix?>/icon_sticky.gif" width=11 height=15 align=absmiddle>
-TYPEDELAYED=>{Ss}<img src="<?imgprefix?>/icon_delayed.gif" width=11 height=15 align=absmiddle>
-SECURITYPRIVATE=>{Ss}<img src="<?imgprefix?>/icon_private.gif" width=16 height=16 align=absmiddle>
-SECURITYPROTECTED=>{Ss}<img src="<?imgprefix?>/icon_protected.gif" width=14 height=15 align=absmiddle>
-SECURITYGROUPS=>{Ss}<img src="<?imgprefix?>/icon_groups.gif" width=19 height=16 align=absmiddle>
+TYPESTICKY=>{Ss}<img src="<?imgprefix?>/icon_sticky.png" width=13 height=15 align=absmiddle class="i-posticon">
+TYPEDELAYED=>{Ss}<img src="<?imgprefix?>/icon_delayed.png" width=13 height=15 align=absmiddle class="i-posticon">
+SECURITYPRIVATE=>{Ss}<img src="<?imgprefix?>/icon_private.gif" width=16 height=16 align=absmiddle class="i-posticon">
+SECURITYPROTECTED=>{Ss}<img src="<?imgprefix?>/icon_protected.gif" width=14 height=15 align=absmiddle class="i-posticon">
+SECURITYGROUPS=>{Ss}<img src="<?imgprefix?>/icon_groups.gif" width=19 height=16 align=absmiddle class="i-posticon">
 HELP=>{DR}(<a href="%%data%%"><i>help</i></a>)
 INERR=>{DR}<font color="#ff0000"><b>%%data%%</b></font>
 SOERROR=>{DR}<div><b>%%data%%</b></div>

Modified: branches/delayed_entries/htdocs/stc/lj_base.css
===================================================================
--- branches/delayed_entries/htdocs/stc/lj_base.css	2011-09-05 09:54:52 UTC (rev 19960)
+++ branches/delayed_entries/htdocs/stc/lj_base.css	2011-09-05 10:03:18 UTC (rev 19961)
@@ -3173,3 +3173,9 @@
 		border-radius:6px;
 		}
 
+.i-posticon {
+	margin: 0 .5em 0 0;
+	}
+.i-posticon-flip {
+	margin: 0 0 0 .5em;
+	}

Modified: branches/delayed_entries/htdocs/talkread.bml
===================================================================
--- branches/delayed_entries/htdocs/talkread.bml	2011-09-05 09:54:52 UTC (rev 19960)
+++ branches/delayed_entries/htdocs/talkread.bml	2011-09-05 10:03:18 UTC (rev 19961)
@@ -478,7 +478,15 @@
             $sec = BML::fill_template("securityprotected");
         }
     }
+    
+    if ($entry->is_delayed) {
+        $sec =  BML::fill_template("typedelayed") . $sec;
+    }
 
+    if ($entry->is_sticky) {
+         $sec =  BML::fill_template("typesticky") . $sec;
+    }
+
     $sec .= "<br />\n" unless $sec eq "" or $item->{'subject'};
     $ret .= $sec;
 

Tags: bml, css, livejournal, look, madeon, pm
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