cvs: phpweb / tips.php
| From: | Gabor Hojtsy | Date: | Sun, 03 Aug 2003 11:16:41 +0000 |
| Subject: | cvs: phpweb / tips.php | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-19777@lists.php.net to get a copy of this message | ||
goba Sun Aug 3 07:16:41 2003 EDT
Modified files:
/phpweb tips.php
Log:
= Use the new include method, and provide base page name, so
we can include this from anywhere
= Update tip title printout, use standard HTML tags
= Layout the tips as we have things layed out on other pages
= Remove the lang attribute from calls, so the preferred language
is used in all cases, add note on this to the text above the tips
= Make tips relative to the mirror site, as on the urlhowto page,
also removing the IE5 image, as it was static in this manner
(and was not really that needed anyway)
= It still would be nice, if guys would be able to check that these
tips are still working (eg. the all browser JS tip is not fully working
for me in Firebird)
Index: phpweb/tips.php diff -u phpweb/tips.php:1.35 phpweb/tips.php:1.36 --- phpweb/tips.php:1.35 Mon Jul 28 04:10:41 2003 +++ phpweb/tips.php Sun Aug 3 07:16:40 2003 @@ -1,41 +1,48 @@ <?php -/* $Id: tips.php,v 1.35 2003/07/28 08:10:41 goba Exp $ */ - -require_once './include/prepend.inc'; -commonHeader("Cool Quick Reference Tips"); - -function tipTitle($title,$author='',$date='') { - echo hdelim(); - echo "<big><b>" . $title . "</b></big><br />\n"; - if ($author || $date) { - echo "<small>\n"; - if ($author) { - echo "Submitted by " . $author . "<br />\n"; - } - if ($date) { - echo $date . "<br />\n"; - } - echo "</small>\n"; - } - echo "<br />\n"; +// $Id: tips.php,v 1.36 2003/08/03 11:16:40 goba Exp $ +$_SERVER['BASE_PAGE'] = 'tips.php'; +include_once $_SERVER['DOCUMENT_ROOT'] . '/include/prepend.inc'; +commonHeader("Quick Reference Tips"); + +function tip_title($title, $author = '', $date = '') +{ + echo "<hr />\n<h2>" . $title . "</h2>\n"; + if ($author || $date) { + echo "<small>\n"; + if ($author) { + echo "Submitted by " . $author . "<br />\n"; + } + if ($date) { + echo $date . "<br />\n"; + } + echo "</small>\n"; + } + echo "<br />\n"; } - ?> -<h1>Cool Quick Reference Tips</h1> +<h1>Quick Reference Tips</h1> <p> -On this page, you can find many neat tips and tricks to optimize -your usage of our quick reference features. Send your suggestions -for tips to <a href="mailto:webmaster@php.net">webmaster@php.net</a>. + On this page, you can find many neat tips and tricks to optimize + your usage of our quick reference features. All of these shortcuts + display pages in your own preferred language, as detected by the + PHP site. For more information on language selection, see + <a href="/my.php">the My PHP.net page</a>. </p> <p> -For a description of PHP.net shortcut URLs, please visit our -<a href="urlhowto.php">URL Howto page</a>. + For a description of PHP.net shortcut URLs (which work in any + browser and on any mirror site), please visit our + <a href="/urlhowto.php">URL Howto page</a>. +</p> + +<p> + Send your suggestions for tips to + <a href="mailto:webmaster@php.net">the webmasters</a>. </p> -<?php tipTitle('Quick Reference for BBEdit', 'Stian Andersen', '27-July-2003');?> +<?php tip_title('Quick Reference for BBEdit', 'Stian Andersen', '27-July-2003');?> <p> BBEdit users can put this little AppleScript into the Scripts folder of @@ -52,97 +59,98 @@ end if if fu is not "" then - set target_URL to "http://www.php.net/" & fu + set target_URL to "<?php echo $MYSITE; ?>" & fu open location target_URL end if end tell </pre> -<?php tipTitle('Quick Reference for iCab', 'Telcontar', '17-Jun-2003');?> +<?php tip_title('Quick Reference for iCab', 'Telcontar', '17-Jun-2003');?> <p> -Open the Preferences dialog box, select Searches and then Internet Sites. -Click New, add "PHP Quick Reference" as the Title, and "http://www.php.net/manual-lookup.php?function=" as the URL. If you add -a letter in the Key column (eg. "p") you can search using the address bar -with that letter (eg. "p str_replace"). Otherwise, use Edit > Find (Cmd-F) -and select "On the Internet" under Find and choose "PHP Quick Reference" as -the search site. + Open the Preferences dialog box, select Searches and then Internet Sites. + Click New, add "PHP Quick Reference" as the Title, and + <tt>"<?php echo $MYSITE; ?>manual-lookup.php?function="</tt> as the URL. If + you add a letter in the Key column (eg. "p") you can search using the + address bar with that letter (eg. "p str_replace"). Otherwise, use Edit + → Find (Cmd-F) and select "On the Internet" under Find and choose + "PHP Quick Reference" as the search site. </p> -<?php tipTitle('Quick Reference for Internet Explorer 4 and above', 'Fraghunter', '07-Nov-2002');?> +<?php tip_title('Quick Reference for Internet Explorer 4 and above', 'Fraghunter', '07-Nov-2002');?> <p> -Just right-click on this link: -<a href="javascript:q=document.selection.createRange().text;if(!q)void(q=prompt('PHP%20Reference:',''));if(q)location.href='http://www.php.net/manual-lookup.php?lang=en&function='+escape(q)" title="PHP Quick Reference">PHP Quick Reference</a> -and add it to your bookmarks. You can edit the bookmark to change the -default language by changing 'lang=en' to whatever language you want to -use by default. (For example, to pull up the German translation of the -manual, you would replace "lang=en" with "lang=de".) + Just right-click on this link: + <a href="javascript:q=document.selection.createRange().text;if(!q)void(q=prompt('PHP%20Reference:',''));if(q)location.href='<?php echo $MYSITE; ?>manual-lookup.php?function='+escape(q)" title="PHP Quick Reference">PHP Quick Reference</a> + and add it to your bookmarks. Using this bookmark you can directly get to + the documentation page of any function you have selected the name of + on the page, or if there is no selection, you are prompted for a string to + look for. </p> -<?php tipTitle('Quick Reference for KDE 3.x', 'James Grant', '07-Nov-2002');?> +<?php tip_title('Quick Reference for KDE 3.x', 'James Grant', '07-Nov-2002');?> <p> -In <a href="http://www.kde.org/">KDE</a> 3.0, the PHP quicksearch -is preconfigured, so you can type "php:mail" in Konqueror to get -the mail() function's manual page. + In <a href="http://www.kde.org/">KDE</a> 3.0, the PHP quicksearch + is preconfigured, so you can type "php:mail" in Konqueror to get + the mail() function's manual page. </p> -<?php tipTitle('Search Box for Galeon', 'Carter Comunale', '31-Oct-2002'); ?> +<?php tip_title('Search Box for Galeon', 'Carter Comunale', '31-Oct-2002'); ?> <ol> - <li>Press CTRL+D to add a bookmark</li> - <li>Edit the bookmark, filling the folowing fields in: - <dl> - <dt>Name</dt><dd>PHP</dd> - <dt>URL</dt><dd>http://php.net</dd> - <dt>Smart URL</dt><dd>http://www.php.net/manual-lookup.php?pattern=%s&lang=en</dd> - <dt>Nicknames</dt><dd>php</dd> - </dl> - </li> - <li>You can also add a logo to the bookmark, see our - <a href="/download-logos.php">logos page</a></li> + <li>Press CTRL+D to add a bookmark</li> + <li>Edit the bookmark, filling the folowing fields in: + <dl> + <dt>Name</dt><dd>PHP</dd> + <dt>URL</dt><dd><?php echo $MYSITE; ?></dd> + <dt>Smart URL</dt><dd><?php echo $MYSITE; ?>manual-lookup.php?pattern=%s</dd> + <dt>Nicknames</dt><dd>php</dd> + </dl> + </li> + <li> + You can also add a logo to the bookmark, see our + <a href="/download-logos.php">logos page</a> + </li> </ol> -<?php tipTitle('Quick Reference for OmniWeb on Mac OS X', 'Steve Poole', '03-Oct-2002'); ?> +<?php tip_title('Quick Reference for OmniWeb on Mac OS X', 'Steve Poole', '03-Oct-2002'); ?> <ol> - <li>In OmniWeb, open the Preferences window and select Shortcuts.</li> - <li>Click the + button to add a shortcut.</li> - <li>In the Shortcut column type: <tt>php@</tt></li> - <li>In the Destination URL column type: <tt>http://www.php.net/manual-lookup.php?function=%@</tt></li> - <li>Close the Preferences window.</li> + <li>Open the Preferences window in OmniWeb, and select Shortcuts.</li> + <li>Click the + button to add a shortcut.</li> + <li>In the Shortcut column type: <tt>php@</tt></li> + <li>In the Destination URL column type: <tt><?php echo $MYSITE; ?>manual-lookup.php?function=%@</tt></li> + <li>Close the Preferences window.</li> </ol> <p> -Now you can search for PHP functions by typing into the URL well. -For instance, <tt>php mysql</tt> or <tt>php strstr</tt>. + Now you can search for PHP functions by typing into the URL well. + For instance, <tt>php mysql</tt> or <tt>php strstr</tt>. </p> -<?php tipTitle('Quick Reference for Opera', 'Paul Sculthorpe', '11-Jun-2002');?> +<?php tip_title('Quick Reference for Opera', 'Paul Sculthorpe', '11-Jun-2002');?> <p> -Add this stuff to search.ini in your Opera directory. + Add this stuff to search.ini in your Opera directory. </p> <p> -I replaced one of the existing search engine entries -(number 4 in this case), but there are tools around -that allow you to fully manage the search features of Opera. + I replaced one of the existing search engine entries + (number 4 in this case), but there are tools around + that allow you to fully manage the search features of Opera. </p> <p> -After adding, saving and restarting Opera, I can access the -UK mirror of the PHP function list by typing 'p is_dir' in the -address bar of any Opera window. Obviously the UK part can be -changed back to 'www' to access the main site instead of the -mirror. + After adding, saving and restarting Opera, I can access the + PHP function list by typing 'p is_dir' in the address bar of + any Opera window. </p> <pre> [Search Engine 4] Name=PHP -URL=http://uk.php.net/manual-lookup.php?function=%s +URL=<?php echo $MYSITE; ?>manual-lookup.php?function=%s Query= Key=p Is post=0 @@ -151,133 +159,135 @@ Search Type=0 </pre> -<?php tipTitle('Quick Reference for KDE 2.1', 'Christoph Luehr', '10-Mar-2001');?> +<?php tip_title('Quick Reference for KDE 2.1', 'Christoph Luehr', '10-Mar-2001');?> <p> -With <a href="http://www.kde.org/">KDE</a> 2.1, it is possible -to configure the Konqueror web browser to recognize quick reference -URIs, for example: "php:mysql_connect". + With <a href="http://www.kde.org/">KDE</a> 2.1, it is possible + to configure the Konqueror web browser to recognize quick reference + URIs, for example: "php:mysql_connect". </p> <p> -Just open the Konqueror menu "Settings->Configure Konqueror", -select the tab "Enhanced Browsing", check "Enable Web Shortcuts". + Just open the Konqueror menu "Settings → Configure Konqueror", + select the tab "Enhanced Browsing", check "Enable Web Shortcuts". </p> <p> -Then click on "Add..." and fill the dialog: + Then click on "Add..." and fill the dialog: </p> <ul> <li>Search provider name: <b>"PHP Manual Quick Reference"</b></li> - <li>Search URI: <b>http://www.php.net/manual-lookup.php?function=\1</b></li> - <li>URI Shortcuts: <b>php</b></li> + <li>Search URI: <b><?php echo $MYSITE; ?>manual-lookup.php?function=\1</b></li> + <li>URI Shortcuts: <b>php</b></li> </ul> <p> -Voila! + Voila! </p> -<?php tipTitle('Adding the Quick Reference to most Javascript-capable Browsers', '', '07-Mar-2001'); ?> +<?php tip_title('Adding the Quick Reference to most Javascript-capable Browsers', '', '07-Mar-2001'); ?> <p> -Just right-click (control-click or click-and-hold for Macintosh users) -on this link: <a href="javascript:q=document.getSelection();if(!q)void(q=prompt('PHP Reference:',''));if(q)location.href='http://www.php.net/manual-lookup.php?lang=en&function='+escape(q)" title="PHP Quick Reference">PHP Quick Reference</a> -and add it to your bookmarks. With some browsers, you may need to edit -your bookmarks manually to give the bookmark an easy-to-remember title. -You can also edit the bookmark to change the default language by changing -'lang=en' to whatever language you want to use by default. (For example, -to pull up the German translation of the manual, you would replace -"lang=en" with "lang=de".) + Just right-click (control-click or click-and-hold for Macintosh users) + on this link: <a href="javascript:q=document.getSelection();if(!q)void(q=prompt('PHP Reference:',''));if(q)location.href='<?php echo $MYSITE; ?>manual-lookup.php?function='+escape(q)" title="PHP Quick Reference">PHP Quick Reference</a> + and add it to your bookmarks. With some browsers, you may need to edit + your bookmarks manually to give the bookmark an easy-to-remember title. </p> -<?php tipTitle('Adding the Quick Reference to Mozilla and Netscape 6', 'André Langhorst', '16-Aug-2000'); ?> +<?php tip_title('Adding the Quick Reference to Mozilla and Netscape 6', 'André Langhorst', '16-Aug-2000'); ?> <p> -Quick access to PHP documentation and site search for all Mozilla -and Netscape 6 users: + Quick access to PHP documentation and site search for all Mozilla + and Netscape 6 users: </p> <ol> - <li>Click "Bookmarks -> Manage Bookmarks"</li> - <li>Create a bookmark in a folder of your choice on - the following URL: http://www.php.net/manual-lookup.php?function=%s - (or mirror site of your choice) - <ul> - <li>Choose a name for your bookmark.</li> - </ul> - </li> - <li>Right click the bookmark you´ve created and select "Properties..."</li> - <li>Choose a "custom keyword" you want to enter in the URL bar, - eg. "php" and fill it in.</li> - <li>Click "ok" and open a new browser window.</li> - <li>Finished. Now you´re able to enter eg. "php fgets" to look - up the manual entry on the function fgets() or eg. "php building - PHP 4" to search all available information how to build PHP 4.</li> + <li>Click "Bookmarks → Manage Bookmarks"</li> + <li> + Create a bookmark in a folder of your choice on + the following URL: <tt><?php echo $MYSITE; ?>manual-lookup.php?function=%s</tt> + and choose a name for it. + </li> + <li> + Right click the bookmark you have just created and select "Properties..." + </li> + <li> + Choose a "custom keyword" you want to enter in the URL bar, + eg. "php" and fill it in. + </li> + <li>Click "ok" and open a new browser window.</li> + <li> + Finished. Now you are able to enter eg. "php fgets" to look + up the manual entry on the function fgets() + </li> </ol> -<?php tipTitle('Adding the Quick Reference to Internet Explorer 5', 'Colin Viebrock', '28-Jul-2000'); ?> +<?php tip_title('Adding the Quick Reference to Internet Explorer 5', 'Colin Viebrock', '28-Jul-2000'); ?> <ol> - <li>If you don't already have the IE5 Tools package, download and install it from + <li> + If you don't already have the IE5 Tools package, download and install it from <a href="http://www.microsoft.com/Windows/IE/WebAccess/ie5tools.asp" target="_blank" - >www.microsoft.com/Windows/IE/WebAccess/ie5tools.asp</a></li> - <li>Launch the QuickSearch utility (you'll find it on your Links bar)</li> - <li>Add a new search shortcut by clicking on "New" and use the + >www.microsoft.com/Windows/IE/WebAccess/ie5tools.asp</a> + </li> + <li>Launch the QuickSearch utility (you'll find it on your Links bar)</li> + <li> + Add a new search shortcut by clicking on "New" and use the following settings: - <ul> - <li>Shortcut: <b>php</b></li> - <li>Search: <b>Custom URL</b></li> - <li>URL: <b>http://www.php.net/manual-lookup.php?function=%s</b></li> - </ul> - ... or substitute your favorite mirror site instead of <b>www.php.net</b><br /> - <div align="center"> - <img src="images/tips-quickref.gif" width="317" height="293" border="0" alt="Edit shortcut" /><br /> - </div></li> - <li>Click "Ok", then click "Save" to keep your new settings</li> - <li>That's it! Try it by typing "php strlen" in the IE Address bar. - You should jump right to the manual entry for strlen. And because the - QuickRef code on the PHP site is smart, you can use it to do general - searches of the PHP site. For example, try typing "php file upload" - in your browser.</li> + <ul> + <li>Shortcut: <tt>php</tt></li> + <li>Search: <strong>Custom URL</strong></li> + <li>URL: <tt><?php echo $MYSITE; ?>manual-lookup.php?function=%s</tt></li> + </ul> + </li> + <li>Click "Ok", then click "Save" to keep your new settings</li> + <li> + That's it! Try it by typing "php strlen" in the IE Address bar. + You should jump right to the manual entry for strlen(). + </li> </ol> -<?php tipTitle('Adding the Quick Reference to Netscape on Linux', 'David Rose', '28-Jul-2000'); ?> +<?php tip_title('Adding the Quick Reference to Netscape on Linux', 'David Rose', '28-Jul-2000'); ?> <p> -Further to the example above for Windows/IE users, here's something Linux folk can do: + Further to the example above for Windows/IE users, here's something + Linux folks can do: </p> <ol> - <li>Create a file called <b>phpfind</b> somewhere on an executable path</li> - <li>In that file, write the following code (substituting the path to Netscape, + <li>Create a file called <tt>phpfind</tt> somewhere on an executable path</li> + <li> + In that file, write the following code (substituting the path to Netscape, if necessary): -<pre> + <pre> #!/bin/sh -/usr/bin/netscape http://www.php.net/manual-lookup.php?function=$1 -</pre></li> - <li>Save it and type <b>chmod +x phpfind</b> to make it executable</li> - <li>That's it. When you type "phpfind funcionname" on your command line, - Netscape will open the proper URL for you.</li> +/usr/bin/netscape <?php echo $MYSITE; ?>manual-lookup.php?function=$1 + </pre> + </li> + <li>Save it and type <tt>chmod +x phpfind</tt> to make it executable</li> + <li> + That's it. When you type "phpfind fopen" on your command line, + Netscape will open the fopen() documentation page for you. + </li> </ol> -<?php tipTitle('Quick Reference for Gnome Users', 'Benjamin Curtis', '29-Jul-2000'); ?> +<?php tip_title('Quick Reference for Gnome Users', 'Benjamin Curtis', '29-Jul-2000'); ?> <p> -Here's another search option for Linux users who use Gnome. This is a macro -for gnome's mini-commander panel applet (modified from the Yahoo search that -comes with the applet): + Here's another search option for Linux users who use Gnome. This is a macro + for gnome's mini-commander panel applet (modified from the Yahoo search that + comes with the applet): </p> <p> -<b>Regex:</b><br /> -^php: *(.*)$ + <stroong>Regex:</strong><br /><tt>^php: *(.*)$</tt> </p> <p> -<b>Macro:</b><br /> -gnome-moz-remote --newwin http://www.php.net/manual-lookup.php?function=$(echo<br /> -'\1'|sed -e ': p;s/+/%2B/;t p;: s;s/\ /+/;t s;: q;s/\"/%22/;t q') + <strong>Macro:</strong><br /> + <tt>gnome-moz-remote --newwin <?php echo $MYSITE; ?>manual-lookup.php?function=$(echo<br /> +'\1'|sed -e ': p;s/+/%2B/;t p;: s;s/\ /+/;t s;: q;s/\"/%22/;t q')</tt> </p> <?php commonFooter(); ?>
Index: phpweb/tips.php diff -u phpweb/tips.php:1.35 phpweb/tips.php:1.36 --- phpweb/tips.php:1.35 Mon Jul 28 04:10:41 2003 +++ phpweb/tips.php Sun Aug 3 07:16:40 2003 @@ -1,41 +1,48 @@ <?php -/* $Id: tips.php,v 1.35 2003/07/28 08:10:41 goba Exp $ */ - -require_once './include/prepend.inc'; -commonHeader("Cool Quick Reference Tips"); - -function tipTitle($title,$author='',$date='') { - echo hdelim(); - echo "<big><b>" . $title . "</b></big><br />\n"; - if ($author || $date) { - echo "<small>\n"; - if ($author) { - echo "Submitted by " . $author . "<br />\n"; - } - if ($date) { - echo $date . "<br />\n"; - } - echo "</small>\n"; - } - echo "<br />\n"; +// $Id: tips.php,v 1.36 2003/08/03 11:16:40 goba Exp $ +$_SERVER['BASE_PAGE'] = 'tips.php'; +include_once $_SERVER['DOCUMENT_ROOT'] . '/include/prepend.inc'; +commonHeader("Quick Reference Tips"); + +function tip_title($title, $author = '', $date = '') +{ + echo "<hr />\n<h2>" . $title . "</h2>\n"; + if ($author || $date) { + echo "<small>\n"; + if ($author) { + echo "Submitted by " . $author . "<br />\n"; + } + if ($date) { + echo $date . "<br />\n"; + } + echo "</small>\n"; + } + echo "<br />\n"; } - ?> -<h1>Cool Quick Reference Tips</h1> +<h1>Quick Reference Tips</h1> <p> -On this page, you can find many neat tips and tricks to optimize -your usage of our quick reference features. Send your suggestions -for tips to <a href="mailto:webmaster@php.net">webmaster@php.net</a>. + On this page, you can find many neat tips and tricks to optimize + your usage of our quick reference features. All of these shortcuts + display pages in your own preferred language, as detected by the + PHP site. For more information on language selection, see + <a href="/my.php">the My PHP.net page</a>. </p> <p> -For a description of PHP.net shortcut URLs, please visit our -<a href="urlhowto.php">URL Howto page</a>. + For a description of PHP.net shortcut URLs (which work in any + browser and on any mirror site), please visit our + <a href="/urlhowto.php">URL Howto page</a>. +</p> + +<p> + Send your suggestions for tips to + <a href="mailto:webmaster@php.net">the webmasters</a>. </p> -<?php tipTitle('Quick Reference for BBEdit', 'Stian Andersen', '27-July-2003');?> +<?php tip_title('Quick Reference for BBEdit', 'Stian Andersen', '27-July-2003');?> <p> BBEdit users can put this little AppleScript into the Scripts folder of @@ -52,97 +59,98 @@ end if if fu is not "" then - set target_URL to "http://www.php.net/" & fu + set target_URL to "<?php echo $MYSITE; ?>" & fu open location target_URL end if end tell </pre> -<?php tipTitle('Quick Reference for iCab', 'Telcontar', '17-Jun-2003');?> +<?php tip_title('Quick Reference for iCab', 'Telcontar', '17-Jun-2003');?> <p> -Open the Preferences dialog box, select Searches and then Internet Sites. -Click New, add "PHP Quick Reference" as the Title, and "http://www.php.net/manual-lookup.php?function=" as the URL. If you add -a letter in the Key column (eg. "p") you can search using the address bar -with that letter (eg. "p str_replace"). Otherwise, use Edit > Find (Cmd-F) -and select "On the Internet" under Find and choose "PHP Quick Reference" as -the search site. + Open the Preferences dialog box, select Searches and then Internet Sites. + Click New, add "PHP Quick Reference" as the Title, and + <tt>"<?php echo $MYSITE; ?>manual-lookup.php?function="</tt> as the URL. If + you add a letter in the Key column (eg. "p") you can search using the + address bar with that letter (eg. "p str_replace"). Otherwise, use Edit + → Find (Cmd-F) and select "On the Internet" under Find and choose + "PHP Quick Reference" as the search site. </p> -<?php tipTitle('Quick Reference for Internet Explorer 4 and above', 'Fraghunter', '07-Nov-2002');?> +<?php tip_title('Quick Reference for Internet Explorer 4 and above', 'Fraghunter', '07-Nov-2002');?> <p> -Just right-click on this link: -<a href="javascript:q=document.selection.createRange().text;if(!q)void(q=prompt('PHP%20Reference:',''));if(q)location.href='http://www.php.net/manual-lookup.php?lang=en&function='+escape(q)" title="PHP Quick Reference">PHP Quick Reference</a> -and add it to your bookmarks. You can edit the bookmark to change the -default language by changing 'lang=en' to whatever language you want to -use by default. (For example, to pull up the German translation of the -manual, you would replace "lang=en" with "lang=de".) + Just right-click on this link: + <a href="javascript:q=document.selection.createRange().text;if(!q)void(q=prompt('PHP%20Reference:',''));if(q)location.href='<?php echo $MYSITE; ?>manual-lookup.php?function='+escape(q)" title="PHP Quick Reference">PHP Quick Reference</a> + and add it to your bookmarks. Using this bookmark you can directly get to + the documentation page of any function you have selected the name of + on the page, or if there is no selection, you are prompted for a string to + look for. </p> -<?php tipTitle('Quick Reference for KDE 3.x', 'James Grant', '07-Nov-2002');?> +<?php tip_title('Quick Reference for KDE 3.x', 'James Grant', '07-Nov-2002');?> <p> -In <a href="http://www.kde.org/">KDE</a> 3.0, the PHP quicksearch -is preconfigured, so you can type "php:mail" in Konqueror to get -the mail() function's manual page. + In <a href="http://www.kde.org/">KDE</a> 3.0, the PHP quicksearch + is preconfigured, so you can type "php:mail" in Konqueror to get + the mail() function's manual page. </p> -<?php tipTitle('Search Box for Galeon', 'Carter Comunale', '31-Oct-2002'); ?> +<?php tip_title('Search Box for Galeon', 'Carter Comunale', '31-Oct-2002'); ?> <ol> - <li>Press CTRL+D to add a bookmark</li> - <li>Edit the bookmark, filling the folowing fields in: - <dl> - <dt>Name</dt><dd>PHP</dd> - <dt>URL</dt><dd>http://php.net</dd> - <dt>Smart URL</dt><dd>http://www.php.net/manual-lookup.php?pattern=%s&lang=en</dd> - <dt>Nicknames</dt><dd>php</dd> - </dl> - </li> - <li>You can also add a logo to the bookmark, see our - <a href="/download-logos.php">logos page</a></li> + <li>Press CTRL+D to add a bookmark</li> + <li>Edit the bookmark, filling the folowing fields in: + <dl> + <dt>Name</dt><dd>PHP</dd> + <dt>URL</dt><dd><?php echo $MYSITE; ?></dd> + <dt>Smart URL</dt><dd><?php echo $MYSITE; ?>manual-lookup.php?pattern=%s</dd> + <dt>Nicknames</dt><dd>php</dd> + </dl> + </li> + <li> + You can also add a logo to the bookmark, see our + <a href="/download-logos.php">logos page</a> + </li> </ol> -<?php tipTitle('Quick Reference for OmniWeb on Mac OS X', 'Steve Poole', '03-Oct-2002'); ?> +<?php tip_title('Quick Reference for OmniWeb on Mac OS X', 'Steve Poole', '03-Oct-2002'); ?> <ol> - <li>In OmniWeb, open the Preferences window and select Shortcuts.</li> - <li>Click the + button to add a shortcut.</li> - <li>In the Shortcut column type: <tt>php@</tt></li> - <li>In the Destination URL column type: <tt>http://www.php.net/manual-lookup.php?function=%@</tt></li> - <li>Close the Preferences window.</li> + <li>Open the Preferences window in OmniWeb, and select Shortcuts.</li> + <li>Click the + button to add a shortcut.</li> + <li>In the Shortcut column type: <tt>php@</tt></li> + <li>In the Destination URL column type: <tt><?php echo $MYSITE; ?>manual-lookup.php?function=%@</tt></li> + <li>Close the Preferences window.</li> </ol> <p> -Now you can search for PHP functions by typing into the URL well. -For instance, <tt>php mysql</tt> or <tt>php strstr</tt>. + Now you can search for PHP functions by typing into the URL well. + For instance, <tt>php mysql</tt> or <tt>php strstr</tt>. </p> -<?php tipTitle('Quick Reference for Opera', 'Paul Sculthorpe', '11-Jun-2002');?> +<?php tip_title('Quick Reference for Opera', 'Paul Sculthorpe', '11-Jun-2002');?> <p> -Add this stuff to search.ini in your Opera directory. + Add this stuff to search.ini in your Opera directory. </p> <p> -I replaced one of the existing search engine entries -(number 4 in this case), but there are tools around -that allow you to fully manage the search features of Opera. + I replaced one of the existing search engine entries + (number 4 in this case), but there are tools around + that allow you to fully manage the search features of Opera. </p> <p> -After adding, saving and restarting Opera, I can access the -UK mirror of the PHP function list by typing 'p is_dir' in the -address bar of any Opera window. Obviously the UK part can be -changed back to 'www' to access the main site instead of the -mirror. + After adding, saving and restarting Opera, I can access the + PHP function list by typing 'p is_dir' in the address bar of + any Opera window. </p> <pre> [Search Engine 4] Name=PHP -URL=http://uk.php.net/manual-lookup.php?function=%s +URL=<?php echo $MYSITE; ?>manual-lookup.php?function=%s Query= Key=p Is post=0 @@ -151,133 +159,135 @@ Search Type=0 </pre> -<?php tipTitle('Quick Reference for KDE 2.1', 'Christoph Luehr', '10-Mar-2001');?> +<?php tip_title('Quick Reference for KDE 2.1', 'Christoph Luehr', '10-Mar-2001');?> <p> -With <a href="http://www.kde.org/">KDE</a> 2.1, it is possible -to configure the Konqueror web browser to recognize quick reference -URIs, for example: "php:mysql_connect". + With <a href="http://www.kde.org/">KDE</a> 2.1, it is possible + to configure the Konqueror web browser to recognize quick reference + URIs, for example: "php:mysql_connect". </p> <p> -Just open the Konqueror menu "Settings->Configure Konqueror", -select the tab "Enhanced Browsing", check "Enable Web Shortcuts". + Just open the Konqueror menu "Settings → Configure Konqueror", + select the tab "Enhanced Browsing", check "Enable Web Shortcuts". </p> <p> -Then click on "Add..." and fill the dialog: + Then click on "Add..." and fill the dialog: </p> <ul> <li>Search provider name: <b>"PHP Manual Quick Reference"</b></li> - <li>Search URI: <b>http://www.php.net/manual-lookup.php?function=\1</b></li> - <li>URI Shortcuts: <b>php</b></li> + <li>Search URI: <b><?php echo $MYSITE; ?>manual-lookup.php?function=\1</b></li> + <li>URI Shortcuts: <b>php</b></li> </ul> <p> -Voila! + Voila! </p> -<?php tipTitle('Adding the Quick Reference to most Javascript-capable Browsers', '', '07-Mar-2001'); ?> +<?php tip_title('Adding the Quick Reference to most Javascript-capable Browsers', '', '07-Mar-2001'); ?> <p> -Just right-click (control-click or click-and-hold for Macintosh users) -on this link: <a href="javascript:q=document.getSelection();if(!q)void(q=prompt('PHP Reference:',''));if(q)location.href='http://www.php.net/manual-lookup.php?lang=en&function='+escape(q)" title="PHP Quick Reference">PHP Quick Reference</a> -and add it to your bookmarks. With some browsers, you may need to edit -your bookmarks manually to give the bookmark an easy-to-remember title. -You can also edit the bookmark to change the default language by changing -'lang=en' to whatever language you want to use by default. (For example, -to pull up the German translation of the manual, you would replace -"lang=en" with "lang=de".) + Just right-click (control-click or click-and-hold for Macintosh users) + on this link: <a href="javascript:q=document.getSelection();if(!q)void(q=prompt('PHP Reference:',''));if(q)location.href='<?php echo $MYSITE; ?>manual-lookup.php?function='+escape(q)" title="PHP Quick Reference">PHP Quick Reference</a> + and add it to your bookmarks. With some browsers, you may need to edit + your bookmarks manually to give the bookmark an easy-to-remember title. </p> -<?php tipTitle('Adding the Quick Reference to Mozilla and Netscape 6', 'André Langhorst', '16-Aug-2000'); ?> +<?php tip_title('Adding the Quick Reference to Mozilla and Netscape 6', 'André Langhorst', '16-Aug-2000'); ?> <p> -Quick access to PHP documentation and site search for all Mozilla -and Netscape 6 users: + Quick access to PHP documentation and site search for all Mozilla + and Netscape 6 users: </p> <ol> - <li>Click "Bookmarks -> Manage Bookmarks"</li> - <li>Create a bookmark in a folder of your choice on - the following URL: http://www.php.net/manual-lookup.php?function=%s - (or mirror site of your choice) - <ul> - <li>Choose a name for your bookmark.</li> - </ul> - </li> - <li>Right click the bookmark you´ve created and select "Properties..."</li> - <li>Choose a "custom keyword" you want to enter in the URL bar, - eg. "php" and fill it in.</li> - <li>Click "ok" and open a new browser window.</li> - <li>Finished. Now you´re able to enter eg. "php fgets" to look - up the manual entry on the function fgets() or eg. "php building - PHP 4" to search all available information how to build PHP 4.</li> + <li>Click "Bookmarks → Manage Bookmarks"</li> + <li> + Create a bookmark in a folder of your choice on + the following URL: <tt><?php echo $MYSITE; ?>manual-lookup.php?function=%s</tt> + and choose a name for it. + </li> + <li> + Right click the bookmark you have just created and select "Properties..." + </li> + <li> + Choose a "custom keyword" you want to enter in the URL bar, + eg. "php" and fill it in. + </li> + <li>Click "ok" and open a new browser window.</li> + <li> + Finished. Now you are able to enter eg. "php fgets" to look + up the manual entry on the function fgets() + </li> </ol> -<?php tipTitle('Adding the Quick Reference to Internet Explorer 5', 'Colin Viebrock', '28-Jul-2000'); ?> +<?php tip_title('Adding the Quick Reference to Internet Explorer 5', 'Colin Viebrock', '28-Jul-2000'); ?> <ol> - <li>If you don't already have the IE5 Tools package, download and install it from + <li> + If you don't already have the IE5 Tools package, download and install it from <a href="http://www.microsoft.com/Windows/IE/WebAccess/ie5tools.asp" target="_blank" - >www.microsoft.com/Windows/IE/WebAccess/ie5tools.asp</a></li> - <li>Launch the QuickSearch utility (you'll find it on your Links bar)</li> - <li>Add a new search shortcut by clicking on "New" and use the + >www.microsoft.com/Windows/IE/WebAccess/ie5tools.asp</a> + </li> + <li>Launch the QuickSearch utility (you'll find it on your Links bar)</li> + <li> + Add a new search shortcut by clicking on "New" and use the following settings: - <ul> - <li>Shortcut: <b>php</b></li> - <li>Search: <b>Custom URL</b></li> - <li>URL: <b>http://www.php.net/manual-lookup.php?function=%s</b></li> - </ul> - ... or substitute your favorite mirror site instead of <b>www.php.net</b><br /> - <div align="center"> - <img src="images/tips-quickref.gif" width="317" height="293" border="0" alt="Edit shortcut" /><br /> - </div></li> - <li>Click "Ok", then click "Save" to keep your new settings</li> - <li>That's it! Try it by typing "php strlen" in the IE Address bar. - You should jump right to the manual entry for strlen. And because the - QuickRef code on the PHP site is smart, you can use it to do general - searches of the PHP site. For example, try typing "php file upload" - in your browser.</li> + <ul> + <li>Shortcut: <tt>php</tt></li> + <li>Search: <strong>Custom URL</strong></li> + <li>URL: <tt><?php echo $MYSITE; ?>manual-lookup.php?function=%s</tt></li> + </ul> + </li> + <li>Click "Ok", then click "Save" to keep your new settings</li> + <li> + That's it! Try it by typing "php strlen" in the IE Address bar. + You should jump right to the manual entry for strlen(). + </li> </ol> -<?php tipTitle('Adding the Quick Reference to Netscape on Linux', 'David Rose', '28-Jul-2000'); ?> +<?php tip_title('Adding the Quick Reference to Netscape on Linux', 'David Rose', '28-Jul-2000'); ?> <p> -Further to the example above for Windows/IE users, here's something Linux folk can do: + Further to the example above for Windows/IE users, here's something + Linux folks can do: </p> <ol> - <li>Create a file called <b>phpfind</b> somewhere on an executable path</li> - <li>In that file, write the following code (substituting the path to Netscape, + <li>Create a file called <tt>phpfind</tt> somewhere on an executable path</li> + <li> + In that file, write the following code (substituting the path to Netscape, if necessary): -<pre> + <pre> #!/bin/sh -/usr/bin/netscape http://www.php.net/manual-lookup.php?function=$1 -</pre></li> - <li>Save it and type <b>chmod +x phpfind</b> to make it executable</li> - <li>That's it. When you type "phpfind funcionname" on your command line, - Netscape will open the proper URL for you.</li> +/usr/bin/netscape <?php echo $MYSITE; ?>manual-lookup.php?function=$1 + </pre> + </li> + <li>Save it and type <tt>chmod +x phpfind</tt> to make it executable</li> + <li> + That's it. When you type "phpfind fopen" on your command line, + Netscape will open the fopen() documentation page for you. + </li> </ol> -<?php tipTitle('Quick Reference for Gnome Users', 'Benjamin Curtis', '29-Jul-2000'); ?> +<?php tip_title('Quick Reference for Gnome Users', 'Benjamin Curtis', '29-Jul-2000'); ?> <p> -Here's another search option for Linux users who use Gnome. This is a macro -for gnome's mini-commander panel applet (modified from the Yahoo search that -comes with the applet): + Here's another search option for Linux users who use Gnome. This is a macro + for gnome's mini-commander panel applet (modified from the Yahoo search that + comes with the applet): </p> <p> -<b>Regex:</b><br /> -^php: *(.*)$ + <stroong>Regex:</strong><br /><tt>^php: *(.*)$</tt> </p> <p> -<b>Macro:</b><br /> -gnome-moz-remote --newwin http://www.php.net/manual-lookup.php?function=$(echo<br /> -'\1'|sed -e ': p;s/+/%2B/;t p;: s;s/\ /+/;t s;: q;s/\"/%22/;t q') + <strong>Macro:</strong><br /> + <tt>gnome-moz-remote --newwin <?php echo $MYSITE; ?>manual-lookup.php?function=$(echo<br /> +'\1'|sed -e ': p;s/+/%2B/;t p;: s;s/\ /+/;t s;: q;s/\"/%22/;t q')</tt> </p> <?php commonFooter(); ?>