recorded article id into a second table

Hello,

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?

Thank you in advance.
Ben

Hello, Ben!

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.

If you don’t know what pipelines are and how to use them, please read this page: http://programmer3.spip.net/Definition,709

Best regards,
Oleksii Iaroshchuk.

2013/2/25 ben wyss <bmwyss@gmail.com>

Hello,

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?

Thank you in advance.
Ben


spip-en@rezo.net - http://listes.rezo.net/mailman/listinfo/spip-en


С уважением, Ярощук Алексей.

Greeting,

we did that in formulaire/editer_article.php. In traitor function.

I think this is easier than creating new plugin. But as Alex wrote - the correct way to create it with pipeline (new plugin).

About a mes_options.php - I’m not sure that could be a solution, but my knowledge is not enough.

Best regards,
Serge

2013/2/25 ben wyss <bmwyss@gmail.com>

Hello,

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?

Thank you in advance.
Ben


spip-en@rezo.net - http://listes.rezo.net/mailman/listinfo/spip-en

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.

2013/2/25 Serge Markitanenko <ss1945@gmail.com>

Greeting,

we did that in formulaire/editer_article.php. In traitor function.

I think this is easier than creating new plugin. But as Alex wrote - the correct way to create it with pipeline (new plugin).

About a mes_options.php - I’m not sure that could be a solution, but my knowledge is not enough.

Best regards,
Serge

2013/2/25 ben wyss <bmwyss@gmail.com>

Hello,

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?

Thank you in advance.
Ben


spip-en@rezo.net - http://listes.rezo.net/mailman/listinfo/spip-en


spip-en@rezo.net - http://listes.rezo.net/mailman/listinfo/spip-en


С уважением, Ярощук Алексей.

Cool )))

Век живи, век учись

2013/2/25 Алексей Ярощук <a.yaroshuk@aloha.org.ua>

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.

2013/2/25 Serge Markitanenko <ss1945@gmail.com>

Greeting,

we did that in formulaire/editer_article.php. In traitor function.

I think this is easier than creating new plugin. But as Alex wrote - the correct way to create it with pipeline (new plugin).

About a mes_options.php - I’m not sure that could be a solution, but my knowledge is not enough.

Best regards,
Serge

2013/2/25 ben wyss <bmwyss@gmail.com>

Hello,

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?

Thank you in advance.
Ben


spip-en@rezo.net - http://listes.rezo.net/mailman/listinfo/spip-en


spip-en@rezo.net - http://listes.rezo.net/mailman/listinfo/spip-en


С уважением, Ярощук Алексей.