Topics

User Functions

Events

There are no upcoming events

What's New

Stories

No new stories

Comments last 2 weeks

No new comments

Trackbacks last 2 weeks

No new trackback comments

Links last 2 weeks

No recent new links

NEW FILES last 14 days

No new files

Welcome to Geeklog Tuesday, May 21 2013 @ 04:24 AM EDT

> >

About Autolinks And Autotags

Geeklog
  • Saturday, November 27 2004 @ 06:30 AM EST
  • Contributed by:
  • Views:
    17,402

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.

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...

Post a Comment

Your Name
Create Account
Allowed HTML Tags:
 

Security code
This question is for testing whether you are a human visitor and to prevent automated spam submissions.

What code is in the image?
Enter the bolded text, case sensitive!
Important Stuff
  • Please try to keep posts on topic.
  • Try to reply to other people comments instead of starting new threads.
  • Read other people's messages before posting your own to avoid simply duplicating what has already been said.
  • Use a clear subject that describes what your message is about.
  • Your email address will NOT be made public.