1 # Bloxsom Plugin:AutoLink
2 # Author: Fletcher T. Penney
4 # modelled after dictionary by Gregory Bair
8 # --- Configurable variables ----
10 # Where is the definition page
11 $link_file = "$blosxom::datadir/autolinks";
14 # -------------------------------
19 open (LINKS, $link_file);
26 my ($pkg, $path, $filename, $story_ref, $title_ref, $body_ref) = @_;
28 if ($$story_ref =~ m/<!-- noautolink -->/gi || $$body_ref =~ m/<!-- noautolink -->/gi) {
33 foreach $i (@linkslist) {
34 if ($i =~ /(.*?)=(.*)/) {
38 # By default, autolinks now changes only the first occurence of a given term
39 # If you want to change all occurences,
40 # change the end of the following line to '\/a>/ig'
41 $$body_ref =~ s/(?<=\s)($word)(?=([\s\,\!\;]|\.\s|\:\s|[\(\)]\s))/<a href="$link">$1<\/a>/i;
55 Blosxom Plug-in: autolink
59 Allows you to create a list of keywords that are automatically converted to a
60 url whenever they are used in a story. You can insert "<!-- noautolink -->"
61 in a story to prevent any changes
63 You can set your own location for the autolinks data file, but by default it
64 lives in your data directory.
68 None known; please send bug reports and feedback to the Blosxom
69 development mailing list <blosxom-devel@lists.sourceforge.net>.
73 Fletcher T. Penney - http://fletcher.freeshell.org
75 This plugin is now maintained by the Blosxom Sourceforge Team,
76 <blosxom-devel@lists.sourceforge.net>.
80 This source is submitted to the public domain. Feel free to use and modify
81 it. If you like, a comment in your modified source attributing credit to
82 myself and Gregory Bair for his original work would be appreciated.
84 THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY WARRANTY OF ANY KIND. USE AT