trying out a new plugin. this particular one lets me manage a set of words which will automatically generate a link when i post. for example, if i use BF2 a lot, and i want people to know more, i’d add that as a quicklink and link every mention of BF2 to http://battlefield2.ea.com. so hopefully, the bf2’s i’ve mentioned so far have all been quicklinked. 🙂
visit the QuickLink project page.
Here’s my extended entry section. This BF2 here should also be quicklinked (see comments)
as expected, the modifications are triggered upon saving the entry. the problem here is that it’ll keep putting in the link code every time i save the entry, causing nested A tags to appear.
a better way of doing this should be to modify each time the page is rebuilt, keeping the original text intact. sacrifice a little performance for reliability.
rather than continuously adding comments to the author’s project page, i might as well post a TrackBack there and see if anyone follows. 🙂
after a quick look at the code in QuickLink.pl, i noticed that there are two ways in which quicklinking can happen:-
1. saving the entry, as i mentioned earlier.
2. adding a quicklink property to any existing data template tag (i think i may have worded this incorrectly).
an example of item 2 would be to quicklink the extended entry text by adding quicklink=”1″ to the MTEntryMore tag like so: <$MTEntryMore quicklink=”1″$>. this way also leaves whatever text you had intact.
since i don’t like the idea of the plugin changing my entry from the way i entered it, i did this for MTEntryBody, and at the same time removing/commenting out line #47 of QuickLink.pl (MT::Entry->add_callback) entirely to stop the plugin from doing double work.
this “fix” probably won’t work for dynamic publishing, btw.
changed the setting for the BF2 quicklink to make it process the first mention only. might save a bit of speed there.
hmm.. there was a bug where quicklinks added were not processed. it would only work after those quicklinks were edited first, even if no changes were made.
managed to trace the bug to 2 missed lines during the create function which the update function had. i didn’t bother to figure out exactly why.
also fixed a bug where initially created regex quicklinks were saved as non-regex. also another missed line. :/