From: <vb...@us...> - 2002-09-20 04:17:45
|
Update of /cvsroot/webnotes/webnotes In directory usw-pr-cvs1:/tmp/cvs-serv5624 Modified Files: note_add.php note_preview_page.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: note_add.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/note_add.php,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- note_add.php 18 Sep 2002 12:33:31 -0000 1.16 +++ note_add.php 20 Sep 2002 04:17:42 -0000 1.17 @@ -41,7 +41,6 @@ } else { echo "$s_sql_error_msg <a href=\"$g_administrator_email\">$s_administrator</a><br />"; - echo $query; } echo '<br />'; Index: note_preview_page.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/note_preview_page.php,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- note_preview_page.php 18 Sep 2002 12:33:31 -0000 1.6 +++ note_preview_page.php 20 Sep 2002 04:17:42 -0000 1.7 @@ -16,6 +16,7 @@ print_head_top(); print_title( $g_window_title ); print_css( $g_css_inc_file ); + theme_head(); print_head_bottom(); print_body_top(); @@ -41,10 +42,18 @@ $t_note['date'] = date ($g_date_format); $t_note['note'] = $f_note; - $t_page = page_get_name( $f_page_id ); - theme_notes_start( $t_page, $f_url, true ); - theme_notes_echo( $t_page, $f_url, $t_note, true ); - theme_notes_end( $t_page, $f_url, true ); + $t_page_data = array(); + $t_page_data['id'] = 0; + $t_page_data['page'] = page_get_name( $f_page_id ); + $t_page_data['url'] = $f_url; + $t_page_data['preview'] = true; + $t_page_data['prev_page'] = ''; + $t_page_data['prev_url'] = ''; + $t_page_data['next_page'] = ''; + $t_page_data['next_url'] = ''; + $t_page_data['notes'] = array ( $t_note ); + + theme_body( $t_page_data ); $f_email = string_to_form( $f_email ); $f_note = string_to_form( $f_note ); |