cvs: phpweb / urlhowto.php
| From: | Gabor Hojtsy | Date: | Thu, 24 Apr 2003 07:20:25 +0000 |
| Subject: | cvs: phpweb / urlhowto.php | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-17000@lists.php.net to get a copy of this message | ||
goba Thu Apr 24 03:20:25 2003 EDT
Modified files:
/phpweb urlhowto.php
Log:
Provide information on the 'new' My PHP.net
feature (language detection), modify the description,
so it does not state that mirror site default language
is used which is no more true
Also modify all links to be relative, instead of php.net
based, so the mirror site will print out examples using
it's own address. This probably strengthens the fact,
that URL shortcuts are available on mirrors.
Add langchooser to 'get it on your site' part (though I
think noone would like to dig into this anymore just
to get the feature on his site, this just got too complex
for a newcomer).
Index: phpweb/urlhowto.php
diff -u phpweb/urlhowto.php:1.10 phpweb/urlhowto.php:1.11
--- phpweb/urlhowto.php:1.10 Tue Dec 17 15:47:20 2002
+++ phpweb/urlhowto.php Thu Apr 24 03:20:25 2003
@@ -7,11 +7,11 @@
We have many kind of URL shortcuts. Here are some
examples you can try out:
<ul>
- <li><a href="http://php.net/echo">http://php.net/echo</a></li>
- <li><a href="http://php.net/it/echo">http://php.net/it/echo</a></li>
- <li><a href="http://php.net/imap">http://php.net/imap</a></li>
- <li><a href="http://php.net/downloads">http://php.net/downloads</a></li>
- <li><a href="http://php.net/searchterm">http://php.net/searchterm</a></li>
+ <li><a
href="'.$MYSITE.'echo">'.$MYSITE.'echo</a></li>
+ <li><a
href="'.$MYSITE.'it/echo">'.$MYSITE.'it/echo</a></li>
+ <li><a
href="'.$MYSITE.'imap">'.$MYSITE.'imap</a></li>
+ <li><a
href="'.$MYSITE.'downloads">'.$MYSITE.'downloads</a></li>
+ <li><a
href="'.$MYSITE.'searchterm">'.$MYSITE.'searchterm</a></li>
</ul>
</p>
@@ -20,6 +20,13 @@
You can find <a href="tips.php">more
quick reference tips</a> on our site.
</p>
+
+<h3>My PHP.net</h3>
+<p>
+URL shortcut behaviour is greatly influenced by
+your <a href="/my.php">language preferences</a>
+detected and set.
+</p>
';
commonHeader("URL Howto");
@@ -29,10 +36,9 @@
<h1>URL Howto</h1>
<p>
-Among the many smart access methods to get to information quickly
-on the PHP site, we decided to implement a system, where there
-is even no need to write something inside a search box, you can
-use short php.net URLs to access pages directly.
+When using the PHP.net website, there is even no need to get to
+a search box to access the content you would like to see quickly.
+You can use short PHP.net URLs to access pages directly.
</p>
<p>
@@ -45,14 +51,13 @@
<p>
There are currently three types of URLs you can use this way.
-For the examples, we'll use the main site URL.
</p>
<h2>Page shortcuts</h2>
<p>
-If you write in a php.net URL, like <tt>http://php.net/links</tt>,
-first this URL is matched against the php.net pages. If there is
+If you write in a PHP.net URL, like <tt><?php echo $MYSITE; ?>links</tt>,
+first this URL is matched against the PHP.net pages. If there is
a page named <tt>links.php</tt>, then you'll get that page
immediately. This type of shortcut makes easy to type in a link
in an IRC conversation or mailing list message. If the script
@@ -64,34 +69,27 @@
<p>
If your URL can't be matched with a page name, a manual page
is searched for your query. This is the case for the
-<tt>http://php.net/preg_match</tt> URL.
The following pages
+<tt><?php echo $MYSITE; ?>preg_match</tt> URL. The following pages
are searched for in the manual:
<ul>
- <li>Chapter pages, like <tt>http://php.net/installation</tt></li>
- <li>Reference pages, like <tt>http://php.net/imap</tt></li>
- <li>Function pages, like <tt>http://php.net/join</tt></li>
- <li>Class pages, like <tt>http://php.net/dir</tt></li>
- <li>Feature pages, like <tt>http://php.net/safe_mode</tt></li>
- <li>Control structure pages, like <tt>http://php.net/while</tt></li>
- <li>Other language pages, like <tt>http://php.net/oop</tt></li>
+ <li>Chapter pages, like <tt><?php echo $MYSITE;
?>installation</tt></li>
+ <li>Reference pages, like <tt><?php echo $MYSITE; ?>imap</tt></li>
+ <li>Function pages, like <tt><?php echo $MYSITE; ?>join</tt></li>
+ <li>Class pages, like <tt><?php echo $MYSITE; ?>dir</tt></li>
+ <li>Feature pages, like <tt><?php echo $MYSITE;
?>safe_mode</tt></li>
+ <li>Control structure pages, like <tt><?php echo $MYSITE;
?>while</tt></li>
+ <li>Other language pages, like <tt><?php echo $MYSITE;
?>oop</tt></li>
</ul>
</p>
<p>
-This kind of URL will bring up the manual page in the mirror's
-default manual language. This is English for the main site,
-but can be a wide range of languages, depending on the mirror's
-setup. You can see the list of languages used by mirrors at
-<a href="http://php.net/mirrors">http://php.net/mirrors</a>.
-This way if you would like to get an Italian manual page for
-your queries, you can type <tt>http://it.php.net/echo</tt>.
-</p>
-
-<p>
-There is another method though for accessing the manual page
-in your preferred language. You can embed the language in the
-URL before the manual search term. <tt>http://php.net/hu/echo</tt>
-will bring up the Hungarian manual page for echo for example.
+This kind of URL will bring up the manual page in
+<a href="/my.php">your preferred language</a>. You can
+always override this setting by explicitly providing
+the language you want to get to. You can embed the language
+in the URL before the manual search term.
+<tt><?php echo $MYSITE; ?>hu/sort</tt> will bring up
+the Hungarian manual page for sort() for example.
</p>
<h2>Search shortcuts</h2>
@@ -100,7 +98,7 @@
At last, if there is no PHP page, and there is no manual
page matching your query, a search is issued on the site with
the query you typed into the URL. An example of this kind
-of URL is <tt>http://php.net/search_for_this</tt>.
+of URL is <tt><?php echo $MYSITE; ?>search_for_this</tt>.
</p>
<h2>Even smarter tricks</h2>
@@ -109,12 +107,12 @@
We also have shortcut aliases to access some resources more quickly,
and with a nice URL. Aliases are translated to their relevant shortcuts
before the first step (PHP page search) mentioned above. Some examples
-of shortcut aliases: <tt>http://php.net/whatisphp</tt>,
-<tt>http://php.net/php4news</tt>. The
latter is an external page alias,
-as it points to a file on the CVS server, containing information about
-changes in PHP. There are also some convinient aliases, like
-<tt>http://php.net/de/books</tt> which
displays the German PHP books'
-list.
+of shortcut aliases: <tt><?php echo $MYSITE; ?>whatisphp</tt>,
+<tt><?php echo $MYSITE; ?>php4news</tt>. The latter is an external page
+alias, as it points to a file on the CVS server, containing information
+about changes in PHP. There are also some convinient aliases, like
+<tt><?php echo $MYSITE; ?>de/books</tt> which displays the German
+PHP books' list.
</p>
<h1>Get it on your site</h1>
@@ -124,13 +122,15 @@
ErrorDocument Apache settings, redirecting the browser to another page
in case of an "Error 401/3/4" and a little search script that looks up
page names or functions names in the manual corresponding to what
-you searched for in <tt>http://php.net/search_for_this</tt>.
+you searched for in <tt><?php echo $MYSITE; ?>search_for_this</tt>.
+We also have a general language selection method.
</p>
<p>
Everything behind this feature is available here:
<ul>
<li><a href="/mirroring.php">Mirroring instructions</a> (see the three
ErrorDocument settings)</li>
+ <li><a href="http://cvs.php.net/co.php/phpweb/include/langchooser.inc">http://cvs.php.net/co.php/phpweb/include/langchooser.inc</a></li>
<li><a href="http://cvs.php.net/co.php/phpweb/error/index.php">http://cvs.php.net/co.php/phpweb/error/index.php</a></li>
<li><a href="http://cvs.php.net/co.php/phpweb/include/manual-lookup.inc">http://cvs.php.net/co.php/phpweb/include/manual-lookup.inc</a></li>
<li><a href="http://cvs.php.net/co.php/phpweb/search.php">http://cvs.php.net/co.php/phpweb/search.php</a></li>