When a new article is created, I would like the article id to be recorded into a second table eg. 'spip_bridge'. I am wondering what the best way to do this is? Do I need to create a whole new plugin? Can I simply modify the spip/prive/formulaires/editer_article.php file? Or do I need to use the mes_options.php file?
The best to do what you need in SPIP is to use pipelines. I guess that this one will help you: http://programmer3.spip.net/post_insertion,729
There is an example on this page with spip_articles table - it will be useful for you.
When a new article is created, I would like the article id to be recorded into a second table eg. ‹ spip_bridge ›. I am wondering what the best way to do this is? Do I need to create a whole new plugin? Can I simply modify the spip/prive/formulaires/editer_article.php file? Or do I need to use the mes_options.php file?
When a new article is created, I would like the article id to be recorded into a second table eg. ‹ spip_bridge ›. I am wondering what the best way to do this is? Do I need to create a whole new plugin? Can I simply modify the spip/prive/formulaires/editer_article.php file? Or do I need to use the mes_options.php file?
Serge, you can declare pipeline directly in config/mes_options.php (without creating new plugin), and as I remember this really works.
This page http://programmer3.spip.net/Definition,709 contains and example of how to do this.
When a new article is created, I would like the article id to be recorded into a second table eg. ‹ spip_bridge ›. I am wondering what the best way to do this is? Do I need to create a whole new plugin? Can I simply modify the spip/prive/formulaires/editer_article.php file? Or do I need to use the mes_options.php file?
Serge, you can declare pipeline directly in config/mes_options.php (without creating new plugin), and as I remember this really works.
This page http://programmer3.spip.net/Definition,709 contains and example of how to do this.
When a new article is created, I would like the article id to be recorded into a second table eg. ‹ spip_bridge ›. I am wondering what the best way to do this is? Do I need to create a whole new plugin? Can I simply modify the spip/prive/formulaires/editer_article.php file? Or do I need to use the mes_options.php file?