Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revisionBoth sides next revision
wordpress [2017/05/18 16:43] – Sectioning for easier edition. Replaced HTML table with DokuWiki table Toni Corverawordpress [2017/05/18 23:24] – [Interlinks+] Toni Corvera
Line 19: Line 19:
  
 ===== Interlinks+ ===== ===== Interlinks+ =====
 +
 +<alert type="warning" icon="fa fa-warning">This section isn't finished</alert>
  
 <callout type="success" icon="true" title="No longer needed">This plugin was integrated back into the main [[//wordpress.org/extend/plugins/interlinks/|Interlinks]] so it is deprecated.</callout> <callout type="success" icon="true" title="No longer needed">This plugin was integrated back into the main [[//wordpress.org/extend/plugins/interlinks/|Interlinks]] so it is deprecated.</callout>
Line 30: Line 32:
 Additionally I added a couple extra modifications to generate valid XHTML, and made the link also display the article's title. Additionally I added a couple extra modifications to generate valid XHTML, and made the link also display the article's title.
  
-Let's compare Interlinks and Interlinks+:^                                  ^ Interlinks                                                                                        |^ Interlinks+                                                                                                          ||                                                                                                                           | +Let's compare Interlinks and Interlinks+:
-^ Code                             ^ Generated HTML                                               ^ Rendered HTML                       ^ Generated HTML                                                                  ^ Rendered HTML                                                                                                                                                 | +
-| <code>[[My article]]</code>                   | <code><a href="http://example.invalid/my-article/">My article</a></code>  | http://example.invalid/my-article/  | <a href="http://example.invalid/my-article/" title="My article">My article</a>  | http://example.invalid/my-article/  |                                                                                                                           | +
-| <nowiki>[[My article|My first article]]</nowiki>  | * <code html><font color='red'>My article</font></code>                               | My first article</font>             | My article                                                                      | My first article                    | <a href="http://example.invalid/my-article/" title="My article">My first article</a>  | http://example.invalid/my-article/ +
-| * [[Broken]]                     | * <font color='red'>Broken</font>                            | Broken                              |                                                                                 | * Broken                            |                                                                                                                           |+
  
 +^ \\ Case 1: Standard interlink ||^
 +| Example: ''<nowiki>[[My article]]</nowiki>'' |||
 +^ ^ Interlinks   ^ Interlinks+  ^
 +^ Generated HTML | <code html><a href="http://example.invalid/my-article/">My article</a></code>  | <code html><a href="http://example.invalid/my-article/" title="My article">My article</a></code>  |
 +^ Rendered HTML  | <html><a href="http://example.invalid/my-article/">My article</a></html> | <html><a href="http://example.invalid/my-article/" title="My article">My article</a></html> |
 +^ \\ Case 2: Interlink with user-supplied text ||^
 +| Example: ''<nowiki>[[My article|My first article]]</nowiki>'' |||
 +^ ^ Interlinks   ^ Interlinks+  ^
 +^ Generated HTML | <code html><font color='red'>My article</font></code>   | <code html><a href="http://example.invalid/my-article/" title="My article">My first article</a></code>  |
 +^ Rendered HTML  | <html><span style="color:red;"><nowiki>My article|My first article</nowiki></span></html> <label type="warning">broken link</label> | <html><a href="http://example.invalid/my-article/" title="My article">My first article</a></html> |
 +^ \\ Case 3: Broken link ||^
 +| Example: ''<nowiki>[[Broken]]</nowiki>'' (where "Broken" doesn't exist) |||
 +^ ^ Interlinks   ^ Interlinks+  ^
 +^ Generated HTML | <code html><font color='red'>Broken</font></code> | <code html><span style="color:red;">Broken</span></code>  |
 +^ Rendered HTML  | <html><span style="color:red;">Broken</span></html> <label type="warning">broken link</label> | <html><span style="color:red;">Broken</span></html> <label type="warning">broken link</label> |
  
  
-<div class="tiny"><dfn class="tt">*</dfn> indicates a broken interlink</div> +===== Relative URLs =====
-<table style="width:100%;padding:0;margin:0;border:1px solid black;font-size:small;">+
  
-<!-- End of Interlinks+ --> +<alert type="warning" icon="fa fa-warning">This section isn't finished</alert>
- +
-===== Relative URLs =====+
  
 <p><a href="files/net_outlyer_wp-relativeurls.php">Download v1.5</a> (last update october 14th 2007)</p> <p><a href="files/net_outlyer_wp-relativeurls.php">Download v1.5</a> (last update october 14th 2007)</p>
  
-<p><em>Relative <abbr title="Uniform Resource Locator">URL</abbr>s</em> +Relative URL<nowiki>s</nowiki> is mainly targeted at people with a **local copy** of their WordPress site and those that **reorganise and/or change their pages hierarchy often** although many standard installations can also take advantage of it.
-(hereon <abbr title="Relative URLs">RU</abbr>is +
-mainly targeted at people with a <strong>local copy</strong> of their +
-WordPress site and those that <strong>reorganise and/or change their +
-pages hierarchy often</strong> although many standard installations +
-can also take advantage of it.</p>+
  
-<p><abbr title="Relative URLs">RU</abbr> can be seen as kind of complementary +//Relative URLs/can be seen as kind of complementary to Interlinks: It creates a valid URL or link from a relative path. 
-to Interlinks: It creates a valid URL or link from a relative path. +\\ 
-<br /> +If you want to link to a post Interlinks or Interlinks+ are better alternatives, but if you want to link to a given file in your site neither will help you. 
-If you want to link to a post Interlinks or Interlinks+ are better alternatives, +\\ 
-but if you want to link to a given file in your site none of them will help you. +I guess so far it isn't clear what's the need for such a plugin, so let's clarify a bit, note that:
-<br /> +
-I guess so far it isn't clear what's the need for such a plugin, so let's clarify +
-a bit, note that:</p>+
  
-<ul><li>Pages can be accessed from more than one URL (I'm assuming +  * Pages can be accessed from more than one URL (I'm assuming your WordPress installation is in a subdirectory and URL redirection is being used): 
- your WordPress installation is in a subdirectory and URL redirection +    <html><samp>http://example.com/parentpage/page/</samp></html
- is being used): +    <html><samp>http://example.com/wordpress/parentpage/page/</samp></html> 
- <ul+    * <html><samp>http://example.com/wordpress/?page_id=2</samp></html
-  <li><samp>http://example.com/parentpage/page/</samp></li+  * Using an absolute URL to refer to stuff in the site has the potential of being broken if you 
-  <li><samp>http://example.com/wordpress/parentpage/page/</samp></li+    * Change WordPress' path, e.g.: <html><samp>http://example.com/wordpress/</samp></html> is moved to <html><samp>http://example.com/</samp></htmlor <html><samp>http://example.com/blog/</samp></html>
-  <li><samp>http://example.com/wordpress/?page_id=2</samp></li> +    * Change your (sub)domain, e.g. <html><samp>http://example.com/</samp></html> becomes <html><samp>http://blog.example.com/</samp></html>. 
- </ul> +  * Using a relative URL to refer to stuff in the site has the potential of being broken if you (or visitors) 
-</li>+    * Access from a different URL, e.g.: A relative URL like <html><samp>images/im.jpg</samp></html> will point to different things when accessed from <html><samp>http://example.com/parentpage/page</samp></html> (<html><samp><var>http://example.com/parentpage/page/images/im.jpg</var></samp></html>) and <html><samp>http://example.com/wordpress/?page_id=2</samp></html(<html><samp><var>http://example.com/wordpress/images/im.jpg</var></samp></html>).
  
- <li>Using an absolute URL to refer to stuff in the site has the potential +Finally, if you use a local copy of WordPress to test stuff, chances are your local copy would have quite a different URL, e.g. <html><samp>http://localhost/~username/wordpress/</samp></htmland you might want your URLs to point to the local copy and not the on-line site.</p
- of being broken if you +
- <ul> +
-  <li>Change WordPress' path, e.g.<samp>http://example.com/wordpress/</samp> +
-  is moved to <samp>http://example.com/</samp> or <samp>http://example.com/blog/</samp>+
-  </li> +
-  <li>Change your (sub)domain, e.g. <samp>http://example.com/</samp> +
-  becomes <samp>http://blog.example.com/</samp>.</li> +
- </ul> +
- </li>+
  
- <li>Using a relative URL to refer to stuff in the site has the potential +==== Usage ====
- of being broken if you (or visitors) +
- <ul> +
-  <li>Access from a different URL, e.g.: A relative URL like <samp>images/im.jpg</samp> +
-  will point to different things when accessed from +
-  <samp>http://example.com/parentpage/page</samp> +
-  (<samp><var>http://example.com/parentpage/page/images/im.jpg</var></samp>+
-  and <samp>http://example.com/wordpress/?page_id=2</samp> +
-  (<samp><var>http://example.com/wordpress/images/im.jpg</var></samp>). +
-  </li> +
- </ul> +
- </li> +
-</ul>+
  
-<p>Finallyif you use a local copy of WordPress to test stuff, chances +Enclose your local URL in double braces (e.g. <html><samp></html>''<nowiki>{{myrelative/url}}</nowiki>''<html></samp></html>), to get full URL generated dynamically, e.g. to <html><samp>http://example.com/wordpress/myrelative/url</samp></html>.
-are your local copy would have quite different URL, e.g. +
-<samp>http://localhost/~username/wordpress/</samp> and you might +
-want your URLs to point to the local copy and not the on-line site.</p+
  
-<h3 id="ru-usage">Usage</h3><!-- of Relative URLs -->+Enclose your local URL in double braces along a text description (separated by a space) to get a dynamically generated link to the full URL. 
 +\\ 
 +<html><samp></html>''<nowiki>{{the_url/file.txt The text file}}</nowiki>''<html></samp></html> would become 
 +<html><samp>&lt;a href=&quot;http://example.com/wordpress/the_url/file.txt&quot;&gt;The text file&lt;/a&gt;</samp></html>.
  
-<p>Enclose your local URL in double braces (e.g. <samp>{{myrelative/url}}</samp>), to get a +Note you'll have to encode any spaces in the url (e.g. to link to "<html><samp>the file</samp></html>"; you'll have to encode the space (replace it with ''%20'') 
-full URL generated dinamically, e.g. to <samp>http://example.com/wordpress/myrelative/url</samp>.</p>+i.e.: <html><samp></html>''<nowiki>{{the%20file}}</nowiki>''<html></samp></html>.
  
-<p>Enclose your local URL in double braces along a text description (separated by a space) +==== Escaping Relative URLs ====
-to get a dinamically generated link to the full URL. +
-<br /> +
-<samp>{{the_url/file.txt The text file}}</samp> would become +
-<samp>&lt;a href=&quot;http://example.com/wordpress/the_url/file.txt&quot;&gt;The text +
-  file&lt;/a&gt;</samp>+
-<br /><br /> +
-Note you'll have to encode any spaces in the url (e.g. to link to +
-&quot;<samp>the file</samp>&quot; you'll have to encode the space (replace it with +
-<kbd>%20</kbd>) i.e.: <samp>{{the%20file}}</samp>.</p>+
  
-<h4 id="ru-escape">Escaping <em>Relative URLs</em></h4> +If you want to write literal double curly brackets (''{{'') then you'll have to use an //html entity// such as <html><samp></html>''&#x7b;''<html></samp></html> and 
- +<html><samp></html>''&#x7d;''<html></samp></html> (or <html><samp></html>''&#123;''<html></samp></html> and <html><samp></html>''&#125;''<html></samp></html>). 
-<p>If you want to write literal double curly brackets (<kbd>{{</kbd>) then +For maximum security use at least one on each end, e.g.  
-you'll have to use an html entities such as <samp>&amp;#x7b;</samp> and +<html><samp></html>''&#x7b;{\_whatever\_&#x7d;}''<html></samp></html> will be parsed correctly as 
-<samp>&amp;#x7d;</samp> (or <samp>&amp;#123;</samp> and <samp>&amp;#125;</samp>). For +<html><samp></html>''&#x7b;{\_whatever\_&#x7d;}''<html></samp></html>
-maximum security use at least on each end, e.g.  +\\
-<samp>&amp;#x7b;{&nbsp;whatever&nbsp;&amp;#x7d;}</samp> will be parsed correctly as +
-<samp>&#x7b;{&nbsp;whatever&nbsp;&#x7d;}</samp>+
-<br />+
 BUT beware of the visual editor in WordPress (although if you use it you're BUT beware of the visual editor in WordPress (although if you use it you're
-probably used to fight it ;).</p> +probably used to fight it ;).
- +
-<!-- End of Relative URLs -->+
  
 ===== JS Base2 ===== ===== JS Base2 =====
 +
 +<alert type="warning" icon="fa fa-warning">This section isn't finished</alert>
  
 <p><a href="files/js-base2-1.0+0.9a.tar.gz">Download v1.0+0.9a</a> (last update october 24th 2007). (Note <var>1.0</var> is the plugin version and <var>0.9a</var> is the base2's version used in the plugin).</p> <p><a href="files/js-base2-1.0+0.9a.tar.gz">Download v1.0+0.9a</a> (last update october 24th 2007). (Note <var>1.0</var> is the plugin version and <var>0.9a</var> is the base2's version used in the plugin).</p>
  
-<p>A completely trivial plugin that loads <a href="http://dean.edwards.name">Dean Edwards'</a> <strong>base2</strong> JavaScript library (see <a href="http://dean.edwards.name/weblog/2007/03/yet-another">[1]</a> and <a href="http://code.google.com/p/base2/">[2]</a>).</p> +A completely trivial plugin that loads [[http://dean.edwards.name|Dean Edwards]] **base2** JavaScript library (see [[http://dean.edwards.name/weblog/2007/03/yet-another|[1]]] and [[http://code.google.com/p/base2/[2]]]).
- +
-<p>This library is mostly a cross-browser fix of the <abbr title="Document Object Model">DOM</abbr> plus a selectors <abbr title="Aplication Programming Interface">API</abbr> implementation (allowing selection from <abbr title="JavaScript">JS</abbr> with <abbr title="Cascading Style Sheets">CSS</abbr> selectors).</p>+
  
-<p>It is used by the following plugin :)</p>+This library is mostly a cross-browser fix of the <html><abbr title="Document Object Model">DOM</abbr></html> plus a selectors API implementation (allowing selection from JavaScript with CSS selectors).
  
-<!-- End of JS Base 2 -->+<label type="info">Note</label> It is used by the following plugin :)
  
 ===== JS Syntax Highlighter ===== ===== JS Syntax Highlighter =====
All dates/times in this page are UTC.
  • wordpress.txt
  • Last modified: 2017/05/19 01:27
  • by Toni Corvera