From svnnotify ¡÷ sourceforge.jp Mon Jun 16 16:10:09 2008 From: svnnotify ¡÷ sourceforge.jp (svnnotify ¡÷ sourceforge.jp) Date: Mon, 16 Jun 2008 16:10:09 +0900 Subject: [Slashdotjp-dev 1134] [661] * Fix: Automatic adding related stories and comments Message-ID: <1213600209.604388.3474.nullmailer@users.sourceforge.jp> Revision: 661 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=slashdotjp&view=rev&rev=661 Author: tach Date: 2008-06-16 16:10:09 +0900 (Mon, 16 Jun 2008) Log Message: ----------- * Fix: Automatic adding related stories and comments - Check sid existance - Select enable/disable to add related comments using variable "related_cid_disabled" Modified Paths: -------------- slashjp/branches/2.5.0.192/debian/changelog slashjp/branches/2.5.0.192/plugins/Admin/admin.pl slashjp/branches/2.5.0.192/sql/mysql/defaults.sql -------------- next part -------------- Modified: slashjp/branches/2.5.0.192/debian/changelog =================================================================== --- slashjp/branches/2.5.0.192/debian/changelog 2008-05-20 01:12:51 UTC (rev 660) +++ slashjp/branches/2.5.0.192/debian/changelog 2008-06-16 07:10:09 UTC (rev 661) @@ -19,8 +19,12 @@ * Add feature to enable/disable PERL / RAWPERL directives on Template - use constant 'enable_template_evalperl' * Add feature to create slashhead/slashfoot file for mobile mode + * Fix: Automatic adding related stories and comments + - Check sid existance + - Select enable/disable to add related comments using variable + "related_cid_disabled" - -- Taku YASUI Tue, 20 May 2008 01:11:50 +0000 + -- Taku YASUI Mon, 16 Jun 2008 07:07:32 +0000 slash (2.5.0.192-12) unstable; urgency=low Modified: slashjp/branches/2.5.0.192/plugins/Admin/admin.pl =================================================================== --- slashjp/branches/2.5.0.192/plugins/Admin/admin.pl 2008-05-20 01:12:51 UTC (rev 660) +++ slashjp/branches/2.5.0.192/plugins/Admin/admin.pl 2008-06-16 07:10:09 UTC (rev 661) @@ -1589,7 +1589,11 @@ # Extract sids from urls in introtext and bodytext foreach ($form->{introtext}, $form->{bodytext}) { next unless ($_); - push @$related, $1 while /$match/g; + while (/$match/g) { + next unless $slashdb->getStory($1); + push @$related, $1; + } + next if ($constants->{related_cid_disabled}); push @$related_cids, $1 while /$match_cid/g; } Modified: slashjp/branches/2.5.0.192/sql/mysql/defaults.sql =================================================================== --- slashjp/branches/2.5.0.192/sql/mysql/defaults.sql 2008-05-20 01:12:51 UTC (rev 660) +++ slashjp/branches/2.5.0.192/sql/mysql/defaults.sql 2008-06-16 07:10:09 UTC (rev 661) @@ -1148,6 +1148,7 @@ INSERT IGNORE INTO vars (name, value, description) VALUES ('mobile_encoding','Shift_JIS','Content encoding for mobile webpages (static html files)'); INSERT IGNORE INTO vars (name, value, description) VALUES ('mobile_staticdir','','Path for mobile static html files (disabled if empty)'); INSERT IGNORE INTO vars (name, value, description) VALUES ('enable_template_evalperl','0','Add "EVAL_PERL" to Template option to be able to use "PERL" and "RAWPERL" directives'); +INSERT IGNORE INTO vars (name, value, description) VALUES ('related_cid_disabled','0','If set, then disable inserting cid to related story list'); UPDATE vars SET value='text/html; charset=UTF-8' WHERE name='content_type_webpage'; UPDATE vars SET value='0' WHERE name='draconian_charset'; UPDATE vars SET value='UTF-8' WHERE name='rdfencoding'; From svnnotify ¡÷ sourceforge.jp Mon Jun 16 19:53:14 2008 From: svnnotify ¡÷ sourceforge.jp (svnnotify ¡÷ sourceforge.jp) Date: Mon, 16 Jun 2008 19:53:14 +0900 Subject: [Slashdotjp-dev 1135] [662] * Add to killing orphaned slashd child process when keepalive Message-ID: <1213613594.331896.10252.nullmailer@users.sourceforge.jp> Revision: 662 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=slashdotjp&view=rev&rev=662 Author: tach Date: 2008-06-16 19:53:14 +0900 (Mon, 16 Jun 2008) Log Message: ----------- * Add to killing orphaned slashd child process when keepalive Modified Paths: -------------- slashjp/branches/2.5.0.192/debian/changelog slashjp/branches/2.5.0.192/debian/slash-backend.init.d -------------- next part -------------- Modified: slashjp/branches/2.5.0.192/debian/changelog =================================================================== --- slashjp/branches/2.5.0.192/debian/changelog 2008-06-16 07:10:09 UTC (rev 661) +++ slashjp/branches/2.5.0.192/debian/changelog 2008-06-16 10:53:14 UTC (rev 662) @@ -23,8 +23,9 @@ - Check sid existance - Select enable/disable to add related comments using variable "related_cid_disabled" + * Add to killing orphaned slashd child process when keepalive - -- Taku YASUI Mon, 16 Jun 2008 07:07:32 +0000 + -- Taku YASUI Mon, 16 Jun 2008 10:52:31 +0000 slash (2.5.0.192-12) unstable; urgency=low Modified: slashjp/branches/2.5.0.192/debian/slash-backend.init.d =================================================================== --- slashjp/branches/2.5.0.192/debian/slash-backend.init.d 2008-06-16 07:10:09 UTC (rev 661) +++ slashjp/branches/2.5.0.192/debian/slash-backend.init.d 2008-06-16 10:53:14 UTC (rev 662) @@ -145,6 +145,18 @@ ;; keepalive) + # kill orphaned slashd child process + pids=`pidof -x slashd` + for pid in $pids; do + ppid=`egrep '^PPid:' /proc/$pid/status 2>/dev/null | awk '{print $2}'` + pname=`cat /proc/$pid/cmdline 2>/dev/null` + pcmd=`echo $pname | awk '{print $3}'` + test "$ppid" != "1" && continue + test -z "$pcmd" && continue + echo Orphaned slashd procces is found: $pid $ppid $pname + kill -USR1 $pid + done + for server_name in $GRAB_CONFIG; do break_parts; if [ ! -f $RUNNINGPID ] ;then From svnnotify ¡÷ sourceforge.jp Wed Jun 18 21:03:31 2008 From: svnnotify ¡÷ sourceforge.jp (svnnotify ¡÷ sourceforge.jp) Date: Wed, 18 Jun 2008 21:03:31 +0900 Subject: [Slashdotjp-dev 1136] [663] * Fix next_prev_stories selection code Message-ID: <1213790611.966947.9963.nullmailer@users.sourceforge.jp> Revision: 663 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=slashdotjp&view=rev&rev=663 Author: tach Date: 2008-06-18 21:03:31 +0900 (Wed, 18 Jun 2008) Log Message: ----------- * Fix next_prev_stories selection code - Make same as mainpage story list -- ¤³¹Ô°Ê¤Ïe̵»ë¤µ¤ì¤Þ¤¹ -- M debian/changelog M Slash/DB/MySQL/MySQL.pm Modified Paths: -------------- slashjp/branches/2.5.0.192/Slash/DB/MySQL/MySQL.pm slashjp/branches/2.5.0.192/debian/changelog -------------- next part -------------- Modified: slashjp/branches/2.5.0.192/Slash/DB/MySQL/MySQL.pm =================================================================== --- slashjp/branches/2.5.0.192/Slash/DB/MySQL/MySQL.pm 2008-06-16 10:53:14 UTC (rev 662) +++ slashjp/branches/2.5.0.192/Slash/DB/MySQL/MySQL.pm 2008-06-18 12:03:31 UTC (rev 663) @@ -5859,6 +5859,16 @@ my $nexus_clause = join ',', @$nexuses, $mp_tid; $where .= " AND story_topics_rendered.tid IN ($nexus_clause)"; $key .= '|>='; + } elsif (!$section && !$topic) { + # suppress stories never seen + $where .= " AND story_topics_rendered.stoid NOT IN (SELECT stoid FROM story_topics_rendered WHERE tid IN ($user->{story_never_nexus}))" + if ($user->{story_never_nexus}); + my $nexuses = []; + push @$nexuses, $user->{story_full_best_nexus} if ($user->{story_full_best_nexus}); + push @$nexuses, $user->{story_brief_best_nexus} if ($user->{story_brief_best_nexus}); + my $nexus_clause .= join ',', @$nexuses; + $where .= " AND (story_topics_rendered.stoid NOT IN (SELECT stoid FROM story_topics_rendered WHERE tid IN ($nexus_clause)) OR story_topics_rendered.tid = $mp_tid)" + if ($nexus_clause); } else { $where .= " AND story_topics_rendered.tid = $mp_tid"; $key .= '|='; @@ -5878,6 +5888,8 @@ $key = $user->{story_never_topic} || $user->{story_never_author} || $user->{story_never_nexus} + || $user->{story_full_best_nexus} + || $user->{story_brief_best_nexus} ? '' : "$key|"; } elsif ($topic) { Modified: slashjp/branches/2.5.0.192/debian/changelog =================================================================== --- slashjp/branches/2.5.0.192/debian/changelog 2008-06-16 10:53:14 UTC (rev 662) +++ slashjp/branches/2.5.0.192/debian/changelog 2008-06-18 12:03:31 UTC (rev 663) @@ -24,8 +24,10 @@ - Select enable/disable to add related comments using variable "related_cid_disabled" * Add to killing orphaned slashd child process when keepalive + * Fix next_prev_stories selection code + - Make same as mainpage story list - -- Taku YASUI Mon, 16 Jun 2008 10:52:31 +0000 + -- Taku YASUI Wed, 18 Jun 2008 12:00:34 +0000 slash (2.5.0.192-12) unstable; urgency=low From svnnotify ¡÷ sourceforge.jp Thu Jun 19 16:19:43 2008 From: svnnotify ¡÷ sourceforge.jp (svnnotify ¡÷ sourceforge.jp) Date: Thu, 19 Jun 2008 16:19:43 +0900 Subject: [Slashdotjp-dev 1137] [664] * Change mobile mode default charset from Shift_JIS to UTF-8 Message-ID: <1213859983.099325.23398.nullmailer@users.sourceforge.jp> Revision: 664 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=slashdotjp&view=rev&rev=664 Author: tach Date: 2008-06-19 16:19:42 +0900 (Thu, 19 Jun 2008) Log Message: ----------- * Change mobile mode default charset from Shift_JIS to UTF-8 * Fix to specify correct ssi include file for mobile mode Modified Paths: -------------- slashjp/branches/2.5.0.192/Slash/Utility/Anchor/Anchor.pm slashjp/branches/2.5.0.192/debian/changelog slashjp/branches/2.5.0.192/sql/mysql/defaults.sql -------------- next part -------------- Modified: slashjp/branches/2.5.0.192/Slash/Utility/Anchor/Anchor.pm =================================================================== --- slashjp/branches/2.5.0.192/Slash/Utility/Anchor/Anchor.pm 2008-06-18 12:03:31 UTC (rev 663) +++ slashjp/branches/2.5.0.192/Slash/Utility/Anchor/Anchor.pm 2008-06-19 07:19:42 UTC (rev 664) @@ -437,6 +437,7 @@ (my $dir = $gSkin->{rootdir}) =~ s|^(?:https?:)?//[^/]+||; my $hostname = $gSkin->{hostname}; my $page = $options->{Page} || $user->{currentPage} || 'misc'; + $dir = $constants->{mobile_urlpath} if ($user->{mobile}); # if there's a special .inc header for this page, use it, else it's # business as usual. Modified: slashjp/branches/2.5.0.192/debian/changelog =================================================================== --- slashjp/branches/2.5.0.192/debian/changelog 2008-06-18 12:03:31 UTC (rev 663) +++ slashjp/branches/2.5.0.192/debian/changelog 2008-06-19 07:19:42 UTC (rev 664) @@ -26,8 +26,10 @@ * Add to killing orphaned slashd child process when keepalive * Fix next_prev_stories selection code - Make same as mainpage story list + * Change mobile mode default charset from Shift_JIS to UTF-8 + * Fix to specify correct ssi include file for mobile mode - -- Taku YASUI Wed, 18 Jun 2008 12:00:34 +0000 + -- Taku YASUI Thu, 19 Jun 2008 07:18:22 +0000 slash (2.5.0.192-12) unstable; urgency=low Modified: slashjp/branches/2.5.0.192/sql/mysql/defaults.sql =================================================================== --- slashjp/branches/2.5.0.192/sql/mysql/defaults.sql 2008-06-18 12:03:31 UTC (rev 663) +++ slashjp/branches/2.5.0.192/sql/mysql/defaults.sql 2008-06-19 07:19:42 UTC (rev 664) @@ -1145,8 +1145,9 @@ INSERT IGNORE INTO vars (name, value, description) VALUES ('topiclist_dont_show_nexuses','1','Do not show nexus topics on topic list'); INSERT IGNORE INTO vars (name, value, description) VALUES ('mobile_enabled','0','Use mobile mode (1: enable, 0: disable)'); INSERT IGNORE INTO vars (name, value, description) VALUES ('mobile_useragent_regex','','User-Agent regex to force mobile mode'); -INSERT IGNORE INTO vars (name, value, description) VALUES ('mobile_encoding','Shift_JIS','Content encoding for mobile webpages (static html files)'); +INSERT IGNORE INTO vars (name, value, description) VALUES ('mobile_encoding','utf8','Content encoding for mobile webpages (static html files)'); INSERT IGNORE INTO vars (name, value, description) VALUES ('mobile_staticdir','','Path for mobile static html files (disabled if empty)'); +INSERT IGNORE INTO vars (name, value, description) VALUES ('mobile_urlpath','/m','URL path for mobile static html files'); INSERT IGNORE INTO vars (name, value, description) VALUES ('enable_template_evalperl','0','Add "EVAL_PERL" to Template option to be able to use "PERL" and "RAWPERL" directives'); INSERT IGNORE INTO vars (name, value, description) VALUES ('related_cid_disabled','0','If set, then disable inserting cid to related story list'); UPDATE vars SET value='text/html; charset=UTF-8' WHERE name='content_type_webpage'; From svnnotify ¡÷ sourceforge.jp Thu Jun 19 17:20:27 2008 From: svnnotify ¡÷ sourceforge.jp (svnnotify ¡÷ sourceforge.jp) Date: Thu, 19 Jun 2008 17:20:27 +0900 Subject: [Slashdotjp-dev 1138] [665] Fix linkStory() for mobile mode Message-ID: <1213863627.251748.27587.nullmailer@users.sourceforge.jp> Revision: 665 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=slashdotjp&view=rev&rev=665 Author: tach Date: 2008-06-19 17:20:26 +0900 (Thu, 19 Jun 2008) Log Message: ----------- Fix linkStory() for mobile mode Modified Paths: -------------- slashjp/branches/2.5.0.192/Slash/Utility/Display/Display.pm slashjp/branches/2.5.0.192/debian/changelog -------------- next part -------------- Modified: slashjp/branches/2.5.0.192/Slash/Utility/Display/Display.pm =================================================================== --- slashjp/branches/2.5.0.192/Slash/Utility/Display/Display.pm 2008-06-19 07:19:42 UTC (rev 664) +++ slashjp/branches/2.5.0.192/Slash/Utility/Display/Display.pm 2008-06-19 08:20:26 UTC (rev 665) @@ -526,6 +526,7 @@ my $skin = $reader->getSkin($story_link->{skin}); $url = $skin->{rootdir} || $constants->{real_rootdir} || $gSkin->{rootdir}; + $url = $constants->{real_rootdir} if ($user->{mobile}); if (!$static && $dynamic) { $url .= "/$script?"; @@ -546,7 +547,11 @@ # but we would need to `mv articles mainpage`, or ln -s, and it just seems better # to me to keep the same URL scheme if possible my $skinname = $skin->{name} eq 'mainpage' ? 'articles' : $skin->{name}; - $url .= "/$skinname" unless ($url =~ /\/${skinname}$/); + if ($user->{mobile}) { + $skinname = $constants->{mobile_urlpath}; + $skinname =~ s/^\/*//; + } + $url .= "/$skinname" if ($skinname && $url !~ /\/${skinname}$/); $url .= "/" . ($story_link->{sid} || $story_ref->{sid}) . ".shtml"; # manually add the tid(s), if wanted if ($constants->{tids_in_urls} && $params{tids}) { Modified: slashjp/branches/2.5.0.192/debian/changelog =================================================================== --- slashjp/branches/2.5.0.192/debian/changelog 2008-06-19 07:19:42 UTC (rev 664) +++ slashjp/branches/2.5.0.192/debian/changelog 2008-06-19 08:20:26 UTC (rev 665) @@ -28,8 +28,9 @@ - Make same as mainpage story list * Change mobile mode default charset from Shift_JIS to UTF-8 * Fix to specify correct ssi include file for mobile mode + * Fix linkStory() for mobile mode - -- Taku YASUI Thu, 19 Jun 2008 07:18:22 +0000 + -- Taku YASUI Thu, 19 Jun 2008 08:11:19 +0000 slash (2.5.0.192-12) unstable; urgency=low From svnnotify ¡÷ sourceforge.jp Thu Jun 19 18:00:09 2008 From: svnnotify ¡÷ sourceforge.jp (svnnotify ¡÷ sourceforge.jp) Date: Thu, 19 Jun 2008 18:00:09 +0900 Subject: [Slashdotjp-dev 1139] [666] * Show mobile mode page when useragent matches " mobile_useragent_regex" Message-ID: <1213866009.535393.21574.nullmailer@users.sourceforge.jp> Revision: 666 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=slashdotjp&view=rev&rev=666 Author: tach Date: 2008-06-19 18:00:09 +0900 (Thu, 19 Jun 2008) Log Message: ----------- * Show mobile mode page when useragent matches "mobile_useragent_regex" Modified Paths: -------------- slashjp/branches/2.5.0.192/Slash/Apache/Apache.pm slashjp/branches/2.5.0.192/debian/changelog -------------- next part -------------- Modified: slashjp/branches/2.5.0.192/Slash/Apache/Apache.pm =================================================================== --- slashjp/branches/2.5.0.192/Slash/Apache/Apache.pm 2008-06-19 08:20:26 UTC (rev 665) +++ slashjp/branches/2.5.0.192/Slash/Apache/Apache.pm 2008-06-19 09:00:09 UTC (rev 666) @@ -394,6 +394,13 @@ if ($gSkin->{skid} == $constants->{mainpage_skid}) { $r->filename("$basedir/$base.shtml"); $r->uri("/$base.shtml"); + if ($constants->{mobile_enabled}) { + if (($constants->{mobile_useragent_regex} && + $r->header_in('user-agent') =~ $constants->{mobile_useragent_regex}) || + $r->args() =~ m{\bm=[1-9a-zA-Z]}) { + $r->uri($constants->{mobile_urlpath}."/$base.shtml"); + } + } } else { $r->filename("$basedir/$gSkin->{name}/$base.shtml"); $r->uri("/$gSkin->{name}/$base.shtml"); Modified: slashjp/branches/2.5.0.192/debian/changelog =================================================================== --- slashjp/branches/2.5.0.192/debian/changelog 2008-06-19 08:20:26 UTC (rev 665) +++ slashjp/branches/2.5.0.192/debian/changelog 2008-06-19 09:00:09 UTC (rev 666) @@ -29,8 +29,9 @@ * Change mobile mode default charset from Shift_JIS to UTF-8 * Fix to specify correct ssi include file for mobile mode * Fix linkStory() for mobile mode + * Show mobile mode page when useragent matches "mobile_useragent_regex" - -- Taku YASUI Thu, 19 Jun 2008 08:11:19 +0000 + -- Taku YASUI Thu, 19 Jun 2008 08:59:14 +0000 slash (2.5.0.192-12) unstable; urgency=low From svnnotify ¡÷ sourceforge.jp Thu Jun 19 18:52:07 2008 From: svnnotify ¡÷ sourceforge.jp (svnnotify ¡÷ sourceforge.jp) Date: Thu, 19 Jun 2008 18:52:07 +0900 Subject: [Slashdotjp-dev 1140] [667] * Redirect to mobile story page when mobile clients come to normal shtml Message-ID: <1213869127.786906.5269.nullmailer@users.sourceforge.jp> Revision: 667 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=slashdotjp&view=rev&rev=667 Author: tach Date: 2008-06-19 18:52:07 +0900 (Thu, 19 Jun 2008) Log Message: ----------- * Redirect to mobile story page when mobile clients come to normal shtml Modified Paths: -------------- slashjp/branches/2.5.0.192/Slash/Apache/Apache.pm slashjp/branches/2.5.0.192/debian/changelog -------------- next part -------------- Modified: slashjp/branches/2.5.0.192/Slash/Apache/Apache.pm =================================================================== --- slashjp/branches/2.5.0.192/Slash/Apache/Apache.pm 2008-06-19 09:00:09 UTC (rev 666) +++ slashjp/branches/2.5.0.192/Slash/Apache/Apache.pm 2008-06-19 09:52:07 UTC (rev 667) @@ -360,6 +360,20 @@ return DECLINED; } + # REDIRECT article page shtml for mobile mode + if ($uri !~ m|^$constants->{mobile_urlpath}/| && $uri =~ m|^/\w+/(\d{2}/\d{2}/\d{2}/\d{6,})\.shtml|) { + my $sid = $1; + if ($constants->{mobile_enabled}) { + if (($constants->{mobile_useragent_regex} && + $r->header_in('user-agent') =~ $constants->{mobile_useragent_regex}) || + $r->args() =~ m{\bm=[1-9a-zA-Z]}) { + my $newuri = $constants->{real_rootdir}.$constants->{mobile_urlpath}."/$sid.shtml"; + redirect($newuri); + return DONE; + } + } + } + # Comment this in if you want to try having this do the right # thing dynamically # my $slashdb = getCurrentDB(); Modified: slashjp/branches/2.5.0.192/debian/changelog =================================================================== --- slashjp/branches/2.5.0.192/debian/changelog 2008-06-19 09:00:09 UTC (rev 666) +++ slashjp/branches/2.5.0.192/debian/changelog 2008-06-19 09:52:07 UTC (rev 667) @@ -30,8 +30,9 @@ * Fix to specify correct ssi include file for mobile mode * Fix linkStory() for mobile mode * Show mobile mode page when useragent matches "mobile_useragent_regex" + * Redirect to mobile story page when mobile clients come to normal shtml - -- Taku YASUI Thu, 19 Jun 2008 08:59:14 +0000 + -- Taku YASUI Thu, 19 Jun 2008 09:51:05 +0000 slash (2.5.0.192-12) unstable; urgency=low From svnnotify ¡÷ sourceforge.jp Fri Jun 20 17:11:02 2008 From: svnnotify ¡÷ sourceforge.jp (svnnotify ¡÷ sourceforge.jp) Date: Fri, 20 Jun 2008 17:11:02 +0900 Subject: [Slashdotjp-dev 1141] [668] Allow "accesskey" attribute at linkStory() Message-ID: <1213949462.851446.20176.nullmailer@users.sourceforge.jp> Revision: 668 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=slashdotjp&view=rev&rev=668 Author: tach Date: 2008-06-20 17:11:02 +0900 (Fri, 20 Jun 2008) Log Message: ----------- Allow "accesskey" attribute at linkStory() Modified Paths: -------------- slashjp/branches/2.5.0.192/Slash/Utility/Display/Display.pm slashjp/branches/2.5.0.192/debian/changelog -------------- next part -------------- Modified: slashjp/branches/2.5.0.192/Slash/Utility/Display/Display.pm =================================================================== --- slashjp/branches/2.5.0.192/Slash/Utility/Display/Display.pm 2008-06-19 09:52:07 UTC (rev 667) +++ slashjp/branches/2.5.0.192/Slash/Utility/Display/Display.pm 2008-06-20 08:11:02 UTC (rev 668) @@ -565,7 +565,7 @@ } } - my @extra_attrs_allowed = qw( title class id ); + my @extra_attrs_allowed = qw( title class id accesskey ); if ($render) { my $rendered = ' Thu, 19 Jun 2008 09:51:05 +0000 + -- Taku YASUI Fri, 20 Jun 2008 08:10:20 +0000 slash (2.5.0.192-12) unstable; urgency=low From svnnotify ¡÷ sourceforge.jp Fri Jun 20 17:12:21 2008 From: svnnotify ¡÷ sourceforge.jp (svnnotify ¡÷ sourceforge.jp) Date: Fri, 20 Jun 2008 17:12:21 +0900 Subject: [Slashdotjp-dev 1142] [669] Fix: zero commentcount and hitparade Message-ID: <1213949541.528775.21828.nullmailer@users.sourceforge.jp> Revision: 669 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=slashdotjp&view=rev&rev=669 Author: tach Date: 2008-06-20 17:12:21 +0900 (Fri, 20 Jun 2008) Log Message: ----------- Fix: zero commentcount and hitparade Modified Paths: -------------- slashjp/branches/2.5.0.192/themes/slashcode/tasks/freshenup.pl -------------- next part -------------- Modified: slashjp/branches/2.5.0.192/themes/slashcode/tasks/freshenup.pl =================================================================== --- slashjp/branches/2.5.0.192/themes/slashcode/tasks/freshenup.pl 2008-06-20 08:11:02 UTC (rev 668) +++ slashjp/branches/2.5.0.192/themes/slashcode/tasks/freshenup.pl 2008-06-20 08:12:21 UTC (rev 669) @@ -324,7 +324,7 @@ # mobile mode if ($constants->{mobile_enabled} && $constants->{mobile_staticdir}) { my $filename_m = "$constants->{mobile_staticdir}/$sid.shtml"; - my $args_m = "$vu ssi=yes m=1 sid='$sid'$cchp_param"; + my $args_m = "$vu ssi=yes m=1 sid='$sid'"; my ($success_m, $stderr_text_m) = prog2file( "$basedir/article.pl", $filename_m, From svnnotify ¡÷ sourceforge.jp Fri Jun 20 17:42:55 2008 From: svnnotify ¡÷ sourceforge.jp (svnnotify ¡÷ sourceforge.jp) Date: Fri, 20 Jun 2008 17:42:55 +0900 Subject: [Slashdotjp-dev 1143] [670] [svn-buildpackage] Tagging slash (2.5.0.192-13) Message-ID: <1213951375.704952.19358.nullmailer@users.sourceforge.jp> Revision: 670 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=slashdotjp&view=rev&rev=670 Author: tach Date: 2008-06-20 17:42:55 +0900 (Fri, 20 Jun 2008) Log Message: ----------- [svn-buildpackage] Tagging slash (2.5.0.192-13) Added Paths: ----------- slashjp/tags/2.5.0.192-13/ -------------- next part -------------- Copied: slashjp/tags/2.5.0.192-13 (from rev 669, slashjp/branches/2.5.0.192) From svnnotify ¡÷ sourceforge.jp Fri Jun 20 22:09:33 2008 From: svnnotify ¡÷ sourceforge.jp (svnnotify ¡÷ sourceforge.jp) Date: Fri, 20 Jun 2008 22:09:33 +0900 Subject: [Slashdotjp-dev 1144] [671] * Fix to change commentsort for mobile mode from 5 to 4 Message-ID: <1213967373.669322.18442.nullmailer@users.sourceforge.jp> Revision: 671 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=slashdotjp&view=rev&rev=671 Author: tach Date: 2008-06-20 22:09:33 +0900 (Fri, 20 Jun 2008) Log Message: ----------- * Fix to change commentsort for mobile mode from 5 to 4 * Make to change commentsort, commentmode and commentlimitfor mobile mode using constants - commentsort = mobile_commentsort - commentlimit = mobile_commentlimit - mode = mobile_commentmode Modified Paths: -------------- slashjp/branches/2.5.0.192/Slash/Utility/Environment/Environment.pm slashjp/branches/2.5.0.192/debian/changelog slashjp/branches/2.5.0.192/sql/mysql/defaults.sql -------------- next part -------------- Modified: slashjp/branches/2.5.0.192/Slash/Utility/Environment/Environment.pm =================================================================== --- slashjp/branches/2.5.0.192/Slash/Utility/Environment/Environment.pm 2008-06-20 08:42:55 UTC (rev 670) +++ slashjp/branches/2.5.0.192/Slash/Utility/Environment/Environment.pm 2008-06-20 13:09:33 UTC (rev 671) @@ -1643,9 +1643,9 @@ # settings for mobile mode if ($user->{mobile}) { - $user->{mode} = 'flat'; # show flat - $user->{commentsort} = 5; # sorted by date desc - $user->{commentlimit} = 5; # comments per page + $user->{mode} = $constants->{mobile_commentmode} || 'flat'; # show flat + $user->{commentsort} = $constants->{mobile_commentsort} || 4; # sorted by date asc + $user->{commentlimit} = $constants->{mobile_commentlimit} || 5; # comments per page } } Modified: slashjp/branches/2.5.0.192/debian/changelog =================================================================== --- slashjp/branches/2.5.0.192/debian/changelog 2008-06-20 08:42:55 UTC (rev 670) +++ slashjp/branches/2.5.0.192/debian/changelog 2008-06-20 13:09:33 UTC (rev 671) @@ -1,3 +1,14 @@ +slash (2.5.0.192-14) unstable; urgency=low + + * Fix to change commentsort for mobile mode from 5 to 4 + * Make to change commentsort, commentmode and commentlimitfor mobile mode + using constants + - commentsort = mobile_commentsort + - commentlimit = mobile_commentlimit + - mode = mobile_commentmode + + -- Taku YASUI Fri, 20 Jun 2008 13:06:35 +0000 + slash (2.5.0.192-13) unstable; urgency=low * Fix: linkStory() add '?m=1' Modified: slashjp/branches/2.5.0.192/sql/mysql/defaults.sql =================================================================== --- slashjp/branches/2.5.0.192/sql/mysql/defaults.sql 2008-06-20 08:42:55 UTC (rev 670) +++ slashjp/branches/2.5.0.192/sql/mysql/defaults.sql 2008-06-20 13:09:33 UTC (rev 671) @@ -1148,6 +1148,9 @@ INSERT IGNORE INTO vars (name, value, description) VALUES ('mobile_encoding','utf8','Content encoding for mobile webpages (static html files)'); INSERT IGNORE INTO vars (name, value, description) VALUES ('mobile_staticdir','','Path for mobile static html files (disabled if empty)'); INSERT IGNORE INTO vars (name, value, description) VALUES ('mobile_urlpath','/m','URL path for mobile static html files'); +INSERT IGNORE INTO vars (name, value, description) VALUES ('mobile_commentsort','4','comment sort for mobile mode'); +INSERT IGNORE INTO vars (name, value, description) VALUES ('mobile_commentlimit','5','comment limit for mobile mode'); +INSERT IGNORE INTO vars (name, value, description) VALUES ('mobile_commentmode','flat','comment mode for mobile mode'); INSERT IGNORE INTO vars (name, value, description) VALUES ('enable_template_evalperl','0','Add "EVAL_PERL" to Template option to be able to use "PERL" and "RAWPERL" directives'); INSERT IGNORE INTO vars (name, value, description) VALUES ('related_cid_disabled','0','If set, then disable inserting cid to related story list'); UPDATE vars SET value='text/html; charset=UTF-8' WHERE name='content_type_webpage'; From svnnotify ¡÷ sourceforge.jp Mon Jun 23 13:05:40 2008 From: svnnotify ¡÷ sourceforge.jp (svnnotify ¡÷ sourceforge.jp) Date: Mon, 23 Jun 2008 13:05:40 +0900 Subject: [Slashdotjp-dev 1145] [672] Fix: redirect url when ('?m=1') has been appended Message-ID: <1214193940.392110.13355.nullmailer@users.sourceforge.jp> Revision: 672 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=slashdotjp&view=rev&rev=672 Author: tach Date: 2008-06-23 13:05:40 +0900 (Mon, 23 Jun 2008) Log Message: ----------- Fix: redirect url when ('?m=1') has been appended Modified Paths: -------------- slashjp/branches/2.5.0.192/Slash/Utility/Data/Data.pm slashjp/branches/2.5.0.192/debian/changelog -------------- next part -------------- Modified: slashjp/branches/2.5.0.192/Slash/Utility/Data/Data.pm =================================================================== --- slashjp/branches/2.5.0.192/Slash/Utility/Data/Data.pm 2008-06-20 13:09:33 UTC (rev 671) +++ slashjp/branches/2.5.0.192/Slash/Utility/Data/Data.pm 2008-06-23 04:05:40 UTC (rev 672) @@ -414,12 +414,15 @@ sub cleanRedirectUrl { my($redirect) = @_; my $gSkin = getCurrentSkin(); + my $form = getCurrentForm(); + my $rurl = $gSkin->{rootdir}; + $rurl .= '?m=1' if ($form->{m}); if (urlFromSite($redirect)) { my $base = root2abs(); - return URI->new_abs($redirect || $gSkin->{rootdir}, $base); + return URI->new_abs($redirect || $rurl, $base); } else { - return url2abs($gSkin->{rootdir}); + return url2abs($rurl); } } Modified: slashjp/branches/2.5.0.192/debian/changelog =================================================================== --- slashjp/branches/2.5.0.192/debian/changelog 2008-06-20 13:09:33 UTC (rev 671) +++ slashjp/branches/2.5.0.192/debian/changelog 2008-06-23 04:05:40 UTC (rev 672) @@ -6,8 +6,9 @@ - commentsort = mobile_commentsort - commentlimit = mobile_commentlimit - mode = mobile_commentmode + * Fix: redirect url when ('?m=1') has been appended - -- Taku YASUI Fri, 20 Jun 2008 13:06:35 +0000 + -- Taku YASUI Mon, 23 Jun 2008 04:04:52 +0000 slash (2.5.0.192-13) unstable; urgency=low From svnnotify ¡÷ sourceforge.jp Mon Jun 23 16:46:00 2008 From: svnnotify ¡÷ sourceforge.jp (svnnotify ¡÷ sourceforge.jp) Date: Mon, 23 Jun 2008 16:46:00 +0900 Subject: [Slashdotjp-dev 1146] [673] Add "discussion" variable for printCommComments template Message-ID: <1214207160.182825.23725.nullmailer@users.sourceforge.jp> Revision: 673 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=slashdotjp&view=rev&rev=673 Author: tach Date: 2008-06-23 16:46:00 +0900 (Mon, 23 Jun 2008) Log Message: ----------- Add "discussion" variable for printCommComments template Modified Paths: -------------- slashjp/branches/2.5.0.192/Slash/Slash.pm slashjp/branches/2.5.0.192/debian/changelog -------------- next part -------------- Modified: slashjp/branches/2.5.0.192/Slash/Slash.pm =================================================================== --- slashjp/branches/2.5.0.192/Slash/Slash.pm 2008-06-23 04:05:40 UTC (rev 672) +++ slashjp/branches/2.5.0.192/Slash/Slash.pm 2008-06-23 07:46:00 UTC (rev 673) @@ -1065,6 +1065,7 @@ lvl => $lvl, discussion2 => $discussion2, anon_dump => $anon_dump, + discussion => $discussion, }, { Return => 1 }); # We have to get the comment text we need (later we'll search/replace Modified: slashjp/branches/2.5.0.192/debian/changelog =================================================================== --- slashjp/branches/2.5.0.192/debian/changelog 2008-06-23 04:05:40 UTC (rev 672) +++ slashjp/branches/2.5.0.192/debian/changelog 2008-06-23 07:46:00 UTC (rev 673) @@ -7,8 +7,9 @@ - commentlimit = mobile_commentlimit - mode = mobile_commentmode * Fix: redirect url when ('?m=1') has been appended + * Add "discussion" variable for printCommComments template - -- Taku YASUI Mon, 23 Jun 2008 04:04:52 +0000 + -- Taku YASUI Mon, 23 Jun 2008 07:45:17 +0000 slash (2.5.0.192-13) unstable; urgency=low From svnnotify ¡÷ sourceforge.jp Thu Jun 26 18:08:37 2008 From: svnnotify ¡÷ sourceforge.jp (svnnotify ¡÷ sourceforge.jp) Date: Thu, 26 Jun 2008 18:08:37 +0900 Subject: [Slashdotjp-dev 1147] [674] more rich like slashdot.jp real site Message-ID: <1214471317.403762.4643.nullmailer@users.sourceforge.jp> Revision: 674 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=slashdotjp&view=rev&rev=674 Author: tach Date: 2008-06-26 18:08:37 +0900 (Thu, 26 Jun 2008) Log Message: ----------- more rich like slashdot.jp real site Modified Paths: -------------- images/css/m.css -------------- next part -------------- Modified: images/css/m.css =================================================================== --- images/css/m.css 2008-06-23 07:46:00 UTC (rev 673) +++ images/css/m.css 2008-06-26 09:08:37 UTC (rev 674) @@ -20,6 +20,9 @@ border-left: 3px solid #DDD; padding-left: 0.3em; margin-left: 0.5em; + margin-right: 0; + margin-top: 0.2em; + margin-bottom: 0.2em; display: block; } @@ -55,3 +58,51 @@ height: auto; width: auto; } + +div.contentsbody { + margin: 0.2em; +} + +div.article { + margin: 0.5em 0; +} + +div.toptitle, +div.article div.title { + margin: 0; + padding: 0; + border-bottom: 1px solid #fff; + background: #044 url(//images.slashdot.jp/article-title-bg.png) repeat-x left top; + color: #FFF; +} +div.toptitle div.tt, +div.article div.title div.tt { + color: #fff; + padding-left: 6px; + padding-top: 0.1em; + padding-bottom: 0.1em; + font-weight: bold; + background: url(//images.slashdot.jp/article-title-left.png) no-repeat left top; +} +div.article div.title div.tt a, +div.article div.title div.tt a:visited { + color: #fff; +} +div.article div.title div.details { + background: #DDD; + color: #000; + padding-left: 6px; + padding-top: 2px; + padding-bottom: 2px; +} +div.storylinks { + padding-left: 6px; + margin: 0.5em 0; + background: url(//images.slashdot.jp/storylinks-bg.png) repeat-x left bottom; +} +div.storylinks div.links { + background: url(//images.slashdot.jp/storylinks-right.png) no-repeat right bottom; + padding-top: 5px; + padding-bottom: 3px; + padding-right: 6px; +} From svnnotify ¡÷ sourceforge.jp Thu Jun 26 18:28:45 2008 From: svnnotify ¡÷ sourceforge.jp (svnnotify ¡÷ sourceforge.jp) Date: Thu, 26 Jun 2008 18:28:45 +0900 Subject: [Slashdotjp-dev 1148] [675] * enable to show divided top journal pages Message-ID: <1214472525.913958.22446.nullmailer@users.sourceforge.jp> Revision: 675 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=slashdotjp&view=rev&rev=675 Author: tach Date: 2008-06-26 18:28:45 +0900 (Thu, 26 Jun 2008) Log Message: ----------- * enable to show divided top journal pages - top_recent - top_posters - top_friends * add "start" parameter for $journal->top() and $journal->topRecent() - due to enable pagination for top journals Modified Paths: -------------- slashjp/branches/2.5.0.192/plugins/Journal/Journal.pm slashjp/branches/2.5.0.192/plugins/Journal/journal.pl -------------- next part -------------- Modified: slashjp/branches/2.5.0.192/plugins/Journal/Journal.pm =================================================================== --- slashjp/branches/2.5.0.192/plugins/Journal/Journal.pm 2008-06-26 09:08:37 UTC (rev 674) +++ slashjp/branches/2.5.0.192/plugins/Journal/Journal.pm 2008-06-26 09:28:45 UTC (rev 675) @@ -295,15 +295,16 @@ } sub top { - my($self, $limit) = @_; + my($self, $limit, $start) = @_; $limit ||= getCurrentStatic('journal_top') || 10; + $start ||= 0; $self->sqlConnect; my $sql = <{_dbh}->selectall_arrayref($sql); @@ -323,8 +324,9 @@ } sub topRecent { - my($self, $limit) = @_; + my($self, $limit, $start) = @_; $limit ||= getCurrentStatic('journal_top') || 10; + $start ||= 0; $self->sqlConnect; my $sql = <{_dbh}->selectall_arrayref($sql); Modified: slashjp/branches/2.5.0.192/plugins/Journal/journal.pl =================================================================== --- slashjp/branches/2.5.0.192/plugins/Journal/journal.pl 2008-06-26 09:08:37 UTC (rev 674) +++ slashjp/branches/2.5.0.192/plugins/Journal/journal.pl 2008-06-26 09:28:45 UTC (rev 675) @@ -68,6 +68,9 @@ list => [ 1, \&listArticle ], display => [ 1, \&displayArticle ], top => [ $top_ok, \&displayTop ], + top_posters => [ $top_ok, \&displayTop ], + top_friend => [ $top_ok, \&displayTop ], + top_recent => [ $top_ok, \&displayTop ], searchusers => [ 1, \&searchUsers ], friends => [ 1, \&displayFriends ], friendview => [ 1, \&displayArticleFriends ], @@ -117,20 +120,23 @@ my $journals; _printHead('mainhead') or return; + my $start = $form->{start} || 0; # this should probably be in a separate template, so the site admins # can select the order themselves -- pudge - if ($constants->{journal_top_recent}) { - $journals = $journal_reader->topRecent; + if ($constants->{journal_top_recent} && $form->{op} =~ /^top(_recent)?$/) { + $journals = $user->{mobile} ? $journal_reader->topRecent($constants->{mobile_top_journal_count} || 10, $start) + : $journal_reader->topRecent; slashDisplay('journaltop', { journals => $journals, type => 'recent' }); } - if ($constants->{journal_top_posters}) { - $journals = $journal_reader->top; + if ($constants->{journal_top_posters} && $form->{op} =~ /^top(_posters)?$/) { + $journals = $user->{mobile} ? $journal_reader->top($constants->{mobile_top_journal_count} || 10, $start) + : $journal_reader->top; slashDisplay('journaltop', { journals => $journals, type => 'top' }); } - if ($constants->{journal_top_friend}) { + if ($constants->{journal_top_friend} && $form->{op} =~ /^top(_friend)?$/) { my $zoo = getObject('Slash::Zoo'); $journals = $zoo->topFriends; slashDisplay('journaltop', { journals => $journals, type => 'friend' }); @@ -526,6 +532,7 @@ push @sorted_articles, $collection; my $theme = _checkTheme($form->{theme} || $journal_reader->getUser($uid, 'journal_theme')); + $theme = 'mobile' if ($user->{mobile}); my $show_discussion = $form->{id} && !$constants->{journal_no_comments_item} && $discussion; my $zoo = getObject('Slash::Zoo'); From svnnotify ¡÷ sourceforge.jp Thu Jun 26 18:46:05 2008 From: svnnotify ¡÷ sourceforge.jp (svnnotify ¡÷ sourceforge.jp) Date: Thu, 26 Jun 2008 18:46:05 +0900 Subject: [Slashdotjp-dev 1149] [676] * add debian/changelog entry about previous commit Message-ID: <1214473565.227437.5971.nullmailer@users.sourceforge.jp> Revision: 676 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=slashdotjp&view=rev&rev=676 Author: tach Date: 2008-06-26 18:46:05 +0900 (Thu, 26 Jun 2008) Log Message: ----------- * add debian/changelog entry about previous commit * Add new url for userdir_handler - Add "/journals" URL Modified Paths: -------------- slashjp/branches/2.5.0.192/Slash/Apache/User/User.pm slashjp/branches/2.5.0.192/debian/changelog -------------- next part -------------- Modified: slashjp/branches/2.5.0.192/Slash/Apache/User/User.pm =================================================================== --- slashjp/branches/2.5.0.192/Slash/Apache/User/User.pm 2008-06-26 09:28:45 UTC (rev 675) +++ slashjp/branches/2.5.0.192/Slash/Apache/User/User.pm 2008-06-26 09:46:05 UTC (rev 676) @@ -592,6 +592,18 @@ return OK; } + # journals for slashdot.jp + if ($uri =~ m[^/journals (?: /([^?]*) | /? ) (?: \?(.*) )? $]x) { + my($word, $query) = ($1, $2); + my @args = ($query); + $word =~ s{/}{_}g; + push @args, "op=$word" if ($word); + $r->args(join('&', @args)); + $r->uri('/journal.pl'); + $r->filename($constants->{basedir} . '/journal.pl'); + return OK; + } + # for self-references (/~/ and /my/) if (($saveuri =~ m[^/(?:%7[eE]|~)] && $uri =~ m[^/~ (?: /(.*) | /? ) $]x) # /my/ or /my can match, but not /mything Modified: slashjp/branches/2.5.0.192/debian/changelog =================================================================== --- slashjp/branches/2.5.0.192/debian/changelog 2008-06-26 09:28:45 UTC (rev 675) +++ slashjp/branches/2.5.0.192/debian/changelog 2008-06-26 09:46:05 UTC (rev 676) @@ -8,8 +8,16 @@ - mode = mobile_commentmode * Fix: redirect url when ('?m=1') has been appended * Add "discussion" variable for printCommComments template + * enable to show divided top journal pages + - top_recent + - top_posters + - top_friends + * add "start" parameter for $journal->top() and $journal->topRecent() + - for enabling pagination for top journals + * Add new url for userdir_handler + - Add "/journals" URL - -- Taku YASUI Mon, 23 Jun 2008 07:45:17 +0000 + -- Taku YASUI Thu, 26 Jun 2008 09:45:09 +0000 slash (2.5.0.192-13) unstable; urgency=low From svnnotify ¡÷ sourceforge.jp Thu Jun 26 19:19:47 2008 From: svnnotify ¡÷ sourceforge.jp (svnnotify ¡÷ sourceforge.jp) Date: Thu, 26 Jun 2008 19:19:47 +0900 Subject: [Slashdotjp-dev 1150] [677] fix for pagination (cont.) Message-ID: <1214475587.852064.836.nullmailer@users.sourceforge.jp> Revision: 677 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=slashdotjp&view=rev&rev=677 Author: tach Date: 2008-06-26 19:19:47 +0900 (Thu, 26 Jun 2008) Log Message: ----------- fix for pagination (cont.) Modified Paths: -------------- slashjp/branches/2.5.0.192/plugins/Journal/journal.pl -------------- next part -------------- Modified: slashjp/branches/2.5.0.192/plugins/Journal/journal.pl =================================================================== --- slashjp/branches/2.5.0.192/plugins/Journal/journal.pl 2008-06-26 09:46:05 UTC (rev 676) +++ slashjp/branches/2.5.0.192/plugins/Journal/journal.pl 2008-06-26 10:19:47 UTC (rev 677) @@ -121,19 +121,29 @@ _printHead('mainhead') or return; my $start = $form->{start} || 0; + my $limit = $user->{mobile} ? $constants->{mobile_top_journal_count} || 10 + : $constants->{'journal_top'} || 10; # this should probably be in a separate template, so the site admins # can select the order themselves -- pudge if ($constants->{journal_top_recent} && $form->{op} =~ /^top(_recent)?$/) { - $journals = $user->{mobile} ? $journal_reader->topRecent($constants->{mobile_top_journal_count} || 10, $start) - : $journal_reader->topRecent; - slashDisplay('journaltop', { journals => $journals, type => 'recent' }); + $journals = $journal_reader->topRecent($limit, $start); + slashDisplay('journaltop', { + journals => $journals, + type => 'recent', + start => $start, + limit => $limit, + }); } if ($constants->{journal_top_posters} && $form->{op} =~ /^top(_posters)?$/) { - $journals = $user->{mobile} ? $journal_reader->top($constants->{mobile_top_journal_count} || 10, $start) - : $journal_reader->top; - slashDisplay('journaltop', { journals => $journals, type => 'top' }); + $journals = $journal_reader->top($limit, $start); + slashDisplay('journaltop', { + journals => $journals, + type => 'top', + start => $start, + limit => $limit, + }); } if ($constants->{journal_top_friend} && $form->{op} =~ /^top(_friend)?$/) { From svnnotify ¡÷ sourceforge.jp Fri Jun 27 16:05:08 2008 From: svnnotify ¡÷ sourceforge.jp (svnnotify ¡÷ sourceforge.jp) Date: Fri, 27 Jun 2008 16:05:08 +0900 Subject: [Slashdotjp-dev 1151] [678] * Add next and previous journal data to journal Message-ID: <1214550308.156456.810.nullmailer@users.sourceforge.jp> Revision: 678 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=slashdotjp&view=rev&rev=678 Author: tach Date: 2008-06-27 16:05:07 +0900 (Fri, 27 Jun 2008) Log Message: ----------- * Add next and previous journal data to journal - use $journal_reader->getJournalByTime() * Disable to show comments when mobile mode Modified Paths: -------------- slashjp/branches/2.5.0.192/debian/changelog slashjp/branches/2.5.0.192/plugins/Journal/Journal.pm slashjp/branches/2.5.0.192/plugins/Journal/journal.pl -------------- next part -------------- Modified: slashjp/branches/2.5.0.192/debian/changelog =================================================================== --- slashjp/branches/2.5.0.192/debian/changelog 2008-06-26 10:19:47 UTC (rev 677) +++ slashjp/branches/2.5.0.192/debian/changelog 2008-06-27 07:05:07 UTC (rev 678) @@ -16,8 +16,11 @@ - for enabling pagination for top journals * Add new url for userdir_handler - Add "/journals" URL + * Add next and previous journal data to journal + - use $journal_reader->getJournalByTime() + * Disable to show comments when mobile mode - -- Taku YASUI Thu, 26 Jun 2008 09:45:09 +0000 + -- Taku YASUI Fri, 27 Jun 2008 07:03:00 +0000 slash (2.5.0.192-13) unstable; urgency=low Modified: slashjp/branches/2.5.0.192/plugins/Journal/Journal.pm =================================================================== --- slashjp/branches/2.5.0.192/plugins/Journal/Journal.pm 2008-06-26 10:19:47 UTC (rev 677) +++ slashjp/branches/2.5.0.192/plugins/Journal/Journal.pm 2008-06-27 07:05:07 UTC (rev 678) @@ -697,7 +697,39 @@ } } +sub getJournalByTime { + my($self, $sign, $journal, $options) = @_; + my $constants = getCurrentStatic(); + $options = {} if !$options || ref($options) ne 'HASH'; + my $limit = $options->{limit} || 1; + my $uid = int($options->{uid}) || undef; + my $where = ""; + my $name = 'journal_by_time'; + my $order = $sign eq '<' ? 'DESC' : 'ASC'; + # $journal->[0]: datetime string + # $journal->{1]: journaltext + # $journal->{2]: journaltitle + # $journal->[3]: journal_id + # $journal->[4]: format_id + # $journal->[5]: topic_id + # $journal->[6]: discussion_id + + if ($uid) { + $where .= " AND uid=$uid"; + } + + my $returnable = $self->sqlSelectArrayRef( + 'date, article, description, id, posttype, tid, discussion', + 'journals JOIN journals_text USING (id)', + "date $sign '$journal->[0]' + AND date <= NOW() + $where", + "ORDER by date $order LIMIT $limit" + ); + return $returnable; +} + sub DESTROY { my($self) = @_; $self->{_dbh}->disconnect if !$ENV{GATEWAY_INTERFACE} && $self->{_dbh}; Modified: slashjp/branches/2.5.0.192/plugins/Journal/journal.pl =================================================================== --- slashjp/branches/2.5.0.192/plugins/Journal/journal.pl 2008-06-26 10:19:47 UTC (rev 677) +++ slashjp/branches/2.5.0.192/plugins/Journal/journal.pl 2008-06-27 07:05:07 UTC (rev 678) @@ -428,6 +428,7 @@ my $collection = {}; my $user_change = {}; my $head_data = {}; + my ($prev, $next); my $slashdb = getCurrentDB(); @@ -518,6 +519,8 @@ $commentcount = $article->[6] ? $discussion->{commentcount} : 0; + $next = $journal_reader->getJournalByTime('>', $article, { uid => $uid }); + $prev = $journal_reader->getJournalByTime('<', $article, { uid => $uid }); } else { $commentcount = $article->[6] ? $journal_reader->getDiscussion($article->[6], 'commentcount') @@ -537,6 +540,8 @@ discussion => $article->[6], id => $article->[3], commentcount => $commentcount, + prev => $prev, + next => $next, }; } @@ -558,7 +563,7 @@ print getData('journalfoot'); - if ($show_discussion) { + if (!$user->{mobile} && $show_discussion) { printComments($discussion); } From svnnotify ¡÷ sourceforge.jp Fri Jun 27 16:55:41 2008 From: svnnotify ¡÷ sourceforge.jp (svnnotify ¡÷ sourceforge.jp) Date: Fri, 27 Jun 2008 16:55:41 +0900 Subject: [Slashdotjp-dev 1152] [679] * upside down next_prev issue for journal Message-ID: <1214553341.449166.12659.nullmailer@users.sourceforge.jp> Revision: 679 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=slashdotjp&view=rev&rev=679 Author: tach Date: 2008-06-27 16:55:41 +0900 (Fri, 27 Jun 2008) Log Message: ----------- * upside down next_prev issue for journal * use Hash instead Array at getJournalByTime() Modified Paths: -------------- slashjp/branches/2.5.0.192/plugins/Journal/Journal.pm slashjp/branches/2.5.0.192/plugins/Journal/journal.pl -------------- next part -------------- Modified: slashjp/branches/2.5.0.192/plugins/Journal/Journal.pm =================================================================== --- slashjp/branches/2.5.0.192/plugins/Journal/Journal.pm 2008-06-27 07:05:07 UTC (rev 678) +++ slashjp/branches/2.5.0.192/plugins/Journal/Journal.pm 2008-06-27 07:55:41 UTC (rev 679) @@ -719,7 +719,7 @@ $where .= " AND uid=$uid"; } - my $returnable = $self->sqlSelectArrayRef( + my $returnable = $self->sqlSelectHashref( 'date, article, description, id, posttype, tid, discussion', 'journals JOIN journals_text USING (id)', "date $sign '$journal->[0]' Modified: slashjp/branches/2.5.0.192/plugins/Journal/journal.pl =================================================================== --- slashjp/branches/2.5.0.192/plugins/Journal/journal.pl 2008-06-27 07:05:07 UTC (rev 678) +++ slashjp/branches/2.5.0.192/plugins/Journal/journal.pl 2008-06-27 07:55:41 UTC (rev 679) @@ -519,8 +519,8 @@ $commentcount = $article->[6] ? $discussion->{commentcount} : 0; - $next = $journal_reader->getJournalByTime('>', $article, { uid => $uid }); - $prev = $journal_reader->getJournalByTime('<', $article, { uid => $uid }); + $prev = $journal_reader->getJournalByTime('>', $article, { uid => $uid }); + $next = $journal_reader->getJournalByTime('<', $article, { uid => $uid }); } else { $commentcount = $article->[6] ? $journal_reader->getDiscussion($article->[6], 'commentcount') From svnnotify ¡÷ sourceforge.jp Sat Jun 28 02:22:53 2008 From: svnnotify ¡÷ sourceforge.jp (svnnotify ¡÷ sourceforge.jp) Date: Sat, 28 Jun 2008 02:22:53 +0900 Subject: [Slashdotjp-dev 1153] [680] [svn-buildpackage] Tagging slash (2.5.0.192-14) Message-ID: <1214587373.384418.21403.nullmailer@users.sourceforge.jp> Revision: 680 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=slashdotjp&view=rev&rev=680 Author: tach Date: 2008-06-28 02:22:53 +0900 (Sat, 28 Jun 2008) Log Message: ----------- [svn-buildpackage] Tagging slash (2.5.0.192-14) Added Paths: ----------- slashjp/tags/2.5.0.192-14/ -------------- next part -------------- Copied: slashjp/tags/2.5.0.192-14 (from rev 679, slashjp/branches/2.5.0.192)