Update of /cvsroot/php-blog/serendipity
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28213
Modified Files:
INSTALL NEWS serendipity_sidebar_items.php
Log Message:
Moved caching explanations to the README file as suggested by tom.
Added configuration parameters to prevent caching inside the syndication
plugin. Translations needed.
Index: INSTALL
===================================================================
RCS file: /cvsroot/php-blog/serendipity/INSTALL,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- INSTALL 21 Jan 2004 18:28:25 -0000 1.8
+++ INSTALL 25 Feb 2004 08:41:24 -0000 1.9
@@ -71,78 +71,6 @@
###############################################################################
-###############################################################################
-# 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!
-
-###############################################################################
Serendipity Weblog - http://s9y.org
Licensed under the BSD License
Index: NEWS
===================================================================
RCS file: /cvsroot/php-blog/serendipity/NEWS,v
retrieving revision 1.75
retrieving revision 1.76
diff -u -d -r1.75 -r1.76
--- NEWS 18 Feb 2004 11:49:12 -0000 1.75
+++ NEWS 25 Feb 2004 08:41:24 -0000 1.76
@@ -2,14 +2,7 @@
Version 0.5.1 ()
------------------------------------
- * Conditional GET logic for RSS feeds using HTTP caching methods. (garvinhicking)
-
- RSS readers will only fetch the latest items of the feed since last modification date. Saves bandwidth
- and only affects Readers. RSS-Syndication is unaffected, since it usually doesn't use IF_MODIFIED_SINCE
- headers. Will in a side affect also allow to get all missed items since the last refresh. Can also be
- overriden by appending a '&nocache' HTTP-Parameter to the RSS feed. Supported by RSS Bandit, Sharpreader etc.
-
- [NOTE: Requires database schema update, provided in db_update-0.5-0.5.1.sql]
+ * Conditional GET logic for RSS feeds using HTTP caching methods. See README for instructions, needs database schema update [db_update-0.5-0.5.1.sql] (garvinhicking)
* Small XHTML-compliance fixes. (garvinhicking)
* Image manager: Allow sorting by date/file attributes, changing sort order and choosing items displayed per page (garvinhicking)
* Fixed wrong link to entry when not using any rewrite rule (tomsommer & AlfaTeK)
Index: serendipity_sidebar_items.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_sidebar_items.php,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -d -r1.44 -r1.45
--- serendipity_sidebar_items.php 18 Feb 2004 11:48:23 -0000 1.44
+++ serendipity_sidebar_items.php 25 Feb 2004 08:41:24 -0000 1.45
@@ -130,11 +130,13 @@
$propbag->add('description', SHOWS_RSS_BLAHBLAH);
$propbag->add('configuration', array(
'show_0.91',
+ 'show_1.0',
'show_2.0',
'show_2.0c',
- 'show_1.0',
'show_atom0.3',
'seperator',
+ 'prevent_cache',
+ 'seperator',
'field_managingEditor',
'field_webMaster',
'field_ttl',
@@ -184,6 +186,12 @@
$propbag->add('type', 'seperator');
break;
+ case 'prevent_cache':
+ $propbag->add('type', 'boolean');
+ $propbag->add('name', SYNDICATION_PLUGIN_PREVENT_CACHE);
+ $propbag->add('description', SYNDICATION_PLUGIN_PREVENT_CACHE_DESC);
+ break;
+
case 'field_managingEditor':
$propbag->add('type', 'string');
$propbag->add('name', SYNDICATION_PLUGIN_MANAGINGEDITOR);
@@ -237,42 +245,49 @@
global $serendipity;
$title = SYNDICATE_THIS_BLOG;
+
+ if ($this->get_config('prevent_cache') == 'true') {
+ $cache = '&nocache=true';
+ } else {
+ $cache = '';
+ }
if ($this->get_config('show_0.91') != 'false') {
?>
- <a href="<?php echo $serendipity['serendipityHTTPPath']; ?>rss.php?version=0.91"><img src="<?php echo $serendipity['serendipityHTTPPath']; ?>pixel/xml.gif" <?php echo ($serendipity['XHTML11'] ? 'style="border: 0px"' : 'border="0"'); ?> alt="XML" /></a>
- <a href="<?php echo $serendipity['serendipityHTTPPath']; ?>rss.php?version=0.91">RSS 0.91 feed</a>
+ <a href="<?php echo $serendipity['serendipityHTTPPath']; ?>rss.php?version=0.91<?php echo $cache; ?>"><img src="<?php echo $serendipity['serendipityHTTPPath']; ?>pixel/xml.gif" <?php echo ($serendipity['XHTML11'] ? 'style="border: 0px"' : 'border="0"'); ?> alt="XML" /></a>
+ <a href="<?php echo $serendipity['serendipityHTTPPath']; ?>rss.php?version=0.91<?php echo $cache; ?>">RSS 0.91 feed</a>
<br />
<?php
}
+
if ($this->get_config('show_1.0') != 'false') {
?>
- <a href="<?php echo $serendipity['serendipityHTTPPath']; ?>rss.php?version=1.0"><img src="<?php echo $serendipity['serendipityHTTPPath']; ?>pixel/xml.gif" <?php echo ($serendipity['XHTML11'] ? 'style="border: 0px"' : 'border="0"'); ?> alt="XML" /></a>
- <a href="<?php echo $serendipity['serendipityHTTPPath']; ?>rss.php?version=1.0">RSS 1.0 feed</a>
+ <a href="<?php echo $serendipity['serendipityHTTPPath']; ?>rss.php?version=1.0<?php echo $cache; ?>"><img src="<?php echo $serendipity['serendipityHTTPPath']; ?>pixel/xml.gif" <?php echo ($serendipity['XHTML11'] ? 'style="border: 0px"' : 'border="0"'); ?> alt="XML" /></a>
+ <a href="<?php echo $serendipity['serendipityHTTPPath']; ?>rss.php?version=1.0<?php echo $cache; ?>">RSS 1.0 feed</a>
<br />
<?php
}
if ($this->get_config('show_2.0') != 'false') {
?>
- <a href="<?php echo $serendipity['serendipityHTTPPath']; ?>rss.php?version=2.0"><img src="<?php echo $serendipity['serendipityHTTPPath']; ?>pixel/xml.gif" <?php echo ($serendipity['XHTML11'] ? 'style="border: 0px"' : 'border="0"'); ?> alt="XML" /></a>
- <a href="<?php echo $serendipity['serendipityHTTPPath']; ?>rss.php?version=2.0">RSS 2.0 feed</a>
+ <a href="<?php echo $serendipity['serendipityHTTPPath']; ?>rss.php?version=2.0<?php echo $cache; ?>"><img src="<?php echo $serendipity['serendipityHTTPPath']; ?>pixel/xml.gif" <?php echo ($serendipity['XHTML11'] ? 'style="border: 0px"' : 'border="0"'); ?> alt="XML" /></a>
+ <a href="<?php echo $serendipity['serendipityHTTPPath']; ?>rss.php?version=2.0<?php echo $cache; ?>">RSS 2.0 feed</a>
<br />
<?php
}
if ($this->get_config('show_atom0.3') != 'false') {
?>
- <a href="<?php echo $serendipity['serendipityHTTPPath']; ?>rss.php?version=atom0.3"><img src="<?php echo $serendipity['serendipityHTTPPath']; ?>pixel/xml.gif" <?php echo ($serendipity['XHTML11'] ? 'style="border: 0px"' : 'border="0"'); ?> alt="ATOM/XML" /></a>
- <a href="<?php echo $serendipity['serendipityHTTPPath']; ?>rss.php?version=atom0.3">ATOM 0.3 feed</a>
+ <a href="<?php echo $serendipity['serendipityHTTPPath']; ?>rss.php?version=atom0.3<?php echo $cache; ?>"><img src="<?php echo $serendipity['serendipityHTTPPath']; ?>pixel/xml.gif" <?php echo ($serendipity['XHTML11'] ? 'style="border: 0px"' : 'border="0"'); ?> alt="ATOM/XML" /></a>
+ <a href="<?php echo $serendipity['serendipityHTTPPath']; ?>rss.php?version=atom0.3<?php echo $cache; ?>">ATOM 0.3 feed</a>
<br />
<?php
}
if ($this->get_config('show_2.0c') != 'false') {
?>
- <a href="<?php echo $serendipity['serendipityHTTPPath']; ?>rss.php?version=2.0&type=comments"><img src="<?php echo $serendipity['serendipityHTTPPath']; ?>pixel/xml.gif" <?php echo ($serendipity['XHTML11'] ? 'style="border: 0px"' : 'border="0"'); ?> alt="XML" /></a>
- <a href="<?php echo $serendipity['serendipityHTTPPath']; ?>rss.php?version=2.0&type=comments"><?php echo ($serendipity['XHTML11'] ? '<span style="white-space: nowrap">' : '<nobr>'); ?>RSS 2.0 <?php echo COMMENTS; ?><?php echo ($serendipity['XHTML11'] ? '</span>' : '</nobr>'); ?></a>
+ <a href="<?php echo $serendipity['serendipityHTTPPath']; ?>rss.php?version=2.0&type=comments<?php echo $cache; ?>"><img src="<?php echo $serendipity['serendipityHTTPPath']; ?>pixel/xml.gif" <?php echo ($serendipity['XHTML11'] ? 'style="border: 0px"' : 'border="0"'); ?> alt="XML" /></a>
+ <a href="<?php echo $serendipity['serendipityHTTPPath']; ?>rss.php?version=2.0&type=comments<?php echo $cache; ?>"><?php echo ($serendipity['XHTML11'] ? '<span style="white-space: nowrap">' : '<nobr>'); ?>RSS 2.0 <?php echo COMMENTS; ?><?php echo ($serendipity['XHTML11'] ? '</span>' : '</nobr>'); ?></a>
<?php
}
}
|