Version 0.9.2 ()
------------------------------------------------------------------------
+ * Fix server locale order to always first use the charset locale
+ instead of a generic locale. Fixes bug #1384978 (garvinhicking)
+
* Fix entry quicksearch on postgresql, where it returned the same
entry multiple times if it was contained in multiple categories.
Fix by Robert Treat, many thanks!
}
}
- $retval = $parent ? '' : '<select id="serendipity_replyTo" name="serendipity[replyTo]"><option value="0">[ ' . TOP_LEVEL . ' ]</option>';
+ $retval = $parent ? '' : '<select id="serendipity_replyTo" onchange="' . (!empty($serendipity['plugindata']['onchange']) ? $serendipity['plugindata']['onchange'] : '') . '" name="serendipity[replyTo]"><option value="0">[ ' . TOP_LEVEL . ' ]</option>';
+
$i = 0;
foreach ($comments as $comment) {
if ($comment['parent_id'] == $parent) {
if (!empty($comment['url']) && substr($comment['url'], 0, 7) != 'http://' && substr($comment['url'], 0, 8) != 'https://') {
$comment['url'] = 'http://' . $comment['url'];
}
-
+
if (!empty($comment['url'])) {
if (!@parse_url($comment['url'])) {
$comment['url'] = '';
}
$comment['url'] = htmlspecialchars($comment['url'], ENT_QUOTES);
}
-
+
serendipity_plugin_api::hook_event('frontend_display', $comment);
if (isset($comment['no_email']) && $comment['no_email']) {
* @access public
* @return null
*/
-function serendipity_smarty_init() {
+function serendipity_smarty_init($vars = array()) {
global $serendipity;
if (!isset($serendipity['smarty'])) {
)
);
+ if (count($vars) > 0) {
+ $serendipity['smarty']->assign($vars);
+ }
+
// For advanced usage, we allow template authors to create a file 'config.inc.php' where they can
// setup custom smarty variables, modifiers etc. to use in their templates.
@include_once $serendipity['smarty']->config_dir . '/config.inc.php';
$uri_addData['startpage'] = true;
}
+$serendipity['plugindata']['smartyvars'] = array(); // Plugins can change this global variable
serendipity_plugin_api::hook_event('genpage', $uri, $uri_addData);
-serendipity_smarty_init();
+serendipity_smarty_init($serendipity['plugindata']['smartyvars']);
$serendipity['smarty']->assign(
array(
-<div class="serendipityCommentForm">
+<div id="serendipityCommentFormC" class="serendipityCommentForm">
+ <div id="serendipity_replyform_0"></div>
<a id="serendipity_CommentForm"></a>
<form id="serendipity_comment" action="{$commentform_action}#feedback" method="post">
<div><input type="hidden" name="serendipity[entry_id]" value="{$commentform_id}" /></div>
<tr>
<td> </td>
- <td><input type="submit" name="serendipity[submit]" value="{$CONST.SUBMIT_COMMENT}" /> <input type="submit" name="serendipity[preview]" value="{$CONST.PREVIEW}" /></td>
+ <td><input type="submit" name="serendipity[submit]" value="{$CONST.SUBMIT_COMMENT}" /> <input type="submit" id="serendipity_preview" name="serendipity[preview]" value="{$CONST.PREVIEW}" /></td>
</tr>
</table>
</form>
{foreach from=$comments item=comment}
<a id="c{$comment.id}"></a>
- <div class="serendipity_comment serendipity_comment_author_{$comment.author|@makeFilename} {if $entry.author == $comment.author}serendipity_comment_author_self{/if}" style="padding-left: {$comment.depth*20}px">
+ <div id="serendipity_comment_{$comment.id}" class="serendipity_comment serendipity_comment_author_{$comment.author|@makeFilename} {if $entry.author == $comment.author}serendipity_comment_author_self{/if}" style="padding-left: {$comment.depth*20}px">
<div class="serendipity_commentBody">{$comment.body}</div>
<div class="serendipity_comment_source">
<a href="#c{$comment.id}" title="Link to comment #{$comment.trace}">#{$comment.trace}</a>
(<a href="{$comment.link_delete}" onclick="return confirm('{$CONST.COMMENT_DELETE_CONFIRM|@sprintf:$comment.id:$comment.author}');">delete</a>)
{/if}
{if $entry.allow_comments}
- (<a href="#serendipity_CommentForm" onclick="document.getElementById('serendipity_replyTo').value='{$comment.id}';">{$CONST.REPLY}</a>)
+ (<a href="#serendipity_CommentForm" id="serendipity_reply_{$comment.id}" onclick="document.getElementById('serendipity_replyTo').value='{$comment.id}'; {$comment_onchange}">{$CONST.REPLY}</a>)
+ <div id="serendipity_replyform_{$comment.id}"></div>
{/if}
</div>
</div>
{else}
{$comment.author|@default:$CONST.ANONYMOUS}
{/if}</cite> {$CONST.SAYS}:<br />
- <div class="commentmetadata">
+ <div class="commentmetadata" id="serendipity_comment_{$comment.id}">
<a href="#c{$comment.id}" title="{$CONST.LINK_TO_COMMENT|sprintf:$comment.trace}">#{$comment.trace}</a>
{$comment.timestamp|@formatTime:$CONST.DATE_FORMAT_SHORT}
{if $entry.is_entry_owner}
(<a href="{$comment.link_delete}" onclick="return confirm('{$CONST.COMMENT_DELETE_CONFIRM|@sprintf:$comment.id:$comment.author}');">{$CONST.DELETE}</a>)
{/if}
{if $entry.allow_comments}
- (<a href="#serendipity_CommentForm" onclick="document.getElementById('serendipity_replyTo').value='{$comment.id}';">{$CONST.REPLY}</a>)
+ (<a href="#serendipity_CommentForm" id="serendipity_reply_{$comment.id}" onclick="document.getElementById('serendipity_replyTo').value='{$comment.id}'; {$comment_onchange}">{$CONST.REPLY}</a>)
+ <div id="serendipity_replyform_{$comment.id}"></div>
{/if}
</div>
<p>{$comment.body}</p>