Hi All,

I've spent some time browsing the drupal site, and I am looking for a module that filters the body of nodes from keywords that are actually node titles; it is almost like the freelinking module, but it works the other way around.

Editors can add (keyword) nodes from a certain type, and then when displaying the content, the filter module filters out the body from a node looking for keywords, and creates a hyperlink to the keyword node instead.

With the freelinking module, a link must already be added in the text, and then it searches for a node title. But you don't want users on your site adding CamelCase words. You want the module look in a mysql table for 'freelinks' and create the link to the node by the module.

Does this kind of module exist? It seems to me drupallers are using this kind of module at drupaldocs.org...
It also would be nice to have some kind of ajax involved as well... yahoo news united nations.

What do you think?

bundle the drupal force

Comments

merlinofchaos’s picture

That sounds like an interesting module idea. You don't want to do it at post time, as the query could take some time to run. But if you're willing to wait for the _cron hook to run, that would be a good time to do it. Well unless you're using poormanscron. Heh.

I hope someone does it.

-- Merlin

[Point the finger: Assign Blame!]
[Read my writing: ehalseymiles.com]

-- Merlin

[Read my writing: ehalseymiles.com]
[Read my Coding blog: Angry Donuts]

narkoba’s picture

i am currently working on some kind of module.
it will work like this: you can choose a node type to 'filter' links to. (for example: flexinode-1)
then you need to create a new flexinode-1, for example with title 'filter module'.
when the text of a new node is displayed, the module will search for corresponding titles of the specified node (flexinode-1). in this case the module will search for 'filter module' in the text, and create a link to the flexinode-1 with title 'filter module'. so if somebody is posting some content and writes 'filter module' a link to the appropriate node will be created, where more information on the topic will be available.
the filtering mechanism in drupal is developed in this way, that the filtered text is stored in a cache table, so the filter will trigger only once.
http://drupaldocs.org/api/head/function/hook_filter
so i a cron would be necessary...
i need to do some more testing, if people are interested in this functionality, you know how to find me...

cheers

eaton’s picture

That's pretty much the feature set of the FreeLinking module. Check it out...
--
Jeff Eaton | I heart Drupal.

--
Eaton — Partner at Autogram

narkoba’s picture

hi,
thanks for the tip.
i've checked it out, but the freelinking module requires CamelCase words or [[link]] tags in the text to create the links. but i need something that creates links automatically. an editor wants to create glossary items where the nodes (posted by normal webusers) automatically link to.

this feature requires some hacking of the free filter module, so this adjustement is almost up and running for my site.

if there is some interest from other drupallers, please let me know and i'll try to release it under cvs or something.

ps: instead of glossary items, the admin can also create site sponsor items, to create sponsor links. like they use at harmony-central

eaton’s picture

I see it's already being discussed. I ran into problems using this approach with an older wiki module about a year ago. Either you do the filtering dynamically, when a node is loaded (incurring a major database/speed hit) or you do it at node-save time, and it doesn't keep up with newly posted (or renamed) nodes.

It's a tricky balance.
--
Jeff Eaton | I heart Drupal.

--
Eaton — Partner at Autogram

narkoba’s picture

i've made a module with the above functionality i am talking about, if somebody is interested, feel free to contact me.
it works as a filter, and has a cron hook that checks for new added nodes and updates the links...
it's working quite well.

regards

***----___
drupal & podcasting -> narkoba