[geeklog-hg] geeklog: Merged with upstream
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Thu Jan 9 06:55:40 EST 2014
changeset 9405:7109dae4fd86
url: http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/7109dae4fd86
user: Kenji ITO <mystralkk at gmail.com>
date: Thu Jan 09 20:54:49 2014 +0900
description:
Merged with upstream
diffstat:
public_html/article.php | 2 +-
public_html/docs/english/theme.html | 1 +
public_html/layout/denim/topicrelated.thtml | 12 +++++++++
public_html/layout/modern_curve/topicrelated.thtml | 12 +++++++++
public_html/layout/professional/topicrelated.thtml | 12 +++++++++
public_html/layout/professional_css/topicrelated.thtml | 12 +++++++++
system/lib-topic.php | 23 ++++++++++++++---
7 files changed, 69 insertions(+), 5 deletions(-)
diffs (126 lines):
diff -r f6fa82043496 -r 7109dae4fd86 public_html/article.php
--- a/public_html/article.php Thu Jan 09 14:33:01 2014 +0900
+++ b/public_html/article.php Thu Jan 09 20:54:49 2014 +0900
@@ -391,8 +391,8 @@
$story_page = 1;
} else {
$story_page = $mode;
+ $mode = '';
}
- $mode = '';
if( $story_page <= 0 ) {
$story_page = 1;
diff -r f6fa82043496 -r 7109dae4fd86 public_html/docs/english/theme.html
--- a/public_html/docs/english/theme.html Thu Jan 09 14:33:01 2014 +0900
+++ b/public_html/docs/english/theme.html Thu Jan 09 20:54:49 2014 +0900
@@ -204,6 +204,7 @@
<ul>
<li>Added the template variable {related_topics} to <tt>featuredstorytext.thtml</tt> and <tt>storytext.thtml</tt></li>li>
+<li>Added <tt>topicrelated.thtml</tt> which displays related topics for articles.</li>
<li>Removed <tt>topicoption.thtml</tt> and <tt>topicoption_off.thtml</tt>.
Added <tt>topicnavigation.thtml</tt> which uses blocks to reduce the number of template files.</li>
<li>Renamed <tt>page_navigation.thtml</tt> to <tt>pagenavigation.thtml</tt>
diff -r f6fa82043496 -r 7109dae4fd86 public_html/layout/denim/topicrelated.thtml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/public_html/layout/denim/topicrelated.thtml Thu Jan 09 20:54:49 2014 +0900
@@ -0,0 +1,12 @@
+{# begin {templatelocation} - Related Topics uses template blocks which is built into this file #}
+
+<div class="related-topics">{lang_filed_under} {topics}</div>
+
+{# end {templatelocation} #}
+
+<!-- BEGIN topicitem -->
+<a href="{topic_url}">{topic}</a>
+<!-- END topicitem -->
+<!-- BEGIN separator -->
+ 
+<!-- END separator -->
diff -r f6fa82043496 -r 7109dae4fd86 public_html/layout/modern_curve/topicrelated.thtml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/public_html/layout/modern_curve/topicrelated.thtml Thu Jan 09 20:54:49 2014 +0900
@@ -0,0 +1,12 @@
+{# begin {templatelocation} - Related Topics uses template blocks which is built into this file #}
+
+<div class="related-topics">{lang_filed_under} {topics}</div>
+
+{# end {templatelocation} #}
+
+<!-- BEGIN topicitem -->
+<a href="{topic_url}">{topic}</a>
+<!-- END topicitem -->
+<!-- BEGIN separator -->
+ 
+<!-- END separator -->
diff -r f6fa82043496 -r 7109dae4fd86 public_html/layout/professional/topicrelated.thtml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/public_html/layout/professional/topicrelated.thtml Thu Jan 09 20:54:49 2014 +0900
@@ -0,0 +1,12 @@
+{# begin {templatelocation} - Related Topics uses template blocks which is built into this file #}
+
+<div class="related-topics">{lang_filed_under} {topics}</div>
+
+{# end {templatelocation} #}
+
+<!-- BEGIN topicitem -->
+<a href="{topic_url}">{topic}</a>
+<!-- END topicitem -->
+<!-- BEGIN separator -->
+ 
+<!-- END separator -->
diff -r f6fa82043496 -r 7109dae4fd86 public_html/layout/professional_css/topicrelated.thtml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/public_html/layout/professional_css/topicrelated.thtml Thu Jan 09 20:54:49 2014 +0900
@@ -0,0 +1,12 @@
+{# begin {templatelocation} - Related Topics uses template blocks which is built into this file #}
+
+<div class="related-topics">{lang_filed_under} {topics}</div>
+
+{# end {templatelocation} #}
+
+<!-- BEGIN topicitem -->
+<a href="{topic_url}">{topic}</a>
+<!-- END topicitem -->
+<!-- BEGIN separator -->
+ 
+<!-- END separator -->
diff -r f6fa82043496 -r 7109dae4fd86 system/lib-topic.php
--- a/system/lib-topic.php Thu Jan 09 14:33:01 2014 +0900
+++ b/system/lib-topic.php Thu Jan 09 20:54:49 2014 +0900
@@ -1505,15 +1505,30 @@
$result = DB_query($sql);
$nrows = DB_numRows($result);
if ($nrows > 0) {
- $retval = '<div class="related-topics">' . $LANG27['filed_under:'];
+ $topicrelated = COM_newTemplate($_CONF['path_layout']);
+ $topicrelated->set_file( array(
+ 'topicrelated' => 'topicrelated.thtml'
+ ));
+ $blocks = array('topic', 'separator');
+ foreach ($blocks as $block) {
+ $topicrelated->set_block('menunavigation', $block);
+ }
+
+ $topicrelated->set_var('lang_filed_under', $LANG27['filed_under:']);
for ($i = 0; $i < $nrows; $i++) {
$A = DB_fetchArray($result);
- $url = $_CONF['site_url'] . '/index.php?topic=' . $A['tid'];
+ $url = $_CONF['site_url'] . '/index.php?topic=' . $A['tid'];
- $retval .= ' <a href="' . $url . '">' . $A['topic'] . '</a>';
+ $topicrelated->set_var('topic_url', $url);
+ $topicrelated->set_var('topic', $A['topic']);
+
+ $topicrelated->parse('topics', 'topicitem', true);
+ if (($i+1) < $nrows) {
+ $topicrelated->parse('topics', 'separator', true);
+ }
}
- $retval .= '</div>';
+ $retval = $topicrelated->finish($topicrelated->parse('topicrelated', 'topicrelated'));
}
return $retval;
More information about the geeklog-cvs
mailing list