Hello !!
I wrote this plugin to integrate in document and manage easily links towards websites to which I often refers.
So, I suppose it run in chunks (I not test this).
/* Plugin : AutoLinkRef
* Version : 1.0
* Date : 2006-03-12
* Author : Guillaume Charneau (Guillaume)
*
* Short desc : Create links automatically from a reference [-xxxxx-]
*
* Installation :
* Create a new plugin
* Copy and paste this code into
* Check OnWebPagePrerender (system events > Template Service Events)
*
* Long desc :
* This plugin parse the (x)html code to create weblinks from [-linkalias-] tag.
* It can add "http://" before url, if you want.
* All link attributes can be used to create the link and its context.
* Possibility to specify values by default.
* Possibility to use or not default values for each link.
*
* Example :
* [-modx-] can become <a href="www.modxcms.com" class="modxlink" id="linkToModx" lang="en">Modx</a>
*
* Todo :
* To add an interface to manage parameters
* To add table into database for parameters
*/
Regards
Edit (2006-03-12 23:42) : I have modified www.modx.com to www.modxcms.com ; Thanks, davidm.
Sorry for my english. I'm french... My dictionary is near me, but it's only a dictionary !
It sure will be a time saver !
Just one thing of no importance, in the example : it’s modxcms.com not modx.com
It will sure be nice to have this, along with an autolink feature and the phpGiggle thing that’s in the hopper
.: COO - Commerce Guys - Community Driven Innovation :.
MODx est l'outil id
I don’t suppose this has any features to create a link with a _blank target location ?
Hi bugsmi0
Quote from: Guillaume at Mar 11, 2006, 06:59 PM
* All link attributes can be used to create the link and its context.
You can create a link with all attributes
An example for your case ; in the code of the
snippet plugin you need to add sommething like this :
$alr_links['grunzig']['text'] = 'grunzig';
$alr_links['grunzig']['title'] = 'Website of Grunzig';
$alr_links['grunzig']['href'] = 'www.grunzig.net';
$alr_links['grunzig']['hreflang'] = 'fr';
$alr_links['grunzig']['target'] = '_blank';
This code will generate this link :
<a lang="fr" hreflang="fr" title="Website of Grunzig" href="http://www.grunzig.net" target="_blank">grunzig</a>
Sorry for my english. I'm french... My dictionary is near me, but it's only a dictionary !
$alr_links['grunzig']['text'] = 'grunzig';
$alr_links['grunzig']['title'] = 'Website of Grunzig';
$alr_links['grunzig']['href'] = 'www.grunzig.net';
$alr_links['grunzig']['hreflang'] = 'fr';
$alr_links['grunzig']['target'] = '_blank';
what snippet should we put this code in the dropmenu ? does it matter where in the snippet the code goes ?
Sorry bugsmi0 but I don’t understant your questions. My english is so bad...

Could you explain what do you want to mean ?
Thanks
Sorry for my english. I'm french... My dictionary is near me, but it's only a dictionary !
the code above you said to put it inside the snippet, did you mean the dropmenu snippet ? if so where in the dropmenu would this code go
Sorry ! I commit an error. You need to put it inside the plugin and not the snippet.
For example, if you put this inside the plugin AutoLinkRef :
$alr_links['grunzig']['text'] = 'grunzig';
$alr_links['grunzig']['title'] = 'Website of Grunzig';
$alr_links['grunzig']['href'] = 'www.grunzig.net';
$alr_links['grunzig']['hreflang'] = 'fr';
$alr_links['grunzig']['target'] = '_blank';
In a document, this plugin will replace
[-grunzig-]
by
<a lang="fr" hreflang="fr" title="Website of Grunzig" href="http://www.grunzig.net" target="_blank">grunzig</a>
Sorry for my english. I'm french... My dictionary is near me, but it's only a dictionary !