[geeklog-cvs] Geeklog-1.x/system lib-story.php,1.121,1.122
Dirk Haun
dhaun at qs1489.pair.com
Sat Feb 16 17:18:16 EST 2008
Update of /cvsroot/geeklog/Geeklog-1.x/system
In directory qs1489.pair.com:/tmp/cvs-serv22147/system
Modified Files:
lib-story.php
Log Message:
Minor improvement for my own convenience: When displaying an article with a highlighted search query, make the story title a link again (to the same article without the query)
Index: lib-story.php
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/system/lib-story.php,v
retrieving revision 1.121
retrieving revision 1.122
diff -C2 -d -r1.121 -r1.122
*** lib-story.php 5 Jan 2008 16:00:59 -0000 1.121
--- lib-story.php 16 Feb 2008 22:18:14 -0000 1.122
***************
*** 200,204 ****
$articleUrl = COM_buildUrl($_CONF['site_url'] . '/article.php?story='
. $story->getSid());
- $article->set_var('story_title_link', $story->DisplayElements('title'));
$article->set_var('story_title', $story->DisplayElements('title'));
$article->set_var('lang_permalink', $LANG01[127]);
--- 200,203 ----
***************
*** 207,210 ****
--- 206,223 ----
// n = 'Compact display' for list of stories. p = 'Preview' mode.
+
+ if ((($index != 'n') && ($index != 'p')) || !empty($query)) {
+ $article->set_var( 'start_storylink_anchortag', '<a href="'
+ . $articleUrl . '" class="non-ul">' );
+ $article->set_var( 'end_storylink_anchortag', '</a>' );
+ $article->set_var( 'story_title_link',
+ COM_createLink(
+ $story->DisplayElements('title'),
+ $articleUrl,
+ array('class'=>'non-ul')
+ )
+ );
+ }
+
if(( $index == 'n' ) || ( $index == 'p' ))
{
***************
*** 310,324 ****
$article->set_var('read_more_class', 'class="story-read-more-link"');
}
-
- $article->set_var( 'start_storylink_anchortag', '<a href="'
- . $articleUrl . '" class="non-ul">' );
- $article->set_var( 'end_storylink_anchortag', '</a>' );
- $article->set_var( 'story_title_link',
- COM_createLink(
- $story->DisplayElements('title'),
- $articleUrl,
- array('class'=>'non-ul')
- )
- );
if(( $story->DisplayElements('commentcode') >= 0 ) and ( $show_comments ))
--- 323,326 ----
More information about the geeklog-cvs
mailing list