Autoarchive Mambot for Joomla 1.0.x available for download

Friday, 04 August 2006

TeachMeJoomla launches the autoarchive mambot!

 
Do you enjoy Autoarchive?
.

Update: the mambot was recently updated to allow expiration date reset. Use this parameter if you are archiving expired items and want to make the archive available to the public. This fixes the "You are not authorized..." problem when using SectionArchive or CategoryArchive menu items. 

If you are having problems with this error:

  1. unarchive your items from Joomla! administration-content-archive manager
  2. install the latest bot version

It will reset expiration date and fix those problems. you may also want to temporarily set "How many items to process" to a very large value (like 100) . This will ensure that your items are archived quickly.

If you see too many "Automation by TeachMeJoomla" links on your site, your cache directory may not be writable. You need to chmod it to 777 or 755 using Joomla Xplorer or a FTP client. To check cache folder writeability, go to your Joomla! administration and click System-System information. If this operation is too technical for you, ask your hosting support for instructions. Tell them you need to make a folder writeable by PHP scripts.

Also make sure the polling interval parameter is set to a non-zero value (60, for example). This enhances site performance and unclutters your blog-view pages.

The latest plugin(mambot) version is 1.0.1 

More information:

  

TeachMeJoomla's AutoArchive mambot

performs automatic actions when content items reach expiration time

The mambot is compatible with Joomla! versions 1.0x and 1.1 

This is a content mambot. It runs when your Joomla site displays content items in frontend. Mambot tags are not needed for this mambot. It runs automagically.

Behaviour:

The mambot is called when a visitor (or a Web crawler) accesses a content item. At that point, the mambot scans the Joomla database content table to check if some items expired. If so, an automatic action is performed.

The mambot design takes site performance into account. This is why you can set both how many items may be processed at a time, and how much time should pass between two consecutive executions.

You may set a section and category filter if you want automatic processing to be restricted on specific containers.

Catching up with many expired items

For example, you have a 10,000 articles site, and 8000 of those expired. You need to move the articles to archive and notify article authors that an action is being taken.

We also assume you have one visitor per hour on your site. So what you need is a simple calculation in order to adjust those parameters right.

24hours * 1 visit * 1 item = 24 items processed per day.

8000 articles / 24 articles per day = 333 days. So, it will take aproximately 333 days (almost 1 year!) to auto-archive your items.

The problem here is the small number of visits. If you want the job done in one month, just set "How many items to process" to 10. This will make the mambot finish in 1 month, but sending 10 notification emails each time a visitor hits a content item may slow the site down.

You should tune the mambot again after the articles are processed.

Calculating normal operation parameters

High traffic scenario

Let's assume for this example that 10 articles on your Joomla! site expire every day. You want those processed automatically.

Your site has 1000 pageviews per day. How do you set the autoarchive mambot for best performance(minimal impact for site speed).

Well, set the "How many items" to 1, since your pageviews are greater than the number of content items that need processing.

Now, how large should be the polling cycle interval? We don't what the mambot scanning the site uselessly if all our ten articles have already been processed.

Well, 1000 pageviews means 1000 mambot executions per day. We only need ten executions, since our site has an average of ten expiring articles a day.

24 hours * 60 minutes * 60 seconds = 86400 seconds in a day. We need 86400seconds / 10articles = one execution every 8640 seconds. So, you set how many to 1, and polling cycle to 8640. This ensures the mambot will process ten articles a day with great performance. An alternative is setting How many to 2, and doubling the polling cycle.

Low traffic scenario

Another example. Your large site has 100 expiring articles daily. Unfortunately, it gets only 10 pageviews per day.

You want those articles processed automatically. In this case, you should process more items per pageview, because pageviews are fewer than expiring articles. So, set "How many" to 10, that will make 10 * 10 = 100 articles.

If you notice that some articles are, not processed as fast as you wish you should increase the "How many" parameter and/or decrease the polling cycle.

You can help me, too

The mambot outputs a span "Automation by TeachmeJoomla" , using the "small" CSS class. this text is only outputed when effective actions have been taken on items. It does not display every time you access content items.

This text is displayed on-the fly, it does alter your content items in any way.

This text helps me track mambot popularity, and increase my homepage visibility on the Internet.

Thank You !

If you want to remove the TeachmeJoomla notice or if you have any suggestions or inqueries, please contact me at webmaster [at] teachmejoomla.net.

Do you enjoy Autoarchive?

https://www.teachmejoomla.net


Related articles(beta):



Add this page to your favorite Social Bookmarking websites
Reddit! Del.icio.us! StumbleUpon! Yahoo! Swik!



Comments (11)
RSS comments
1. Suggest02-02-2007 16:18

I find it great. Do you think it would be possible to extend it as a batch we could launch in a cron job, instead of needing someone to read an article live. 
 
thanks 
:)

2. Thanks14-02-2007 14:49

Thank you! 
I'm trying to find the time to extend the mambot 
The next version will be packaged as a system mambot, so it'll run all the time, regardless on what content or component the user is browsing 
If you feel you have too few visits and want to make sure your items get processed, you can try to increase the number of items processed per execution 
 
