====== WordPress Plugins from OutlyerNet ====== Here I'll place plugins I've written or modified to fit my needs, **but I'm not a WordPress hacker**, so I might be re-inventing the wheel for built-in functions or pre-existing, much better plugins. \\ If you know that's the case, please contact me :). I can't say for sure either if I'm inadvertently breaking something or punching security holes into WordPress although I can't see any such problems in the code I'm publishing. These are plugins I wrote for my personal use, I've tried to make them usable by others before publishing but there're some rough edges. Code here is published under the **GPL** license unless specified otherwise.

===== Relative URLs ===== This plugin works correctly with current versions of WordPress as of 2017. [[/files/wordpress/net_outlyer_wp-relativeurls.php|Download v1.5]] (last update october 14th 2007). Relative URLs 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. //Relative URLs// can be seen as kind of complementary to Interlinks: It creates a valid URL or link from a relative path. \\ 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. \\ I guess so far it isn't clear what's the need for such a plugin, so let's clarify a bit, note that: * 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): * http://example.com/parentpage/page/ * http://example.com/wordpress/parentpage/page/ * http://example.com/wordpress/?page_id=2 * Using an absolute URL to refer to stuff in the site has the potential of being broken if you * Change WordPress' path, e.g.: http://example.com/wordpress/ is moved to http://example.com/ or http://example.com/blog/. * Change your (sub)domain, e.g. http://example.com/ becomes http://blog.example.com/. * Using a relative URL to refer to stuff in the site has the potential of being broken if you (or visitors) * Access from a different URL, e.g.: A relative URL like images/im.jpg will point to different things when accessed from http://example.com/parentpage/page (http://example.com/parentpage/page/images/im.jpg) and http://example.com/wordpress/?page_id=2 (http://example.com/wordpress/images/im.jpg). 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. http://localhost/~username/wordpress/ and you might want your URLs to point to the local copy and not the on-line site.

===== Interlinks+ ===== This plugin was integrated back into the main [[//wordpress.org/extend/plugins/interlinks/|Interlinks]] so it is deprecated. [[/files/wordpress/kd-o-interlinks.php|Download v1.0a+]] (last update october 13th 2007). Interlinks+ is based on [[http://www.harleyquine.com/php-scripts/interlinks/|Interlinks]] by Harley. The original adds a very nifty feature: it enables wiki-style interlinks (e.g. [[Some article]] will be converted to a link to the post/page titled "Some article"). There's a feature I missed in Interlinks: Support for [[wp>Help:Piped_link|piped links]]; continuing with the above example, [[Some article|That's a nicer title IMHO]] would link to "Some article" but the link text will be "That's a nicer title IMHO". 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+: ^ \\ Case 1: Standard interlink ||^ | Example: ''[[My article]]'' ||| ^ ^ Interlinks ^ Interlinks+ ^ ^ Generated HTML | My article | My article | ^ Rendered HTML | My article | My article | ^ \\ Case 2: Interlink with user-supplied text ||^ | Example: ''[[My article|My first article]]'' ||| ^ ^ Interlinks ^ Interlinks+ ^ ^ Generated HTML | My article | My first article | ^ Rendered HTML | My article|My first article | My first article | ^ \\ Case 3: Broken link ||^ | Example: ''[[Broken]]'' (where "Broken" doesn't exist) ||| ^ ^ Interlinks ^ Interlinks+ ^ ^ Generated HTML | Broken | Broken | ^ Rendered HTML | Broken | Broken | ==== Usage ==== Enclose your local URL in double braces (e.g. ''{{myrelative/url}}''), to get a full URL generated dynamically, e.g. to http://example.com/wordpress/myrelative/url. 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. \\ ''{{the_url/file.txt The text file}}'' would become <a href="http://example.com/wordpress/the_url/file.txt">The text file</a>. Note you'll have to encode any spaces in the url (e.g. to link to "the file"; you'll have to encode the space (replace it with ''%20'') i.e.: ''{{the%20file}}''. ==== Escaping Relative URLs ==== If you want to write literal double curly brackets (''{{'') then you'll have to use an //html entity// such as ''{'' and ''}'' (or ''{'' and ''}''). For maximum security use at least one on each end, e.g. ''{{\_whatever\_}}'' will be parsed correctly as ''{{\_whatever\_}}''. \\ BUT beware of the visual editor in WordPress (although if you use it you're probably used to fight it ;). ===== JS Base2 ===== This plugin is abandoned. Additionally, Base2 doesn't seem to be updated anymore. [[/files/wordpress/js-base2-1.0+0.9a.tar.gz|Download v1.0+0.9a]] (last update october 24th 2007). (Note 1.0 is the plugin version and 0.9a is the Base2 version used in the plugin). 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]]]). This library is mostly a cross-browser fix of the DOM plus a selectors API implementation (allowing selection from JavaScript with CSS selectors). It is used by the following plugin :) ===== JS Syntax Highlighter ===== This plugin is abandoned. [[/files/wordpress/js-syntax-highlighter-0.2.tar.gz|Download v0.2]] (last update october 25th 2007). This plugin loads Alex Gorbatchev **[[http://code.google.com/p/syntaxhighlighter/SyntaxHighlighter]]** JavaScript script. With a twist :) //SyntaxHighlighter// is a script that will highlight code from JavaScript when marked appropriately, hence allowing you to post raw code that will be automagically pretty-printed on load. \\ I needed a couple workarounds to use it on my site and they were the motivation for this plugin: First problem: Code must be enclosed in either a ''
'' or a ''