You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(240) |
Oct
(66) |
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(9) |
Sep
(7) |
Oct
|
Nov
|
Dec
|
From: <vb...@us...> - 2002-09-26 12:29:33
|
Update of /cvsroot/webnotes/webnotes/images In directory usw-pr-cvs1:/tmp/cvs-serv14439/images Added Files: bigsmile.gif cool.gif mad.gif sad.gif shocked.gif smile.gif wink.gif Log Message: - 0000059: Added checking for the enabled flag (part 2). - 0000065: Emotion icons --- NEW FILE: bigsmile.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: cool.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: mad.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: sad.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: shocked.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: smile.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: wink.gif --- (This appears to be a binary file; contents omitted.) |
From: <vb...@us...> - 2002-09-26 12:29:32
|
Update of /cvsroot/webnotes/webnotes/doc In directory usw-pr-cvs1:/tmp/cvs-serv14439/doc Modified Files: INSTALL Log Message: - 0000059: Added checking for the enabled flag (part 2). - 0000065: Emotion icons Index: INSTALL =================================================================== RCS file: /cvsroot/webnotes/webnotes/doc/INSTALL,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- INSTALL 19 Sep 2002 21:51:02 -0000 1.5 +++ INSTALL 26 Sep 2002 12:29:30 -0000 1.6 @@ -92,6 +92,13 @@ and lower it. There should be enough comments around the variable to help you out. +* PROBLEM: After upgrading from phpWebNotes 1.0.0, I can not login. + +SOLUTION: Users were created in version 1.0.0 with enabled equal to 0. This was not +a problem in v1.0.0 because the enabled field was ignored. However, in v2.0.0 enabled +is checked. In order to solve this problem, login to the database and set the enabled +flag to 1 for the accounts that you need enabled. + * PROBLEM: Adding notes does nothing (obsolete since PHP 4.0.6 is the minimum requirement). SOLUTION 1: You may have track_vars set to Off (or 0). Set this to On in your |
From: <vb...@us...> - 2002-09-26 12:29:32
|
Update of /cvsroot/webnotes/webnotes/core In directory usw-pr-cvs1:/tmp/cvs-serv14439/core Modified Files: string_api.php user_api.php Log Message: - 0000059: Added checking for the enabled flag (part 2). - 0000065: Emotion icons Index: string_api.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/core/string_api.php,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- string_api.php 26 Sep 2002 06:55:05 -0000 1.7 +++ string_api.php 26 Sep 2002 12:29:30 -0000 1.8 @@ -67,11 +67,27 @@ return ( preg_replace( '/#([0-9]+)/', "<a href=\"$p_page_url#\\1\">#\\1</a>", $p_note ) ); } ### -------------------- + function string_emotions( $p_note ) { + $images_dir = config_get( 'web_directory' ) . 'images/'; + + $smile = '<img src="' . $images_dir . 'smile.gif" alt=":)" />'; + $sad = '<img src="' . $images_dir . 'sad.gif" alt=":(" />'; + $wink = '<img src="' . $images_dir . 'wink.gif" alt=";)" />'; + $big_smile = '<img src="' . $images_dir . 'bigsmile.gif" alt=":D" />'; + + $p_note = str_replace( ':)', $smile, $p_note ); + $p_note = str_replace( ':(', $sad, $p_note ); + $p_note = str_replace( ';)', $wink, $p_note ); + $p_note = str_replace( ':D', $big_smile, $p_note ); + + return ( $p_note ); + } + ### -------------------- function string_prepare_note_for_viewing( $p_note_string, $p_url = null ) { if ( null !== $p_url ) { - return( string_add_note_links( $p_url, string_preserve_spaces_at_bol( htmlspecialchars( $p_note_string ) ) ) ); + return( string_emotions( string_add_note_links( $p_url, string_preserve_spaces_at_bol( htmlspecialchars( $p_note_string ) ) ) ) ); } else { - return( string_preserve_spaces_at_bol( htmlspecialchars( $p_note_string ) ) ); + return( string_emotions( string_preserve_spaces_at_bol( htmlspecialchars( $p_note_string ) ) ) ); } } ### -------------------- Index: user_api.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/core/user_api.php,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- user_api.php 26 Sep 2002 12:03:59 -0000 1.9 +++ user_api.php 26 Sep 2002 12:29:30 -0000 1.10 @@ -15,12 +15,12 @@ ### -------------------- function user_create( $p_username, $p_password, $p_email, $p_access_level = null, $p_enabled = true ) { if ( false !== user_get_info( user_where_username_equals( $p_username ) ) ) { - echo "Duplicate user.<br />"; + echo "<p>Duplicate user.</p>"; return false; } if ( false !== user_get_info( user_where_email_equals( $p_email ) ) ) { - echo "Duplicate email.<br />"; + echo "<p>Duplicate email.</p>"; return false; } @@ -36,8 +36,8 @@ $t_cookie_string = create_cookie_string( $t_seed ); $c_cookie_string = db_prepare_string( $t_cookie_string ); - $query = "INSERT INTO phpWN_user_table (username, password, email, cookie_string) - VALUES ('$c_username', '$c_encrypted_password', '$c_email', '$c_cookie_string')"; + $query = "INSERT INTO phpWN_user_table (username, password, email, cookie_string, enabled) + VALUES ('$c_username', '$c_encrypted_password', '$c_email', '$c_cookie_string', 1)"; $result = mysql_query($query); return( false !== $result ); |
From: <vb...@us...> - 2002-09-26 12:27:11
|
Update of /cvsroot/webnotes/webnotes/images In directory usw-pr-cvs1:/tmp/cvs-serv13402/images Log Message: Directory /cvsroot/webnotes/webnotes/images added to the repository |
From: <vb...@us...> - 2002-09-26 12:04:02
|
Update of /cvsroot/webnotes/webnotes In directory usw-pr-cvs1:/tmp/cvs-serv5061 Modified Files: login.php signup_page.php Log Message: - Modified the signup page to use the new style. - 0000059: Added checking for the enabled flag. - Updated scratch pad. Index: login.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/login.php,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- login.php 21 Sep 2002 02:44:32 -0000 1.13 +++ login.php 26 Sep 2002 12:03:58 -0000 1.14 @@ -14,7 +14,7 @@ $f_password = gpc_get_string( 'f_password' ); $f_perm_login = gpc_get_string( 'f_perm_login', 'off' ); - $row = user_get_info( user_where_username_equals( $f_username ) ); + $row = user_get_info( user_where_username_equals_and_enabled( $f_username ) ); if ( $row ) { extract( $row, EXTR_PREFIX_ALL, 'v' ); Index: signup_page.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/signup_page.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- signup_page.php 16 Sep 2002 13:27:19 -0000 1.2 +++ signup_page.php 26 Sep 2002 12:03:59 -0000 1.3 @@ -48,25 +48,28 @@ } echo <<<EOT + <div class="spacer"></div> <div align="center"> + <div class="small-width"> <form name="f_signup_form" action="$PHP_SELF" method="post"> - <table class="width50" summary=""> - <tr> - <td colspan="2" class="form-title"><strong>Sign Up</strong></td> + <table class="box" summary=""> + <tr class="title"> + <td colspan="2"><strong>Sign Up</strong></td> </tr> <tr class="row-1"> - <td class="category" width="25%">$s_username:</td> + <th width="25%">$s_username:</th> <td width="75%"><input type="text" name="f_username" size="32" maxlength="32" /></td> </tr> <tr class="row-2"> - <td class="category">E-mail:</td> + <th>E-mail:</th> <td><input type="text" name="f_email" size="32" maxlength="64" /></td> </tr> - <tr> - <td class="form-buttons" colspan="2"><input type="submit" name="submit" value="Register" /></td> + <tr class="buttons"> + <td colspan="2"><input type="submit" name="submit" value="Register" /></td> </tr> </table> </form> + </div> </div> <script type="text/javascript" language="JavaScript"> |
From: <vb...@us...> - 2002-09-26 12:04:02
|
Update of /cvsroot/webnotes/webnotes/core In directory usw-pr-cvs1:/tmp/cvs-serv5061/core Modified Files: access_api.php user_api.php Log Message: - Modified the signup page to use the new style. - 0000059: Added checking for the enabled flag. - Updated scratch pad. Index: access_api.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/core/access_api.php,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- access_api.php 21 Sep 2002 02:44:33 -0000 1.8 +++ access_api.php 26 Sep 2002 12:03:59 -0000 1.9 @@ -105,7 +105,7 @@ ### get user info $query = "SELECT * FROM $g_phpWN_user_table - WHERE username='$c_username'"; + WHERE username='$c_username' AND enabled=1"; $result = db_query( $query ); $row = db_fetch_array( $result ); Index: user_api.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/core/user_api.php,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- user_api.php 17 Sep 2002 06:25:03 -0000 1.8 +++ user_api.php 26 Sep 2002 12:03:59 -0000 1.9 @@ -79,6 +79,11 @@ return ("(username='$c_username')"); } ### -------------------- + function user_where_username_equals_and_enabled( $p_username ) { + $c_username = db_prepare_string( $p_username ); + return ("((username='$c_username') AND (enabled=1))"); + } + ### -------------------- function user_where_email_equals( $p_email ) { $c_email = db_prepare_string( $p_email ); return ("(email='$c_email')"); |
From: <vb...@us...> - 2002-09-26 12:04:02
|
Update of /cvsroot/webnotes/webnotes/doc In directory usw-pr-cvs1:/tmp/cvs-serv5061/doc Modified Files: SCRATCHPAD Log Message: - Modified the signup page to use the new style. - 0000059: Added checking for the enabled flag. - Updated scratch pad. Index: SCRATCHPAD =================================================================== RCS file: /cvsroot/webnotes/webnotes/doc/SCRATCHPAD,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- SCRATCHPAD 9 Sep 2002 05:10:25 -0000 1.1 +++ SCRATCHPAD 26 Sep 2002 12:03:59 -0000 1.2 @@ -9,17 +9,11 @@ To-Do list: - * Index pages by url rather than path, this way hyperlinks to the pages goes through Web/PHP servers rather than directly. - * Be able to require user logins (vb: currently login check is disabled) - * Be able to reverse the display order (vb: them may already be supported) - * Support for user supplied CSS. (vb: value to be confirmed) + * Be able to reverse the display order (vb: they may already be supported) * Consider re-using some APIs like config_api.php / lang_api.php / database_api.php / php_api.php / gpc_api.php from mantisbt. * Add access_api.php - note_accept() / decline() / update() / delete() should check the access level. - * Support displaying queued notes on the page in case of moderators. There should be an accept/reject links on the note and it should be in a different color. * Consider supporting html only pages. This can be done by a php loader page + some other tricks (output buffering?) * Indexing page * Add a link next to each file to open it for viewing. - * Differentiate between newly submitted notes, and notes that are hidden by - the admin. * API mode for plugability into existing systems. * Add note on how to parse HTML files through the PHP interpreter. |
From: <vb...@us...> - 2002-09-26 06:55:09
|
Update of /cvsroot/webnotes/webnotes/themes/phpnet In directory usw-pr-cvs1:/tmp/cvs-serv20913/themes/phpnet Modified Files: theme.css theme_api.php Log Message: - Removed some hard-coded formatting from the theme, and moved it to the theme.css - Removed some styles which were not needed. - Used strict XHTML validator with the phpnet theme output and fixed all errors. (there is only one remaining error in the sample files which uses border="0" for the source forge logo). - Used htmlspecialchars() rather than string_disable_html() and used it for e-mail / note. This is to escape chars like <, >, and hence get no errors from the validator. - Removed strings_disable_html() - #<note id> will now work in the e-mail (title) field. Index: theme.css =================================================================== RCS file: /cvsroot/webnotes/webnotes/themes/phpnet/theme.css,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- theme.css 26 Sep 2002 04:41:53 -0000 1.3 +++ theme.css 26 Sep 2002 06:55:05 -0000 1.4 @@ -15,3 +15,5 @@ div.phpnet .light { background-color: #e0e0e0; } div.phpnet .lighter { background-color: #f0f0f0; } div.phpnet tr { vertical-align: top; } +div.phpnet img { border: 0px; } +div.phpnet table { border: 0px; width: 100%; } Index: theme_api.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/themes/phpnet/theme_api.php,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- theme_api.php 26 Sep 2002 04:41:53 -0000 1.26 +++ theme_api.php 26 Sep 2002 06:55:05 -0000 1.27 @@ -62,12 +62,12 @@ echo <<<EOT <div class="phpnet"> - <table summary="" border="0" cellpadding="4" cellspacing="0" width="100%"> + <table summary="" cellpadding="4" cellspacing="0"> <tr class="dark"> <td><small>User Contributed Notes</small><br /><strong>$t_page</strong></td> <td align="right"> - $t_link_start<img src="$add_picture" border="0" width="13" height="13" alt="Add Notes" />$t_link_end - <img src="$help_picture" border="0" width="13" height="13" alt="About Notes" /> + $t_link_start<img src="$add_picture" width="13" height="13" alt="Add Notes" />$t_link_end + <img src="$help_picture" width="13" height="13" alt="About Notes" /> </td> </tr> EOT; @@ -124,12 +124,12 @@ } if ( isset( $t_note_info['id'] ) && ( $t_note_info['id'] != 0 ) ) { - $t_id = '#' . (integer)$t_note_info['id']; + $t_id = (integer)$t_note_info['id']; $t_visibility = ''; if ( NOTE_VISIBLE_ACCEPTED != $t_note_info['visible'] ) { $t_visibility = '(' . note_get_visibility_str( $t_note_info['visible'] ) . ') - '; } - $t_id_view = "<tt>$t_visibility$t_id<br />$t_moderation</tt>"; + $t_id_view = "<tt>$t_visibility#$t_id<br />$t_moderation</tt>"; $t_id_bookmark = "<a name=\"$t_id\"></a>"; } else { $t_id_view = ' '; @@ -160,7 +160,7 @@ <td colspan="2"> $t_id_bookmark - <table summary="" border="0" cellpadding="2" cellspacing="0" width="100%"> + <table summary="" cellpadding="2" cellspacing="0"> <tr class="light"> <td><strong>$t_email</strong><br />$t_date</td> <td align="right">$t_id_view</td> @@ -182,7 +182,7 @@ if ( empty( $p_page_data['prev_page'] ) ) { $t_prev_text = ''; } else { - $t_prev_text = "<img src=\"$prev_picture\" border=\"0\" width=\"11\" height=\"7\" alt=\"" . $p_page_data['prev_page'] . "\" />" . + $t_prev_text = "<img src=\"$prev_picture\" width=\"11\" height=\"7\" alt=\"" . $p_page_data['prev_page'] . "\" />" . link_create( $p_page_data['prev_url'], $p_page_data['prev_page'], true, '', '' ); } @@ -190,7 +190,7 @@ $t_next_text = ''; } else { $t_next_text = link_create( $p_page_data['next_url'], $p_page_data['next_page'], true, '', '' ) . - "<img src=\"$next_picture\" border=\"0\" width=\"11\" height=\"7\" alt=\"" . $p_page_data['next_page'] . "\" />"; + "<img src=\"$next_picture\" width=\"11\" height=\"7\" alt=\"" . $p_page_data['next_page'] . "\" />"; } if ( empty( $t_prev_text ) && empty( $t_next_text ) ) { @@ -210,8 +210,8 @@ echo <<<EOT <tr class="dark"> <td colspan="2" align="right"> - $t_link_start<img src="$add_picture" border="0" width="13" height="13" alt="Add Notes" />$t_link_end - <img src="$help_picture" border="0" width="13" height="13" alt="About Notes" /> + $t_link_start<img src="$add_picture" width="13" height="13" alt="Add Notes" />$t_link_end + <img src="$help_picture" width="13" height="13" alt="About Notes" /> </td> </tr> EOT; @@ -222,7 +222,7 @@ $t_last_updated = date('D, d M Y - G:i:s', $p_page_data['last_updated']); echo <<<EOT <tr class="dark"><td colspan="2"> - <table class="light" border="0" width="100%" cellpadding="0" cellspacing="4"> + <table class="light" cellpadding="0" cellspacing="4"> $t_navigation_row <tr><td align="right" colspan="2"><small>Last updated: $t_last_updated</small></td></tr> </table> |
From: <vb...@us...> - 2002-09-26 06:55:08
|
Update of /cvsroot/webnotes/webnotes/sample In directory usw-pr-cvs1:/tmp/cvs-serv20913/sample Modified Files: webservices.php xhtml.php xml.php Log Message: - Removed some hard-coded formatting from the theme, and moved it to the theme.css - Removed some styles which were not needed. - Used strict XHTML validator with the phpnet theme output and fixed all errors. (there is only one remaining error in the sample files which uses border="0" for the source forge logo). - Used htmlspecialchars() rather than string_disable_html() and used it for e-mail / note. This is to escape chars like <, >, and hence get no errors from the validator. - Removed strings_disable_html() - #<note id> will now work in the e-mail (title) field. Index: webservices.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/sample/webservices.php,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- webservices.php 20 Sep 2002 04:17:43 -0000 1.7 +++ webservices.php 26 Sep 2002 06:55:05 -0000 1.8 @@ -32,7 +32,7 @@ <?php pwn_body( 'Web Services', $PHP_SELF, 'XHTML', null ); ?> - <br /> - <a href="http://sourceforge.net/projects/webnotes/"><img src="http://sourceforge.net/sflogo.php?group_id=15381&type=5" width="140" height="42" border="0" alt="phpWebNotes @ SourceForge"></a> + <p> + <a href="http://sourceforge.net/projects/webnotes/"><img src="http://sourceforge.net/sflogo.php?group_id=15381&type=5" width="140" height="42" border="0" alt="phpWebNotes @ SourceForge" /></a></p> </body> </html> Index: xhtml.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/sample/xhtml.php,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- xhtml.php 20 Sep 2002 04:17:43 -0000 1.3 +++ xhtml.php 26 Sep 2002 06:55:05 -0000 1.4 @@ -16,7 +16,7 @@ <p>A device designer, using standard building blocks, will specify which elements are supported. Content creators will then target these building blocks--or modules.</p> <p>Because these modules conform to certain standards, XHTML's extensibility ensures that layout and presentation stay true-to-form over any platform.</p> <?php pwn_body( 'XHTML', $PHP_SELF, 'XML', 'Web Services' ); ?> - <br /> - <a href="http://sourceforge.net/projects/webnotes/"><img src="http://sourceforge.net/sflogo.php?group_id=15381&type=5" width="140" height="42" border="0" alt="phpWebNotes @ SourceForge"></a> + <p> + <a href="http://sourceforge.net/projects/webnotes/"><img src="http://sourceforge.net/sflogo.php?group_id=15381&type=5" width="140" height="42" border="0" alt="phpWebNotes @ SourceForge" /></a></p> </body> </html> Index: xml.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/sample/xml.php,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- xml.php 20 Sep 2002 04:17:43 -0000 1.7 +++ xml.php 26 Sep 2002 06:55:05 -0000 1.8 @@ -24,7 +24,7 @@ <p>The above definition was copied from <a href="http://www.webopedia.com">Webopedia</a>.</p> <?php pwn_body( 'XML', $PHP_SELF, null, 'XHTML' ); ?> - <br /> - <a href="http://sourceforge.net/projects/webnotes/"><img src="http://sourceforge.net/sflogo.php?group_id=15381&type=5" width="140" height="42" border="0" alt="phpWebNotes @ SourceForge"></a> + <p> + <a href="http://sourceforge.net/projects/webnotes/"><img src="http://sourceforge.net/sflogo.php?group_id=15381&type=5" width="140" height="42" border="0" alt="phpWebNotes @ SourceForge" /></a></p> </body> </html> |
From: <vb...@us...> - 2002-09-26 06:55:08
|
Update of /cvsroot/webnotes/webnotes/core In directory usw-pr-cvs1:/tmp/cvs-serv20913/core Modified Files: meta_inc.php note_api.php string_api.php Log Message: - Removed some hard-coded formatting from the theme, and moved it to the theme.css - Removed some styles which were not needed. - Used strict XHTML validator with the phpnet theme output and fixed all errors. (there is only one remaining error in the sample files which uses border="0" for the source forge logo). - Used htmlspecialchars() rather than string_disable_html() and used it for e-mail / note. This is to escape chars like <, >, and hence get no errors from the validator. - Removed strings_disable_html() - #<note id> will now work in the e-mail (title) field. Index: meta_inc.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/core/meta_inc.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- meta_inc.php 10 Sep 2002 01:14:35 -0000 1.1 +++ meta_inc.php 26 Sep 2002 06:55:05 -0000 1.2 @@ -15,8 +15,8 @@ $g_content_expire = 0; } ?> -<META HTTP-EQUIV="Pragma" CONTENT="no-cache"> -<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache"> -<META HTTP-EQUIV="Pragma-directive" CONTENT="no-cache"> -<META HTTP-EQUIV="Cache-Directive" CONTENT="no-cache"> -<META HTTP-EQUIV="Expires" CONTENT="<?php echo $g_content_expire ?>"> \ No newline at end of file +<meta http-equiv="Pragma" content="no-cache" /> +<meta http-equiv="Cache-Control" content="no-cache" /> +<meta http-equiv="Pragma-directive" content="no-cache" /> +<meta http-equiv="Cache-Directive" content="no-cache" /> +<meta http-equiv="Expires" content="<?php echo $g_content_expire ?>" /> \ No newline at end of file Index: note_api.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/core/note_api.php,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- note_api.php 26 Sep 2002 03:41:46 -0000 1.28 +++ note_api.php 26 Sep 2002 06:55:05 -0000 1.29 @@ -210,7 +210,7 @@ $info['visible'] = $v_visible; $info['id'] = $v_id; - $info['email'] = $v_email; + $info['email'] = string_prepare_note_for_viewing ( $v_email, $t_page_info['url'] ); $info['note'] = string_prepare_note_for_viewing ( $v_note, $t_page_info['url'] ); $info['date'] = $v_date_submitted; Index: string_api.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/core/string_api.php,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- string_api.php 24 Sep 2002 06:14:40 -0000 1.6 +++ string_api.php 26 Sep 2002 06:55:05 -0000 1.7 @@ -63,19 +63,15 @@ return htmlspecialchars( addslashes( $p_string ) ); } ### -------------------- - function string_disable_html( $p_string ) { - return str_replace(array('<', '>'), array('<', '>'), $p_string ); - } - ### -------------------- function string_add_note_links( $p_page_url, $p_note ) { return ( preg_replace( '/#([0-9]+)/', "<a href=\"$p_page_url#\\1\">#\\1</a>", $p_note ) ); } ### -------------------- function string_prepare_note_for_viewing( $p_note_string, $p_url = null ) { if ( null !== $p_url ) { - return( string_add_note_links( $p_url, string_preserve_spaces_at_bol( string_disable_html( $p_note_string ) ) ) ); + return( string_add_note_links( $p_url, string_preserve_spaces_at_bol( htmlspecialchars( $p_note_string ) ) ) ); } else { - return( string_preserve_spaces_at_bol( string_disable_html( $p_note_string ) ) ); + return( string_preserve_spaces_at_bol( htmlspecialchars( $p_note_string ) ) ); } } ### -------------------- |
From: <vb...@us...> - 2002-09-26 06:55:08
|
Update of /cvsroot/webnotes/webnotes In directory usw-pr-cvs1:/tmp/cvs-serv20913 Modified Files: note_preview_page.php Log Message: - Removed some hard-coded formatting from the theme, and moved it to the theme.css - Removed some styles which were not needed. - Used strict XHTML validator with the phpnet theme output and fixed all errors. (there is only one remaining error in the sample files which uses border="0" for the source forge logo). - Used htmlspecialchars() rather than string_disable_html() and used it for e-mail / note. This is to escape chars like <, >, and hence get no errors from the validator. - Removed strings_disable_html() - #<note id> will now work in the e-mail (title) field. Index: note_preview_page.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/note_preview_page.php,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- note_preview_page.php 24 Sep 2002 06:14:39 -0000 1.10 +++ note_preview_page.php 26 Sep 2002 06:55:04 -0000 1.11 @@ -25,8 +25,8 @@ $f_note_id = gpc_get_int( 'f_note_id' ); $f_page_id = gpc_get_int( 'f_page_id' ); - $f_email = string_disable_html( gpc_get_string( 'f_email' ) ); - $f_note = string_disable_html( gpc_get_string( 'f_note' ) ); + $f_email = gpc_get_string( 'f_email' ); + $f_note = gpc_get_string( 'f_note' ); $t_page_info = page_get_info( page_where_id_equals( $f_page_id ) ); if ( false === $t_page_info ) { @@ -35,9 +35,9 @@ } $t_note['id'] = '0'; - $t_note['email']= $f_email; + $t_note['email']= string_prepare_note_for_viewing( $f_email ); $t_note['date'] = date ($g_date_format); - $t_note['note'] = string_prepare_note_for_viewing( $f_note, false ); + $t_note['note'] = string_prepare_note_for_viewing( $f_note ); $t_page_data = array(); $t_page_data['id'] = 0; |
From: <vb...@us...> - 2002-09-26 04:41:56
|
Update of /cvsroot/webnotes/webnotes/themes/phpnet In directory usw-pr-cvs1:/tmp/cvs-serv23157/themes/phpnet Modified Files: theme.css theme_api.php Log Message: - Removed some hard-coded formatting from the theme, and moved it to the theme.css - Removed some styles which were not needed. Index: theme.css =================================================================== RCS file: /cvsroot/webnotes/webnotes/themes/phpnet/theme.css,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- theme.css 21 Sep 2002 02:44:33 -0000 1.2 +++ theme.css 26 Sep 2002 04:41:53 -0000 1.3 @@ -9,7 +9,9 @@ # -------------------------------------------------------- */ -div.phpnet { font-family:Verdana, Arial; font-size: 10pt; background: transparent; } +div.phpnet { } div.phpnet td { font-family:Verdana, Arial; font-size: 10pt; padding: 4px; } -div.phpnet th { font-family:Verdana, Arial; font-size: 10pt; padding: 4px; } -div.phpnet p { font-family:Verdana, Arial; font-size: 10pt; } +div.phpnet .dark { background-color: #d0d0d0; } +div.phpnet .light { background-color: #e0e0e0; } +div.phpnet .lighter { background-color: #f0f0f0; } +div.phpnet tr { vertical-align: top; } Index: theme_api.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/themes/phpnet/theme_api.php,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- theme_api.php 26 Sep 2002 03:41:46 -0000 1.25 +++ theme_api.php 26 Sep 2002 04:41:53 -0000 1.26 @@ -63,7 +63,7 @@ echo <<<EOT <div class="phpnet"> <table summary="" border="0" cellpadding="4" cellspacing="0" width="100%"> - <tr bgcolor="#d0d0d0" valign="top"> + <tr class="dark"> <td><small>User Contributed Notes</small><br /><strong>$t_page</strong></td> <td align="right"> $t_link_start<img src="$add_picture" border="0" width="13" height="13" alt="Add Notes" />$t_link_end @@ -78,8 +78,8 @@ if ( 0 === count( $t_notes ) ) { echo <<<EOT - <tr valign="top"> - <td bgcolor="#e0e0e0" colspan="2">There are no user contributed notes for this page.</td> + <tr class="light"> + <td colspan="2">There are no user contributed notes for this page.</td> </tr> </table> EOT; @@ -156,16 +156,16 @@ } echo <<<EOT - <tr valign="top"> - <td bgcolor="#e0e0e0" colspan="2"> + <tr class="light"> + <td colspan="2"> $t_id_bookmark <table summary="" border="0" cellpadding="2" cellspacing="0" width="100%"> - <tr valign="top" bgcolor="#e0e0e0"> + <tr class="light"> <td><strong>$t_email</strong><br />$t_date</td> <td align="right">$t_id_view</td> </tr> - <tr bgcolor="#f0f0f0"> + <tr class="lighter"> <td colspan="2">$t_note</td> </tr> </table> @@ -208,7 +208,7 @@ if ( 0 !== count( $t_notes ) ) { echo <<<EOT - <tr bgcolor="#d0d0d0" valign="top"> + <tr class="dark"> <td colspan="2" align="right"> $t_link_start<img src="$add_picture" border="0" width="13" height="13" alt="Add Notes" />$t_link_end <img src="$help_picture" border="0" width="13" height="13" alt="About Notes" /> @@ -221,8 +221,8 @@ # Tue, 17 Sep 2002 $t_last_updated = date('D, d M Y - G:i:s', $p_page_data['last_updated']); echo <<<EOT - <tr bgcolor="#d0d0d0" valign="top"><td colspan="2"> - <table border="0" width="100%" bgcolor="#e0e0e0" cellpadding="0" cellspacing="4"> + <tr class="dark"><td colspan="2"> + <table class="light" border="0" width="100%" cellpadding="0" cellspacing="4"> $t_navigation_row <tr><td align="right" colspan="2"><small>Last updated: $t_last_updated</small></td></tr> </table> |
From: <vb...@us...> - 2002-09-26 04:13:03
|
Update of /cvsroot/webnotes/web In directory usw-pr-cvs1:/tmp/cvs-serv18164 Modified Files: links.php Log Message: Added HTML Tidy to developer links Index: links.php =================================================================== RCS file: /cvsroot/webnotes/web/links.php,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- links.php 12 Sep 2002 22:10:09 -0000 1.3 +++ links.php 26 Sep 2002 04:13:00 -0000 1.4 @@ -16,7 +16,8 @@ <ul> <li><a href="http://www.cvsgui.org">http://www.cvsgui.org</a> - WinCVS website for Windows users.</li> <li><a href="http://filezilla.sf.net">http://filezilla.sf.net</a> - FileZilla for accessing SourceForge webservers (SFTP).</li> -<li><a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/">http://www.chiark.greenend.org.uk/~sgtatham/putty</a> - PuTTY</li> +<li><a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/">http://www.chiark.greenend.org.uk/~sgtatham/putty</a>- PuTTY</li> +<li><a href="http://sourceforge.net/projects/tidy">http://sourceforge.net/projects/tidy</a> - HTML Tidy</li> </ul> <?php include('footer.php') ?> |
From: <vb...@us...> - 2002-09-26 03:41:49
|
Update of /cvsroot/webnotes/webnotes In directory usw-pr-cvs1:/tmp/cvs-serv11650 Modified Files: action.php admin_manage_notes.php Log Message: - Removed single quotes from queries when accessing numeric fields. - Added support for re-queueing of notes. - Improved the Manage Notes page to have two lists. The first lists the documents that have pending notes, and the second lists all documents. Index: action.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/action.php,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- action.php 22 Sep 2002 04:17:37 -0000 1.8 +++ action.php 26 Sep 2002 03:41:46 -0000 1.9 @@ -17,26 +17,19 @@ exit; } - #if ( !isset( $f_url ) ) { - # echo 'f_url not defined<br />'; - # exit; - #} else { - # $c_url = urldecode( $f_url ); - #} - # @@@@ add handling for confirm? # The access level check is done in the APIs if ( isset( $f_note_id )) { $t_note_info = note_get_info( note_where_id_equals( $f_note_id ) ); if ( false === $t_note_info ) { - echo "note not found"; + echo "note not found"; exit; } $t_page_info = page_get_info( page_where_id_equals( $t_note_info['page_id'] ) ); if ( false === $t_page_info ) { - echo "page not found"; + echo "page not found"; exit; } $t_url = $t_page_info['url']; @@ -52,7 +45,7 @@ } else if ( 'pack' === $f_action ) { # in this case id = 0 note_pack_deleted(); - } else if ( 'pending' === $f_action ) { + } else if ( 'queue' === $f_action ) { note_pending( $f_note_id ); } else if ( 'edit' === $f_action ) { header( "Location: $g_note_add_page?f_note_id=$f_note_id" ); Index: admin_manage_notes.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/admin_manage_notes.php,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- admin_manage_notes.php 22 Sep 2002 04:17:38 -0000 1.17 +++ admin_manage_notes.php 26 Sep 2002 03:41:46 -0000 1.18 @@ -25,12 +25,49 @@ print_admin_menu (); - $pages = page_get_array ( page_where_url_exists(), 'last_updated DESC' ); + $query = "SELECT p.*, COUNT(n.id) as notes_count + FROM " . config_get( 'phpWN_page_table' ) . " p, + " . config_get( 'phpWN_note_table' ) . " n + WHERE (p.id=n.page_id) AND (n.visible=".NOTE_VISIBLE_PENDING.") + GROUP BY p.id + ORDER BY notes_count DESC"; + + $result = db_query($query); + + echo <<<EOT + <p><strong>Following are the documents that have notes pending approval:</strong></p> + <table class="box" summary=""> + <tr><th>Page</th><th>URL</th><th>Pending Notes</th></tr>\n +EOT; + $count = 0; + while ( $row = db_fetch_array( $result ) ) { + $color = util_alternate_colors( $count++ ); + extract( $row, EXTR_PREFIX_ALL, 'v' ); + echo "<tr bgcolor=\"$color\"><td><a href=\"$v_url\">$v_page</a></td><td>$v_url</td><td>$v_notes_count</td></tr>\n"; + } + echo <<<EOT + </table> + <p>There are $count document(s) to be moderated.</p>\n + <hr> + <div class="spacer"></div> + <p><strong>Following are all the documents that use phpWebNotes:</strong></p> + <table class="box" summary=""> + <tr><th>Page</th><th>URL</th></tr>\n +EOT; + + $count = 0; + $pages = page_get_array ( page_where_url_exists(), 'last_updated DESC' ); foreach( $pages as $page ) { extract( $page, EXTR_PREFIX_ALL, 'v' ); - echo "<a href=\"$v_url\">$v_page</a> - $v_url<br />\n"; + $color = util_alternate_colors( $count++ ); + echo "<tr bgcolor=\"$color\"><td><a href=\"$v_url\">$v_page</a></td><td>$v_url</td></tr>\n"; } + + echo <<<EOT + </table> + <p>There are $count document(s) that are indexed.</p>\n +EOT; print_footer( __FILE__ ); print_bottom_page( $g_bottom_page_inc ); |
From: <vb...@us...> - 2002-09-26 03:41:49
|
Update of /cvsroot/webnotes/webnotes/themes/phpnet In directory usw-pr-cvs1:/tmp/cvs-serv11650/themes/phpnet Modified Files: theme_api.php Log Message: - Removed single quotes from queries when accessing numeric fields. - Added support for re-queueing of notes. - Improved the Manage Notes page to have two lists. The first lists the documents that have pending notes, and the second lists all documents. Index: theme_api.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/themes/phpnet/theme_api.php,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- theme_api.php 22 Sep 2002 04:17:38 -0000 1.24 +++ theme_api.php 26 Sep 2002 03:41:46 -0000 1.25 @@ -98,6 +98,11 @@ access_check_action( ACTION_NOTES_MODERATE_ACCEPT ) ) . ' '; } + if ( $t_note_info['visible'] != NOTE_VISIBLE_PENDING ) { + $t_moderation .= link_note_action( $t_note_info['id'], 'queue', $t_url, + access_check_action( ACTION_NOTES_MODERATE_QUEUE ) ) . ' '; + } + if ( $t_note_info['visible'] != NOTE_VISIBLE_DECLINED ) { $t_moderation .= link_note_action( $t_note_info['id'], 'decline', $t_url, access_check_action( ACTION_NOTES_MODERATE_DECLINE ) ) . ' '; |
From: <vb...@us...> - 2002-09-26 03:41:49
|
Update of /cvsroot/webnotes/webnotes/core In directory usw-pr-cvs1:/tmp/cvs-serv11650/core Modified Files: note_api.php page_api.php Log Message: - Removed single quotes from queries when accessing numeric fields. - Added support for re-queueing of notes. - Improved the Manage Notes page to have two lists. The first lists the documents that have pending notes, and the second lists all documents. Index: note_api.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/core/note_api.php,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -r1.27 -r1.28 --- note_api.php 24 Sep 2002 06:14:40 -0000 1.27 +++ note_api.php 26 Sep 2002 03:41:46 -0000 1.28 @@ -11,13 +11,20 @@ ### -------------------- function note_where_id_equals( $p_note_id ) { $c_note_id = db_prepare_int( $p_note_id ); - return ("(id='$c_note_id')"); + return ("(n.id=$c_note_id)"); + } + ### -------------------- + function note_where_page_and_visibility_equals( $p_page_id, $p_visibility ) { + $c_page_id = db_prepare_int( $p_page_id ); + $c_visibility = db_prepare_int( $p_visibility ); + return ("((n.page_id=$c_page_id) AND (n.visible=$c_visiblity))"); } ### -------------------- # $p_where is constructed by note_where* and hence does not need to be cleaned. function note_get_info ( $p_where, $p_field = null ) { $query = "SELECT *, UNIX_TIMESTAMP(date_submitted) as date_submitted - FROM " . config_get( 'phpWN_note_table' ) . " + FROM " . config_get( 'phpWN_note_table' ) . " n, + " . config_get( 'phpWN_page_table' ) . " p WHERE $p_where LIMIT 1"; @@ -44,7 +51,7 @@ FROM " . config_get( 'phpWN_note_table' ) . " n, " . config_get( 'phpWN_page_table' ) . " p WHERE n.page_id = p.id AND - visible='" . NOTE_VISIBLE_PENDING . "'"; + visible=" . NOTE_VISIBLE_PENDING; $result = db_query( $query ); return db_result( $result, 0, 0 ); } @@ -66,7 +73,7 @@ $query = "INSERT INTO " . config_get( 'phpWN_note_table' ) . " ( id, page_id, email, ip, date_submitted, note, visible ) VALUES - ( null, '$c_page_id', '$c_email', '$c_remote_address', NOW(), '$c_note', '$t_visible' )"; + ( null, $c_page_id, '$c_email', '$c_remote_address', NOW(), '$c_note', $t_visible )"; $result = db_query( $query ); page_touch( $p_page_id ); @@ -96,8 +103,8 @@ $c_visibility = db_prepare_int( $p_visibility ); $query = "UPDATE " . config_get( 'phpWN_note_table' ) . " - SET visible='$c_visibility' - WHERE id='$c_id' LIMIT 1"; + SET visible=$c_visibility + WHERE id=$c_id LIMIT 1"; $result = db_query( $query ); note_touch( $p_id ); @@ -126,7 +133,7 @@ ### -------------------- function note_pack_deleted() { $query = "DELETE FROM " . config_get( 'phpWN_note_table' ) . " - WHERE visible='" . NOTE_VISIBLE_DELETED ."'"; + WHERE visible=" . NOTE_VISIBLE_DELETED; $result = db_query( $query ); } ### -------------------- @@ -137,7 +144,7 @@ $query = "UPDATE " . config_get( 'phpWN_note_table' ) . " SET email='$c_email', note='$c_note' - WHERE id='$c_id' LIMIT 1"; + WHERE id=$c_id LIMIT 1"; $result = db_query( $query ); note_touch( $p_id ); @@ -174,7 +181,7 @@ $query = "SELECT *, UNIX_TIMESTAMP(date_submitted) as date_submitted FROM " . config_get( 'phpWN_note_table' ) . " - WHERE page_id='$c_page_id' + WHERE page_id=$c_page_id ORDER BY date_submitted " . config_get( 'note_order' ); $result = db_query( $query ); @@ -219,7 +226,7 @@ $query = "SELECT n.id as note_id, n.*, p.page FROM " . config_get( 'phpWN_note_table' ) . " n, " . config_get( 'phpWN_page_table' ) . " p - WHERE n.visible='" . NOTE_VISIBLE_PENDING . "' + WHERE n.visible=" . NOTE_VISIBLE_PENDING . " AND n.page_id=p.id"; if ( $p_only_one ) { Index: page_api.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/core/page_api.php,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- page_api.php 22 Sep 2002 04:17:38 -0000 1.17 +++ page_api.php 26 Sep 2002 03:41:46 -0000 1.18 @@ -15,7 +15,7 @@ ### -------------------- function page_where_id_equals( $p_page_id ) { $c_page_id = db_prepare_int( $p_page_id ); - return ("(id='$c_page_id')"); + return ("(id=$c_page_id)"); } ### -------------------- function page_where_all() { @@ -23,8 +23,8 @@ } ### -------------------- function page_where_page_equals( $p_page ) { - $c_page_id = db_prepare_string( $p_page ); - return ("(page='$c_page_id')"); + $c_page = db_prepare_string( $p_page ); + return ("(page='$c_page')"); } ### -------------------- # $p_where is constructed by page_where* and hence does not need to be cleaned. @@ -52,8 +52,7 @@ # $p_where is constructed by page_where* and hence does not need to be cleaned. function page_get_array ( $p_where, $p_order = null ) { if ( null !== $p_order ) { - $p_order = 'ORDER BY ' . $p_order; - $c_order = db_prepare_string( $p_order ); + $c_order = 'ORDER BY ' . db_prepare_string( $p_order ); } else { $c_order = ''; } @@ -89,7 +88,7 @@ $query = "SELECT COUNT(*) FROM " . config_get( 'phpWN_note_table' ) . " - WHERE page_id='$c_page_id' AND visible='" . NOTE_VISIBLE_ACCEPTED . "'"; + WHERE page_id=$c_page_id AND visible=" . NOTE_VISIBLE_ACCEPTED; $result = db_query( $query ); return db_result( $result, 0, 0 ); } @@ -99,7 +98,7 @@ $query = "SELECT COUNT(*) FROM " . config_get( 'phpWN_note_table' ) . " - WHERE page_id='$c_page_id'"; + WHERE page_id=$c_page_id"; $result = db_query( $query ); return db_result( $result, 0, 0 ); } @@ -109,7 +108,7 @@ $query = "SELECT page FROM " . config_get( 'phpWN_page_table' ) . " - WHERE id='$c_page_id' + WHERE id=$c_page_id LIMIT 1"; $result = db_query( $query ); @@ -133,7 +132,7 @@ $query = "UPDATE " . config_get( 'phpWN_page_table' ) . " SET url='$c_url' - WHERE id='$c_page_id' LIMIT 1"; + WHERE id=$c_page_id LIMIT 1"; $result = db_query( $query ); page_touch( $p_page_id ); } @@ -174,8 +173,8 @@ $c_page_id = db_prepare_int( $p_page_id ); $query = "UPDATE " . config_get( 'phpWN_page_table' ) . " - SET prev_id='$t_prev_id', next_id='$t_next_id' - WHERE id='$c_page_id' LIMIT 1"; + SET prev_id=$t_prev_id, next_id=$t_next_id + WHERE id=$c_page_id LIMIT 1"; $result = db_query( $query ); page_touch( $p_page_id ); } @@ -186,7 +185,7 @@ $query ='UPDATE ' . config_get( 'phpWN_page_table') . ' ' . "SET last_updated=NOW() " . - "WHERE id='$c_page_id' " . + "WHERE id=$c_page_id " . "LIMIT 1"; return ( false !== db_query( $query ) ); @@ -289,7 +288,7 @@ $c_page_id = db_prepare_int( $p_page_id ); $query = "DELETE FROM " . config_get( 'phpWN_note_table' ) . " - WHERE page_id='$c_page_id'"; + WHERE page_id=$c_page_id"; $result = db_query( $query ); @@ -304,7 +303,7 @@ $c_page_id = db_prepare_int( $p_page_id ); $query = "DELETE FROM " . config_get( 'phpWN_page_table' ) . " - WHERE id='$c_page_id' + WHERE id=$c_page_id LIMIT 1"; $result = db_query( $query ); |
From: <vb...@us...> - 2002-09-24 06:14:43
|
Update of /cvsroot/webnotes/webnotes/core In directory usw-pr-cvs1:/tmp/cvs-serv13329/core Modified Files: note_api.php string_api.php Log Message: - Changed the preserving of spaces to be only done when the spaces are at the beginning of a line (string_preserve_spaces_at_bol()). - Added string_prepare_note_for_viewing() to be used from viewing/previewing. Index: note_api.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/core/note_api.php,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- note_api.php 22 Sep 2002 04:17:38 -0000 1.26 +++ note_api.php 24 Sep 2002 06:14:40 -0000 1.27 @@ -204,13 +204,13 @@ $info['visible'] = $v_visible; $info['id'] = $v_id; $info['email'] = $v_email; - $info['note'] = string_add_note_links( $t_page_info['url'], string_preserve_spaces( string_disable_html( $v_note ) ) ); + $info['note'] = string_prepare_note_for_viewing ( $v_note, $t_page_info['url'] ); $info['date'] = $v_date_submitted; $notes[] = $info; } - + return( $notes ); } ### -------------------- Index: string_api.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/core/string_api.php,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- string_api.php 15 Sep 2002 02:25:58 -0000 1.5 +++ string_api.php 24 Sep 2002 06:14:40 -0000 1.6 @@ -40,6 +40,25 @@ return str_replace( " ", " ", $p_string ); } ### -------------------- + # Preserve spaces at beginning of lines. + function string_preserve_spaces_at_bol( $p_string ) { + $lines = explode("\n", $p_string); + for ( $i = 0; $i < count( $lines ); $i++ ) { + $count = 0; + $prefix = ''; + while ( substr($lines[$i], $count, 1) == ' ' ) { + $count++; + } + for ($j = 0; $j < $count; $j++) { + $prefix .= ' '; + } + $lines[$i] = $prefix . substr( $lines[$i], $count ); + + } + $result = implode( "\n", $lines ); + return $result; + } + ### -------------------- function string_to_form( $p_string ) { return htmlspecialchars( addslashes( $p_string ) ); } @@ -50,6 +69,14 @@ ### -------------------- function string_add_note_links( $p_page_url, $p_note ) { return ( preg_replace( '/#([0-9]+)/', "<a href=\"$p_page_url#\\1\">#\\1</a>", $p_note ) ); + } + ### -------------------- + function string_prepare_note_for_viewing( $p_note_string, $p_url = null ) { + if ( null !== $p_url ) { + return( string_add_note_links( $p_url, string_preserve_spaces_at_bol( string_disable_html( $p_note_string ) ) ) ); + } else { + return( string_preserve_spaces_at_bol( string_disable_html( $p_note_string ) ) ); + } } ### -------------------- ?> |
From: <vb...@us...> - 2002-09-24 06:14:43
|
Update of /cvsroot/webnotes/webnotes In directory usw-pr-cvs1:/tmp/cvs-serv13329 Modified Files: note_preview_page.php Log Message: - Changed the preserving of spaces to be only done when the spaces are at the beginning of a line (string_preserve_spaces_at_bol()). - Added string_prepare_note_for_viewing() to be used from viewing/previewing. Index: note_preview_page.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/note_preview_page.php,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- note_preview_page.php 22 Sep 2002 02:47:16 -0000 1.9 +++ note_preview_page.php 24 Sep 2002 06:14:39 -0000 1.10 @@ -37,7 +37,7 @@ $t_note['id'] = '0'; $t_note['email']= $f_email; $t_note['date'] = date ($g_date_format); - $t_note['note'] = $f_note; + $t_note['note'] = string_prepare_note_for_viewing( $f_note, false ); $t_page_data = array(); $t_page_data['id'] = 0; |
From: <vb...@us...> - 2002-09-22 16:10:14
|
Update of /cvsroot/webnotes/web In directory usw-pr-cvs1:/tmp/cvs-serv8674 Modified Files: demo.php Log Message: Added support for moderator demo. Index: demo.php =================================================================== RCS file: /cvsroot/webnotes/web/demo.php,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- demo.php 12 Sep 2002 22:10:09 -0000 1.6 +++ demo.php 22 Sep 2002 16:10:10 -0000 1.7 @@ -5,10 +5,21 @@ <p>We have put together a demo with a couple of documents enabling the viewers to contribute comments to. For this demo we have disabled the queueing / approval process in order for the comments to appear right away. In a real system, the administrator might like to have such comments moderated first before appearing on the website (which can be done using phpWebNotes).</p> +<center> +<span class="center_link"> +<a href="http://webnotes.sourceforge.net/phpWebNotes-2.0.0-dev/sample/xml.php">phpWebNotes v2.0.0-dev</a> (Contributor) +</span> +<br />(No login required)<br /><br /> +</center> + +<center> +<span class="center_link"><a href="http://webnotes.sourceforge.net/phpWebNotes-2.0.0-dev">phpWebNotes v2.0.0-dev</a> (Moderator)</span><br /> +(Username: moderator, Password: moderator) +</center> + <span class="center_link"> <p align="center"> <a href="http://webnotes.sourceforge.net/webnotes/demo/">phpWebNotes v1.0.0</a><br /> -<a href="http://webnotes.sourceforge.net/phpWebNotes-2.0.0-dev/sample/xml.php">phpWebNotes v2.0.0-dev</a> </p> </span> |
From: <vb...@us...> - 2002-09-22 04:17:44
|
Update of /cvsroot/webnotes/webnotes In directory usw-pr-cvs1:/tmp/cvs-serv9804 Modified Files: action.php admin_manage_notes.php login_page.php Log Message: - Fixed the [ edit ] action in inline moderation - Remove the [ action x ], if the note is already in state x. - Remove the <small>...</small> tags from around the actions. - In manage notes, pages are now sorted in descending order according to last updated. - Fixed a problem with the cross referencing where preserve spaces was called after they were created and hence <a href -> was replaced with <anbsp;href. - Fixed a problem with the size of the login form (introduced in the last commit). Index: action.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/action.php,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- action.php 21 Sep 2002 02:44:32 -0000 1.7 +++ action.php 22 Sep 2002 04:17:37 -0000 1.8 @@ -56,6 +56,7 @@ note_pending( $f_note_id ); } else if ( 'edit' === $f_action ) { header( "Location: $g_note_add_page?f_note_id=$f_note_id" ); + exit; } } Index: admin_manage_notes.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/admin_manage_notes.php,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- admin_manage_notes.php 21 Sep 2002 02:44:32 -0000 1.16 +++ admin_manage_notes.php 22 Sep 2002 04:17:38 -0000 1.17 @@ -25,7 +25,7 @@ print_admin_menu (); - $pages = page_get_array ( page_where_url_exists() ); + $pages = page_get_array ( page_where_url_exists(), 'last_updated DESC' ); foreach( $pages as $page ) { extract( $page, EXTR_PREFIX_ALL, 'v' ); Index: login_page.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/login_page.php,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- login_page.php 22 Sep 2002 02:47:16 -0000 1.21 +++ login_page.php 22 Sep 2002 04:17:38 -0000 1.22 @@ -55,6 +55,7 @@ echo <<<EOT <div class="center"> + <div class="small-width"> <form name="f_login_form" method="post" action="$g_login"> <table class="box" summary=""> <tr class="title"> @@ -78,6 +79,7 @@ </tr> </table> </form> + </div> </div> <script type="text/javascript" language="JavaScript"> |
From: <vb...@us...> - 2002-09-22 04:17:43
|
Update of /cvsroot/webnotes/webnotes/core In directory usw-pr-cvs1:/tmp/cvs-serv9804/core Modified Files: note_api.php page_api.php Log Message: - Fixed the [ edit ] action in inline moderation - Remove the [ action x ], if the note is already in state x. - Remove the <small>...</small> tags from around the actions. - In manage notes, pages are now sorted in descending order according to last updated. - Fixed a problem with the cross referencing where preserve spaces was called after they were created and hence <a href -> was replaced with <anbsp;href. - Fixed a problem with the size of the login form (introduced in the last commit). Index: note_api.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/core/note_api.php,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- note_api.php 22 Sep 2002 02:47:16 -0000 1.25 +++ note_api.php 22 Sep 2002 04:17:38 -0000 1.26 @@ -210,7 +210,7 @@ $notes[] = $info; } - + return( $notes ); } ### -------------------- Index: page_api.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/core/page_api.php,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- page_api.php 22 Sep 2002 02:47:16 -0000 1.16 +++ page_api.php 22 Sep 2002 04:17:38 -0000 1.17 @@ -58,7 +58,7 @@ $c_order = ''; } - $query = "SELECT * + $query = "SELECT *, UNIX_TIMESTAMP(last_updated) as last_updated FROM " . config_get( 'phpWN_page_table' ) . " WHERE $p_where $c_order"; |
From: <vb...@us...> - 2002-09-22 04:17:43
|
Update of /cvsroot/webnotes/webnotes/themes/phpnet In directory usw-pr-cvs1:/tmp/cvs-serv9804/themes/phpnet Modified Files: theme_api.php Log Message: - Fixed the [ edit ] action in inline moderation - Remove the [ action x ], if the note is already in state x. - Remove the <small>...</small> tags from around the actions. - In manage notes, pages are now sorted in descending order according to last updated. - Fixed a problem with the cross referencing where preserve spaces was called after they were created and hence <a href -> was replaced with <anbsp;href. - Fixed a problem with the size of the login form (introduced in the last commit). Index: theme_api.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/themes/phpnet/theme_api.php,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- theme_api.php 22 Sep 2002 02:47:16 -0000 1.23 +++ theme_api.php 22 Sep 2002 04:17:38 -0000 1.24 @@ -91,24 +91,30 @@ if ( false === $p_page_data['preview'] ) { if ( access_check_action( ACTION_NOTES_MODERATE ) ) { $t_url = $p_page_data['url']; - $t_moderation = '<small>'; + $t_moderation = ''; - $t_moderation .= link_note_action( $t_note_info['id'], 'accept', $t_url, - access_check_action( ACTION_NOTES_MODERATE_ACCEPT ) ) . ' '; + if ( $t_note_info['visible'] != NOTE_VISIBLE_ACCEPTED ) { + $t_moderation .= link_note_action( $t_note_info['id'], 'accept', $t_url, + access_check_action( ACTION_NOTES_MODERATE_ACCEPT ) ) . ' '; + } - $t_moderation .= link_note_action( $t_note_info['id'], 'decline', $t_url, - access_check_action( ACTION_NOTES_MODERATE_DECLINE ) ) . ' '; + if ( $t_note_info['visible'] != NOTE_VISIBLE_DECLINED ) { + $t_moderation .= link_note_action( $t_note_info['id'], 'decline', $t_url, + access_check_action( ACTION_NOTES_MODERATE_DECLINE ) ) . ' '; + } - $t_moderation .= link_note_action( $t_note_info['id'], 'archive', $t_url, - access_check_action( ACTION_NOTES_MODERATE_ARCHIVE ) ) . ' '; + if ( $t_note_info['visible'] != NOTE_VISIBLE_ARCHIVED ) { + $t_moderation .= link_note_action( $t_note_info['id'], 'archive', $t_url, + access_check_action( ACTION_NOTES_MODERATE_ARCHIVE ) ) . ' '; + } - $t_moderation .= link_note_action( $t_note_info['id'], 'edit', $t_url, + $t_moderation .= link_note_action( $t_note_info['id'], 'edit', $t_url, access_check_action( ACTION_NOTES_EDIT ) ); - $t_moderation .= link_note_action( $t_note_info['id'], 'delete', $t_url, - access_check_action( ACTION_NOTES_MODERATE_DELETE ) ); - - $t_moderation .= '</small>'; + if ( $t_note_info['visible'] != NOTE_VISIBLE_DELETED ) { + $t_moderation .= link_note_action( $t_note_info['id'], 'delete', $t_url, + access_check_action( ACTION_NOTES_MODERATE_DELETE ) ); + } } } @@ -139,7 +145,7 @@ } if ( isset( $t_note_info['note'] ) ) { - $t_note = nl2br(string_preserve_spaces('<tt>' . $t_note_info['note'] . '</tt>')); + $t_note = nl2br('<tt>' . $t_note_info['note'] . '</tt>'); } else { $t_note = ' '; } |
From: <vb...@us...> - 2002-09-22 02:47:19
|
Update of /cvsroot/webnotes/webnotes/themes/phpnet In directory usw-pr-cvs1:/tmp/cvs-serv28006/themes/phpnet Modified Files: theme_api.php Log Message: - Fixed the border in the submit form - Removed the menu from the preview page. - Added a spacer in the preview page. - Fixed the alignment in the login / submit forms. - Removed the last updated from the preview. - Fixed the formatting of the note submit timestamp - Added the last updated timestamp for the page to the database. - Implemented the code to update/view the page last updated timestamp. Index: theme_api.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/themes/phpnet/theme_api.php,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- theme_api.php 21 Sep 2002 02:44:33 -0000 1.22 +++ theme_api.php 22 Sep 2002 02:47:16 -0000 1.23 @@ -36,7 +36,7 @@ } global $g_note_add_page, $s_add_note_link, $s_manage, $s_admin, $g_web_directory, -$g_theme; + $g_theme; $t_notes = $p_page_data['notes']; $t_page = $p_page_data['page']; @@ -132,7 +132,8 @@ } if ( isset( $t_note_info['date'] ) ) { - $t_date = $t_note_info['date']; + # 06-Feb-2002 02:28 + $t_date = date('d-M-Y G:i', $t_note_info['date']); } else { $t_date = ''; } @@ -205,17 +206,22 @@ EOT; } - echo <<<EOT - <tr bgcolor="#d0d0d0" valign="top"><td colspan="2"> - <table border="0" width="100%" bgcolor="#e0e0e0" cellpadding="0" cellspacing="4"> - $t_navigation_row - <tr><td align="right" colspan="2"><small>Last updated: Tue, 17 Sep 2002</small></td></tr> - </table> -</td></tr> - </table> - </div> + if ( false === $p_page_data['preview'] ) { + # Tue, 17 Sep 2002 + $t_last_updated = date('D, d M Y - G:i:s', $p_page_data['last_updated']); + echo <<<EOT + <tr bgcolor="#d0d0d0" valign="top"><td colspan="2"> + <table border="0" width="100%" bgcolor="#e0e0e0" cellpadding="0" cellspacing="4"> + $t_navigation_row + <tr><td align="right" colspan="2"><small>Last updated: $t_last_updated</small></td></tr> + </table> + </td></tr> EOT; - if ( access_is_logged_in() ) { + } + + echo '</table></div>'; + + if ( ( false === $p_page_data['preview'] ) && ( access_is_logged_in() ) ) { echo '<div class="pwn">'; print_admin_menu(); echo '</div>'; |
From: <vb...@us...> - 2002-09-22 02:47:19
|
Update of /cvsroot/webnotes/webnotes/doc In directory usw-pr-cvs1:/tmp/cvs-serv28006/doc Modified Files: ChangeLog Log Message: - Fixed the border in the submit form - Removed the menu from the preview page. - Added a spacer in the preview page. - Fixed the alignment in the login / submit forms. - Removed the last updated from the preview. - Fixed the formatting of the note submit timestamp - Added the last updated timestamp for the page to the database. - Implemented the code to update/view the page last updated timestamp. Index: ChangeLog =================================================================== RCS file: /cvsroot/webnotes/webnotes/doc/ChangeLog,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- ChangeLog 20 Sep 2002 04:17:43 -0000 1.19 +++ ChangeLog 22 Sep 2002 02:47:16 -0000 1.20 @@ -35,6 +35,7 @@ * Viewing notes based on access level rather than displaying all accepted notes for everybody. * Added support for prev / next documents. * Added pwn_api.php to act the the main interface to phpWebNotes. + * Added support for Last Updated timestamp for pages. 03.12.2000 - 1.0.0 |
From: <vb...@us...> - 2002-09-22 02:47:19
|
Update of /cvsroot/webnotes/webnotes/core In directory usw-pr-cvs1:/tmp/cvs-serv28006/core Modified Files: css_inc.php html_api.php note_api.php page_api.php pwn_api.php Log Message: - Fixed the border in the submit form - Removed the menu from the preview page. - Added a spacer in the preview page. - Fixed the alignment in the login / submit forms. - Removed the last updated from the preview. - Fixed the formatting of the note submit timestamp - Added the last updated timestamp for the page to the database. - Implemented the code to update/view the page last updated timestamp. Index: css_inc.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/core/css_inc.php,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- css_inc.php 21 Sep 2002 02:44:33 -0000 1.9 +++ css_inc.php 22 Sep 2002 02:47:16 -0000 1.10 @@ -45,10 +45,10 @@ div.pwn p { font-family:Verdana, Arial; font-size: 10pt; } div.pwn div.spacer { width: auto; border: none; margin: 20px; } -div.pwn .large-width { width: 75%; } -div.pwn .medium-width { width: 75%; } -div.pwn .small-width { width: 50%; } -div.pwn .center { align: center; } +div.pwn .large-width { width: 100%; text-align: center; } +div.pwn .medium-width { width: 75%; text-align: center; } +div.pwn .small-width { width: 50%; text-align: center; } +div.pwn .center { text-align: center; } div.pwn div.title { background-color: #98b8e8; padding: 3px; border-bottom: 5px solid #000000; font-size: 10pt; font-weight: bold; letter-spacing: 1.0em; text-align: right; color: #204888; padding-top: 10px; padding-bottom: 10px; margin-bottom: 0px; } div.pwn div.menu { background-color: #f4f4f4; border-bottom: 1px solid #000000; padding: 3px; text-align: left; margin-bottom: 20px; padding-left: 10px; } div.pwn div.menu a { text-decoration: none; color: #666; } @@ -63,7 +63,7 @@ div.pwn th, div.pwn .category { background-color: #c8c8e8; color: #000000; font-weight: bold; } div.pwn form { margin: 0px; display: inline; } div.pwn address { font-family:Verdana, Arial; font-size: 8pt; } -div.pwn table.box { border: solid 1px #000000; margin-top: 10px; margin-bottom: 10px; } +div.pwn table.box { border: solid 1px #000000; margin-top: 10px; margin-bottom: 10px; text-align: left; width: 100%; } div.pwn tr.row-1 { background-color: #d8d8d8; color: #000000; } div.pwn tr.row-2 { background-color: #d8d8d8; color: #000000; } div.pwn tr.title { color: #000000; font-weight: bold; } Index: html_api.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/core/html_api.php,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- html_api.php 21 Sep 2002 02:44:33 -0000 1.11 +++ html_api.php 22 Sep 2002 02:47:16 -0000 1.12 @@ -10,7 +10,8 @@ ### -------------------- function print_html_top() { - echo '<html>'; + echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">' . + "\n<html>"; } ### -------------------- function print_head_top() { Index: note_api.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/core/note_api.php,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- note_api.php 21 Sep 2002 02:44:33 -0000 1.24 +++ note_api.php 22 Sep 2002 02:47:16 -0000 1.25 @@ -16,7 +16,7 @@ ### -------------------- # $p_where is constructed by note_where* and hence does not need to be cleaned. function note_get_info ( $p_where, $p_field = null ) { - $query = "SELECT * + $query = "SELECT *, UNIX_TIMESTAMP(date_submitted) as date_submitted FROM " . config_get( 'phpWN_note_table' ) . " WHERE $p_where LIMIT 1"; @@ -145,7 +145,21 @@ return ( $result ); } ### -------------------- + function note_get_page_id( $p_note_id ) { + $t_note_info = note_get_info( note_where_id_equals ( $p_note_id ) ); + if ( false === $t_note_info ) { + return false; + } + + return $t_note_info['page_id']; + } + ### -------------------- function note_touch( $p_note_id, $p_page_id = null ) { + if ( null === $p_page_id ) { + $p_page_id = note_get_page_id( $p_note_id ); + } + + page_touch( $p_page_id ); } ### -------------------- function note_get_all_visible( $p_page_id ) { @@ -158,7 +172,7 @@ $c_page_id = db_prepare_int( $p_page_id ); - $query = "SELECT * + $query = "SELECT *, UNIX_TIMESTAMP(date_submitted) as date_submitted FROM " . config_get( 'phpWN_note_table' ) . " WHERE page_id='$c_page_id' ORDER BY date_submitted " . config_get( 'note_order' ); Index: page_api.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/core/page_api.php,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- page_api.php 20 Sep 2002 04:17:43 -0000 1.15 +++ page_api.php 22 Sep 2002 02:47:16 -0000 1.16 @@ -29,7 +29,7 @@ ### -------------------- # $p_where is constructed by page_where* and hence does not need to be cleaned. function page_get_info ( $p_where, $p_field = null ) { - $query = "SELECT * + $query = "SELECT *, UNIX_TIMESTAMP(last_updated) as last_updated FROM " . config_get( 'phpWN_page_table' ) . " WHERE $p_where LIMIT 1"; @@ -166,7 +166,10 @@ } } - # @@@@ If the information is the same, then don't update/touch. + # If the information is the same, then don't update/touch. + if ( ( $t_prev_id == $t_page_info['prev_id'] ) || ( $t_next_id == $t_page_info['next_id'] ) ) { + return; + } $c_page_id = db_prepare_int( $p_page_id ); @@ -179,6 +182,14 @@ ### -------------------- # Update the last modified time stamp for the page. function page_touch( $p_page_id ) { + $c_page_id = db_prepare_int( $p_page_id ); + + $query ='UPDATE ' . config_get( 'phpWN_page_table') . ' ' . + "SET last_updated=NOW() " . + "WHERE id='$c_page_id' " . + "LIMIT 1"; + + return ( false !== db_query( $query ) ); } ### -------------------- ### Allows for path navigation to choose base dir @@ -231,9 +242,9 @@ $c_page_name = db_prepare_string( $p_page_name ); $query = "INSERT INTO " . config_get( 'phpWN_page_table' ) . " - ( id, date_indexed, page ) + ( id, date_indexed, last_updated, page ) VALUES - ( null, NOW(), '$c_page_name' )"; + ( null, NOW(), NOW(), '$c_page_name' )"; $result = db_query( $query ); return $result; @@ -312,7 +323,7 @@ $t_page_data['id'] = $t_page_info['id']; $t_page_data['page'] = $t_page_info['page']; $t_page_data['url'] = $t_page_info['url']; - $t_page_data['last_modified'] = 0; + $t_page_data['last_updated'] = $t_page_info['last_updated']; $t_page_data['preview'] = false; $t_prev_page = page_get_info( page_where_id_equals( $t_page_info['prev_id'] ) ); Index: pwn_api.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/core/pwn_api.php,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- pwn_api.php 21 Sep 2002 02:44:33 -0000 1.3 +++ pwn_api.php 22 Sep 2002 02:47:16 -0000 1.4 @@ -12,7 +12,7 @@ function pwn_head() { global $g_meta_inc_file, $g_css_inc_file; print_meta_inc( $g_meta_inc_file ); - print_css_link( $g_css_inc_file ); + print_css( $g_css_inc_file ); theme_head(); } ### -------------------- |