[support] Automatically post node to forum topic
Davide Michel 'ZioBudda' Morelli
michel at ziobudda.net
Fri May 30 12:56:36 UTC 2008
Ryan Snowden ha scritto:
> When a user creates a node and clicks save, i would like the same
> title to automatically be used as a forum topic.
[SNIP]
You can create a little module with a function nodeapi:
function mymodule_nodeapi($op,$node,$a3,$a4) {
switch ($op) {
case 'insert':
$f = $node;
unset($f->nid);
unset($f->vid);
unset($f->changed);
unset($f->created);
$f->type = 'forum';
//Here you need to setup the taxonomy/category of the
forum's post
//[your code]
//Now save the new node
$fnew = node_save($f);
}
}
This is only a start point for your request. I hope that this can help you.
--
Michel 'ZioBudda' Morelli michel at ziobudda.net
Consulenza sistemistica in ambito OpenSource.
Sviluppo applicazioni web dinamiche (LAMP+Ajax)
Telefono: 0200619074
Telefono Cell: +39-3939890025 -- Fax: +39-0291390660
http://www.ziobudda.net ICQ: 58351764
http://www.ziobuddalabs.it Skype: zio_budda
http://www.ajaxblog.it MSN: michel at ziobuddalabs.it
JABBER: michel at gmail.com
More information about the support
mailing list