Update of /cvsroot/webnotes/webnotes/core
In directory usw-pr-cvs1:/tmp/cvs-serv14356/core
Modified Files:
html_api.php pwn_api.php
Log Message:
- Added an extra level in the samples to demonstrate the parent page link. Now the manual has Webopedia > Markup Languages > XML / XHTML
- Added a style sheet in the sample to enhance the look.
- Moved some code from the sample_header.php to pwn_api.php.
- Added some extra images that are used as part of phpnet in the manual look.
Index: html_api.php
===================================================================
RCS file: /cvsroot/webnotes/webnotes/core/html_api.php,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- html_api.php 1 Oct 2002 03:38:28 -0000 1.15
+++ html_api.php 1 Oct 2002 12:30:09 -0000 1.16
@@ -125,7 +125,7 @@
echo '<div class="spacer"></div>';
}
### --------------------
- function print_admin_menu() {
+ function print_admin_menu( $p_add_space = true ) {
global $g_logout, $g_admin_index_files, $g_admin_change_password,
$g_admin_manage_notes, $g_admin_manage_users,
$s_logout_link, $s_index_files, $s_change_password,
Index: pwn_api.php
===================================================================
RCS file: /cvsroot/webnotes/webnotes/core/pwn_api.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- pwn_api.php 1 Oct 2002 06:51:45 -0000 1.5
+++ pwn_api.php 1 Oct 2002 12:30:09 -0000 1.6
@@ -53,7 +53,8 @@
$query = "SELECT page
FROM " . config_get( 'phpWN_page_table' ) . "
- WHERE ( parent_id = $t_parent_id ) AND ( id <> $t_id )";
+ WHERE ( parent_id = $t_parent_id )
+ ORDER BY page ASC";
$result = db_query( $query );
$t_pages_array = array();
@@ -64,4 +65,42 @@
return $t_pages_array;
}
### --------------------
+ function pwn_index( $p_page, $p_page_top, $p_page_parent ) {
+ $images = dirname( dirname( __FILE__ ) ) . DIRECTORY_SEPARATOR . 'themes' .
+ DIRECTORY_SEPARATOR . config_get( 'theme' ) . DIRECTORY_SEPARATOR .
+ 'images' . DIRECTORY_SEPARATOR;
+
+ $image_top = $images . 'caret_top.gif';
+ $image_up = $images . 'caret_up.gif';
+ $image_sibling = $images . 'bullet_sibling.gif';
+ $image_current = $images . 'bullet_current.gif';
+
+ if ( $p_page != $p_page_top ) {
+ $link = pwn_page_get_link( $p_page_top );
+ echo "<a href=\"$link\"><img class=\"bullet\" src=\"$image_top\" alt=\"$p_page_top\" />$p_page_top</a><br />\n";
+ }
+
+ if ( ( $p_page_parent != null ) && ( $p_page_parent != $p_page_top ) ) {
+ echo "<hr noshade=\"noshade\" />\n";
+ $link = pwn_page_get_link( $p_page_parent );
+ echo "<a href=\"$link\"><img class=\"bullet\" src=\"$image_up\" alt=\"$p_page_parent\" />$p_page_parent</a><br />";
+ }
+
+ $siblings = pwn_page_get_siblings_array( $p_page );
+ if ( count( $siblings ) > 0 ) {
+ echo "<small>";
+
+ foreach( $siblings as $sibling ) {
+ if ( $sibling == $p_page ) {
+ $bullet = $image_current;
+ } else {
+ $bullet = $image_sibling;
+ }
+ $link = pwn_page_get_link( $sibling );
+ echo "<a href=\"$link\"><img class=\"bullet\" src=\"$bullet\" alt=\"$sibling\" />$sibling</a><br />";
+ }
+
+ echo "</small>";
+ }
+ }
?>
|