A simple method to fake browsing with cron is placing a  
wget -O /dev/null http:/yoursite/index.php?option=com_content&task=view&id=1 
command in your crontab 
Replace this example URL with an article URL from your site, doesn't matter which one 
And, if manually editing the crontab, you need to read the cron howto, easily found on Google

3. Archive By Count of Days Instead?08-03-2007 20:52

Wouldn't it be simpler just to allow the Admin to input how many days old he wants articles to be when they should be archived? For instanct, just put in "180" days and then when once a day the mambot archives all articles with a publication date of 180 days old?  
 
I'd feel more comfortable with that kind of system that using a math calculation. For instance, let's say I input 8640 seconds to that it archives 10 articles a day, as per your example. But then I only post 6 articles a day for a long periods. Sooner or later the mambot is going to catch up to me and I'm not going to have any articles on my site, except in archives.

4. Archive By Count of Days Instead?09-03-2007 09:11
Tudor

@Sean 
Please read the docs and the relevant forum topic. The current "interval" and "how many" parameters are for bot control, they have nothing to do with article age. The next bot version will have a "delete if older than x days" option.

5. How can I control the display of the arc15-03-2007 00:53

It appears to me that you are not only archiving items but you are also creating a link for each month that has at least one archived item. I am unclear as to what controls how those archived items get displayed... The link that comes from your mambot is (for January 2007 archived articles) 
http://home.frognet.net/~folkworks/fw/index.php?option=com_content&task=archivecategory&year=2007&month=01&module=1 
 
[Why archivecategory? I specified a section (after I discovered that I needed to enter the section ID rather than the section name)] 
 
whereas the link that I get for the normal 'section blog' (after selecting Jan 2007 articles) 
http://home.frognet.net/~folkworks/fw/index.php?option=com_content&task=archivesection&id=8&Itemid=91 
 
So what is going on here? and is there a way I can control the number of 'lead' articles? and how many columns are used to display the intros on the next x articles? and whether or not titles, authors, etc. get displayed? 
 
I'm a bit confused by what I'm seeing going on.

Is there some way to insert the links generated by this mambot into a content item using mosmodule or something similar? Do I have to replicate the capability in my own php snippet?

7. Alone in The Dirt29-05-2007 15:11

Very nice module, however I have been trying to modify it a bit. Instead of archiving the content, I would like it to just move it to another content category. Everything is working fine, except I can't get it to reset publish_down. That means that it moves it to the correct category, but it is unpublished, because it is expired. I enabled the reset expiration in Autoarchives options. Here is the code I altered. 
 
case 'archive':  
$sql="UPDATE #__content SET catid = 15 , modified = " . $database->Quote( date( 'Y-m-d H:i:s' ) ) ; 
if ($fixnotauth) $sql.= ", publish_down='0000-00-00 00:00:00' " ; 
break; 
 
I also tried adding SET state=1, to ensure that it would stay published, but it just won't reset the publish_down. I also tried publish_down='0000-00-00 00:00:00' along with the others in the UPDATE line. Any ideas?

8. NICE WORK19-06-2007 14:37

I have been using this mambot for a while now, and it works awesome! All I have to do is be sure that articles are given proper expiration dates (sometimes my authors fail to do this so I have to), but it never fails to archive, which I love. I also use Mamblog, which allows users to manually archive their entries, but since it does not allow expiration dates, Mamblog entries never get autoarchived. I saw that you are working on the new version of AutoArchive and that it will include a feature to "Archive if X days old." This will solve the Mamblog problem perfectly and I look forward to its release! NICE WORK

9. Great Work19-07-2007 10:11

I've been looking for something that does this for a while now. 
The only thing that's missing for me is an option to do nothing with the article (no archive,trash, etc) but just email the author on a set date so they can check the content of the article is still up to date (phone numbers, contact info etc). 
Could you implement this in the next version please?

10. Follow-on to Allan's Comment #704-09-2007 18:57

Hi, 
 
This is a great idea for an extension and very useful. I was going to ask if it would be possible to have the mambot change the article category instead of archive it but Allan beat me to it in his comment #7. I was wondering if you know if he was successful in solving his question about resetting the expiration? 
 
Thanks.

11. kjgylpzk08-12-2007 03:13

mnwqlnln [URL=http://gesegwjd.com]qrgimgld[/URL] ytrgwuee http://tbgeiwjh.com zrsajusx lopejasg

Powered by AkoComment Tweaked Special Edition v.1.4.2

Last Updated ( Thursday, 26 June 2008 )
 

Newsletter

Subscribe to TeachMeJoomla's newsletter
Name:
Email:


Joomla books

Auto tags

mombot download

download mombot

move content items to category after date mambot

autoarchive

auto archive joomla

mombot 1.4 download

Old mombot for 1.4

joomla replace mambots hits with code

joomla automatical archive

mambo archived articles available

add no-archive joomla

mambo download count

auto archiv mambot

mambot add php download

mambot joomla howto