By Simon on Thursday, 15 January 2015
Posted in General Issues
Replies 9
Likes 0
Views 0.9K
Votes 0
Hello,

I'm using EasyBlog, and I would like to know if it's possible to auto-archive the post after x days?
Thanks for your answer.
Hi Simon,

I am sorry for the late reply.
I believe this feature is not possible yet in the current system. The archive feature in EasyBlog works by sorting the existing blogpost by day/month or year. If you have anymore question, please don't hesitate to ask us.

Hope I explained this well.
·
Thursday, 15 January 2015 19:25
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi,

thanks for your answer!
·
Friday, 16 January 2015 01:38
·
0 Likes
·
0 Votes
·
0 Comments
·
You are most welcome Simon
·
Friday, 16 January 2015 03:19
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi,

my client wants auto-unpublishing in Easyblog. I know it's not build-in, but i found a plugin with which you can auto unpublish Joomla-frontpage items.

After some modifications i established to make this plugin auto-unpublish Joomla-articles after X-days.

So i went on and modified it to auto-unpublish Easyblog posts. And well it works :-)

What the plugin does is check the publish-dates in the __easyblog_post records and when the X-days are past the field published will be set to 0 (zero).
Navigating to the site indeed the old posts are unpublished.
Navigating to adminstrator > easyblog : it says no post are published. So far so good.
But when navigating to administrator > easyblog > posts the Status icons are still green.

How is this possible? Am i corrupting Easyblog in any way?

Looking forward for your reply. Attached you will find the plugin.

Kind regards,

Mark
·
Tuesday, 25 August 2015 20:54
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Mark,

To be honest we are not quite sure how to plugins work but if I'm not wrong easyblog already have the feature where user can choose when to automatically unpublished the blog post. You can refer to my screenshot here, http://screencast.com/t/ZgoGCunuo .
·
Wednesday, 26 August 2015 19:16
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Ezrul,

i'm aware of the feature where users can set an Unpublish date. But people are lazy ;-) and my client definitely wants that posts are unpublished after X-days.

The thing is that i found it odd that the status icon remains Green instead of Red although in the database the state is set to 0.
If you have any idea how this is possible i can take a look at it.

Kind regards,
Mark
·
Wednesday, 26 August 2015 20:18
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Mark,

I believe the plugin which you modified, is not altering the states correctly and this is why you are getting the "green" state. The "published" column needs to be 0 to unpublish a post
·
Thursday, 27 August 2015 03:39
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi,

i've checked the plugin in and this is the command which updates the state :

$query = "UPDATE #__easyblog_post SET `published` = 0 WHERE id IN($daystring)";

So i guess this is correct. Any ideas ?

Kind regards,
Mark
·
Friday, 28 August 2015 15:11
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Mark,

I am really sorry for the delay of this reply, I must have missed this thread when I was away. I am not really sure what $daystring is, but if it's a collection of post id's, I believe it should be correct
·
Thursday, 03 September 2015 02:17
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post