About auto publish and sending expiration notifications

More
12 years 5 months ago #41602 by brandonking
Hello,

When we create an menu item for item submission form, there is Auto publish override option.

I know how to set those publish up/down intervals...

But what is gonna happen when item unpublished?

Does author get notification?
Can author re-publish item via editing item form?
Will publish up interval apply on item when re-publish item?

Thanks for your time.

Please Log in or Create an account to join the conversation.

More
12 years 5 months ago #41603 by ggppdk
Hello

this autopublish - override is for submitting only, and all other SUBMIT menu item parameters, effect the submit page only

-- to have an effect after that we would need a new feature, e.g. have a plugin/feature that periodically checks for unpublished items,

and send notifications if (via a single faster query)
now > ITEM unpublish date
and logs the unpublish date on a different table (thus notifications are sent once),

in future if again is detected
now > unpublish date
and LOGGED unpublish date <> ITEM unpublish date then notification is sent again and LOGGED unpublish date is changed to the new value

you could do the above via a simple PHP script that would run via CRON


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

More
12 years 5 months ago #41608 by brandonking
Thanks for your suggestion.
I will try..

Please Log in or Create an account to join the conversation.

More
12 years 5 months ago #41611 by ggppdk
Hello,

-0- start implementing this, and it is not that difficult, below is good, compact code for doing what you need and ... more ;)

-- and i give you this because we will be implementing this in a near future release,

(... we would need a good full day or more to implement this, debug, test various configuration scenarios, add languages strings, add email templating etc, etc, plus don't want to add this new feature now ...)

-1- just note that FLEXIcontent implementation will be what we will see best at the time, but this is a good start for you

-2- please !!CORRECT!! the below code it is only a draft

-3- please don't discuss this further by posting long codes that you have written, i will not look at them, but i will answer you other questions, if you have ;)

e.g. below i describe issuing notifications as the expiration time appoaches, PLUS after it has expired

You need:

1. Create a table (3 columns):
#__content_expired_notifications

!! KEY (item_id, days_notify) // so that replacing old record will work !!

(int) item_id,
(date) publish_down
(int) days_notify
30: WARNING for 1 month prior to expire
14: WARNING for 2 weeks prior to expire,
7 : WARNING for 1 week prior to expire,
0 : WARNING for that it has expired,
Code:
$days_intervals = array(30, 14, 7, 0); foreach($days_intervals as $days) { $query = 'SELECT i.id, i.publish_down, i.title ' // more cols ... .' FROM #__content AS i' // find previous notification record (if any ... using LEFT join) .' LEFT JOIN #__content_expired_notifications AS n .' ON n.item_id=i.id' .' WHERE' // Send notifications only for published content '. i.state IN (1,-5)' // that have expired ($days=0), or are $days before expiration .' AND i.publish_down > DATE_SUB(NOW(), INTERVAL '.$days.' DAY)' // but the notification date differs, // so no NEW notification was sent yet !! .' AND n.publish_down!=i.publish_down' ; $db->setQuery($query); $notify_items_list = $db->loadObjectList(); // NOTE 1: last AND clause detects different published_down date for a re-published_item !! so next time it re-expires e.g. after a year we will re-send a new notification // NOTE 2: if you use CRON, LOAD joomla framework (google to find how to this) or DO NOT load it and use PHP mysqli commands foreach ($notify_items_list as $item) { // 1. code to send notification email // ... // 2. Update notifications DB table, so that next run will not $query = 'REPLACE INTO #__content_expired_notifications' .' (item_id, publish_down, notify_days)' .' VALUES('. $item->id.', '. $db->Quote($item->publish_down).', '. $days .')'; $db->setQuery($query); $db->query(); // 3. create a log file or append to a log file // ... } } // end of foreach days, note THAT the VERY FIRST run will send for unexpired item 4 notifications at once BECAUSE the notifications table is empty, final code will be handling this ...


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

More
12 years 4 months ago #42533 by ggppdk
Hello

what have you done with this?


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

More
12 years 4 months ago #42535 by brandonking
Hi,

I know that you provide me detailed explanation but I couldn't do it.
It's a bit difficult for me. :oops:

Sorry about that.

I will have to wait for the next version.

Please Log in or Create an account to join the conversation.

More
12 years 4 months ago #42536 by ggppdk
Hello

ok, it is not trivial to implement,

but you have provide several good ideas for the project ;)

note this will be in the commercial version of FLEXIcontent along with e.g. (possible) endless-scroll,

but it will not be implemented immediately for next version yet,

top in the list for commercial version is configuration importing (installable web-apps or content kits or whatever we decide to call it)

Regards


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

More
12 years 4 months ago #42544 by brandonking
That's great news and I prefer using FC as commercial coz its too awesome CCK. :D

I just want to mention that there are some lacks for interaction between Authors(My authors have Frontend access ONLY) and Admin.

e.g.
1. Auto Publish/Unpublish,

2. Limits Number of Articles for each Author(or each Group)
(Free account holder allowed to create 5 articles...)

3. Custom Email Notification Template

4. Simple Item Form(All my Authors are not PC-friendly )
: I don't want to display first general TAB(includes Category, Featured Category, Language and so on.. )

5. Customizable State toggler in category view/item view.
: I want to display only publish/unpublish, and want to display unpublish as "SOLD".
: Authors create an article to sell their goods, but if an item sold then they have to unpublish article(maybe archive).

Hope these are acceptable for future version.. :D

Please Log in or Create an account to join the conversation.

More
12 years 4 months ago #42547 by ggppdk
Hello

more things are planned for subscription (or subscription-like) sites

about your comments:

1. Auto Publish/Unpublish,

what exactly do yo mean with this ?
e.g.
1. there is publish up and publish down dates, and do exactly this
2. recent FC versions have ability to set (after you suggesting it) an Publish UP/Publish Down interval
-- the above exists in the menu item, you mean to add the above to the Content Type too ?
or you mean something else ?

2. Limits Number of Articles for each Author (or each Group)
(Free account holder allowed to create 5 articles...)

-- We implemented this per author (per user group is coming ...)
you mean added per content type ?

3. Custom Email Notification Template

yes sure ... just too much work to give this priority now

4. Simple Item Form(All my Authors are not PC-friendly )
: I don't want to display first general TAB(includes Category, Featured Category, Language and so on.. )

Yes this is rather common request, todo: add more options for simplifying frontend form further

5. Customizable State toggler in category view/item view.
: I want to display only publish/unpublish, and want to display unpublish as "SOLD".
: Authors create an article to sell their goods, but if an item sold then they have to unpublish article(maybe archive).

What about making a joomla language override both English / Japanish ?
this will avoid hacking the code or altering the language files


Hope these are acceptable for future version.. :D


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

More
12 years 4 months ago #42559 by brandonking

1. Auto Publish/Unpublish,
what exactly do yo mean with this ?
e.g.
1. there is publish up and publish down dates, and do exactly this
2. recent FC versions have ability to set (after you suggesting it) an Publish UP/Publish Down interval
-- the above exists in the menu item, you mean to add the above to the Content Type too ?
or you mean something else ?


Yeah your right.. already implemented.. my mistake.

2. Limits Number of Articles for each Author (or each Group)
(Free account holder allowed to create 5 articles...)
-- We implemented this per author (per user group is coming ...)
you mean added per content type ?


Yes, need it per Content Type.
Some content type are free for all registered users and some are not.

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline
Save