Rules - Check for term on node page

Hi all,

What an awesome module to start with. This has saved me much pain since I am writing a module that would integrate nicely with Rules and I will be releasing it to the community when its complete.

However, I am not sure on where to go from here:

I am trying to detect with Editing condition Execute custom PHP code to find a particular pages term and return true if its there or if its not. I did a wack of googling, played around with modified block visibility snippits, but no avail.

Has anyone done this? this seems to be something that could be really usefull.

As a last "awesome", I am looking to also check the watchdog for a particular entry within a certain time frame IE: Now to 20 minutes ago.
A 'timer' function or something like that would be stellar!

Thanks,

Ron

Groups:
Login to post comments

Have you tried using Glossary??

Superchicken - Thu, 2009-06-25 04:08

http://drupal.org/project/glossary

I read somewhere that is can be used for this purpose... please let e know if it works! (sorry, at the moment the best i can do is give you a pointer, now hit on google!!)


Glossary is not what he's looking for?!

AlexisWilke's picture
AlexisWilke - Thu, 2009-06-25 10:05

Superchicken,

I don't see how a glossary would have anything to do with it!

Actually, the best glossary module is here: http://www.m2osw.com/drupal#mo_glossary but I'm digressing here... 8-)

Now I have done such a thing in another module to allow my customer to show a poll based on the current terms of the page. It is not too hard, but the Tags are put in a sub-array in the current node. Those are quite annoying to manage. Out side of that, it is relatively easy. More or less, if the user gives you a term ID, you will end up doing this:

return in_array($term_id, );

In regard to the watchdog, you may instead want to find another way of tracking events. Note that the Rules module does allow for delayed events. I think you want to look into that in regard to delays.

Also, if you have CRON running once every 15 min., checking for something 20 min. ago will still have an error of up to 15 min. In my case, I run CRON only once per hour and for some sites that is already way too much (once a day would suffice for those!)

Thank you.
Alexis Wilke