# $Id$
+Version 1.1-alpha7()
+------------------------------------------------------------------------
+
+ * Add new template 'comments_by_author' which show comments made
+ by authors. New permalink structure:
+ "/comments/[AUTHORNAME]/comments|trackbacks|comments_and_trackbacks/P[PAGENUMBER]/FROM [YYYY-MM-DD]/TO [YYYY-MM-DD]"
+ (garvinhicking)
+
+ * Add "Comments and Trackbacks" feed feature (stm99..)
+
+ * Add LiveJournal XML importer (garvinhicking)
+
+ * Fix not fetching allow_comments/moderate_comments value when
+ inside search function. Thanks to stm! (garvinhicking)
+
+ * Add new links to check for upgradable SPARTACUS plugins
+ (garvinhicking)
+
+ * Add new frontend view "Archive by Authors": /archive/Axx.html to
+ view the archive listing for specific authors only (like viewing
+ archive by specific categories only via /archive/Cxx.html etc.)
+ (garvinhicking)
+
+ * Templating: Add new {$entry.html_title} variable that holds
+ unescaped HTML code of the Entry's title (garvinhicking)
+
+ * BC-Break / Plugin API change: The serendipity_getTemplate() file
+ now no longer returns FALSE when a file is not found, but instead
+ the filename without a path. This is required so that the smarty-
+ created error message contains the missing filename instead of an
+ empty '' string.
+ Plugins based on this function need to make sure that they will
+ now properly use a file_exists() check on the returned function,
+ if they want to probe different locations of a file.
+ All template files containing the string "plugin" will still return
+ FALSE for the function call, to circumvent problems with spartacus
+ plugins.
+ Bottom line: Plugins that use "*plugin*.tpl" filenames or check
+ via file_exists() on the returned variable are safe.
+ (garvinhicking)
+
+ * Added arabic (sa) language by Way
+
+ * Add patch to allow entryproperties plugin to define passwords for
+ specific entries (Falk Döring)
+
+ * Made smarty function "serendipity_printComments" accept to new
+ parameters: "order" (ASC/DESC) and "limit" (garvinhicking)
+
+ * Comment moderation panel, usability improvement: Blocking authors/
+ URLs will lead to the originating page. Thanks to Tanel Raja!
+ (garvinhicking)
+
+ * Patch mb-functions to better work on foreign/japanese charsets
+ (thanks to deminy!)
+
+ * Replaced core smarty assign() calls to assign_by_ref() where
+ appropriate. (Falk Döring, garvinhicking)
+ TODO: This might introduce oddities! Check thoroughly.
+
+ * Fixed not showing entries in the quicksearch that have the
+ "no frontpage" entryproperty set (garvinhicking)
+
+ * Fixed sidebar category plugin to show proper category listing
+ for permission-based restrictions, when "current autho" mode
+ is selected (garvinhicking)
+
+ * Added experimental XML-engine, for XSLT templating support
+ (garvinhicking)
+
+ * Added experimental PHP-engine templating support, bypassing
+ Smarty. Work in progress, mostly proof-of-concept. Might
+ be changed completely. Read instructions in the
+ include/template_api.inc.php file. Dedicated to Davey. ;)
+ (garvinhicking)
+
+ * Support to crop images from within the media database. Pick a
+ picture in the MDB, go to the property section of that image
+ and click on the "EDIT" link. (garvinhicking)
+
+ TODO:
+ - Operate also on PNG, TIFF etc. (currently only JPEG!)
+ - Support image magick (currently ony gdlib!)
+ - Currently backup files are scattered around, fix this.
+ - Interface cleanup
+ - Add options to only affect the images thumbnail instead
+ of always saving the whole picture.
+ - Internationalization!
+
+ * Move the DB charset option to serendipity_config_local.inc.php to
+ issue propper DB connections instantly. (garvinhicking)
+
+Version 1.1-alpha6()
+------------------------------------------------------------------------
+
+ * Use possibly existing local PEAR by default. Patch by Davey
+ (garvinhicking)
+
+ * Add missing indices for the statistics visitor DB tables
+ (garvinhicking)
+
+ * Add new "custom" property bag type, which can emit any kind of
+ custom HTML/JS values. Current property bag value can be referenced
+ by DOM GetElementById('config_plugin_XXX') if you want to emit
+ specific JavaScript. Can also be used by template configurator for
+ heavily customized output. (garvinhicking)
+
+ * Fix bug #1494653: Non-Unique index constraint for 'exits' table.
+ Thanks to Markus Brueckner! (garvinhicking)
+
+Version 1.1-alpha5()
+------------------------------------------------------------------------
+
+ * Implemented Drag and Drop based plugin configuration panel for
+ re-ordering plugin layout. Uses JavaScript - works like old
+ manager when having JS disabled! (garvinhicking)
+
+ * Changed "Auto-Login" via Cookie behaviour to only issue single-
+ time valid cookies to users and no longer put username/pw into
+ serialized cookie data. Many thanks to Yasuo Ohgaki for giving
+ a helping hand! (garvinhicking)
+
+ * Added possibility to hide/temporarily disable Event plugins
+ (garvinhicking)
+
+ * Added "plugin_api_extension" class, which contains some helper
+ methods for future use, like re-ordering DB items or checking
+ valid emails. (Falk Döring)
+
+ * Fix multiple occurences of the string "--" in the entry title to
+ not mess up HTML display because of weird Firefox interpretation
+ (Bug #1474290) (garvinhicking)
+
+ * Made "fullfeed" syndication option also support "let the client
+ decide", via $_GET['fullFeed'] = true/false. (garvinhicking)
+
+ * Added new configuration option to that lets you toggle whether to
+ comply with RFC2616 on Conditional GET. (Garvinhicking)
+
+ * Support template/theme/style-specific options via "config.inc.php"
+ file in template directory. Allows values like "background-color",
+ "header" etc. to be made configurable in the admin screen.
+ (garvinhicking)
+
+ * Make media manager able to store media properties and many other
+ enhancements:
+
+ DETAILS:
+ - Smarty templates for all media-related output
+ - New DHTML widget for tree navigation
+ - Store+Retrieve EXIF/XMP/ITPC/ID3 metadata for uploaded files
+ [new database table]
+ - Manage custom keywords for media items
+ - Option for enabling the toolbar in the popup media window
+ - Plugin API hooks for fetching media metadata (like via
+ getID3() plugin)
+ - Make media chooser also return the media ID
+ - Detect if a file is video, audio, image, document, archive,
+ binary. Unify image fetching functionality.
+ - Allow to create directories from the popup media window
+ - Optionally increase filename (1, 2, 4, 5, ...) when file
+ already exists
+ - Restrict file upload by size/dimensions via configuration
+ options
+ - Sort media files by all custom property fields
+ - Search/Filter for specific properties/keywords.
+ - Enhanced media filter for keywords
+ - Use entered comments in the "You choose..." picking page
+ - Integrate new page for viewing images with media properties
+ through serendipity_admin_image_selector.php?serendipity[image]=X
+ - Integrate imageselectorplus plugin options for giving a target
+ to links
+ - New option for image_Selector to save a specific sized version
+ (?serendipity[image]=X&serendipity[step]=showItem
+ &serendipity[resizeWidth]=X&serendipity[resizeHeight]=Y
+ - Track referrers by image selector and show them on detail
+ page
+ - Allow to move directories with files and updating all links
+ in your entries to those moved items. (MySQL only!)
+ - Allow to move single images.
+ (garvinhicking)
+
+ * Create a new index on the plugin DB table, optimize fetching config
+ values for plugins. Load language file when permissions could not
+ allow reading the config file. (garvinhicking)
+
+ * Fix blocking site during file requests by writing session data to
+ disk. Thanks to jgoerzen! (garvinhicking)
+
+ * Make categories sidebar plugin able to only show categories
+ readable for logged in user (garvinhicking)
+
+ * Fix getting multiple images for directories that were put into
+ the Acccess List (garvinhicking)
+
+ * Allow to create new groups from existing ones, by editing them
+ and clicking on "Create new group". (garvinhicking)
+
+ * Statistic plugin update by Shrikee: Graphically display visitors,
+ bot banning.
+
+ * Deleting a comment that has replies will replace that comment with
+ a "Comment deleted" reference. Deleting such a comment again will
+ completely remove it. (garvinhicking, Jabrwock)
+
+ * Added "further links" infobox to Admin interface (garvinhicking)
+
+ * Media manager gallery will use (user-specified)
+ "admin/img/mime_XXX-YYY.png" images of a template for non-image
+ mimetypes. (garvinhicking)
+
+ * Allow entryproperties plugin to define which markup plugins are
+ applied per-entry (garvinhicking)
+
+ * Added links to view an entry in reasonable places (comments / entry
+ overview) (garvinhicking)
+
+ * Added on-the-fly synchronizing of the Serendipity media database
+ with the file system (Marty, garvinhicking)
+
+ * Introduce permission setup for media directories (garvinhicking)
+
+ * Added config option for specifying number of entries in the RSS
+ feed (garvinhicking)
+
+ * Added option whether to issue the "SET NAMES" mysql command
+ (garvinhicking)
+
+ * Removed config option "XHTML11 compliance" and enabled by default
+ now (garvinhicking)
+
Version 1.0.1 ()
------------------------------------------------------------------------
-
+
* Fix multi-authors view only showing first author (garvinhicking)
* Fix bug sending comment-notification mails to subscribed users
* Insert logic for saving an entry that prevents the iframe for
trackbacks/xml-rpc pings to save an entry multiple times upon
failure. Many thanks to tharos from the Forums! (garvinhicking)
-
+
* Add smarty parameter $view which can be used to detect what kind
of page is being displayed. One of: archives, entry, feed, admin,
archives, plugin, categories, authors, search, css, start, 404
* Added polish language translation by CoSTa
- * Fix media browser sorting by authorid causing trouble in SQLite
- (Sven Oliver Moll)
-
-Version 1.0-beta3 (May 5th, 2006)
-------------------------------------------------------------------------
-
* Fix another (minor) XSRF for entry manager, thanks to Geoff Johnson
(garvinhicking)
objects (like emoticonchooser). Also replace <i> with <em> and
<b> with <strong>. (Jay Bertrandt)
+
Version 1.0-beta2 (March 13th, 2006)
------------------------------------------------------------------------
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details
+if (defined('S9Y_FRAMEWORK_COMMENTS')) {
+ return;
+}
+@define('S9Y_FRAMEWORK_COMMENTS', true);
+
/**
* Store the personal details of a commenting user in a cookie (or delete that cookie)
*
$comments = serendipity_fetchComments($id);
}
- $serendipity['smarty']->assign(
- array(
+ $commentform_data = array(
'commentform_action' => $url,
'commentform_id' => $id,
'commentform_name' => isset($data['name']) ? htmlspecialchars($data['name']) : (isset($serendipity['COOKIE']['name']) ? htmlspecialchars($serendipity['COOKIE']['name']) : ''),
'is_allowSubscriptions' => $serendipity['allowSubscriptions'],
'is_moderate_comments' => $moderate_comments,
'commentform_entry' => $entry
- )
);
+ $serendipity['smarty']->assign($commentform_data);
+
serendipity_smarty_fetch('COMMENTFORM', 'commentform.tpl');
}
* @param int How many comments to fetch (empty: all)
* @param string How shall comments be ordered (ASC|DESC)
* @param boolean Shall non-approved comments be displayed?
+ * @param string Comment type to fetch
* @return array The SQL result of comments
*/
-function serendipity_fetchComments($id, $limit = null, $order = '', $showAll = false) {
+function serendipity_fetchComments($id, $limit = null, $order = '', $showAll = false, $type = 'NORMAL', $where = '') {
global $serendipity;
$and = '';
} else {
$limit = '';
}
+
+ if ($type == 'comments' || empty($type)) {
+ $type = 'NORMAL';
+ } elseif ($type == 'trackbacks') {
+ $type = 'TRACKBACK';
+ } elseif ($type == 'comments_and_trackbacks') {
+ $type = '%';
+ }
if (!empty($id)) {
$and .= " AND co.entry_id = '" . (int)$id ."'";
if (!$showAll) {
$and .= ' AND co.status = \'approved\'';
}
+
+ $and .= $where;
if ($serendipity['dbType'] == 'postgres') {
$group = '';
$query = "SELECT $distinct
co.id,
- co.entry_id, co.timestamp, co.title, co.email, co.url, co.ip, co.body, co.type, co.subscribed,
+ co.entry_id, co.timestamp, co.title AS ctitle, co.email, co.url, co.ip, co.body, co.type, co.subscribed,
co.author,
e.title,
+ e.timestamp AS entrytimestamp,
e.id AS entryid,
e.authorid,
co.id AS commentid,
FROM
{$serendipity['dbPrefix']}comments co
LEFT JOIN {$serendipity['dbPrefix']}entries e ON (co.entry_id = e.id)
- WHERE co.type LIKE 'NORMAL' AND co.entry_id > 0 $and
+ WHERE co.type LIKE '" . $type . "' AND co.entry_id > 0 $and
$group
ORDER BY
- co.id " . ($order != '' ? $order : '') . "
+ " . ($where != '' ? '' : 'co.id') . " " . ($order != '' ? $order : '') . "
$limit";
-
- $comments = serendipity_db_query($query);
+ $comments = serendipity_db_query($query, false, 'assoc');
if (!is_array($comments)) {
return array();
* @param string A string repesenting the actual comment (1.1.2.1)
* @return string The HTML construct of all comments
*/
-function serendipity_printComments($comments, $parentid = 0, $depth = 0, $trace = null) {
+function serendipity_printComments($comments, $parentid = 0, $depth = 0, $trace = null, $smarty_block = 'COMMENTS', $smarty_file = 'comments.tpl') {
global $serendipity;
static $_smartyComments;
if (isset($comment['no_email']) && $comment['no_email']) {
$comment['email'] = false;
} elseif (!empty($comment['email'])) {
- $comment['email'] = htmlspecialchars(str_replace('@', '[at]', $comment['email']));
+ $comment['clear_email'] = $comment['email'];
+ $comment['email'] = htmlspecialchars(str_replace('@', '[at]', $comment['email']));
}
$comment['body'] = $comment['comment'];
$_smartyComments[] = $comment;
if ($comment['id'] && $parentid !== VIEWMODE_LINEAR ) {
- serendipity_printComments($comments, $comment['id'], ($depth+1), ($trace . $i . '.'));
+ serendipity_printComments($comments, $comment['id'], ($depth+1), ($trace . $i . '.'), $smarty_block, $smarty_file);
}
}
}
return true;
}
- $serendipity['smarty']->assign('comments', $_smartyComments);
+ $serendipity['smarty']->assign_by_ref('comments', $_smartyComments);
unset($_smartyComments);
- return serendipity_smarty_fetch('COMMENTS', 'comments.tpl');
+ return serendipity_smarty_fetch($smarty_block, $smarty_file);
+}
+
+/**
+ * Fetches and prints a listing of comments by author
+ */
+function serendipity_printCommentsByAuthor() {
+ global $serendipity;
+
+ $type = $serendipity['GET']['commentMode'];
+
+ if ($type == 'comments' || empty($type)) {
+ $type = 'NORMAL';
+ } elseif ($type == 'trackbacks') {
+ $type = 'TRACKBACK';
+ } elseif ($type == 'comments_and_trackbacks') {
+ $type = '%';
+ }
+
+ $sql_where = " AND co.author = '" . serendipity_db_escape_string($serendipity['GET']['viewCommentAuthor']) . "'";
+
+ if (!empty($serendipity['GET']['commentStartTime'])) {
+ $sql_where .= " AND co.timestamp >= " . (int)$serendipity['GET']['commentStartTime'];
+ }
+
+ if (!empty($serendipity['GET']['commentEndTime'])) {
+ $sql_where .= " AND co.timestamp <= " . (int)$serendipity['GET']['commentEndTime'];
+ }
+
+ if (empty($serendipity['GET']['page'])) {
+ $serendipity['GET']['page'] = 1;
+ }
+ $sql_limit = $serendipity['fetchLimit'] * ($serendipity['GET']['page']-1) . ',' . $serendipity['fetchLimit'];
+ $c = serendipity_fetchComments(null, $sql_limit, 'co.entry_id DESC, co.id ASC', false, $type, $sql_where);
+
+ $entry_comments = array();
+ foreach($c as $i => $comment) {
+ if (!isset($entry_comments[$comment['entry_id']])) {
+ $comment['link'] = serendipity_archiveURL($comment['entry_id'], $comment['title'], 'serendipityHTTPPath', true, array('timestamp' => $comment['entrytimestamp']));
+ $entry_comments[$comment['entry_id']] = $comment;
+ }
+ $entry_comments[$comment['entry_id']]['comments'][] = $comment;
+ }
+
+ foreach($entry_comments AS $entry_id => $_data) {
+ $entry_comments[$entry_id]['tpl_comments'] =& serendipity_printComments($_data['comments'], VIEWMODE_LINEAR, 0, null, 'COMMENTS', 'comments.tpl');
+ }
+
+ $serendipity['smarty']->assign_by_ref('comments_by_authors', $entry_comments);
+
+ if (!empty($id)) {
+ $and .= " AND co.entry_id = '" . (int)$id ."'";
+ }
+
+ if (!$showAll) {
+ $and .= ' AND co.status = \'approved\'';
+ }
+
+ $cc = serendipity_db_query("SELECT count(co.id) AS counter
+ FROM {$serendipity['dbPrefix']}comments AS co
+ WHERE co.entry_id > 0
+ AND co.type LIKE '" . $type . "'
+ AND co.status = 'approved' " . $sql_where . "
+ GROUP BY co.author", true, 'assoc');
+ if (!isset($cc['counter'])) {
+ $totalComments = 0;
+ } else {
+ $totalComments = $cc['counter'];
+ }
+ serendipity_printEntryFooter('', $totalComments);
+
+ serendipity_smarty_fetch('ENTRIES', 'comments_by_author.tpl');
+
+ return true;
}
/**
/* We have to figure out if the comment we are about to delete, is awaiting approval,
if so - we should *not* subtract it from the entries table */
- $sql = serendipity_db_query("SELECT type, status, parent_id FROM {$serendipity['dbPrefix']}comments
+ $sql = serendipity_db_query("SELECT type, status, parent_id, body FROM {$serendipity['dbPrefix']}comments
WHERE entry_id = ". $entry_id ."
- AND id = ". $id , true);
-
- serendipity_db_query("DELETE FROM {$serendipity['dbPrefix']}comments
- WHERE entry_id = ". $entry_id ."
- AND id = ". $id );
-
- if ($sql['status'] !== 'pending') {
- if (!empty($sql['type']) && $sql['type'] != 'NORMAL') {
- $type = 'trackbacks';
- } else {
- $type = 'comments';
+ AND id = ". $id, true);
+
+
+ /* Check to see if the comment has children
+ * if it does, don't delete, but replace with "*(COMMENT DELETED)*"
+ to delete a tree, delete children first */
+ $has_parent = serendipity_db_query("SELECT count(id) AS count
+ FROM {$serendipity['dbPrefix']}comments
+ WHERE parent_id = ". $id . "
+ LIMIT 1", true);
+
+ if (is_array($has_parent) && isset($has_parent['count']) && $has_parent['count'] > 0 && $sql['body'] != 'COMMENT_DELETED') {
+ // Comment has childs, so don't delete it.
+ serendipity_db_query("UPDATE {$serendipity['dbPrefix']}comments
+ SET body = 'COMMENT_DELETED'
+ WHERE id = " . $id);
+ } else {
+ // Comment has no childs or had already been deleted., it can be safely removed.
+ serendipity_db_query("DELETE FROM {$serendipity['dbPrefix']}comments
+ WHERE entry_id = ". $entry_id ."
+ AND id = ". $id);
+
+ if (is_array($sql) && $sql['status'] !== 'pending') {
+ if (!empty($sql['type']) && $sql['type'] != 'NORMAL') {
+ $type = 'trackbacks';
+ } else {
+ $type = 'comments';
+ }
+ serendipity_db_query("UPDATE {$serendipity['dbPrefix']}entries SET $type = $type-1 WHERE id = ". $entry_id ." $admin");
}
- serendipity_db_query("UPDATE {$serendipity['dbPrefix']}entries SET $type = $type-1 WHERE id = ". $entry_id);
- }
-
- serendipity_db_query("UPDATE {$serendipity['dbPrefix']}comments SET parent_id = " . (int)$sql['parent_id'] . " WHERE parent_id = " . $id);
+ serendipity_db_query("UPDATE {$serendipity['dbPrefix']}comments SET parent_id = " . (int)$sql['parent_id'] . " WHERE parent_id = " . $id);
+ }
return true;
} else {
return false;
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details
+if (defined('S9Y_FRAMEWORK_ENTRIES')) {
+ return;
+}
+@define('S9Y_FRAMEWORK_ENTRIES', true);
+
/**
* Delete a category or range of categories
*
}
$where = '';
+
+ if ($authorid === -1 OR $authorid === 0) {
+ $sql_groupid = '0';
+ } else {
+ $sql_groupid = 'ag.groupid';
+ }
+
if ($authorid != 'all' && is_numeric($authorid)) {
$sql_authorid = $authorid;
if (!serendipity_checkPermission('adminCategoriesMaintainOthers', $authorid)) {
- $where = " WHERE (c.authorid = $authorid OR c.authorid = 0)";
+ $where = " WHERE (c.authorid = $authorid OR c.authorid = 0) ";
$where .= "OR (
acl.artifact_type = 'category'
AND acl.artifact_mode = '" . serendipity_db_escape_string($artifact_mode) . "'
LEFT OUTER JOIN {$serendipity['dbPrefix']}authorgroups AS ag
ON ag.authorid = $sql_authorid
LEFT OUTER JOIN {$serendipity['dbPrefix']}access AS acl
- ON (ag.groupid = acl.groupid AND acl.artifact_id = c.categoryid)
+ ON ($sql_groupid = acl.groupid AND acl.artifact_id = c.categoryid)
$where
$group";
if (!empty($order)) {
e.id,
e.authorid,
a.realname AS author,
+ e.allow_comments,
+ e.moderate_comments,
a.email,
e.timestamp,
e.comments,
*
* The list of total entries is calculated from the serendipity_getTotelEntries() function
*
+ * @param string suffix for URLs
+ * @param int Amount of total entries
* @access public
* @see serendipity_getTotalEntries()
* @return null
*/
-function serendipity_printEntryFooter() {
+function serendipity_printEntryFooter($suffix = '.html', $totalEntries = null) {
global $serendipity;
- $totalEntries = serendipity_getTotalEntries();
+ if ($totalEntries === null) {
+ $totalEntries = serendipity_getTotalEntries();
+ }
$totalPages = ceil($totalEntries / $serendipity['fetchLimit']);
if (!isset($serendipity['GET']['page'])) {
if ($serendipity['GET']['page'] > 1) {
$uriArguments = $serendipity['uriArguments'];
$uriArguments[] = 'P'. ($serendipity['GET']['page'] - 1);
- $serendipity['smarty']->assign('footer_prev_page', serendipity_rewriteURL(implode('/', $uriArguments) .'.html'));
+ $serendipity['smarty']->assign('footer_prev_page', serendipity_rewriteURL(implode('/', $uriArguments) . $suffix));
}
$uriArguments = $serendipity['uriArguments'];
$serendipity['smarty']->assign('footer_totalEntries', $totalEntries);
$serendipity['smarty']->assign('footer_totalPages', $totalPages);
$serendipity['smarty']->assign('footer_currentPage', $serendipity['GET']['page']);
- $serendipity['smarty']->assign('footer_pageLink', serendipity_rewriteURL(implode('/', $uriArguments) . '.html'));
+ $serendipity['smarty']->assign('footer_pageLink', serendipity_rewriteURL(implode('/', $uriArguments) . $suffix));
$serendipity['smarty']->assign('footer_info', sprintf(PAGE_BROWSE_ENTRIES, (int)$serendipity['GET']['page'], $totalPages, $totalEntries));
if ($serendipity['GET']['page'] < $totalPages) {
$uriArguments = $serendipity['uriArguments'];
$uriArguments[] = 'P'. ($serendipity['GET']['page'] + 1);
- $serendipity['smarty']->assign('footer_next_page', serendipity_rewriteURL(implode('/', $uriArguments) .'.html'));
+ $serendipity['smarty']->assign('footer_next_page', serendipity_rewriteURL(implode('/', $uriArguments) . $suffix));
}
}
$entry['link'] = serendipity_archiveURL($entry['id'], $entry['title'], 'serendipityHTTPPath', true, array('timestamp' => $entry['timestamp']));
$entry['commURL'] = serendipity_archiveURL($entry['id'], $entry['title'], 'baseURL', false, array('timestamp' => $entry['timestamp']));
- $entry['rdf_ident'] = serendipity_archiveURL($entry['id'], $entry['title'], 'baseURL', true, array('timestamp' => $entry['timestamp']));
+ $entry['html_title']= $entry['title'];
$entry['title'] = htmlspecialchars($entry['title']);
+ $entry['title_rdf'] = preg_replace('@-{2,}@', '-', $entry['title']);
+ $entry['rdf_ident'] = serendipity_archiveURL($entry['id'], $entry['title_rdf'], 'baseURL', true, array('timestamp' => $entry['timestamp']));
+ $entry['link_rdf'] = serendipity_rewriteURL(PATH_FEEDS . '/ei_'. $entry['id'] .'.rdf');
+
$entry['link_allow_comments'] = $serendipity['baseURL'] . 'comment.php?serendipity[switch]=enable&serendipity[entry]=' . $entry['id'];
$entry['link_deny_comments'] = $serendipity['baseURL'] . 'comment.php?serendipity[switch]=disable&serendipity[entry]=' . $entry['id'];
$entry['allow_comments'] = serendipity_db_bool($entry['allow_comments']);
$entry['link_popup_trackbacks'] = $serendipity['serendipityHTTPPath'] .'comment.php?serendipity[entry_id]='. $entry['id'] .'&serendipity[type]=trackbacks';
$entry['link_edit'] = $serendipity['baseURL'] .'serendipity_admin.php?serendipity[action]=admin&serendipity[adminModule]=entries&serendipity[adminAction]=edit&serendipity[id]='. $entry['id'];
$entry['link_trackback'] = $serendipity['baseURL'] .'comment.php?type=trackback&entry_id='. $entry['id'];
- $entry['link_rdf'] = serendipity_rewriteURL(PATH_FEEDS . '/ei_'. $entry['id'] .'.rdf');
$entry['link_viewmode_threaded'] = $serendipity['serendipityHTTPPath'] . $serendipity['indexFile'] .'?url='. $entry['commURL'] .'&serendipity[cview]='. VIEWMODE_THREADED;
$entry['link_viewmode_linear'] = $serendipity['serendipityHTTPPath'] . $serendipity['indexFile'] .'?url='. $entry['commURL'] .'&serendipity[cview]='. VIEWMODE_LINEAR;
$entry['link_author'] = serendipity_authorURL($authorData);
/* IF WE ARE DISPLAYING A FULL ENTRY */
if (isset($serendipity['GET']['id'])) {
- $serendipity['smarty']->assign(
- array(
- 'comments_messagestack' => (isset($serendipity['messagestack']['comments']) ? (array)$serendipity['messagestack']['comments'] : array()),
- 'is_comment_added' => (isset($serendipity['GET']['csuccess']) && $serendipity['GET']['csuccess'] == 'true' ? true: false),
- 'is_comment_moderate' => (isset($serendipity['GET']['csuccess']) && $serendipity['GET']['csuccess'] == 'moderate' ? true: false)
- )
+ $comment_add_data = array(
+ 'comments_messagestack' => (isset($serendipity['messagestack']['comments']) ? (array)$serendipity['messagestack']['comments'] : array()),
+ 'is_comment_added' => (isset($serendipity['GET']['csuccess']) && $serendipity['GET']['csuccess'] == 'true' ? true: false),
+ 'is_comment_moderate' => (isset($serendipity['GET']['csuccess']) && $serendipity['GET']['csuccess'] == 'moderate' ? true: false)
);
+ $serendipity['smarty']->assign($comment_add_data);
+
serendipity_displayCommentForm(
$entry['id'],
$serendipity['serendipityHTTPPath'] . $serendipity['indexFile'] . '?url=' . $entry['commURL'],
serendipity_printEntryFooter();
}
- $serendipity['smarty']->assign('entries', $dategroup);
+ $serendipity['smarty']->assign_by_ref('entries', $dategroup);
unset($entries, $dategroup);
if (isset($serendipity['short_archives']) && $serendipity['short_archives']) {
$newEntry = 0;
$exflag = 0;
+ if (isset($entry['properties'])) {
+ unset($entry['properties']);
+ }
+
if (!is_numeric($entry['timestamp'])) {
$entry['timestamp'] = time();
}
serendipity_db_query("DELETE FROM {$serendipity["dbPrefix"]}entrycat WHERE entryid=$id");
serendipity_db_query("DELETE FROM {$serendipity["dbPrefix"]}entryproperties WHERE entryid=$id");
serendipity_db_query("DELETE FROM {$serendipity["dbPrefix"]}comments WHERE entry_id=$id");
- serendipity_db_query("DELETE FROM {$serendipity['dbPrefix']}references WHERE entry_id='$id'");
+ serendipity_db_query("DELETE FROM {$serendipity['dbPrefix']}references WHERE entry_id='$id' AND type = ''");
serendipity_db_query("DELETE FROM {$serendipity['dbPrefix']}permalinks WHERE entry_id='$id'");
}
*
* The archives are created according to the current timestamp and show the current year.
* $serendipity['GET']['category'] is honoured like in serendipity_fetchEntries()
+ * $serendipity['GET']['viewAuthor'] is honoured like in serendipity_fetchEntries()
*
* @access public
* @return null
$thisYear = date('Y', serendipity_serverOffsetHour());
$thisMonth = date('m', serendipity_serverOffsetHour());
break;
- case 'jalali-utf8':
+ case 'persian-utf8':
require_once S9Y_INCLUDE_PATH . 'include/functions_calendars.inc.php';
- $lastYear = jalali_date_utf('Y', serendipity_serverOffsetHour($f[0][0]));
- $lastMonth = jalali_date_utf('m', serendipity_serverOffsetHour($f[0][0]));
- $thisYear = jalali_date_utf('Y', serendipity_serverOffsetHour());
- $thisMonth = jalali_date_utf('m', serendipity_serverOffsetHour());
+ $lastYear = persian_date_utf('Y', serendipity_serverOffsetHour($f[0][0]));
+ $lastMonth = persian_date_utf('m', serendipity_serverOffsetHour($f[0][0]));
+ $thisYear = persian_date_utf('Y', serendipity_serverOffsetHour());
+ $thisMonth = persian_date_utf('m', serendipity_serverOffsetHour());
break;
}
$max = 0;
$cat_get = '';
}
+ if (isset($serendipity['GET']['viewAuthor'])) {
+ $author_get = '/A' . (int)$serendipity['GET']['viewAuthor'];
+ } else {
+ $author_get = '';
+ }
+
$output = array();
for ($y = $thisYear; $y >= $lastYear; $y--) {
$output[$y]['year'] = $y;
$s = serendipity_serverOffsetHour(mktime(0, 0, 0, $m, 1, $y), true);
$e = serendipity_serverOffsetHour(mktime(23, 59, 59, $m, date('t', $s), $y), true);
break;
- case 'jalali-utf8':
+ case 'persian-utf8':
require_once S9Y_INCLUDE_PATH . 'include/functions_calendars.inc.php';
- $s = serendipity_serverOffsetHour(jalali_mktime(0, 0, 0, $m, 1, $y), true);
- $e = serendipity_serverOffsetHour(jalali_mktime(23, 59, 59, $m, date('t', $s), $y), true);
+ $s = serendipity_serverOffsetHour(persian_mktime(0, 0, 0, $m, 1, $y), true);
+ $e = serendipity_serverOffsetHour(persian_mktime(23, 59, 59, $m, date('t', $s), $y), true);
break;
}
AND timestamp >= $s
AND timestamp <= $e "
. (!serendipity_db_bool($serendipity['showFutureEntries']) ? " AND timestamp <= " . time() : '')
- . (!empty($cat_sql) ? ' AND ' . $cat_sql : '') . "
+ . (!empty($cat_sql) ? ' AND ' . $cat_sql : '')
+ . (!empty($serendipity['GET']['viewAuthor']) ? ' AND e.authorid = ' . (int)$serendipity['GET']['viewAuthor'] : '') . "
GROUP BY ec.entryid", false, 'assoc');
if (is_array($entries)) {
$entry_count = count($entries);
$data = array();
$data['entry_count'] = $entry_count;
- $data['link'] = serendipity_archiveDateUrl($y . '/'. sprintf('%02s', $m) . $cat_get);
- $data['link_summary'] = serendipity_archiveDateUrl($y . '/'. sprintf('%02s', $m) . $cat_get, true);
+ $data['link'] = serendipity_archiveDateUrl($y . '/'. sprintf('%02s', $m) . $cat_get . $author_get);
+ $data['link_summary'] = serendipity_archiveDateUrl($y . '/'. sprintf('%02s', $m) . $cat_get . $author_get, true);
$data['date'] = $s;
$output[$y]['months'][] = $data;
}
}
- $serendipity['smarty']->assign(array('archives' => $output,
- 'max_entries' => $max));
+
+ $serendipity['smarty']->assign_by_ref('archives', $output);
+ $serendipity['smarty']->assign_by_ref('max_entries', $max);
serendipity_smarty_fetch('ARCHIVES', 'entries_archives.tpl', true);
}
# All rights reserved. See LICENSE file for licensing details
+if (defined('S9Y_FRAMEWORK_INSTALLER')) {
+ return;
+}
+@define('S9Y_FRAMEWORK_INSTALLER', true);
+
/**
* Convert a PHP Ini setting to a boolean flag
*
fwrite($configfp, "\t\$serendipity['dbPass'] = '" . addslashes($dbPass) . "';\n");
fwrite($configfp, "\t\$serendipity['dbType'] = '" . addslashes($dbType) . "';\n");
fwrite($configfp, "\t\$serendipity['dbPersistent'] = ". (serendipity_db_bool($dbPersistent) ? 'true' : 'false') .";\n");
+ if ($serendipity['dbNames']) {
+ fwrite($configfp, "\t\$serendipity['dbCharset'] = '" . addslashes(SQL_CHARSET) . "';\n");
+ }
if (is_array($privateVariables) && count($privateVariables) > 0) {
foreach($privateVariables AS $p_idx => $p_val) {
echo '<input type="file" size="30" name="' . $name . '" />';
break;
+ case 'textarea':
+ echo '<textarea rows="5" cols="40" name="' . $name . '">' . htmlspecialchars($value) . '</textarea>';
+ break;
+
default:
echo '<input type="text" size="30" name="' . $name . '" value="' . htmlspecialchars($value) . '" />';
break;
*/
function serendipity_printConfigTemplate($config, $from = false, $noForm = false, $folded = true, $allowToggle = true) {
global $serendipity;
- if (!isset($serendipity['XHTML11'])) {
- $serendipity['XHTML11'] = FALSE;
- }
if ( $allowToggle ) {
?>
<script type="text/javascript" language="JavaScript">
<span style="color: #5E7A94; font-size: 8pt;"><?php echo $item['description']; ?></span>
</td>
<td style="border-bottom: 1px #000000 solid; font-size: 8pt" align="left" valign="middle" width="25%">
- <?php echo ($serendipity['XHTML11'] ? '<span style="white-space: nowrap">' : '<nobr>'); ?><?php echo serendipity_guessInput($item['type'], $item['var'], $value, $item['default']); ?><?php echo ($serendipity['XHTML11'] ? '</span>' : '</nobr>'); ?>
+ <span style="white-space: nowrap"><?php echo serendipity_guessInput($item['type'], $item['var'], $value, $item['default']); ?></span>
</td>
</tr>
<?php
'{PAT_DELETE}', '{PATH_DELETE}',
'{PAT_APPROVE}', '{PATH_APPROVE}',
'{PAT_SEARCH}', '{PATH_SEARCH}',
+ '{PAT_COMMENTS}', '{PATH_COMMENTS}',
'{PAT_CSS}',
'{PAT_PERMALINK}',
'{PAT_PERMALINK_AUTHORS}',
trim($PAT['DELETE'], '@/i'), $serendipity['permalinkDeletePath'],
trim($PAT['APPROVE'], '@/i'), $serendipity['permalinkApprovePath'],
trim($PAT['SEARCH'], '@/i'), $serendipity['permalinkSearchPath'],
+ trim($PAT['COMMENTS'], '@/i'), $serendipity['permalinkCommentsPath'],
trim(PAT_CSS, '@/i'),
trim($PAT['PERMALINK'], '@/i'),
trim($PAT['PERMALINK_AUTHORS'], '@/i'),
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details
+if (defined('S9Y_FRAMEWORK_PERMALINKS')) {
+ return;
+}
+@define('S9Y_FRAMEWORK_PERMALINKS', true);
+
/**
* Converts a string into a filename that can be used safely in HTTP URLs
*
// Remove excess separators
$str = trim($str, $to[0]);
-
+
if (empty($str)) {
if (isset($GLOBALS['i18n_unknown'])) {
$str = $GLOBALS['i18n_unknown'];
if (!isset($serendipity['permalinkStructure'])) {
$serendipity['permalinkStructure'] = 'archives/%id%-%title%.html';
}
-
+
if (!isset($serendipity['permalinkFeedAuthorStructure'])) {
$serendipity['permalinkFeedAuthorStructure'] = 'feeds/authors/%id%-%realname%.rss';
}
-
+
if (!isset($serendipity['permalinkFeedCategoryStructure'])) {
$serendipity['permalinkFeedCategoryStructure'] = 'feeds/categories/%id%-%name%.rss';
}
-
+
if (!isset($serendipity['permalinkCategoryStructure'])) {
$serendipity['permalinkCategoryStructure'] = 'categories/%id%-%name%';
}
-
+
if (!isset($serendipity['permalinkAuthorStructure'])) {
$serendipity['permalinkAuthorStructure'] = 'authors/%id%-%realname%';
}
-
+
if (!isset($serendipity['permalinkArchivesPath'])) {
$serendipity['permalinkArchivesPath'] = 'archives';
}
-
+
if (!isset($serendipity['permalinkArchivePath'])) {
$serendipity['permalinkArchivePath'] = 'archive';
}
-
+
if (!isset($serendipity['permalinkCategoriesPath'])) {
$serendipity['permalinkCategoriesPath'] = 'categories';
}
-
+
if (!isset($serendipity['permalinkAuthorsPath'])) {
$serendipity['permalinkAuthorsPath'] = 'authors';
}
-
+
if (!isset($serendipity['permalinkUnsubscribePath'])) {
$serendipity['permalinkUnsubscribePath'] = 'unsubscribe';
}
-
+
if (!isset($serendipity['permalinkDeletePath'])) {
$serendipity['permalinkDeletePath'] = 'delete';
}
-
+
if (!isset($serendipity['permalinkApprovePath'])) {
$serendipity['permalinkApprovePath'] = 'approve';
}
-
+
if (!isset($serendipity['permalinkFeedsPath'])) {
$serendipity['permalinkFeedsPath'] = 'feeds';
}
-
+
if (!isset($serendipity['permalinkPluginPath'])) {
$serendipity['permalinkPluginPath'] = 'plugin';
}
-
+
if (!isset($serendipity['permalinkAdminPath'])) {
$serendipity['permalinkAdminPath'] = 'admin';
}
-
+
if (!isset($serendipity['permalinkSearchPath'])) {
$serendipity['permalinkSearchPath'] = 'search';
}
-
+
+ if (!isset($serendipity['permalinkCommentsPath'])) {
+ $serendipity['permalinkCommentsPath'] = 'comments';
+ }
+
/* URI paths
* These could be defined in the language headers, except that would break
* backwards URL compatibility
@define('PATH_PLUGIN', $serendipity['permalinkPluginPath']);
@define('PATH_ADMIN', $serendipity['permalinkAdminPath']);
@define('PATH_SEARCH', $serendipity['permalinkSearchPath']);
-
+ @define('PATH_COMMENTS', $serendipity['permalinkCommentsPath']);
+
/* URI patterns
* Note that it's important to use @ as the pattern delimiter. DO NOT use shortcuts
* like \d or \s, since mod_rewrite will use the regexps as well and chokes on them.
*/
function &serendipity_permalinkPatterns($return = false) {
global $serendipity;
-
+
$PAT = array();
$PAT['UNSUBSCRIBE'] = '@/' . $serendipity['permalinkUnsubscribePath'].'/(.*)/([0-9]+)@';
$PAT['CATEGORIES'] = '@/' . $serendipity['permalinkCategoriesPath'].'/([0-9;]+)@';
$PAT['PLUGIN'] = '@/(' . $serendipity['permalinkPluginPath'] . '|plugin)/(.*)@';
$PAT['SEARCH'] = '@/' . $serendipity['permalinkSearchPath'] . '/(.*)@';
+ $PAT['COMMENTS'] = '@/' . $serendipity['permalinkCommentsPath'] . '/(.*)@';
$PAT['PERMALINK'] = '@' . serendipity_makePermalinkRegex($serendipity['permalinkStructure'], 'entry') . '@i';
$PAT['PERMALINK_CATEGORIES'] = '@' . serendipity_makePermalinkRegex($serendipity['permalinkCategoryStructure'], 'category') . '@i';
$PAT['PERMALINK_FEEDCATEGORIES'] = '@' . serendipity_makePermalinkRegex($serendipity['permalinkFeedCategoryStructure'], 'category') . '@i';
if (is_array($permalink)) {
return $permalink['entry_id'];
}
- }
+ }
return $default;
}
case 'category':
return serendipity_categoryURL($data, '', false);
break;
-
+
case 'author':
return serendipity_authorURL($data, '', false);
break;
}
-
+
return false;
}
case 'entry':
$idfield = 'id';
break;
-
+
case 'author':
$idfield = 'authorid';
break;
-
+
case 'category':
$idfield = 'categoryid';
break;
}
-
+
return(serendipity_db_query(sprintf("INSERT INTO {$serendipity['dbPrefix']}permalinks
(permalink, entry_id, type)
VALUES ('%s', '%s', '%s')",
$data['entry']['timestamp'] = time();
}
}
-
+
$ts = serendipity_serverOffsetHour($data['entry']['timestamp']);
-
+
$replacements =
array(
(int)$data['id'],
);
return str_replace($entryKeys, $replacements, $format);
break;
-
+
case 'author':
$replacements =
array(
);
return str_replace($authorKeys, $replacements, $format);
break;
-
+
case 'category':
$replacements =
array(
"'",
'<',
'>',
- '`',
+ '`'
),
array(
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details
-include_once('serendipity_config.inc.php');
-include_once(S9Y_INCLUDE_PATH . 'include/plugin_api.inc.php');
-include_once(S9Y_INCLUDE_PATH . 'include/plugin_internal.inc.php');
+if (!defined('S9Y_FRAMEWORK')) {
+ include('serendipity_config.inc.php');
+}
+
+if (!defined('S9Y_FRAMEWORK_PLUGIN_API')) {
+ include(S9Y_INCLUDE_PATH . 'include/plugin_api.inc.php');
+}
+
+if (!defined('S9Y_FRAMEWORK_PLUGIN_INTERNAL')) {
+ include(S9Y_INCLUDE_PATH . 'include/plugin_internal.inc.php');
+}
$uri_addData = array(
'startpage' => false,
serendipity_plugin_api::hook_event('genpage', $uri, $uri_addData);
serendipity_smarty_init($serendipity['plugindata']['smartyvars']);
-$serendipity['smarty']->assign(
- array(
- 'leftSidebarElements' => serendipity_plugin_api::count_plugins('left'),
- 'rightSidebarElements' => serendipity_plugin_api::count_plugins('right')
- )
-);
+$leftSidebarElements = serendipity_plugin_api::count_plugins('left');
+$rightSidebarElements = serendipity_plugin_api::count_plugins('right');
+$serendipity['smarty']->assign_by_ref('leftSidebarElements', $leftSidebarElements);
+$serendipity['smarty']->assign_by_ref('rightSidebarElements', $rightSidebarElements);
if ($serendipity['smarty_raw_mode']) {
/* For BC reasons, we have to ask for layout.php */
- @include_once(serendipity_getTemplateFile('layout.php', 'serendipityPath'));
+ @include(serendipity_getTemplateFile('layout.php', 'serendipityPath'));
} else {
switch ($serendipity['GET']['action']) {
// User wants to read the diary
serendipity_printEntries($r);
break;
+ // Show the comments
+ case 'comments':
+ serendipity_printCommentsByAuthor();
+ // use 'content_message' for pagination?
+
+ break;
+
// Show the archive
case 'archives':
serendipity_printArchives();
}
serendipity_smarty_fetch('CONTENT', 'content.tpl');
+ $serendipity['smarty']->assign('ENTRIES', '');
}
/* vim: set sts=4 ts=4 expandtab : */
# All rights reserved. See LICENSE file for licensing details
if (!defined('serendipity_LANG_LOADED') || serendipity_LANG_LOADED !== true) {
+ $charset = serendipity_getCharset();
+
+ // The following variable can be set in serendipity_config_local.inc.php to force your templates being able to use language override includes
+ if ($serendipity['useTemplateLanguage']) {
+ @include (S9Y_INCLUDE_PATH . 'templates/' . $serendipity['template'] . '/' . $charset . 'lang_' . $serendipity['lang'] . '.inc.php');
+ @include (S9Y_INCLUDE_PATH . 'templates/' . $serendipity['template'] . '/lang_en.inc.php');
+ }
+
// Try and include preferred language from the configurated setting
- if (@include(S9Y_INCLUDE_PATH . 'lang/' . $serendipity['charset'] . 'serendipity_lang_'. $serendipity['lang'] .'.inc.php') ) {
+ if (@include(S9Y_INCLUDE_PATH . 'lang/' . $charset . 'serendipity_lang_'. $serendipity['lang'] .'.inc.php') ) {
// Only here can we truely say the language is loaded
define('serendipity_LANG_LOADED', true);
+ if (function_exists('serendipity_db_reconnect')) {
+ serendipity_db_reconnect();
+ }
} elseif (IS_installed === false || (defined('IS_up2date') && IS_up2date === false)) { /* -- Auto-Guess -- */
// If no config file is loaded, language includes are not available.
// Now include one. Try to auto-guess the language by looking up the HTTP_ACCEPT_LANGUAGE.
// Do fallback to english
if (IS_installed === false || (defined('IS_up2date') && IS_up2date === false)) {
- @include_once(S9Y_INCLUDE_PATH . 'lang/serendipity_lang_en.inc.php');
+ @include(S9Y_INCLUDE_PATH . 'lang/' . $charset . 'serendipity_lang_en.inc.php');
}
}
if (function_exists('mb_language')) {
@mb_language($serendipity['lang']);
}
-
+
if (function_exists('mb_internal_encoding')) {
@mb_internal_encoding(LANG_CHARSET);
}
case 'ucfirst':
// there's no mb_ucfirst, so emulate it
if ($mbstring === 2) {
- return mb_strtoupper(mb_substr($args[1], 0, 1)) . mb_substr($args[1], 1);
+ $enc = LANG_CHARSET;
+ return mb_strtoupper(mb_substr($args[1], 0, 1, $enc), $enc) . mb_substr($args[1], 1, mb_strlen($args[1], $enc), $enc);
} else {
return ucfirst($args[1]);
}
'type' => 'bool',
'default' => false,
'permission' => 'siteConfiguration',
- 'flags' => array('nosave'))
+ 'flags' => array('nosave')),
+
+ array('var' => 'dbNames',
+ 'title' => INSTAL_DB_UTF8,
+ 'description' => INSTAL_DB_UTF8_DESC,
+ 'type' => 'bool',
+ 'default' => true,
+ 'permission' => 'siteConfiguration')
));
$res['paths'] =
'permission' => 'siteConfiguration',
'flags' => array('ifEmpty')),
+ array('var' => 'permalinkCommentsPath',
+ 'title' => INSTALL_PERMALINK_COMMENTSPATH,
+ 'description' => '',
+ 'type' => 'string',
+ 'default' => 'comments',
+ 'permission' => 'siteConfiguration',
+ 'flags' => array('ifEmpty')),
+
)
);
'default' => 15,
'permission' => 'blogConfiguration'),
+ array('var' => 'RSSfetchLimit',
+ 'title' => INSTALL_RSSFETCHLIMIT,
+ 'description' => INSTALL_RSSFETCHLIMIT_DESC,
+ 'type' => 'int',
+ 'default' => 15,
+ 'permission' => 'blogConfiguration'),
+
+ array('var' => 'enforce_RFC2616',
+ 'title' => SYNDICATION_RFC2616,
+ 'description' => SYNDICATION_RFC2616_DESC,
+ 'type' => 'bool',
+ 'default' => false,
+ 'permission' => 'blogConfiguration'),
+
array('var' => 'useGzip',
'title' => INSTALL_USEGZIP,
'description' => INSTALL_USEGZIP_DESC,
'permission' => 'blogConfiguration',
'flags' => array('simpleInstall', 'installOnly')),
- array('var' => 'XHTML11',
- 'title' => INSTALL_XHTML11,
- 'description' => INSTALL_XHTML11_DESC,
- 'type' => 'bool',
- 'permission' => 'siteConfiguration',
- 'default' => true),
-
array('var' => 'enablePopup',
'title' => INSTALL_POPUP,
'description' => INSTALL_POPUP_DESC,
'type' => 'int',
'permission' => 'siteConfiguration',
'default' => 110),
+
+ array('var' => 'maxFileSize',
+ 'title' => MEDIA_UPLOAD_SIZE,
+ 'description' => MEDIA_UPLOAD_SIZE_DESC,
+ 'type' => 'int',
+ 'permission' => 'blogConfiguration',
+ 'default' => ''),
+
+ array('var' => 'maxImgWidth',
+ 'title' => MEDIA_UPLOAD_MAXWIDTH,
+ 'description' => MEDIA_UPLOAD_MAXWIDTH_DESC,
+ 'type' => 'int',
+ 'permission' => 'blogConfiguration',
+ 'default' => ''),
+
+ array('var' => 'maxImgHeight',
+ 'title' => MEDIA_UPLOAD_MAXHEIGHT,
+ 'description' => MEDIA_UPLOAD_MAXHEIGHT_DESC,
+ 'type' => 'int',
+ 'permission' => 'blogConfiguration',
+ 'default' => ''),
+
+ array('var' => 'onTheFlySynch',
+ 'title' => ONTHEFLYSYNCH,
+ 'description' => ONTHEFLYSYNCH_DESC,
+ 'type' => 'bool',
+ 'permission' => 'siteConfiguration',
+ 'default' => true),
+
+ array('var' => 'dynamicResize',
+ 'title' => MEDIA_DYN_RESIZE,
+ 'description' => MEDIA_DYN_RESIZE_DESC,
+ 'type' => 'bool',
+ 'permission' => 'siteConfiguration',
+ 'default' => false),
+
+ array('var' => 'mediaExif',
+ 'title' => MEDIA_EXIF,
+ 'description' => MEDIA_EXIF_DESC,
+ 'type' => 'bool',
+ 'permission' => 'siteConfiguration',
+ 'default' => true),
+
+ array('var' => 'mediaProperties',
+ 'title' => MEDIA_PROP,
+ 'description' => MEDIA_PROP_DESC . MEDIA_PROP_MULTI_DESC,
+ 'type' => 'string',
+ 'permission' => 'blogConfiguration',
+ 'default' => 'DPI:IMAGE;RUN_LENGTH:VIDEO:AUDIO;DATE;COPYRIGHT;TITLE;COMMENT1:MULTI;COMMENT2:MULTI'),
+
+ array('var' => 'mediaKeywords',
+ 'title' => MEDIA_KEYWORDS,
+ 'description' => MEDIA_KEYWORDS_DESC,
+ 'type' => 'textarea',
+ 'permission' => 'blogConfiguration',
+ 'default' => ''),
));
return $res;
RewriteRule ^{PAT_FEED} rss.php?file=$1&ext=$2
RewriteRule ^{PAT_PLUGIN} {indexFile}?url=$1/$2 [L,QSA]
RewriteRule ^{PAT_SEARCH} {indexFile}?url=/{PATH_SEARCH}/$1 [L,QSA]
+RewriteRule ^{PAT_COMMENTS} {indexFile}?url=/{PATH_COMMENTS}/$1 [L,QSA]
RewriteRule ^{PAT_CSS} {indexFile}?url=/$1 [L,QSA]
RewriteRule ^index\.(html?|php.+) {indexFile}?url=index.html [L,QSA]
RewriteRule ^htmlarea/(.*) htmlarea/$1 [L,QSA]
RewriteRule ^{PAT_FEED} rss.php?file=$1&ext=$2
RewriteRule ^{PAT_PLUGIN} {indexFile}?url=$1/$2 [L,QSA]
RewriteRule ^{PAT_SEARCH} {indexFile}?url=/{PATH_SEARCH}/$1 [L,QSA]
+RewriteRule ^{PAT_COMMENTS} {indexFile}?url=/{PATH_COMMENTS}/$1 [L,QSA]
RewriteRule ^{PAT_CSS} {indexFile}?url=/$1 [L,QSA]
RewriteRule ^index\.(html?|php.+) {indexFile}?url=index.html [L,QSA]
RewriteRule ^htmlarea/(.*) htmlarea/$1 [L,QSA]
// Session are needed to also remember an autologin user on the frontend
ob_start();
-include_once('serendipity_config.inc.php');
+include('serendipity_config.inc.php');
header('Content-Type: text/html; charset='. LANG_CHARSET);
$track_referer = true;
$uri = $_SERVER['REQUEST_URI'];
$serendipity['GET']['category'] = $cat;
unset($_args[$k]);
}
+ } elseif ($v{0} == 'A') { /* Author */
+ $serendipity['GET']['viewAuthor'] = $_GET['viewAuthor'] = (int)substr($v, 1);
+ unset($_args[$k]);
} elseif ($v{0} == 'W') { /* Week */
$week = substr($v, 1);
if (is_numeric($week)) {
}
break;
- case 'jalali-utf8':
+ case 'persian-utf8':
require_once S9Y_INCLUDE_PATH . 'include/functions_calendars.inc.php';
$gday = 1;
if ($week) {
}
}
- $tm = jalali_mktime(0, 0, 0, $i, $day, $year);
- $ts = jalali_mktime(0, 0, 0, jalali_date_utf('m', $tm), jalali_date_utf('j', $tm), $year);
- $te = jalali_mktime(23, 59, 59, jalali_date_utf('m', $tm), jalali_date_utf('j', $tm)+7, $year);
+ $tm = persian_mktime(0, 0, 0, $i, $day, $year);
+ $ts = persian_mktime(0, 0, 0, persian_date_utf('m', $tm), persian_date_utf('j', $tm), $year);
+ $te = persian_mktime(23, 59, 59, persian_date_utf('m', $tm), persian_date_utf('j', $tm)+7, $year);
$date = serendipity_formatTime(WEEK .' '. $week .'، %Y', $ts, false);
} else {
if ($day) {
- $ts = jalali_mktime(0, 0, 0, $month, $day, $year);
- $te = jalali_mktime(23, 59, 59, $month, $day, $year);
+ $ts = persian_mktime(0, 0, 0, $month, $day, $year);
+ $te = persian_mktime(23, 59, 59, $month, $day, $year);
$date = serendipity_formatTime(DATE_FORMAT_ENTRY, $ts, false);
} else {
- $ts = jalali_mktime(0, 0, 0, $month, $gday, $year);
+ $ts = persian_mktime(0, 0, 0, $month, $gday, $year);
if (!isset($gday2)) {
- $gday2 = jalali_date_utf('t', $ts);
+ $gday2 = persian_date_utf('t', $ts);
}
- $te = jalali_mktime(23, 59, 59, $month, $gday2, $year);
+ $te = persian_mktime(23, 59, 59, $month, $gday2, $year);
$date = serendipity_formatTime('%B %Y', $ts, false);
}
}
- list($year, $month, $day) = j2g ($year, $month, $day);
+ list($year, $month, $day) = p2g ($year, $month, $day);
break;
}
}
ob_start();
- include_once(S9Y_INCLUDE_PATH . 'include/genpage.inc.php');
+ include(S9Y_INCLUDE_PATH . 'include/genpage.inc.php');
$data = ob_get_contents();
ob_end_clean();
} else if ( preg_match(PAT_COMMENTSUB, $uri, $matches) ||
preg_match(PAT_PERMALINK, $uri, $matches) ) {
$serendipity['view'] = 'entry';
+
$matches[1] = serendipity_searchPermalink($serendipity['permalinkStructure'], $uri, $matches[1], 'entry');
serendipity_rememberComment();
$comment['parent_id'] = $serendipity['POST']['replyTo'];
if (!empty($comment['comment'])) {
if (serendipity_saveComment($serendipity['POST']['entry_id'], $comment, 'NORMAL')) {
- $sc_url = $_SERVER['REQUEST_URI'] . (strstr($_SERVER['REQUEST_URI'], '?') ? '&' : '?') . 'serendipity[csuccess]=' . (isset($serendipity['csuccess']) ? $serendipity['csuccess'] : 'true');
+ $sc_url = ($_SERVER['HTTPS'] == 'on' ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] . (strstr($_SERVER['REQUEST_URI'], '?') ? '&' : '?') . 'serendipity[csuccess]=' . (isset($serendipity['csuccess']) ? $serendipity['csuccess'] : 'true');
if (serendipity_isResponseClean($sc_url)) {
header('Location: ' . $sc_url);
}
}
ob_start();
- include_once(S9Y_INCLUDE_PATH . 'include/genpage.inc.php');
+ include(S9Y_INCLUDE_PATH . 'include/genpage.inc.php');
$data = ob_get_contents();
ob_end_clean();
$serendipity['view'] = 'feed';
header('Content-Type: text/html; charset=utf-8');
- if (preg_match('@/(index|atom[0-9]*|rss|comments|opml)\.(rss[0-9]?|rdf|rss|xml|atom)@', $uri, $vmatches)) {
+ if (preg_match('@/(index|atom[0-9]*|rss|comments|trackbacks|comments_and_trackbacks|opml)\.(rss[0-9]?|rdf|rss|xml|atom)@', $uri, $vmatches)) {
list($_GET['version'], $_GET['type']) = serendipity_discover_rss($vmatches[1], $vmatches[2]);
}
}
ob_start();
- include_once(S9Y_INCLUDE_PATH . 'rss.php');
+ include(S9Y_INCLUDE_PATH . 'rss.php');
$data = ob_get_contents();
ob_end_clean();
$serendipity['GET']['category'] = $cat;
unset($_args[$k]);
}
+ } elseif ($v{0} == 'A') { /* Author */
+ $serendipity['GET']['viewAuthor'] = $_GET['viewAuthor'] = (int)substr($v, 1);
+ unset($_args[$k]);
}
}
- include_once(S9Y_INCLUDE_PATH . 'include/genpage.inc.php');
+ include(S9Y_INCLUDE_PATH . 'include/genpage.inc.php');
} else if (preg_match(PAT_PLUGIN, $uri, $matches)) {
$serendipity['view'] = 'plugin';
serendipity_plugin_api::hook_event('external_plugin', $matches[2]);
unset($_args[$k]);
unset($serendipity['uriArguments'][$k]);
}
+ } elseif ($v{0} == 'A') { /* Author */
+ $serendipity['GET']['viewAuthor'] = $_GET['viewAuthor'] = (int)substr($v, 1);
+ unset($_args[$k]);
}
}
$serendipity['head_title'] = $cInfo['category_name'];
$serendipity['head_subtitle'] = $serendipity['blogTitle'];
- include_once(S9Y_INCLUDE_PATH . 'include/genpage.inc.php');
+ include(S9Y_INCLUDE_PATH . 'include/genpage.inc.php');
} else if ($is_multiauth || preg_match(PAT_PERMALINK_AUTHORS, $uri, $matches)) {
$serendipity['view'] = 'authors';
$serendipity['head_title'] = sprintf(ENTRIES_BY, $uInfo[0]['realname']);
$serendipity['head_subtitle'] = $serendipity['blogTitle'];
- include_once(S9Y_INCLUDE_PATH . 'include/genpage.inc.php');
+ include(S9Y_INCLUDE_PATH . 'include/genpage.inc.php');
} else if (preg_match(PAT_SEARCH, $uri, $matches)) {
$serendipity['view'] = 'search';
$_args = $serendipity['uriArguments'];
$serendipity['GET']['action'] = 'search';
$serendipity['GET']['searchTerm'] = urldecode(htmlspecialchars(strip_tags(implode(' ', $search))));
- include_once(S9Y_INCLUDE_PATH . 'include/genpage.inc.php');
+ include(S9Y_INCLUDE_PATH . 'include/genpage.inc.php');
} elseif (preg_match(PAT_CSS, $uri, $matches)) {
$serendipity['view'] = 'css';
$css_mode = $matches[1];
- include_once(S9Y_INCLUDE_PATH . 'serendipity.css.php');
+ include(S9Y_INCLUDE_PATH . 'serendipity.css.php');
exit;
+} else if (preg_match(PAT_COMMENTS, $uri, $matches)) {
+ $serendipity['view'] = 'comments';
+ $_args = $serendipity['uriArguments'];
+ $timedesc = array();
+
+ /* Attempt to locate hidden variables within the URI */
+ $search = array();
+ foreach ($_args as $k => $v){
+ if ($v == PATH_COMMENTS) {
+ continue;
+ }
+
+ if ($v{0} == 'P') { /* Page */
+ $page = substr($v, 1);
+ if (is_numeric($page)) {
+ $serendipity['GET']['page'] = $page;
+ unset($_args[$k]);
+ unset($serendipity['uriArguments'][$k]);
+ }
+ } elseif (preg_match('@^(f|t|from|to)[\s_-]*([\d-/ ]+)$@', strtolower(urldecode($v)), $m)) {
+ $date = strtotime($m[2]);
+ if ($date < 1) {
+ continue;
+ }
+ if ($m[1] == 'f' || $m[1] == 'from') {
+ $serendipity['GET']['commentStartTime'] = $date;
+ $timedesc['start'] = serendipity_strftime(DATE_FORMAT_SHORT, $date);
+ } else {
+ $serendipity['GET']['commentEndTime'] = $date;
+ $timedesc['end'] = serendipity_strftime(DATE_FORMAT_SHORT, $date);
+ }
+ } elseif ($v == 'trackbacks' || $v == 'comments_and_trackbacks' || $v == 'comments') {
+ $serendipity['GET']['commentMode'] = $v;
+ } else {
+ $serendipity['GET']['viewCommentAuthor'] = urldecode($v);
+ }
+ }
+
+ $serendipity['head_title'] = COMMENTS_FROM . ' ' . htmlspecialchars($serendipity['GET']['viewCommentAuthor']);
+ if (isset($timedesc['start']) && isset($timedesc['end'])) {
+ $serendipity['head_title'] .= ' (' . $timedesc['start'] . ' - ' . $timedesc['end'] . ')';
+ } elseif (isset($timedesc['start'])) {
+ $serendipity['head_title'] .= ' (> ' . $timedesc['start'] . ')';
+ } elseif (isset($timedesc['end'])) {
+ $serendipity['head_title'] .= ' (< ' . $timedesc['end'] . ')';
+ }
+ $serendipity['head_subtitle'] = $serendipity['blogTitle'];
+ $serendipity['GET']['action'] = 'comments';
+ include(S9Y_INCLUDE_PATH . 'include/genpage.inc.php');
} else if (preg_match('@/(index(\.php|\.html)?)|'. preg_quote($serendipity['indexFile']) .'@', $uri) ||
preg_match('@^/' . preg_quote(trim($serendipity['serendipityHTTPPath'], '/')) . '/?(\?.*)?$@', $uri)) {
$serendipity['uriArguments'][] = PATH_ARCHIVES;
}
- include_once(S9Y_INCLUDE_PATH . 'include/genpage.inc.php');
+ include(S9Y_INCLUDE_PATH . 'include/genpage.inc.php');
} else {
$serendipity['view'] = '404';
-
header('HTTP/1.0 404 Not found');
- include_once(S9Y_INCLUDE_PATH . 'include/genpage.inc.php');
+ include(S9Y_INCLUDE_PATH . 'include/genpage.inc.php');
// printf('<div class="serendipity_msg_important">' . DOCUMENT_NOT_FOUND . '</div>', $uri);
}
if (!defined('NO_EXIT')) {
$raw_data = ob_get_contents();
ob_end_clean();
- $serendipity['smarty']->assign('raw_data', $raw_data);
+ $serendipity['smarty']->assign_by_ref('raw_data', $raw_data);
if (empty($serendipity['smarty_file'])) {
$serendipity['smarty_file'] = '404.tpl';
}
-<?php # $Id: serendipity_lang_cn.inc.php 1150 2006-04-24 17:39:59Z garvinhicking $
+<?php # $Id: serendipity_lang_cn.inc.php 1342 2006-07-28 11:07:54Z garvinhicking $
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details
# Translated by
@define('PREFERENCE_USE_JS', 'Enable advanced JS usage?');
@define('PREFERENCE_USE_JS_DESC', 'If enabled, advanced JavaScript sections will be enabled for better usability, like in the Plugin Configuration section you can use drag and drop for re-ordering plugins.');
@define('PREFERENCE_USE_JS_WARNING', '(This page uses advanced JavaScripting. If you are having functionality issues, please disable the use of advanced JS usage in your personal preferences or disable your browser\'s JavaScript)');
+@define('INSTALL_PERMALINK_COMMENTSPATH', 'Path to comments');
-<?php # $Id: serendipity_lang_cs.inc.php 1286 2006-06-22 07:48:10Z garvinhicking $
+<?php # $Id: serendipity_lang_cs.inc.php 1342 2006-07-28 11:07:54Z garvinhicking $
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details
# Translation (c) 2004 Josef Klimosz <ok2wo@centrum.cz>
-<?php # $Id: serendipity_lang_cz.inc.php 1286 2006-06-22 07:48:10Z garvinhicking $
+<?php # $Id: serendipity_lang_cz.inc.php 1342 2006-07-28 11:07:54Z garvinhicking $
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details
# Translation (c) 2004 Josef Klimosz <ok2wo@centrum.cz>
-<?php # $Id: serendipity_lang_da.inc.php 1252 2006-06-09 20:17:14Z garvinhicking $
+<?php # $Id: serendipity_lang_da.inc.php 1342 2006-07-28 11:07:54Z garvinhicking $
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details
# Translation (c) by Tom Sommer, <ts@dreamcoder.dk>
-<?php # $Id: serendipity_lang_de.inc.php 1252 2006-06-09 20:17:14Z garvinhicking $
+<?php # $Id: serendipity_lang_de.inc.php 1342 2006-07-28 11:07:54Z garvinhicking $
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details
# Translation (c) Jannis Hermanns, Garvin Hicking and others
-<?php # $Id: serendipity_lang_en.inc.php 1252 2006-06-09 20:17:14Z garvinhicking $
+<?php # $Id: serendipity_lang_en.inc.php 1342 2006-07-28 11:07:54Z garvinhicking $
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details
/* vim: set sts=4 ts=4 expandtab : */
@define('PLUGIN_INACTIVE', 'Inactive');
@define('PREFERENCE_USE_JS', 'Enable advanced JS usage?');
@define('PREFERENCE_USE_JS_DESC', 'If enabled, advanced JavaScript sections will be enabled for better usability, like in the Plugin Configuration section you can use drag and drop for re-ordering plugins.');
-
@define('PREFERENCE_USE_JS_WARNING', '(This page uses advanced JavaScripting. If you are having functionality issues, please disable the use of advanced JS usage in your personal preferences or disable your browser\'s JavaScript)');
-
-
@define('INSTALL_PERMALINK_COMMENTSPATH', 'Path to comments');
-<?php # $Id: serendipity_lang_es.inc.php 1330 2006-07-22 14:32:10Z rlazo $
+<?php # $Id: serendipity_lang_es.inc.php 1342 2006-07-28 11:07:54Z garvinhicking $
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details
# Translation (c) by Luis Cervantes <LuisCervantes@ono.com>,
-<?php # $Id: serendipity_lang_fa.inc.php 1252 2006-06-09 20:17:14Z garvinhicking $
+<?php # $Id: serendipity_lang_fa.inc.php 1342 2006-07-28 11:07:54Z garvinhicking $
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details
# this translation, translated by Omid Mottaghi <http://oxygenws.com>
-<?php # $Id: serendipity_lang_fi.inc.php 1252 2006-06-09 20:17:14Z garvinhicking $
+<?php # $Id: serendipity_lang_fi.inc.php 1342 2006-07-28 11:07:54Z garvinhicking $
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details
# Translation by Mauri Sahlberg <mos@iki.fi>
-<?php # $Id: serendipity_lang_fr.inc.php 1252 2006-06-09 20:17:14Z garvinhicking $
+<?php # $Id: serendipity_lang_fr.inc.php 1342 2006-07-28 11:07:54Z garvinhicking $
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details
# Translation by Sebastian Mordziol <argh@php-tools.net>
-<?php # $Id: serendipity_lang_is.inc.php 1273 2006-06-19 08:17:00Z garvinhicking $
+<?php # $Id: serendipity_lang_is.inc.php 1342 2006-07-28 11:07:54Z garvinhicking $
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details
# Translation by Örn Arnarson <orn@arnarson.net>
-<?php # $Id: serendipity_lang_ja.inc.php 1252 2006-06-09 20:17:14Z garvinhicking $
+<?php # $Id: serendipity_lang_ja.inc.php 1342 2006-07-28 11:07:54Z garvinhicking $
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details
# Translation (c) Tadashi Jokagi <elf2000@users.sourceforge.net>, 2004-2005.
-<?php # $Id: serendipity_lang_ko.inc.php 1252 2006-06-09 20:17:14Z garvinhicking $
+<?php # $Id: serendipity_lang_ko.inc.php 1342 2006-07-28 11:07:54Z garvinhicking $
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details
# Translated by: Wesley Hwang-Chung <wesley96@gmail.com>
-<?php # $Id: serendipity_lang_nl.inc.php 1252 2006-06-09 20:17:14Z garvinhicking $
+<?php # $Id: serendipity_lang_nl.inc.php 1342 2006-07-28 11:07:54Z garvinhicking $
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details
# Translation (c) by Christiaan Heerze <webmaster@heimp.nl>
-<?php # $Id: serendipity_lang_no.inc.php 1252 2006-06-09 20:17:14Z garvinhicking $
+<?php # $Id: serendipity_lang_no.inc.php 1342 2006-07-28 11:07:54Z garvinhicking $
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details
# Translation (c) by Jo Christian Oterhals <oterhals@gmail.com>
-<?php # $Id: serendipity_lang_pt.inc.php 1252 2006-06-09 20:17:14Z garvinhicking $
+<?php # $Id: serendipity_lang_pt.inc.php 1342 2006-07-28 11:07:54Z garvinhicking $
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details
# Translation (c) by Agner Olson <agner@agner.net>
-<?php # $Id: serendipity_lang_ru.inc.php 1252 2006-06-09 20:17:14Z garvinhicking $
+<?php # $Id: serendipity_lang_ru.inc.php 1342 2006-07-28 11:07:54Z garvinhicking $
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details
# Translation by Nightly <nightly@reys.net>
-<?php # $Id: serendipity_lang_tn.inc.php 1252 2006-06-09 20:17:14Z garvinhicking $
+<?php # $Id: serendipity_lang_tn.inc.php 1342 2006-07-28 11:07:54Z garvinhicking $
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details
# Translated by CapriSkye <admin@capriskye.com>
-<?php # $Id: serendipity_lang_tw.inc.php 1252 2006-06-09 20:17:14Z garvinhicking $
+<?php # $Id: serendipity_lang_tw.inc.php 1342 2006-07-28 11:07:54Z garvinhicking $
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details
# Translated by CapriSkye <admin@capriskye.com>
-<?php # $Id: serendipity_lang_cn.inc.php 1150 2006-04-24 17:39:59Z garvinhicking $
+<?php # $Id: serendipity_lang_zh.inc.php 1342 2006-07-28 11:07:54Z garvinhicking $
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details
# Translated by
@define('LANG_CHARSET', 'UTF-8');
@define('SQL_CHARSET', 'utf8');
-@define('DATE_LOCALES', 'zh_CN.UTF-8, cn, zh');
-@define('DATE_FORMAT_ENTRY', '%A, %B %e. %Y');
+@define('DATE_LOCALES', 'zh_CN.UTF-8, cn, zh, zh_GB, zh_CN');
@define('DATE_FORMAT_SHORT', '%Y-%m-%d %H:%M');
@define('WYSIWYG_LANG', 'en');
@define('NUMBER_FORMAT_DECIMALS', '2');
@define('PERMISSION_ADMINIMAGESVIEWOTHERS', '浏览会员的媒体文件');
@define('CHARSET_NATIVE', '预设');
@define('INSTALL_CHARSET', '语言选项');
-@define('INSTALL_CHARSET_DESC', '这里可以让你转换 UTF-8 或预设编码 (ISO, GB2312, ...)有些语言包只有 UTF-8 编码,所以换成预设语言有不会任何改变。新安装的日志建议使用 UTF-8 编码。记得不要改变这个设定如果你已经发布了文章。详情参阅 http://www.s9y.org/index.php?node=46');
+@define('INSTALL_CHARSET_DESC', '这里可以让你转换 UTF-8 或预设编码 (ISO, UTF-8, ...)有些语言包只有 UTF-8 编码,所以换成预设语言有不会任何改变。新安装的日志建议使用 UTF-8 编码。记得不要改变这个设定如果你已经发布了文章。详情参阅 http://www.s9y.org/index.php?node=46');
@define('CALENDAR_ENABLE_EXTERNAL_EVENTS', 'External Events');
@define('CALENDAR_EXTEVENT_DESC', '如果开启,外挂可以在日历内以颜色显示它的事件。如果没有使用这些特殊的外挂,建议不要使用。');
@define('XMLRPC_NO_LONGER_BUNDLED', 'XML-RPC API 功能不会添加在 s9y 的安装里,因为漏洞和不多人使用的关系。所以必须安装 XML-RPC 的外挂如果使用 XML-RPC API。所有的 URL 不会因此改变,安装这个外挂后马上使用。');