Loading...
 
Skip to main content

Features / Usability


Does WATCH on ANY new article work.

Can anyone tell me if WATCH (i.e. auto-email notification) when ANY new article is posted works in 1.9?

I am having a lot of trouble determining from docs if it is supported or not. I thnk it says it is.. but pretty sure it doesn't have any code behnd it (not to mention it doens't actually work).

In the UserWatch setup there is a single item that can be ADDED which states:

A user submits an article (article_submitted) article: *

which sounds like that should be it... but does this work????

basic mail does work - i can send newsletters and i can "watch" specific blogs, articles, etc (whereever i get the little EYE icon) - but can i watch new additions????

And the next questions would be:

can i watch:

- new calendar postings
- new gallery additions

Would REALY REALLY be great if this worked since i think it likely is the most important thing about my Tiki site since it auto keeps my registered users informed.

cheers,
peter....

so the answer to my own post is NO - this doesnt work for official release of 1.9 - even though the User Watch page would sort of suggest that it does.. so i fixed it (more testing to do - but it does work)... here are results of my investigation and my fix code:

-----------

ok, found the bug or missing code.. which ever way you want to look at it.. and likely need to do some more testing but this seems to work so far…


- only certain cases are allowed for auto email notification as defined in tikilib.php->get_event_watches() ; these include:
o case ‘wiki_page_changed’
o case 'blog_post'
o case 'forum_post_topic'
o case 'forum_post_thread'
o case 'file_gallery_changed'

- so for “article_submitted??? which is the first of a few items I need added to auto-notify I added the following to the SWITCH statement

Image
Copy to clipboard
case 'article_submitted': // p.lindstrom to get notify on new article working // p.lindstrom - not sure of use of permissions here $res['perm']=($this->user_has_perm_on_object($res['user'],$object,'blog','tiki_p_read_article') || $this->user_has_perm_on_object($res['user'],$object,'blog','tiki_p_submit_article')); break;



This seems to be all that was missing since everything else in the artlib.lib file was already in place

Will likely post more code to add the other things that I wasn’t added but I suspect this will be much more work. Three parts (well really many many but at a high level) are required:

1. add item to list in User Watch page to add the watch
2. ensure the code for editing/adding/etc that object has the setup code to call sendEmailNotification
3. ensure permissions are granted in get_event_watches

for Submit Article; items 1 and 2 already done… doubt for other objects though (new image gallery, new event, etc)

Will likely look at Calendar Events, then new Image Galleries next

cheers,

peter....


A user can watch a new article in 1.9
In Mytiki -> My watches, you can activate "a user submits an article"

You can't watch calendar yet