cvs: phpweb /include layout.inc
| From: | Philip Olson | Date: | Sun, 08 Jun 2003 02:17:10 +0000 |
| Subject: | cvs: phpweb /include layout.inc | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-18590@lists.php.net to get a copy of this message | ||
philip Sat Jun 7 22:17:10 2003 EDT
Modified files:
/phpweb/include layout.inc
Log:
Add back the popup link functions, as used by the user comments.
Index: phpweb/include/layout.inc
diff -u phpweb/include/layout.inc:1.166 phpweb/include/layout.inc:1.167
--- phpweb/include/layout.inc:1.166 Sat Jun 7 16:17:34 2003
+++ phpweb/include/layout.inc Sat Jun 7 22:17:10 2003
@@ -1,5 +1,5 @@
<?php
-/* $Id: layout.inc,v 1.166 2003/06/07 20:17:34 goba Exp $ */
+/* $Id: layout.inc,v 1.167 2003/06/08 02:17:10 philip Exp $ */
// Set the static content root differently on php.net
$_SERVER['STATIC_ROOT'] = ($MYSITE == 'http://www.php.net/') ?
@@ -112,6 +112,28 @@
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()
+// print 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);
}
// Print a link for a downloadable file (including filesize)