[geeklog-cvs] geeklog: Reinstated old definitions of the {start_contributedby_...
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Sun Mar 1 04:19:27 EST 2009
details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/40ee788859dc
changeset: 6809:40ee788859dc
user: Dirk Haun <dirk at haun-online.de>
date: Sun Mar 01 09:38:38 2009 +0100
description:
Reinstated old definitions of the {start_contributedby_anchortag}, {end_contributedby_anchortag}, and {contributedby_author} variables (bug #0000821)
diffstat:
4 files changed, 29 insertions(+), 9 deletions(-)
public_html/docs/history | 4 ++++
public_html/docs/theme.html | 8 ++++++++
public_html/docs/themevars.html | 5 +++++
system/lib-story.php | 21 ++++++++++++---------
diffs (81 lines):
diff -r b1a61ff147cb -r 40ee788859dc public_html/docs/history
--- a/public_html/docs/history Sat Feb 28 22:58:46 2009 +0100
+++ b/public_html/docs/history Sun Mar 01 09:38:38 2009 +0100
@@ -11,6 +11,10 @@
+ (TBD) Comment moderation and editable comments, by Jared Wenerd
Other changes:
+- Reinstated old definitions of the {start_contributedby_anchortag},
+ {end_contributedby_anchortag}, and {contributedby_author} variables, i.e. the
+ two anchortag variables are set again and _author contains the name only (bug
+ #0000821) [Dirk]
- Auto-deleting a story didn't delete trackbacks for that story [Dirk]
- Ensure consistent template variable names for the Permission Editor [Dirk]
- Added new permission 'group.assign', now required to be able to assign a user
diff -r b1a61ff147cb -r 40ee788859dc public_html/docs/theme.html
--- a/public_html/docs/theme.html Sat Feb 28 22:58:46 2009 +0100
+++ b/public_html/docs/theme.html Sun Mar 01 09:38:38 2009 +0100
@@ -198,6 +198,14 @@
<h2><a name="changes">Theme changes in Geeklog 1.6.0</a></h2>
<ul>
+<li>The two variables <tt>{start_contributedby_anchortag}</tt> and
+ <tt>{end_contributedby_anchortag}</tt> were not set any more (since Geeklog
+ 1.5.0). Instead, the link to the author's profile was added to
+ <tt>{contributedby_author}</tt>, so that the combination of these three
+ variables (as used in the story templates) still seemed to work. Geeklog
+ 1.6.0 reinstates the old definitions, i.e. the anchortag variables contain
+ the opening and closing tag to link to the author's profile and
+ <tt>{contributedby_author}</tt> contains only the author's name.</li>
<li>New variable <tt>{photo_max_dimensions}</tt> to inform users about the
max. dimensions of a userphoto: <tt>preferences/userphoto.thtml</tt></li>
<li>Added a <tt>print.css</tt> stylesheet to be used by the
diff -r b1a61ff147cb -r 40ee788859dc public_html/docs/themevars.html
--- a/public_html/docs/themevars.html Sat Feb 28 22:58:46 2009 +0100
+++ b/public_html/docs/themevars.html Sun Mar 01 09:38:38 2009 +0100
@@ -325,6 +325,11 @@
<td>Tony Bibbs</td>
<td>The full name of the story's author. If the user hasn't filled in
his/her full name, the user name is used instead.</td></tr>
+<tr><td><code>contributedby_author</code></td>
+ <td>Tony Bibbs</td>
+ <td>The name of the story's author. If <code>$_CONF['show_fullname']</code>
+ is enabled, it will contain the author's full name (if provided).
+ Otherwise, it will contain the user name.</td></tr>
<tr><td><code>start_contributedby_anchortag</code></td>
<td><code><a class="storybyline" href="http://www.example.com/<br>users.php?mode=profile&uid=7"></code></td>
<td>Opening tag for a link to the story author's profile (empty for
diff -r b1a61ff147cb -r 40ee788859dc system/lib-story.php
--- a/system/lib-story.php Sat Feb 28 22:58:46 2009 +0100
+++ b/system/lib-story.php Sun Mar 01 09:38:38 2009 +0100
@@ -125,18 +125,21 @@
} else {
$article->set_var( 'contributedby_fullname',$story->DisplayElements('fullname') );
}
- $authorname = COM_getDisplayName( $story->DisplayElements('uid'), $story->DisplayElements('username'), $fullname );
- $article->set_var( 'author', $authorname );
- $profileUrl = $_CONF['site_url'] . '/users.php?mode=profile&uid='
- . $story->DisplayElements('uid');
+ $authorname = COM_getDisplayName($story->DisplayElements('uid'),
+ $story->DisplayElements('username'), $fullname);
+ $article->set_var('contributedby_author', $authorname);
+ $article->set_var('author', $authorname);
- if( $story->DisplayElements('uid') > 1 )
- {
- $article->set_var( 'contributedby_url', $profileUrl );
- $authorname = COM_createLink($authorname, $profileUrl, array('class' => 'storybyline'));
+ if ($story->DisplayElements('uid') > 1) {
+ $profileUrl = $_CONF['site_url']
+ . '/users.php?mode=profile&uid='
+ . $story->DisplayElements('uid');
+ $article->set_var('start_contributedby_anchortag',
+ '<a class="storybyline" href="' . $profileUrl . '">');
+ $article->set_var('end_contributedby_anchortag', '</a>');
+ $article->set_var('contributedby_url', $profileUrl);
}
- $article->set_var( 'contributedby_author', $authorname );
$photo = '';
if ($_CONF['allow_user_photo'] == 1) {
More information about the geeklog-cvs
mailing list