Hey there, I've been using this module for a while and it works great. But is there a way for site admins to be notified when someone submits a question into the queue? Right now it seems as though you just have to check the queue every now and then to see if there's anything new. Can this module be set up to send an email when a new question is submitted? Can that be done with the Actions module? I've tried to get it to work with actions to no avail, but then again I'm a good themer, but my PHP prowess is lacking.

Any help would be most appreciated.

CommentFileSizeAuthor
#8 question.zip5.02 KBhlopes

Comments

luti’s picture

Hi,

I've also installed this module, but have totally forgotten to go and check questions since then. Today, I've found 2 questions, for which I don't even have any details (when it was submitted). So, I agree that some notification is almost a must for this module to be efficient, and also an information about when question was submitted would be more than useful in some cases (some other details like IP - as received together with webform module notification - could be handy in some cases as well).

verta’s picture

Version: 5.x-1.3 » 6.x-1.x-dev
Category: support » feature
verta’s picture

I have tried to use Rules to send an email when Question content is created.

On the face of it, this should meet the requirement of this issue without change to the Question module itself. However, this module does not seem to allow a Rule to trigger on new content created. The rule will fire on creation of other content types, such as Page or Story. Perhaps it relates to the content not being published immediately, it's not clear.

I will put this in as a new issue.

verta’s picture

Since last posting, it's more clear to me now that this module does not create a node until the question is answered, so Rules are out.

This makes it clear that there is a need for some kind of notification function, as we can't use it without being notified of new questions.

dtj’s picture

How about triggering the action when the Question "Thank You" page is viewed?

dtj’s picture

I'm making sure erroneous messages aren't being sent by checking the referring url as a condition.

  1. I add the condition "Check a truth value"
  2. I put the following code in "Truth value":
    <?php if($_SERVER["HTTP_REFERER"] == "http://www.mysite.com/question") { return 1; } ?>
    
verta’s picture

We went with Faq/FaqAsk with the Path Access module to restrict access to the node/add/faq path to only the permitted roles and Rules to send email when a question is asked.

hlopes’s picture

StatusFileSize
new5.02 KB

Oh hay!

I've added rules support to the module, so now it has 3 available events to work on:

New question created
Question answered
Question edited

Also, includes a fix to solve the issue where the questioner id was erased from the question_node table if the node was edited after beeing answered.

Please review.

PS: I've patched the wrong version, the file contained in the zip is related to the recomended version of the module.... Take that in account please.

Danke!

xalexas’s picture

Thanks for implementing rules support, but can you provide this as patch?