Page Forms - hooking an extension right after saving a form

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Page Forms - hooking an extension right after saving a form

Δαυίδ Μπρομοίρας
Hi there!

I want to hook an extension right after saving a Page Form page, which will
use the contents of the saved template and spawn some other wiki pages that
will contain parts of the saved template. Which hook I should use to do
that? Would "PageContentSaveComplete" be the appropriate one? How should I
filter the Page Form saves from all the rest page saves and apply my custom
functionality on them only?

Thanks in advance everyone!

David Bromoiras, GFOSS
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Page Forms - hooking an extension right after saving a form

Yaron Koren-2
Hi David,

That's a tricky one - I don't think there's an easy way to know, after a
page has been saved, whether or not it was saved using a form. You might be
able to do it by setting some static variable, if any of the Page Forms
hooks are called, and then checking that variable when
PageContentSaveComplete is called. PageForms::RenderingEnd may be a good
one to use.

If I may ask, what does it matter, for your purposes, whether the page was
saved with a form or by a standard edit, if the resulting page is the same?

-Yaron



On Mon, Apr 10, 2017 at 6:28 AM, Δαυίδ Μπρομοίρας <[hidden email]
> wrote:

> Hi there!
>
> I want to hook an extension right after saving a Page Form page, which will
> use the contents of the saved template and spawn some other wiki pages that
> will contain parts of the saved template. Which hook I should use to do
> that? Would "PageContentSaveComplete" be the appropriate one? How should I
> filter the Page Form saves from all the rest page saves and apply my custom
> functionality on them only?
>
> Thanks in advance everyone!
>
> David Bromoiras, GFOSS
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Semediawiki-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/semediawiki-user
>



--
WikiWorks · MediaWiki Consulting · http://wikiworks.com
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Page Forms - hooking an extension right after saving a form

Δαυίδ Μπρομοίρας
thanks for the reply, Yaron.

So, you are suggesting that instead of determining whether I come from a
"form save" event, I should set a category to each page created via forms
and then hook in to PageContentSaveComplete event and determine wether the
recently saved page belongs to the category I want to further process?

thanks in advance!

Μπρομοίρας Δαυίδ
αναλυτής/προγραμματιστής
Οργανισμός Ανοιχτών Τεχνολογιών - ΕΕΛΛΑΚ

2017-04-14 16:42 GMT+03:00 Yaron Koren <[hidden email]>:

> Hi David,
>
> That's a tricky one - I don't think there's an easy way to know, after a
> page has been saved, whether or not it was saved using a form. You might be
> able to do it by setting some static variable, if any of the Page Forms
> hooks are called, and then checking that variable when
> PageContentSaveComplete is called. PageForms::RenderingEnd may be a good
> one to use.
>
> If I may ask, what does it matter, for your purposes, whether the page was
> saved with a form or by a standard edit, if the resulting page is the same?
>
> -Yaron
>
>
>
> On Mon, Apr 10, 2017 at 6:28 AM, Δαυίδ Μπρομοίρας <
> [hidden email]> wrote:
>
>> Hi there!
>>
>> I want to hook an extension right after saving a Page Form page, which
>> will
>> use the contents of the saved template and spawn some other wiki pages
>> that
>> will contain parts of the saved template. Which hook I should use to do
>> that? Would "PageContentSaveComplete" be the appropriate one? How should I
>> filter the Page Form saves from all the rest page saves and apply my
>> custom
>> functionality on them only?
>>
>> Thanks in advance everyone!
>>
>> David Bromoiras, GFOSS
>> ------------------------------------------------------------
>> ------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> _______________________________________________
>> Semediawiki-user mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/semediawiki-user
>>
>
>
>
> --
> WikiWorks · MediaWiki Consulting · http://wikiworks.com
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Page Forms - hooking an extension right after saving a form

Yaron Koren-2
I wasn't suggesting that specifically, but it seems like a reasonable idea.
:)

On Wed, Apr 19, 2017 at 3:57 AM, Δαυίδ Μπρομοίρας <[hidden email]
> wrote:

