Implementing auto publish for custom dB

Hi all,
I am wondering if there is an established way to extend modResource’s auto publishing mechanism to custom DB if custom DB has all required fields. (ie., published, pub_data, unpub_date) or is it easier to write a code for this separately. Thanks to Bob’s blog, I have a general idea how it works.

If it’s not too late, it might be easiest to use ClassExtender to create your custom table for the additional Resource fields. Then MODX would handle the auto-publication of your custom resource as part of its normal process.

If it’s too late for that, I think the next easiest approach would be to just copy the MODX auto-publish code to your own plugin and change the table name involved to point to your own DB table.

BTW, could you provide a link to the Blog post of mine. I couldn’t find it.

Thanks,
Unfortunately, Its too late so I will look into the MODX code.

BTW, I was referring to this article.

The autoPublish code is in the core\model\modx\modcachemanager.class.php file.

Looking at the code, I see a potential problem with my suggestion. Both your code and MODX would be reading from, and writing to, the same auto_publish.cache.php file unless you find a way to change that.

Sweet. I will tinker with it in my practice site for a while.
Thank you!