Update of /cvsroot/php-blog/serendipity/docs
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23806/docs
Added Files:
Tag: branch-smarty
CHANGED_FILES INSTALL LICENSE NEWS README TODO upgrade.sh
Log Message:
* renamed files as announced on the list. upgrader will take care of moving
old files to a 'backup' directory for upgrading (non-CVS) users.
* MFH'ed some parts
* Fixed quicksave button display
* Fixed footer
* Fixed entry preview properly
* Fixed printing categories where no categories appeard in entry view
--- NEW FILE: LICENSE ---
Copyright (c) 2003-2004, Jannis Hermanns
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of the serendipity developer group nor the names of its contributors
may be used to endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
--- NEW FILE: INSTALL ---
###############################################################################
# INSTALLATION #
###############################################################################
1. Decompress and put this folder somewhere inside your document root
2. If you want the directory to be called something other than "serendipity",
change the directory name now
3. Open serendipity in your browser (installer will say hi to you)
4. Serendipity ships world-writeable (777) to make installation easier.
After the install is complete, you should change the permissions to allow
only your web-server user (e.g. Nobody) to access the serendipity directory.
If you have enabled file-upload and/or caching, you need to do something
like this:
chown -R Nobody serendipity/
chmod -R 744 serendipity/
because the web server needs to be able to write to directories inside the
distribution. Otherwise, you should probably chmod -R 644 serendipity.
5. Done!
###############################################################################
# UPGRADE #
###############################################################################
See README file for detailed actions.
###############################################################################
# REQUIREMENTS #
###############################################################################
1. The Apache Webserver
2. .htaccess support allowing overrides for DirectoryIndex
3. PHP Version 4 or greater (PHP 4.3.1 or greater recommended)
4. php.ini options:
- error_reporting E_ALL & ~E_NOTICE (or lower)
- file_uploads on (For import/image upload features)
5. Any of the following database engines:
- Mysql
- PostGreSQL
- SQLite (not quite!)
###############################################################################
# FILE STRUCTURE #
###############################################################################
serendipity consists of 3 parts:
1. Function library / API
-serendipity_admin_entries.inc.php
-serendipity_admin_overview.inc.php
-serendipity_config.inc.php
-serendipity_functions.inc.php
-lang/serendipity_lang_*.inc.php
These files are never loaded in the browser, but included (as their
suffix suggests).
3. Sample usage of the API
-layout.php (in templates/[theme]/)
This file displays the calendar, the search field, and the diary entries.
You can either include this file somewhere in your site, or use the
callback functions directly in your site. It's up to you. I designed this,
so you can quickly start off with a default layout :)
4. Dummy page
-index.php
This file "simulates" your homepage, you can safely ignore it, it is mainly
for testing, whether serendipity works (currently it just prints a standard
HTML header and includes layout.php
###############################################################################
Serendipity Weblog - http://s9y.org
Licensed under the BSD License
# $Id: INSTALL,v 1.1.2.1 2004/11/06 11:22:48 garvinhicking Exp $
--- NEW FILE: CHANGED_FILES ---
This documents the change of filestructure between version 0.7 and 0.8:
Where functions from serendipity_config.inc.php went to:
------------------------------------------------------------------------
./include/functions_comments.inc.php
* serendipity_rememberComment() {
* serendipity_rememberCommentDetails()
* serendipity_forgetCommentDetails()
* serendipity_displayCommentForm()
* serendipity_fetchComments()
* serendipity_generateCommentList()
* serendipity_printComments()
* serendipity_deleteComment()
* serendipity_allowCommentsToggle()
* serendipity_approveComment()
* serendipity_saveComment()
* serendipity_mailSubscribers()
* serendipity_cancelSubscription()
* serendipity_sendComment()
./include/functions_trackbacks.inc.php
* serendipity_fetchTrackbacks()
* serendipity_printTrackbacks()
* serendipity_trackback_is_success()
* serendipity_pingback_autodiscover()
* _serendipity_send()
* serendipity_trackback_autodiscover()
* serendipity_reference_autodiscover()
* add_trackback()
* add_pingback()
* serendipity_trackback_excerpt()
* report_trackback_success()
* report_trackback_failure()
* report_pingback_success()
* report_pingback_failure()
* serendipity_handle_references()
./include/functions_smarty.inc.php
* serendipity_smarty_fetch()
* serendipity_emptyPrefix()
* serendipity_smarty_hookPlugin()
* serendipity_smarty_printSidebar()
* serendipity_smarty_getFile()
* serendipity_smarty_formatTime()
* serendipity_smarty_printComments()
* serendipity_smarty_printTrackbacks()
./include/functions_entries.inc.php
* serendipity_fetchCategoryRange()
* serendipity_fetchCategoryInfo()
* serendipity_fetchEntryCategories()
* serendipity_fetchEntries()
* serendipity_fetchEntry()
* serendipity_fetchEntryProperties()
* serendipity_fetchCategories()
* serendipity_rebuildCategoryTree()
* serendipity_searchEntries()
* serendipity_printEntryFooter()
* serendipity_getTotalEntries()
* serendipity_printEntries()
* serendipity_printEntries_rss()
* serendipity_purgeEntry()
* serendipity_updertEntry()
* serendipity_deleteEntry()
* serendipity_generateCategoryList()
* serendipity_printEntryForm()
* serendipity_emit_htmlarea_code()
* serendipity_updateEntryCategories()
* serendipity_printArchives()
./include/functions.inc.php (remaining)
* serendipity_truncateString()
* serendipity_formatTime()
* serendipity_logout()
* serendipity_login()
* serendipity_userLoggedIn()
* serendipity_fetchTemplates()
* serendipity_fetchTemplateInfo()
* serendipity_setCookie()
* serendipity_deleteCookie()
* serendipity_fetchUsers()
* serendipity_makeFilename()
* serendipity_fetchReferences()
* serendipity_utf8_encode()
* serendipity_rss_getguid()
* xhtml_cleanup()
* serendipity_rewriteURL()
* serendipity_archiveURL()
* serendipity_archiveDateUrl()
* serendipity_maxfileuploadsize()
* serendipity_fetchAuthor()
* serendipity_parseFileName()
* serendipity_authenticate_author()
* serendipity_track_referrer()
* serendipity_track_referrer_gc()
* serendipity_track_url()
* serendipity_displayTopReferrers()
* serendipity_displayTopExits()
* serendipity_displayTopUrlList()
* serendipity_discover_rss()
* serendipity_isResponseClean()
* serendipity_printLogin()
Moved functions:
------------------------------------------------------------------------
serendipity_saveTemplateSelection()
-> OBSOLETE
serendipity_importWP()
-> ./include/admin/rss_exchange.inc.php
serendipity_importMT()
-> ./include/admin/rss_exchange.inc.php
serendipity_load_configuration()
-> ./include/functions_config.inc.php
Removed files:
------------------------------------------------------------------------
./serendipity.inc.php
./serendipity_layout.inc.php
./serendipity_layout_table.inc.php
Moved/Renamed files:
------------------------------------------------------------------------
./serendipity_entries_overview.inc.php
-> ./include/admin/entries_overview.inc.php
./serendipity_rss_exchange.inc.php
-> ./include/admin/rss_exchange.inc.php
./serendipity_admin_category.inc.php
-> ./include/admin/category.inc.php
./serendipity_admin_comments.inc.php
-> ./include/admin/comments.inc.php
./serendipity_admin_entries.inc.php
-> ./include/admin/entries.inc.php
./serendipity_admin_images.inc.php
-> ./include/admin/images.inc.php
./serendipity_admin_installer.inc.php
-> ./include/admin/installer.inc.php
./serendipity_admin_interop.inc.php
-> ./include/admin/interop.inc.php
./serendipity_admin_overview.inc.php
-> ./include/admin/overview.inc.php
./serendipity_admin_plugins.inc.php
-> ./include/admin/plugins.inc.php
./serendipity_admin_templates.inc.php
-> ./include/admin/templates.inc.php
./serendipity_admin_upgrader.inc.php
-> ./include/admin/upgrader.inc.php
./serendipity_admin_users.inc.php
-> ./include/admin/users.inc.php
./compat.php
-> ./include/compat.inc.php
./serendipity_functions_config.inc.php
-> ./include/functions_config.inc.php
./serendipity_functions_images.inc.php
-> ./include/functions_images.inc.php
./serendipity_functions_installer.inc.php
-> ./include/functions_installer.inc.php
./serendipity_genpage.inc.php
-> ./include/genpage.inc.php
./serendipity_lang.inc.php
-> ./include/lang.inc.php
./serendipity_plugin_api.php
-> ./include/plugin_api.inc.php
./serendipity_sidebar_items.php
-> ./include/plugin_internal.inc.php
./serendipity_db.inc.php
-> ./include/db/db.inc.php
./serendipity_db_mysql.inc.php
-> ./include/db/mysql.inc.php
./serendipity_db_mysqli.inc.php
-> ./include/db/mysqli.inc.php
./serendipity_db_postgres.inc.php
-> ./include/db/postgres.inc.php
./serendipity_db_sqlite.inc.php
-> ./include/db/sqlite.inc.php
./htaccess.cgi.errordocs.tpl
-> ./include/tpl/htaccess_cgi_errordocs.tpl
./htaccess.cgi.normal.tpl
-> ./include/tpl/htaccess_cgi_normal.tpl
./htaccess.cgi.rewrite.tpl
-> ./include/tpl/htaccess_cgi_rewrite.tpl
./htaccess.errordocs.tpl
-> ./include/tpl/htaccess_errordocs.tpl
./htaccess.normal.tpl
-> ./include/tpl/htaccess_normal.tpl
./htaccess.rewrite.tpl
-> ./include/tpl/htaccess_rewrite.tpl
./serendipity_config_local.tpl
-> ./include/tpl/config_local.tpl
./serendipity_config_user.tpl
-> ./include/tpl/config_user.tpl
./INSTALL
-> ./docs/INSTALL
./LICENSE
-> ./docs/LICENSE
./NEWS
-> ./docs/NEWS
./README
-> ./docs/README
./TODO
-> ./docs/TODO
./upgrade.sh
-> ./docs/upgrade.sh
--- NEW FILE: README ---
########################################################################
# README #
########################################################################
For the most up-to-date information on documentation, creating styles,
plugins and so on, please visit our Wiki on http://www.s9y.org/!
########################################################################
# UPDATING #
########################################################################
The automatic update script should find and execute any necessary
changes to the database layout made in different s9y versions beginning
from 0.5. The upgrader will perform its automatic actions, as soon as you
have copied the new s9y files over your old installation and access the start
page of your blog.
You can speed up the process of backing up your data and copying the files by
using the supplied "upgrade.sh" script. Be sure to edit the file and change
the variables to your needs.
Usually all DB schema upgrades in previous versions will be used. So
when you upgrade from 0.5 to 0.7 you will get upgrades from 0.5 -> 0.6
and 0.6 -> 0.7.
However, you are always advised to look at the corresponding
SQL update file in sql/db_update* to see which changes were made.
Please bear in mind that the automatic update script is executable by
any user visiting your blog at the time of updating. You should modify
your .htaccess file before upgradding and include this directives:
---- .htaccess
AuthType Basic
AuthName "Authorisation: Serendipity Upgrade IN PROGRESS"
AuthUserFile /absolute/path/to/your/s9y/.htpasswd
require valid-user
----
Then create a file .htpasswd using a simple 'username:cryptpasswd'
combination. Look at http://www.advancehost.com/htpasswd.html for an
online generator for .htpasswd files.
---- .htpasswd
s9y:s9QXoc9dcFOT2
----
This would create a user "s9y" with password "s9y" with which you'd have
to log into your blog.
A proper backup of BOTH the file system and your database is suggested.
Whenever you made changes to the distributed files (or to the files like
xml.gif or the smilies) you have to make sure to copy them over the
distributed files after updating.
########################################################################
# NOTES ON UPDATING FROM 0.5/0.5.1 -> 0.6 #
########################################################################
* [The 0.5.1 release was renamed to 0.6, but there will still be DB
layout changes applied which are labelled as 0.5.1 - just ignore it.
It's only to easy migration to CVS-Snapshot users using the
0.5.1-version]
* The structure of the content_rewrite plugin has changed. It will get
rewritten automatically by the update script, but if you had output on
your sidebar before, you need to do this:
- Add the 'serendipity_plugin_eventwrapper' to the sidebar plugins.
- Configure the 'serendipity_plugin_eventwrapper' and set it to use
your existing 'serendpity_event_contentrewrite' plugin.
* Smilies and the XML-button where moved from the '/pixel' subdirectory
into per-template 'img/' subdirectories. If you modified the original
files, you need to copy your versions inside the
'templates/default/img/' directory.
* A home-link has been added to the page headers. For that, two new CSS
classes have been introduced: .homelink1 (header), .homelink2 (
subheader). If you have a custom template, you need to adapt to those
changes. To make them look like your header previously has, insert
this in your style.css:
a.homelink1,
a.homelink1:hover,
a.homelink1:link,
a.homelink1:visited,
#serendipity_banner h1 {
... your css-definitions ...
text-decoration: none;
}
a.homelink2,
a.homelink2:hover,
a.homelink2:link,
a.homelink2:visited,
#serendipity_banner h2 {
... your css-definitions ...
text-decoration: none;
}
########################################################################
# NOTES ON UPDATING FROM 0.4 -> 0.5 #
########################################################################
No changes where made to the database scheme in this version.
########################################################################
# NOTES ON UPDATING FROM 0.3 -> 0.4 #
########################################################################
Run the file 'sql/db_update_0.3_0.4_mysql.sql' or
'sql/db_update_0.3_0.4_pgsql.sql' to update your database. Apart from
that, just copy over the new files of the distribution.
########################################################################
# THE 'embed' CONFIGURATION DIRECTIVE #
########################################################################
In your serendipity configuration, you can set an 'embed' option to true
or false.
This defines, whether you use your blog as a standalone webpage - or if
you have different content wrapped around your blog, like the menu of
your usual homepage.
By setting the 'embed' option to true, you have to make sure the
following things to get everything to work well:
1. 'indexFile' option.
This configuration option needs to be set to the wrapper file you
want to use. Let's say you normally have a 'content.php' file for
your webpage. This 'content.php' file sets up your internal
templates, your menu structure and such.
Now you want this file to be used to include your weblog. A simple
content.php could look like this:
<?php
$homepage = new Template_Class;
$homepage->set_template($_REQUEST['page']);
$homepage->output_header();
$homepage->output_content();
$homepage->output_footer();
$homepage->track_statistics();
?>
So normally your file would be called with 'content.php?page=about'
to display your 'about' page of your personal homepage.
Now we want this file to be displayed, having the 'page' variable
being set to 'blog'.
For this, we set up a 'wrapper.php' file:
<?php
$_REQUEST['page'] = 'blog';
// Let serendipity generate our content:
ob_start();
require 'index.php';
$blog_data = ob_get_contents();
ob_end_clean();
// Now we include our normal content building file.
// This one has to make use of your $blog_data variable to print
// the content where appropriate!
require 'content.php';
?>
You would then set your 'indexFile' serendipity-option to the
'wrapper.php' file.
2. Plugin panes & HTML-headers
With the example above, we only get the main blog data printed. One
of the most visible actions when using the 'embed' option is that the
plugin panes are not generated. And HTML headers/foooters are also
not provided by s9y in this case, as this should be done by your
'content.php' file.
So you have to include them in your 'content.php' file, to have them
visible in your embedded setup.
You can use this snippet:
<?php
serendipity_plugin_api::generate_plugins('left','div');
serendipity_plugin_api::generate_plugins('right','div');
?>
somewhere in your 'content.php' file.
The 'embed' option is therefore only recommended to be used by advanced
users going for a most flexible setup!
########################################################################
# HOW TO USE SERENDIPITY AS SHARED LIBRARY #
########################################################################
******************************************
* WARNING: THIS FEATURE IS EXPERIMENTAL! *
******************************************
You can install ONE s9y distribution and manage multiple users on it by
sharing the core files and then deploying specially crafted files in
each user's directory.
Let's do this using an example. You own the domain 's9yblogs.org'.
You want to have multiple virtual hosts for as many users as you like.
They are going to be called 'username.s9yblogs.org'. We choose the users
'garvin', 'j' and 'tom' for example hosts. We assume that your webserver
runs as user 'www', group 'www'. We also assume that all your users
are called like the subdomains, and they are also in group 'www'. We
further assume that PHP's safe_mod is turned off.
Of course, for security reasons, you should set the open_basedir
directive to the user's document root, so he can't access other
installations on your host.
So your Apache-Webser should contain VirtualHosts like this:
-- httpd.conf
<VirtualHost 42.42.42.42:80>
ServerName garvin.s9yblogs.org
DocumentRoot /home/www/garvin.s9yblogs.org/htdocs
<Directory "/home/www/garvin.s9yblogs.org/htdocs">
AllowOverride All
</Directory>
php_value include_path ".:/usr/local/lib/php:/usr/local/lib/php/s9y/:/usr/local/lib/php/s9y/bundled-libs/"
php_admin_value open_basedir "/usr/local/lib/php/:/usr/local/lib/php/s9y/:/home/www/garvin.s9yblogs.org/"
</VirtualHost>
<VirtualHost 42.42.42.42:80>
ServerName j.s9yblogs.org
DocumentRoot /home/www/j.s9yblogs.org/htdocs
<Directory "/home/www/j.s9yblogs.org/htdocs">
AllowOverride All
</Directory>
php_value include_path ".:/usr/local/lib/php:/usr/local/lib/php/s9y/:/usr/local/lib/php/s9y/bundled-libs/"
php_admin_value open_basedir "/usr/local/lib/php/:/usr/local/lib/php/s9y/:/home/www/j.s9yblogs.org/"
</VirtualHost>
<VirtualHost 42.42.42.42:80>
ServerName tom.s9yblogs.org
DocumentRoot /home/www/tom.s9yblogs.org/htdocs
<Directory "/home/www/tom.s9yblogs.org/htdocs">
AllowOverride All
</Directory>
php_value include_path ".:/usr/local/lib/php:/usr/local/lib/php/s9y/:/usr/local/lib/php/s9y/bundled-libs/"
php_admin_value open_basedir "/usr/local/lib/php/:/usr/local/lib/php/s9y/:/home/www/tom.s9yblogs.org/"
</VirtualHost>
-- httpd.conf
You will unpack the default s9y distribution files in
"/usr/local/lib/php/s9y/". Where you store the directory 's9y' is
not important, as long as you adjust the include_path setting in the
VirtualHosts. But the directory name 's9y' is significant.
Now copy the subdirectories called
* "/usr/local/lib/php/s9y/deployment/" [core redirection files]
* "/usr/local/lib/php/s9y/templates/" [templates so that users can change them]
* "/usr/local/lib/php/s9y/htmlarea/" [htmlarea WYSIWYG-editor]
to each of the user's subdirectories:
$ cp -r /usr/local/lib/php/s9y/deployment/* /home/www/garvin.s9yblogs.org/htdocs/
$ cp -r /usr/local/lib/php/s9y/templates /home/www/garvin.s9yblogs.org/htdocs/
$ cp -r /usr/local/lib/php/s9y/htmlarea /home/www/garvin.s9yblogs.org/htdocs/
$ chown -R garvin.www /home/www/garvin.s9yblogs.org/htdocs/*
$ chmod go+rwx /home/www/garvin.s9yblogs.org/htdocs
$ chmod go+rwx /home/www/garvin.s9yblogs.org/htdocs/uploads/
$ cp -r /usr/local/lib/php/s9y/deployment/* /home/www/j.s9yblogs.org/htdocs/
$ cp -r /usr/local/lib/php/s9y/templates /home/www/j.s9yblogs.org/htdocs/
$ cp -r /usr/local/lib/php/s9y/htmlarea /home/www/j.s9yblogs.org/htdocs/
$ chown -R j.www /home/www/j.s9yblogs.org/htdocs/*
$ chmod go+rwx /home/www/j.s9yblogs.org/htdocs
$ chmod go+rwx /home/www/j.s9yblogs.org/htdocs/uploads/
$ cp -r /usr/local/lib/php/s9y/deployment/* /home/www/tom.s9yblogs.org/htdocs/
$ cp -r /usr/local/lib/php/s9y/templates /home/www/tom.s9yblogs.org/htdocs/
$ cp -r /usr/local/lib/php/s9y/htmlarea /home/www/tom.s9yblogs.org/htdocs/
$ chown -R tom.www /home/www/tom.s9yblogs.org/htdocs/*
$ chmod go+rwx /home/www/tom.s9yblogs.org/htdocs
$ chmod go+rwx /home/www/tom.s9yblogs.org/htdocs/uploads/
For later management access, it is advised you keep a list of all URLs
for your s9y-managed blogs. We suggest to create a SQL table like
'my_managed_s9y_blogs':
sql> CREATE TABLE my_managed_s9y_blogs (url varchar(255) default null);
sql> INSERT INTO my_managed_s9y_blogs (url) VALUES ('http://garvin.s9yblogs.org/');
sql> INSERT INTO my_managed_s9y_blogs (url) VALUES ('http://j.s9yblogs.org/');
sql> INSERT INTO my_managed_s9y_blogs (url) VALUES ('http://tom.s9yblogs.org/');
Now you are almost ready for take-off. We assume that every user has
access to a seperate SQL database where his blog-data is later stored
in. You can already see, that the steps needed above shouldn't be to
hard to put into a customized script.sh file for use in your setup.
Open up your http://garvin.s9yblogs.org/ file. You should now see s9y's
installation screen. Enter the database- and username and the
corresponding password. Everything else can be left to the user.
Now every user can manage his/her blog just as if it were a standalone
installation.
SPECIAL NOTES:
========================================================================
* Each blog is still a standalone blog.
* If you update the core library files from version 0.5 to 0.6 (for
example) every user of your core library will get the default s9y-
Upgrader script to see and needs to update his local configuration.
As a provider for s9y blogs to your users, you are advised to migrate
the user's blogs on your own. To do so, it is best that you always
have a "spare" testing blog installed just like your user's blogs.
Open that installation and look at the upgrader. Execute it and see
that it completes without errors. If that happened, you should cycle
through a list of ALL your s9y-managed blogs like this:
<?php
$sql = mysql_query('SELECT url FROM my_managed_s9y_blogs');
while ($row = mysql_fetch_array($sql, MYSQL_ASSOC)) {
$fp = fopen($row['url'] . 'serendipity_admin.php?serendipity[action]=upgrade');
}
?>
So basically all you need to do is call that script for every s9y-
powered blog you host.
########################################################################
# NOTES FOR CONDITIONAL GET IN RSS FEEDS #
########################################################################
Serendipity supports an HTTP-cache compatible way of only showing items
in an RSS feed which where modified since the last request from a
client.
Typically, an RSS reader fetches your RSS feeds (15 items, per default).
It then remembers the timestamp when those items where fetched. By the
time your RSS reader updates the feed (typically after 1 hour)
Serendipity will now only serve all new or modified items since the last
time of refresh. If no entries where updated since then, serendipity
will only serve the 304 Header (Not Modified) and saves a lot of
bandwidth for both client and server on periodical updates.
Technically an RSS reader catches the "Last-Modified" Header of the RSS
output as well as a special "ETag"-Header. Both are set to the last
modification time of your article base. On the next fetch, those
received headers are sent as "IF_MODIFIED_SINCE" (= Last-Modified) and
"IF_NONE_MATCH" (= ETag) Headers and will affect your rss feed. This
saves a lot of bandwidth on both client and server side.
Users who have been watching your feed and where not able to catch up
the latest articles may miss some of them, because you usually only get
15 items per feed. In case your reader provides the IF_MODIFIED_SINCE
header the client can now catch all items (resp. a maximum of 50
articles to prevent abuse).
If you want to permanently disable that feature (whatever the reasons
are) you can either set a "$_REQUEST['nocache'] = true" inside your
rss.php file (first line) or append the '&nocache=true' request variable
to your feed so that it looks like:
http://example.host/serendipity/rss.php?version=2.0&nocache=true.
Of course, the usual feed behaviour is not affected if none of the
caching headers are provided. So if you use syndication methods to embed
content from a blog inside an application, just tune your application to
either send the 'nocache'-Variable to a Serendipity blog, or to not send
the caching headers.
The syndication plugin can be configured to append that variable to your
feed URLs from your blog.
########################################################################
# USER MANAGEMENT #
########################################################################
New users can be created by inserting them to the 'authors' table.
The field 'userlevel' is a special field describing which actions a
user may have:
- Userlevel 0: Standard editor. Cannot apply many administrative tasks
- Userlevel 1: Chief editor. Can apply some administrative tasks (like
title of the blog, ...
- Userlevel 255: Admin. Can change everything.
Userlevels are cumulative, thus a user with level '30' can do anything
which users of a lower level can do. Currently only the levels mentioned
above are used.
Here is a short chart of what users can do:
ACTION |editor|chief|admin
-----------------------------------------------------|------|-----|-----
Manage private plugins | - + +
Manage global plugins | - - +
Manage order of plugins | - + +
Manage configuration of private plugins | - + +
Manage configuration of all protected plugins | - - +
Manage configuration of private protected plugins | + + +
Manage all categories | - + +
Manage public categories | + + +
Manage private categories | + + +
Manage global configuration | - - +
Manage basic configuration | - + +
Manage private configuration | + + +
Manage templates | - + +
Manage 'admin' users | - - +
Manage 'chief' users | - + +
Manage 'editor' users | - + +
Manage private entries | + + +
Manage others entries | - + +
Manage comments/trackbacks to private entries | + + +
Manage comments/trackbacks to others entries | - + +
View/Link/Upload all pictures | + + +
View/Link/Upload private pictures | + + +
View/Link/Upload public pictures | + + +
Edit all pictures | - + +
Edit public pictures | + + +
Edit private pictures | + + +
------------------------------------------------------------------------
It is advised that in shared setups only the webmaster has an admin-
access. The users should be given a chief-login, and them theirselves
can distribute user logins.
########################################################################
Serendipity Weblog - http://s9y.org
Licensed under the BSD License
# $Id: README,v 1.1.2.1 2004/11/06 11:22:48 garvinhicking Exp $
--- NEW FILE: NEWS ---
# $Id: NEWS,v 1.1.2.1 2004/11/06 11:22:48 garvinhicking Exp $
Version 0.8 ()
------------------------------------------------------------------------
* Cleaned up directory structure, created new subdirectories,
split up functions file (garvinhicking)
* "Recent Entries" Plugin can now have userdefined title and only
show entries of a specific category (+ subcategories).
(garvinhicking)
* New "quicksave" button to save an entry as draft without being
redirected to entry overview, and immediately showing the preview.
Use Accesskeys: Alt-S saves entry, Alt-P previews, ALT-Q
quicksaves. (garvinhicking)
* Media browser now allows to immediately upload a file from the
entry creation screen and use that file/image easily
[...1366 lines suppressed...]
* Fixed bug #719016 - (entry-title does not escape correctly)
(tomsommer)
* Allow the showing of *complete* archived months (tomsommer)
* Fixed typo in serendipity_getCSS_avail() mysql-query (tomsommer)
* Prevent the Admin interface to be logged as referrer when using
the 'Back to Blog' link (bergmann)
* Added full language support - English, German (jhermanns)
* Keep track of which blog entry was linked from or referred to
(bergmann)
* Regenerate the .htaccess file, if installation fails (sterling &
muesli)
Version 0.2 (April 4th, 2003)
------------------------------------------------------------------------
--- NEW FILE: TODO ---
# $Id: TODO,v 1.1.2.1 2004/11/06 11:22:48 garvinhicking Exp $
This document has been moved to our WiKi:
http://www.s9y.org/32.html
--- NEW FILE: upgrade.sh ---
#!/bin/sh
# File: serendipity_safe_upgrade.sh
# Author: Jez Hancock
#
# Description:
# This shell script performs a backup of the serendipity MySQL database and
# files prior to upgrading from one version to another.
########################################################################
# Configuration options start
########################################################################
# Change this to the IP address from which you will be updgrading the blog from
# in a browser. This IP address will be used in a .htaccess file to restrict
# access during the upgrade process:
ip=192.168.0.1
# Change this to the directory containing the current serendipity web files:
blog_dir=/usr/local/www/htdocs/serendipity
# Change this to the directory containing the new serendipity web files:
# This should be the directory containing the cvs version of s9y or the s9y
# tarball contents:
import_dir=/home/username/serendipity
# Change this to the directory you wish your weblog files and database to be
# backed up to. A subdirectory 's9y.YYYYMMDD' will be created under here into
# which a tarball will be created containing the backed up webfiles and
# database.
# For example if your backup_dir is set to '/home/user/backup', a directory
# called '/home/user/backup/serendipity.20040406' will be created to contain
# the backup tarball 'serendipity_backup.tar.gz' and the backup database file
# 'serendipity_backup.sql'.
# Note if the backup directory already contains a backup from the current day,
# the script will exit without doing anything.
backup_dir=/home/username/backup
# Change this to match your database user/name. Note you will be prompted for
# your password on the commandline.
db_name="serendipity"
db_user="serendipity"
########################################################################
# Configuration options end
# You should not need to modify anything below here!
########################################################################
ok() {
echo "[OK]" ; echo ""
}
nl() {
echo ""
}
# the date ... ymd=20040331 etc ... used in backup
ymd=`date "+%Y%m%d"`
# Our backup directory:
backup_dir=$backup_dir/serendipity.$ymd
# if the backup dir exists already, exit gracefully:
if [ -d $backup_dir ];then
echo "$backup_dir already exists - exiting."
exit
fi
# make backup dir:
echo "Creating backup directory:"
nl
echo "$backup_dir"
mkdir $backup_dir && ok || \
echo "Could not create $backup_dir - exiting."
# backup current weblog to a tarball in the backup dir:
echo "Backing up weblog files from:"
nl
echo "$blog_dir"
nl
echo "to the tarball:"
nl
echo "$backup_dir/serendipity_backup.tar.gz"
set `echo "$blog_dir" | sed -e 's,\(.*\)/\(.*\),\1 \2,'`
tar zcf $backup_dir/serendipity_backup.tar.gz -C $1 $2 && ok
echo "Backing up database $db_name to file:"
nl
echo "$backup_dir/serendipity_backup.sql"
nl
echo -n "MySQL user $db_user - "
mysqldump -u$db_user -p $db_name > $backup_dir/serendipity_backup.sql \
&& ok
# make backup dir safe:
echo "Changing perms on $backup_dir to 700"
chmod 700 $backup_dir && ok
# move current blogdir out of way:
echo "Moving:"
nl
echo "$blog_dir"
nl
echo "to:"
nl
echo "$blog_dir.$ymd"
mv $blog_dir $blog_dir.$ymd && ok
# now copy in the new files:
echo "Copying files from:"
nl
echo "$import_dir"
nl
echo "to:"
nl
echo "$blog_dir"
cp -R $import_dir $blog_dir && ok
# check if a .htaccess file exists in old blog dir - if so copy over:
if [ -f "$blog_dir.$ymd/.htaccess" ]; then
cp $blog_dir.$ymd/.htaccess $blog_dir
fi
# allow only our ip during upgrade - remember to remove these lines
# after you've finished updating!:
echo "Adding .htaccess directives to restrict browser access to blog to $ip"
echo "during upgrade process"
exec >> $blog_dir/.htaccess
echo "deny from all"
echo "allow from $ip"
echo 'ErrorDocument 403 "Upgrading, please check back soon!!!'
exec > /dev/tty
ok
# copy old uploads folder over:
if [ -d $blog_dir.$ymd/uploads ];then
echo "Copying old uploads folder from:"
nl
echo "$blog_dir.$ymd/uploads"
nl
echo "to:"
nl
echo "$blog_dir/uploads"
cp -R $blog_dir.$ymd/uploads $blog_dir/uploads && ok
fi
# most importantly don't forget the local config file - this is checked
# to see whether or not your current config setup needs upgrading or
# not:
echo "Copying $blog_dir.$ymd/serendipity_config_local.inc.php to $blog_dir"
cp $blog_dir.$ymd/serendipity_config_local.inc.php $blog_dir \
&& ok
echo "########################################################################"
echo "Important!"
echo "########################################################################"
echo "Backup is now complete. Continue to upgrade your serendipity"
echo "installation by browsing to it in a web browser - you will be prompted"
echo "with instructions from there."
nl
echo "After completing the upgrade via a browser, remember to remove the lines"
echo "starting:"
nl
echo "deny from all"
echo "allow from $ip"
echo "ErrorDocument 403 ..."
nl
echo "from the .htaccess file:"
nl
echo "$blog_dir/.htaccess"
nl
nl
echo "A copy of the original serendipity web folder can be found here:"
nl
echo "$blog_dir.$ymd"
nl
echo "After confirming the upgrade was successful, you can safely remove"
echo "this directory."
# This is the place to do any custom backup stuff - for example I have various
# directory structures that I copy from my blog base directory, a few custom
# plugins I copy, etc etc.
# ...
# Uncomment/modify the following line if you run the server:
#chown -R www:www $blog_dir && chmod 600 $blog_dir/serendipity_config_local.inc.php
|