> thanks for the reply, Yaron.
>
> So, you are suggesting that instead of determining whether I come from a
> "form save" event, I should set a category to each page created via forms
> and then hook in to PageContentSaveComplete event and determine wether the
> recently saved page belongs to the category I want to further process?
>
> thanks in advance!
>
> Μπρομοίρας Δαυίδ
> αναλυτής/προγραμματιστής
> Οργανισμός Ανοιχτών Τεχνολογιών - ΕΕΛΛΑΚ
>
> 2017-04-14 16:42 GMT+03:00 Yaron Koren <[hidden email]>:
>
>> Hi David,
>>
>> That's a tricky one - I don't think there's an easy way to know, after a
>> page has been saved, whether or not it was saved using a form. You might be
>> able to do it by setting some static variable, if any of the Page Forms
>> hooks are called, and then checking that variable when
>> PageContentSaveComplete is called. PageForms::RenderingEnd may be a good
>> one to use.
>>
>> If I may ask, what does it matter, for your purposes, whether the page
>> was saved with a form or by a standard edit, if the resulting page is the
>> same?
>>
>> -Yaron
>>
>>
>>
>> On Mon, Apr 10, 2017 at 6:28 AM, Δαυίδ Μπρομοίρας <
>> [hidden email]> wrote:
>>
>>> Hi there!
>>>
>>> I want to hook an extension right after saving a Page Form page, which
>>> will
>>> use the contents of the saved template and spawn some other wiki pages
>>> that
>>> will contain parts of the saved template. Which hook I should use to do
>>> that? Would "PageContentSaveComplete" be the appropriate one? How should
>>> I
>>> filter the Page Form saves from all the rest page saves and apply my
>>> custom
>>> functionality on them only?
>>>
>>> Thanks in advance everyone!
>>>
>>> David Bromoiras, GFOSS
>>> ------------------------------------------------------------
>>> ------------------
>>> Check out the vibrant tech community on one of the world's most
>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>> _______________________________________________
>>> Semediawiki-user mailing list
>>> [hidden email]
>>> https://lists.sourceforge.net/lists/listinfo/semediawiki-user
>>>
>>
>>
>>
>> --
>> WikiWorks · MediaWiki Consulting · http://wikiworks.com
>>
>
>


--
WikiWorks · MediaWiki Consulting · http://wikiworks.com
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Page Forms - hooking an extension right after saving a form

Δαυίδ Μπρομοίρας
yes!! i expressed it badly, i understood what you suggested in the first
place, but actually proposed a more "standard", should i say, approach!

thanks for the reply! :)

Μπρομοίρας Δαυίδ
αναλυτής/προγραμματιστής
Οργανισμός Ανοιχτών Τεχνολογιών - ΕΕΛΛΑΚ

2017-04-19 22:48 GMT+03:00 Yaron Koren <[hidden email]>:

> I wasn't suggesting that specifically, but it seems like a reasonable
> idea. :)
>
> On Wed, Apr 19, 2017 at 3:57 AM, Δαυίδ Μπρομοίρας <
> [hidden email]> wrote:
>
>> thanks for the reply, Yaron.
>>
>> So, you are suggesting that instead of determining whether I come from a
>> "form save" event, I should set a category to each page created via forms
>> and then hook in to PageContentSaveComplete event and determine wether the
>> recently saved page belongs to the category I want to further process?
>>
>> thanks in advance!
>>
>> Μπρομοίρας Δαυίδ
>> αναλυτής/προγραμματιστής
>> Οργανισμός Ανοιχτών Τεχνολογιών - ΕΕΛΛΑΚ
>>
>> 2017-04-14 16:42 GMT+03:00 Yaron Koren <[hidden email]>:
>>
>>> Hi David,
>>>
>>> That's a tricky one - I don't think there's an easy way to know, after a
>>> page has been saved, whether or not it was saved using a form. You might be
>>> able to do it by setting some static variable, if any of the Page Forms
>>> hooks are called, and then checking that variable when
>>> PageContentSaveComplete is called. PageForms::RenderingEnd may be a good
>>> one to use.
>>>
>>> If I may ask, what does it matter, for your purposes, whether the page
>>> was saved with a form or by a standard edit, if the resulting page is the
>>> same?
>>>
>>> -Yaron
>>>
>>>
>>>
>>> On Mon, Apr 10, 2017 at 6:28 AM, Δαυίδ Μπρομοίρας <
>>> [hidden email]> wrote:
>>>
>>>> Hi there!
>>>>
>>>> I want to hook an extension right after saving a Page Form page, which
>>>> will
>>>> use the contents of the saved template and spawn some other wiki pages
>>>> that
>>>> will contain parts of the saved template. Which hook I should use to do
>>>> that? Would "PageContentSaveComplete" be the appropriate one? How
>>>> should I
>>>> filter the Page Form saves from all the rest page saves and apply my
>>>> custom
>>>> functionality on them only?
>>>>
>>>> Thanks in advance everyone!
>>>>
>>>> David Bromoiras, GFOSS
>>>> ------------------------------------------------------------
>>>> ------------------
>>>> Check out the vibrant tech community on one of the world's most
>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>>> _______________________________________________
>>>> Semediawiki-user mailing list
>>>> [hidden email]
>>>> https://lists.sourceforge.net/lists/listinfo/semediawiki-user
>>>>
>>>
>>>
>>>
>>> --
>>> WikiWorks · MediaWiki Consulting · http://wikiworks.com
>>>
>>
>>
>
>
> --
> WikiWorks · MediaWiki Consulting · http://wikiworks.com
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Loading...