[geeklog-cvs] geeklog: Added a link back to the story to the "Mail Story to a ...
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Sun Aug 9 07:03:22 EDT 2009
details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/c0541179fa32
changeset: 7243:c0541179fa32
user: Dirk Haun <dirk at haun-online.de>
date: Sun Aug 09 10:33:39 2009 +0200
description:
Added a link back to the story to the "Mail Story to a Friend" form
diffstat:
public_html/docs/english/theme.html | 4 ++++
public_html/docs/history | 1 +
public_html/layout/professional/profiles/contactauthorform.thtml | 4 ++++
public_html/profiles.php | 10 ++++++++--
4 files changed, 17 insertions(+), 2 deletions(-)
diffs (68 lines):
diff -r 648abfeded20 -r c0541179fa32 public_html/docs/english/theme.html
--- a/public_html/docs/english/theme.html Sun Aug 09 10:20:32 2009 +0200
+++ b/public_html/docs/english/theme.html Sun Aug 09 10:33:39 2009 +0200
@@ -198,6 +198,10 @@
<h2><a name="changes">Theme changes in Geeklog 1.6.1</a></h2>
<ul>
+<li>Added a link back to the story to the "Mail Story to a Friend" form,
+ <tt>profiles/contactauthorform.thtml</tt>. Available variables:
+ <tt>{lang_title}</tt>, <tt>{story_title}</tt>, <tt>{story_url}</tt>,
+ <tt>{story_link}</tt>.</tt>
<li>Added a <code>{remoteservice}</code> variable in
<tt>admin/user/edituser.thtml</tt> to optionally display the name of the
service a Remote User was using to log in.</li>
diff -r 648abfeded20 -r c0541179fa32 public_html/docs/history
--- a/public_html/docs/history Sun Aug 09 10:20:32 2009 +0200
+++ b/public_html/docs/history Sun Aug 09 10:33:39 2009 +0200
@@ -3,6 +3,7 @@
??? ??, 2009 (1.6.1)
------------
+- Added a link back to the story to the "Mail Story to a Friend" form [Dirk]
- Only list [code], [raw] tags when story.* permissions are required [Dirk]
- [page_break] was not listed when all HTML was allowed for Root users [Dirk]
- Added support for meta tags and meta keywords, provided by Tom Homer
diff -r 648abfeded20 -r c0541179fa32 public_html/layout/professional/profiles/contactauthorform.thtml
--- a/public_html/layout/professional/profiles/contactauthorform.thtml Sun Aug 09 10:20:32 2009 +0200
+++ b/public_html/layout/professional/profiles/contactauthorform.thtml Sun Aug 09 10:33:39 2009 +0200
@@ -2,6 +2,10 @@
<form action="{site_url}/profiles.php" method="post" name="contact">
<table cellspacing="0" cellpadding="3" width="100%">
<tr>
+ <td class="alignright"><b>{lang_title}:</b></td>
+ <td>{story_link}</td>
+ </tr>
+ <tr>
<td class="alignright"><b>{lang_fromname}:</b></td>
<td><input type="text" name="from" size="40" maxlength="96" value="{name}"{xhtml}></td>
</tr>
diff -r 648abfeded20 -r c0541179fa32 public_html/profiles.php
--- a/public_html/profiles.php Sun Aug 09 10:20:32 2009 +0200
+++ b/public_html/profiles.php Sun Aug 09 10:33:39 2009 +0200
@@ -456,8 +456,14 @@
$mail_template->set_var('site_url', $_CONF['site_url']);
$mail_template->set_var('site_admin_url', $_CONF['site_admin_url']);
$mail_template->set_var('layout_url', $_CONF['layout_url']);
- $mail_template->set_var('start_block_mailstory2friend', COM_startBlock($LANG08[17]));
+ $mail_template->set_var('start_block_mailstory2friend',
+ COM_startBlock($LANG08[17]));
+ $mail_template->set_var('lang_title', $LANG08[31]);
$mail_template->set_var('story_title', $story->displayElements('title'));
+ $url = COM_buildUrl($_CONF['site_url'] . '/article.php?story=' . $sid);
+ $mail_template->set_var('story_url', $url);
+ $link = COM_createLink($story->displayElements('title'), $url);
+ $mail_template->set_var('story_link', $link);
$mail_template->set_var('lang_fromname', $LANG08[20]);
$mail_template->set_var('name', $from);
$mail_template->set_var('lang_fromemailaddress', $LANG08[21]);
@@ -471,8 +477,8 @@
$mail_template->set_var('lang_warning', $LANG08[22]);
$mail_template->set_var('lang_sendmessage', $LANG08[16]);
$mail_template->set_var('story_id',$sid);
- PLG_templateSetVars ('emailstory', $mail_template);
$mail_template->set_var('end_block', COM_endBlock());
+ PLG_templateSetVars('emailstory', $mail_template);
$mail_template->parse('output', 'form');
$retval .= $mail_template->finish($mail_template->get_var('output'));
More information about the geeklog-cvs
mailing list