Update of /cvsroot/php-blog/serendipity
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12642
Modified Files:
NEWS serendipity_admin_entries.inc.php
serendipity_functions.inc.php
Log Message:
New event plugin: HTML Validator.
If used, it can validate your entries upon preview of your created entry.
Index: NEWS
===================================================================
RCS file: /cvsroot/php-blog/serendipity/NEWS,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -d -r1.64 -r1.65
--- NEWS 10 Feb 2004 13:36:40 -0000 1.64
+++ NEWS 10 Feb 2004 15:48:45 -0000 1.65
@@ -2,6 +2,7 @@
Version 0.5.1 ()
------------------------------------
+ * HTML Validator event plugin. Can be used to validate your entry upon preview (garvinhicking)
* Create example events: mailer, weblogping, contentrewrite, eventwrapper (garvinhicking)
* Created event plugin API to hook on certain serendipity actions (garvinhicking)
* Redesigned image manager (tomsommer)
Index: serendipity_admin_entries.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_admin_entries.inc.php,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- serendipity_admin_entries.inc.php 8 Feb 2004 12:06:05 -0000 1.16
+++ serendipity_admin_entries.inc.php 10 Feb 2004 15:48:45 -0000 1.17
@@ -185,9 +185,9 @@
echo '<strong>' . PREVIEW . '</strong>';
echo '<div style="border:1px solid #000000; padding: 15px;">';
- serendipity_printEntries(array($entry), ($entry['extended'] != '' ? 1 : 0));
+ serendipity_printEntries(array($entry), ($entry['extended'] != '' ? 1 : 0), true);
echo '</div>';
-
+
serendipity_printEntryForm(
'?',
array(
Index: serendipity_functions.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_functions.inc.php,v
retrieving revision 1.201
retrieving revision 1.202
diff -u -d -r1.201 -r1.202
--- serendipity_functions.inc.php 9 Feb 2004 15:20:52 -0000 1.201
+++ serendipity_functions.inc.php 10 Feb 2004 15:48:45 -0000 1.202
@@ -717,7 +717,7 @@
/**
* Prints the entries you fetched with serendipity_fetchEntries/searchEntries in HTML.
**/
-function serendipity_printEntries($entries, $extended = 0) {
+function serendipity_printEntries($entries, $extended = 0, $preview = false) {
global $serendipity;
/* pre-walk the array to collect them keyed by date */
@@ -832,6 +832,9 @@
?>
</div>
<?php
+ if ($preview) {
+ serendipity_plugin_api::hook_event('backend_preview', $article);
+ }
} // end for-loop (entries)
?>
</div>
|