cvs: phpweb /include layout.inc shared-manual.inc

From: Date: Sun, 23 Sep 2001 01:04:13 +0000
Subject: cvs: phpweb /include layout.inc shared-manual.inc
Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-6616@lists.php.net to get a copy of this message
jimw Sat Sep 22 21:04:13 2001 EDT Modified files: /phpweb/include layout.inc shared-manual.inc Log: switch to using master.php.net for user note management, and use a sized popup if javascript is enabled Index: phpweb/include/layout.inc diff -u phpweb/include/layout.inc:1.52 phpweb/include/layout.inc:1.53 --- phpweb/include/layout.inc:1.52 Thu Sep 20 22:36:30 2001 +++ phpweb/include/layout.inc Sat Sep 22 21:04:13 2001 @@ -1,5 +1,5 @@ <?php -/* $Id: layout.inc,v 1.52 2001/09/21 02:36:30 jimw Exp $ */ +/* $Id: layout.inc,v 1.53 2001/09/23 01:04:13 jimw Exp $ */ # spacer() # print a IMG tag for a sized spacer GIF @@ -122,6 +122,30 @@ function print_link($url, $linktext=false, $target=false, $extras=false) { echo make_link($url, $linktext, $target, $extras); +} + +# make_popup_link() +# return a hyperlink to something, within the site, that pops up a new window +# + +function make_popup_link ($url, $linktext=false, $target=false, $windowprops="", $extras=false) { + return sprintf("<a href=\"%s\" target=\"%s\" onclick=\"window.open('%s','%s','%s');return false;\"%s>%s</a>", + htmlspecialchars($url), + ($target ? $target : "_new"), + htmlspecialchars($url), + ($target ? $target : "_new"), + $windowprops, + ($extras ? ' '.$extras : ''), + ($linktext ? $linktext : $url) + ); +} + +# print_popup_link() +# echo a hyperlink to something, within the site, that pops up a new window +# + +function print_popup_link($url, $linktext=false, $windowprops="", $target=false, $extras=false) { + echo make_popup_link($url, $linktext, $windowprops, $target, $extras); } # download_link() Index: phpweb/include/shared-manual.inc diff -u phpweb/include/shared-manual.inc:1.120 phpweb/include/shared-manual.inc:1.121 --- phpweb/include/shared-manual.inc:1.120 Sat Sep 22 16:56:16 2001 +++ phpweb/include/shared-manual.inc Sat Sep 22 21:04:13 2001 @@ -143,19 +143,22 @@ <td align="right"> <?php if (isset($MAGIC_COOKIE) && $id) { - print_link('/manual/admin-notes.php?action=edit+' . $id . '&brief=1', + print_popup_link('http://master.php.net/manage/user-notes.php?action=edit+' . $id, make_image('notes-edit.gif', 'edit note'), - 'admin' + 'admin', + 'scrollbars=no,width=650,height=400' ); echo '&nbsp'; - print_link('/manual/admin-notes.php?action=reject+' . $id . '&brief=1&popup=1', + print_popup_link('http://master.php.net/manage/user-notes.php?action=reject+' . $id, make_image('notes-reject.gif', 'reject note'), - 'admin' + 'admin', + 'scrollbars=no,width=300,height=200' ); echo '&nbsp'; - print_link('/manual/admin-notes.php?action=delete+' . $id . '&brief=1&popup=1', + print_popup_link('http://master.php.net/manage/user-notes.php?action=delete+' . $id, make_image('notes-delete.gif', 'delete note'), - 'admin' + 'admin', + 'scrollbars=no,width=300,height=200' ); } ?>

« previous php.mirrors (#6616) next »