cvs: docweb /include lib_general.inc.php /www/rfc rfc-bbcode-help.php

From: Date: Mon, 13 Sep 2004 18:45:15 +0000
Subject: cvs: docweb /include lib_general.inc.php /www/rfc rfc-bbcode-help.php
Groups: php.doc.web 
Request: Send a blank email to doc-web+get-305@lists.php.net to get a copy of this message
vincent Mon Sep 13 14:45:15 2004 EDT Modified files: /docweb/include lib_general.inc.php /docweb/www/rfc rfc-bbcode-help.php Log: changed all the get_resource_url() links into 'normal' links this saves a function call which prepended a '/'

http://cvs.php.net/diff.php/docweb/include/lib_general.inc.php?r1=1.24&r2=1.25&ty=u Index: docweb/include/lib_general.inc.php diff -u docweb/include/lib_general.inc.php:1.24 docweb/include/lib_general.inc.php:1.25 --- docweb/include/lib_general.inc.php:1.24 Mon Sep 13 13:49:09 2004 +++ docweb/include/lib_general.inc.php Mon Sep 13 14:45:15 2004 @@ -18,7 +18,7 @@ | Gabor Hojtsy <goba@php.net> | | Sean Coates <sean@php.net> | +----------------------------------------------------------------------+ -$Id: lib_general.inc.php,v 1.24 2004/09/13 17:49:09 vincent Exp $ +$Id: lib_general.inc.php,v 1.25 2004/09/13 18:45:15 vincent Exp $ */ error_reporting(E_ALL); @@ -75,7 +75,6 @@ { define('IN_HEAD', true); $lang = 'en'; //LANGC; - $master_url = get_resource_url(); $encoding = "iso-8859-1"; // for now $page_title = ($title ? $title . ' - PHP Documentation Tools' : 'PHP Documentation Tools'); $page_h1 = ($title ? $title : 'PHP Documentation Tools'); @@ -112,8 +111,8 @@ <meta http-equiv="Content-Script-Type" content="text/javascript" /> <meta http-equiv="Content-Style-Type" content="text/css" /> <meta http-equiv="Content-Language" content="$lang" /> - <link rel="shortcut icon" href="{$master_url}images/favicon/{$project}/favicon.ico" /> - <style type="text/css">@import url({$master_url}style/site.css); + <link rel="shortcut icon" href="/images/favicon/{$project}/favicon.ico" /> + <style type="text/css">@import url(/style/site.css); $extra_style</style> </head> @@ -164,7 +163,7 @@ $navlist .= '<a href="' . get_insite_address(NULL, 'all') . '">All</a> '."\n"; } else { - $navlist .= '<a href="' . get_insite_address(NULL, $code) . '" title="' . $name . '" ><img src="' . get_resource_url("images/flags/$code.png") . '" alt="' . $name . '" /></a>'."\n"; + $navlist .= '<a href="' . get_insite_address(NULL, $code) . '" title="' . $name . '" ><img src="/images/flags/' . $code . '.png" alt="' . $name . '" /></a>'."\n"; } } return $navlist; http://cvs.php.net/diff.php/docweb/www/rfc/rfc-bbcode-help.php?r1=1.4&r2=1.5&ty=u Index: docweb/www/rfc/rfc-bbcode-help.php diff -u docweb/www/rfc/rfc-bbcode-help.php:1.4 docweb/www/rfc/rfc-bbcode-help.php:1.5 --- docweb/www/rfc/rfc-bbcode-help.php:1.4 Sun Sep 12 03:39:02 2004 +++ docweb/www/rfc/rfc-bbcode-help.php Mon Sep 13 14:45:15 2004 @@ -94,14 +94,14 @@ <br clear="all" /> <table class="forumline" width="100%" cellspacing="1" cellpadding="3" border="0" align="center"> <tr> - <td class="row1" align="left" valign="top"><span class="postbody"><a name="8"></a><b>Linking to another site</b></span><br /><span class="postbody">phpBB BBCode supports a number of ways of creating URIs, Uniform Resource Indicators better known as URLs.<ul><li>The first of these uses the <b>[url=][/url]</b> tag; whatever you type after the = sign will cause the contents of that tag to act as a URL. For example, to link to phpBB.com you could use:<br /><br /><b>[url=http://www.phpbb.com/]</b>Visit phpBB!<b>[/url]</b><br /><br />This would generate the following link, <a href="http://www.phpbb.com/" target="_blank">Visit phpBB!</a> You will notice the link opens in a new window so the user can continue browsing the forums if they wish.</li><li>If you want the URL itself displayed as the link you can do this by simply using:<br /><br /><b>[url]</b>http://www.phpbb.com/<b>[/url]</b><br /><br />This would generate the following link: <a href="http://www.phpbb.com/" target="_blank">http://www.phpbb.com/</a></li><li>Additionally phpBB features something called <i>Magic Links</i>which will turn any syntatically correct URL into a link without you needing to specify any tags or even the leading http://. For example typing www.phpbb.com into your message will automatically lead to <a href="http://www.phpbb.com/" target="_blank">www.phpbb.com</a> being output when you view the message.</li><li>The same thing applies equally to email addresses; you can either specify an address explicitly, like:<br /><br /><b>[email]</b>no.one@domain.adr<b>[/email]</b><br /><br />which will output <a href="emailto:no.one@domain.adr">no.one@domain.adr</a> or you can just type no.one@domain.adr into your message and it will be automatically converted when you view.</li></ul>As with all the BBCode tags you can wrap URLs around any of the other tags such as <b>[img][/img]</b> (see next entry), <b>[b][/b]</b>, etc. As with the formatting tags it is up to you to ensure the correct open and close order is following. For example:<br /><br /><b>[url=<?php echo get_resource_url();?>][img]</b><?php echo get_resource_url('images/php.gif');?><b>[/url][/img]</b><br /><br />is <u>not</u> correct which may lead to your post being deleted so take care.<br /><a class="postlink" href="#Top">Back to top</a></span></td> + <td class="row1" align="left" valign="top"><span class="postbody"><a name="8"></a><b>Linking to another site</b></span><br /><span class="postbody">phpBB BBCode supports a number of ways of creating URIs, Uniform Resource Indicators better known as URLs.<ul><li>The first of these uses the <b>[url=][/url]</b> tag; whatever you type after the = sign will cause the contents of that tag to act as a URL. For example, to link to phpBB.com you could use:<br /><br /><b>[url=http://www.phpbb.com/]</b>Visit phpBB!<b>[/url]</b><br /><br />This would generate the following link, <a href="http://www.phpbb.com/" target="_blank">Visit phpBB!</a> You will notice the link opens in a new window so the user can continue browsing the forums if they wish.</li><li>If you want the URL itself displayed as the link you can do this by simply using:<br /><br /><b>[url]</b>http://www.phpbb.com/<b>[/url]</b><br /><br />This would generate the following link: <a href="http://www.phpbb.com/" target="_blank">http://www.phpbb.com/</a></li><li>Additionally phpBB features something called <i>Magic Links</i>which will turn any syntatically correct URL into a link without you needing to specify any tags or even the leading http://. For example typing www.phpbb.com into your message will automatically lead to <a href="http://www.phpbb.com/" target="_blank">www.phpbb.com</a> being output when you view the message.</li><li>The same thing applies equally to email addresses; you can either specify an address explicitly, like:<br /><br /><b>[email]</b>no.one@domain.adr<b>[/email]</b><br /><br />which will output <a href="emailto:no.one@domain.adr">no.one@domain.adr</a> or you can just type no.one@domain.adr into your message and it will be automatically converted when you view.</li></ul>As with all the BBCode tags you can wrap URLs around any of the other tags such as <b>[img][/img]</b> (see next entry), <b>[b][/b]</b>, etc. As with the formatting tags it is up to you to ensure the correct open and close order is following. For example:<br /><br /><b>[url=http://doc.php.net/][img]</b>http://doc.php.net/images/php.gif<b>[/url][/img]</b><br /><br />is <u>not</u> correct which may lead to your post being deleted so take care.<br /><a class="postlink" href="#Top">Back to top</a></span></td> </tr> </table> <br clear="all" /> <table class="forumline" width="100%" cellspacing="1" cellpadding="3" border="0" align="center"> <tr> - <td class="row1" align="left" valign="top"><span class="postbody"><a name="9"></a><b>Adding an image to a post</b></span><br /><span class="postbody">phpBB BBCode incorporates a tag for including images in your posts. Two very important things to remember when using this tag are: many users do not appreciate lots of images being shown in posts and second, the image you display must already be available on the Internet (it cannot exist only on your computer, for example, unless you run a webserver!). There is currently no way of storing images locally with phpBB (all these issues are expected to be addressed in the next release of phpBB). To display an image, you must surround the URL pointing to the image with <b>[img][/img]</b> tags. For example:<br /><br /><b>[img]</b><?php echo get_resource_url('images/php.gif');?><b>[/img]</b><br /><br />As noted in the URL section above you can wrap an image in a <b>[url][/url]</b> tag if you wish, eg.<br /><br /><b>[url=<?php echo get_resource_url();?>][img]</b><?php echo get_resource_url('images/php.gif');?><b>[/img][/url]</b><br /><br />would generate:<br /><br /><a href="http://www.phpbb.com/" target="_blank"><img src="<?php echo get_resource_url('images/php.gif');?>" border="0" alt="" /></a><br /><br /><a class="postlink" href="#Top">Back to top</a></span></td> + <td class="row1" align="left" valign="top"><span class="postbody"><a name="9"></a><b>Adding an image to a post</b></span><br /><span class="postbody">phpBB BBCode incorporates a tag for including images in your posts. Two very important things to remember when using this tag are: many users do not appreciate lots of images being shown in posts and second, the image you display must already be available on the Internet (it cannot exist only on your computer, for example, unless you run a webserver!). There is currently no way of storing images locally with phpBB (all these issues are expected to be addressed in the next release of phpBB). To display an image, you must surround the URL pointing to the image with <b>[img][/img]</b> tags. For example:<br /><br /><b>[img]</b>http://doc.php.net/images/php.gif<b>[/img]</b><br /><br />As noted in the URL section above you can wrap an image in a <b>[url][/url]</b> tag if you wish, eg.<br /><br /><b>[url=http://doc.php.net/][img]</b>http://doc.php.net/images/php.gif<b>[/img][/url]</b><br /><br />would generate:<br /><br /><a href="http://doc.php.net/" target="_blank"><img src="http://doc.php.net/images/php.gif" border="0" alt="" /></a><br /><br /><a class="postlink" href="#Top">Back to top</a></span></td> </tr> <tr> <td class="spaceRow" height="1"></td>
« previous php.doc.web (#305) next »