From: <vb...@us...> - 2002-09-20 04:17:46
|
Update of /cvsroot/webnotes/webnotes/themes/phpnet In directory usw-pr-cvs1:/tmp/cvs-serv5624/themes/phpnet Modified Files: theme_api.php Log Message: - Fixed the preview to use the new theme interface. - Fixed a layout problem with the preview page (because of styles). - Added APIs for updating the last-modified of pages / notes (not supported by db yet). - Renamed theme_output() to theme_body() and changed it to handle the case where the page data is false (page not indexed and auto index off). - Added theme_head() to be called with the <head>...</head> tags. - Added pwn_api.php to act the the main interface to phpWebNotes (pwn_head() and pwn_body()). - Changed the samples to use the new pwn_* apis. - Added meta tags to disable caching for pages that has phpWebNotes linked to it. - Used include_once() in all html_apis to avoid styles and other includes from being included more than once. Index: theme_api.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/themes/phpnet/theme_api.php,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- theme_api.php 20 Sep 2002 02:48:47 -0000 1.17 +++ theme_api.php 20 Sep 2002 04:17:43 -0000 1.18 @@ -22,18 +22,18 @@ require_once ( dirname( dirname( dirname( __FILE__ ) ) ) . DIRECTORY_SEPARATOR . 'core' . DIRECTORY_SEPARATOR . 'api.php' ); - # Identifies the version of the theme. This will allow the phpWebNotes - # engine in the future to support themes that are designed for older - # versions of phpWebNotes. - function theme_version() { - return (1); - } - - # This function is called if the current page was not indexed - function theme_not_indexed( $p_page ) { + ### -------------------- + function theme_head() { + global $g_css_inc_file; + print_css( $g_css_inc_file ); } + ### -------------------- + function theme_body( $p_page_data ) { + if ( false === $p_page_data ) { + # @@@ Handle not indexed (and auto index off) + return; + } - function theme_output( $p_page_data ) { global $g_note_add_page, $s_add_note_link, $s_manage, $s_admin, $g_web_directory, $g_theme; @@ -184,7 +184,7 @@ $t_navigation_row = "<tr><td>$t_prev_text</td><td align=\"right\">$t_next_text</td></tr>"; } - if ( !$p_page_data['preview'] ) { + if ( false === $p_page_data['preview'] ) { $t_link_start = "<a href=\"$g_note_add_page?f_page_id=$t_page_id&f_url=$c_url\">"; $t_link_end = '</a>'; } else { @@ -206,9 +206,9 @@ echo <<<EOT <table border="0" width="100%" bgcolor="#e0e0e0" cellpadding="0" cellspacing="4"> $t_navigation_row - <tr bgcolor="#cccccc"><td colspan="2"></td></tr> <tr><td align="right" colspan="2"><small>Last updated: Tue, 17 Sep 2002</small></td></tr> </table> EOT; } + ### -------------------- ?> |