PDA

View Full Version : 2 actions per click ? possible ?


mihai11
07-17-2007, 10:45 AM
Hi,

When a user recommends a thread from my forum I want to perform some additional actions. The script that does this in VB is "sendmessage.php":

sendmessage.php?do=sendtofriend&t=46

I see several options:
1) modify sendmessage.php to do the additional functionality;
2) use AJAX to call a PHP script before the script "sendmessage.php" is called. Is this possible ? More specifically, I am thinking to do something on the "onclick" event.
3) use a PHP redirect ? I am not sure how this would work. I just read about it somewhere. Basically, a new script will be called (that will implement the additional functionality) then this script will redirect to the standard script – "sendmessage.php"

What do you think about this ?

Regards,
Razvan M.

Eikinskjaldi
07-17-2007, 11:09 AM
Well if it was me I'd just modify the code, and if it was a vb purist they'd probably tell you to do it as a plugin. I notice sendmessage.php has 14 hooks, I am sure you can find one you like.

mihai11
07-17-2007, 11:42 AM
Well if it was me I'd just modify the code, and if it was a vb purist they'd probably tell you to do it as a plugin. I notice sendmessage.php has 14 hooks, I am sure you can find one you like.

This is a new solution that I overlooked... not a bad idea.