Contribute  :  Support  :  Downloads  :  Forum  :  Links  :  Polls  :  Calendar  :  Directory  :  Advanced Search  
Geeklog The Ultimate Weblog System
Welcome to Geeklog
Friday, May 16 2008 @ 04:27 AM EDT
   

About Autolinks And Autotags

Geeklog

One of the new features in Geeklog 1.3.10 are the so-called autolinks which provide new tags (called autotags) to link to objects under a plugin's control. For example,

[staticpage:cvs Learn all about the Geeklog CVS]
will be displayed as this link: Learn all about the Geeklog CVS

But the full potential of this new form of links has yet to be explored. For example, autolinks could provide a solution to the often requested ability to let normal users upload images with their stories. If you have Gallery installed and allow image upload for your users there, a plugin could provide an autotag that not only links to the image in Gallery but also displays the preview in the story. Another example would be a request from a client I had who asked for attachments to stories (just like attachments in an email), which could be done by adding autotags to the File Management plugin.

To add support for autotags to your plugin, you only have to implement one function, plugin_autotags_pluginname. See the function I wrote for the FAQ Manager plugin for an example. And if you want to add support for autolinks, i.e. that other plugin's autotags will be interpreted by your plugin, then you only have to call the plugin API function PLG_replaceTags (see lib-plugins.php) before displaying your plugin's content.

There's one drawback of autolinks, though: Since they are interpreted when the post (story, comment, ...) is displayed, they use a bit of the webserver's CPU. So on really busy sites, you may have to disable them to ensure sufficiently fast display of your site (at which point the autotags will be displayed verbatim). The new config.php option $_CONF['disable_autotags'] has been introduced for precisely that purpose.

Story Options

About Autolinks And Autotags | 7 comments | Create New Account
The following comments are owned by whomever posted them. This site is not responsible for what they say.
About Autolinks And Autotags
Authored by: ScurvyDawg on Saturday, November 27 2004 @ 01:48 PM EST
Very cool Dirk, Thank you.
About Autolinks And Autotags
Authored by: r0bis on Saturday, November 27 2004 @ 05:41 PM EST
Very cool, just to test comment submission.

---
hai
About Autolinks And Autotags
Authored by: s_witch on Tuesday, December 21 2004 @ 05:13 PM EST
Hello! We love GL and have just installed 1.3.10 on another site we own (we've been using 1.3.9 on other sites for some time prior to this). We love the new autolink feature, however, we have one small issue. We have found that the autolinks don't work in a staticpage when you view the staticpage as a centreblock on the homepage. The original structure of the autolink is shown instead. Is the way it is supposed to work or are we doing something wrong?

Assuming we are doing everything right (because the links are showing when viewed through the staticpages plugin), isn't this kinda a fault in logic? Shouldn't GL always show an autolink as a clickable link?

Regards Jill
About Autolinks And Autotags
Authored by: Dirk on Wednesday, December 22 2004 @ 12:01 PM EST
Yep, that's a bug. I just fixed it in CVS and a bugfix release is due soon anyway.

bye, Dirk
About Autolinks And Autotags
Authored by: s_witch on Wednesday, December 22 2004 @ 04:20 PM EST
Ok cool no problem. Thanks for your prompt response and hard work. We're enjoying GL 1.3.10. Thanks again :-)

---
Regards Jill
About Autolinks And Autotags
Authored by: Anonymous on Monday, October 24 2005 @ 03:11 AM EDT
I am just wondering if someone has worked already on a plugin or if there is a solution yet to use autolinks for gallery, Inmemorian or mediagallery? It would be cool to be able to put the preview of the gallery image in a story including the frame and have it also linked to the large image or album...

Thanks/Frank
About Autolinks And Autotags
Authored by: machinari on Monday, October 24 2005 @ 01:27 PM EDT
inmemoriam already supports autolinks. see this thread for more info.

---
You are limited only by your imagination...