This module listens on the SiteBuilder event hook and should always
be connected to a SiteBuilder module.
This module provide functionality for automatically pinging Twingly when new
pages are published in a site.
This module will automatically make Twingly
aware of new content when new content is published. It does so by pinging the
Twingly ping service.
For this to work you need to add a config file to your normal SiteBuilder
workarea. In this file you can specify under which paths newly published files
should ping Twingly and with what arguments.
The config file is quite simple and you can put it where ever you want in
your workarea just as long as you specify the correct path in the
settings of this module.
So just copy the XML below and put it in an XML file somewhere in your
workarea and add the path to the file in the Config path form field under
the settings tab.
NOTE! If you run a replicated environment install this module
on one of the frontends, don't install it on the backend since
a ping from the backend could lead to Twingly indexing the site before the
content has been replicated.
Pingly config file
<pingly>
<!-- You can add as many path sections as you wish -->
<path>
<!-- Simply the domain name of the server -->
<domain>www.domain.com</domain>
<!-- URL under which newly published files will generate a ping -->
<url>/blogg/</url>
<!-- The name of the blog or news section or site -->
<name>My blog</name>
<!-- The URL of a RSS where the content will show up.
NOTE! If no domain is given the value of the domain node above will
be added automatically. If you have a feed at Feedburner for instance
add the full URL to the rss -->
<rss-url>/blogg/blog.rss</rss-url>
<!-- Freaking don't know what this is for! -->
<update-url></update-url>
<!-- Blog/section/site related keywords/tags -->
<keywords>pike,programming,roxen</keywords>
</path>
</pingly>
"); // }}}
Configuration conf;
object hook;
private mapping pingly_conf = ([]);
private string conf_file;
private int(0..1) is_frontend;
array(string) valid_content_types;
// }}}
void create(Configuration cfg) // {{{
{
conf = cfg;
set_module_creator("Pontus Östlund