2 This XML file defines a set of producers intended for a typical indymedia
14 <nodedefinition name="Language">
16 <string name="languagecondition" defaultvalue="code != 'ot'"/>
17 <string name="bundle" defaultvalue="bundles.producer" />
22 <List key="languages" table="language" selection="${languagecondition}" order="code"/>
23 <Enumerate key="language" table="language" selection="${languagecondition}" order="code">
24 <Resource bundle="${bundle}" key="lang" language="${language.code}"/>
25 <Define key="pathprefix" value="${language.code}" />
26 <Define key="languagepreference" value="${language.code}" />
28 <If condition="language.code=='en'">
30 <Define key="pathprefix" value="or" />
31 <Define key="languagepreference" value="" />
39 <nodedefinition name="RSSChannel">
41 <string name="articleSelection"/>
42 <string name="extratables" defaultvalue="none" />
43 <integer name="limit" defaultvalue="15"/>
44 <string name="channelidentifier" defaultvalue=""/>
45 <string name="channelfilename"/>
46 <string name="channeltitle"/>
47 <string name="articleprefix" defaultvalue="${config['Producer.PublicationHost']}/or" />
48 <string name="iconprefix" defaultvalue="${config['Producer.PublicationHost']}/icon" />
49 <string name="channelpublisher" defaultvalue="${config['Mir.Name']}" />
50 <string name="encoding" defaultvalue="UTF-8" />
51 <string name="channeldescription" defaultvalue=""/>
52 <string name="generator" defaultvalue="/RSS.template" />
56 <If condition="extratables == 'none' ">
58 <List key="articles" table="content c" selection="${articleSelection}" order = "c.webdb_create desc, c.date desc" limit="limit" />
61 <List key="articles" table="content c" selection="${articleSelection}" order = "c.webdb_create desc, c.date desc" limit="limit" extratables="${extratables}" />
64 <If condition="channeldescription==''">
66 <Define key="channeldescription" value="${channeltitle}"/>
69 <If condition="channelidentifier==''">
71 <Define key="channelidentifier" value="${config['Producer.PublicationHost']}/or/${channelfilename}"/>
76 parameters="${encoding}"
77 generator="${generator}"
78 destination="${config.storageRoot}/${channelfilename}"/>
82 <nodedefinition name="RSSChannelBundle">
84 <string name="extratables" defaultvalue="none" />
85 <string name="selection" defaultvalue="c.is_published='1'" />
86 <string name="basefilename" defaultvalue="main" />
91 articleSelection="(c.to_article_type in (${articletype.newswire}) or (c.to_article_type=${articletype.translation} and c.to_original.to_articletype in (${articletype.newswire}))) and ${selection}"
92 channelfilename="${basefilename}-newswire.rss"
93 channeltitle="${config['Mir.Name']} ${basefilename} newswire"
95 extratables="${extratables}"
98 articleSelection="(c.to_article_type in (${articletype.newswire}) or (c.to_article_type=${articletype.translation} and c.to_original.to_articletype in (${articletype.newsire}))) and ${selection}"
99 channelfilename="${basefilename}-newswire-content.rss"
100 channeltitle="${config['Mir.Name']} ${basefilename} newswire"
102 generator="RSS-full.template"
103 extratables="${extratables}"
107 articleSelection="(c.to_article_type in (${articletype.feature},${articletype.startspecial},${articletype.topicspecial}) or (c.to_article_type=${articletype.translation} and c.to_original.to_articletype in (${articletype.feature},${articletype.startspecial},${articletype.topicspecial}))) and ${selection}"
108 channelfilename="${basefilename}-features.rss"
109 channeltitle="${config['Mir.Name']} ${basefilename} features"
111 extratables="${extratables}"
114 articleSelection="(c.to_article_type in (${articletype.feature},${articletype.startspecial},${articletype.topicspecial}) or (c.to_article_type=${articletype.translation} and c.to_original.to_articletype in (${articletype.feature},${articletype.startspecial},${articletype.topicspecial}))) and ${selection}"
115 channelfilename="${basefilename}-features-content.rss"
116 channeltitle="${config['Mir.Name']} ${basefilename} features"
118 generator="RSS-full.template"
119 extratables="${extratables}"
125 <producer name="articles">
127 <verb name="changed" default="1">
128 <Define key="verbcondition" value="(not is_produced)"/>
129 <Set key="limit" value="10"/>
132 <Define key="verbcondition" value=""/>
133 <Set key="limit" value="-1"/>
137 <Define key="verbcondition" value=""/>
138 <Set key="limit" value="10"/>
142 <Enumerate key="article" table="content" selection="${verbcondition}"
143 limit="limit" order="webdb_create desc">
145 key="media" table="image"
146 selection="exists (select * from content_x_media where media_id=images.id and content_id=${article.id})
147 or exists (select * from comment_x_media, comment
148 where comment_id = comment.id and media_id=images.id and comment.to_media=${article.id})"
151 <GenerateMedia key="media" />
154 key="media" table="video"
155 selection="exists (select * from content_x_media where media_id=video.id and content_id=${article.id})
156 or exists (select * from comment_x_media, comment
157 where comment_id = comment.id and media_id=video.id and comment.to_media=${article.id})"
159 <GenerateMedia key="media" />
162 key="media" table="audio"
163 selection="exists (select * from content_x_media where media_id=audio.id and content_id=${article.id})
164 or exists (select * from comment_x_media, comment
165 where comment_id = comment.id and media_id=audio.id and comment.to_media=${article.id})"
168 <GenerateMedia key="media" />
171 key="media" table="otherMedia"
172 selection="exists (select * from content_x_media where media_id=other_media.id and content_id=${article.id})
173 or exists (select * from comment_x_media, comment
174 where comment_id = comment.id and media_id=other_media.id and comment.to_media=${article.id})"
177 <GenerateMedia key="media" />
180 <If condition="article.is_published == '1'">
184 generator="/article.template"
185 destination="${config.storageRoot}/${pathprefix}/${article.date.formatted.yyyy}/${article.date.formatted.MM}/${article.id}.shtml"/>
188 generator="/languagebar.template"
189 destination="${config.storageRoot}/languagebar/${article.to_original.date.formatted.yyyy}/${article.to_original.date.formatted.MM}/${article.to_original.id}.shtml"/>
190 <IndexContent key="article" pathToIndex="${config['IndexPath']}"/>
193 <UnIndexContent key="article" pathToIndex="${config['IndexPath']}"/>
196 <MarkContent key="article"/>
201 <producer name="navigation">
203 <verb name="generate" default="1" description="generates the left column"/>
208 generator="/navigation.template"
209 destination="${config.storageRoot}/${pathprefix}/navigation.inc"/>
214 <producer name="staticimages">
216 <verb name="generate" default="1" description="copies all the static image files into place"/>
219 <CopyDir destination="img" source="etc/producer/images"/>
223 <producer name="newswirearchive">
226 <Set key="pages" value="3"/>
229 <Set key="pages" value="-1"/>
233 <Define key="docSuffix" value=".shtml"/>
234 <Define key="storageSuffix" value=".shtml"/>
236 <Batch key="articles" infokey="batch" table="content"
237 process="pages" batchsize="20" minbatchsize="10"
238 selection="is_published='1' and to_article_type = ${articletype.newswire}"
239 order="webdb_create asc">
242 <Define key="pagePrefix" value="${pathprefix}/newswire/archive"/>
243 <Define key="storagePrefix" value="${config["Producer.StorageRoot"]}/${pagePrefix}"/>
244 <Define key="docPrefix" value="${config["Producer.DocRoot"]}/${pagePrefix}"/>
247 generator="newswirearchive.template"
248 destination="${storagePrefix}${batch.current.identifier}${storageSuffix}"/>
254 <Define key="pagePrefix" value="${pathprefix}/newswire/archive"/>
255 <Define key="storagePrefix" value="${config["Producer.StorageRoot"]}/${pagePrefix}"/>
256 <Define key="docPrefix" value="${config["Producer.DocRoot"]}/${pagePrefix}"/>
258 generator="batchnav.template"
259 destination="${storagePrefix}nav${storageSuffix}"/>
266 <producer name="featurearchive">
269 <Set key="pages" value="3"/>
272 <Set key="pages" value="-1"/>
276 <Define key="docSuffix" value=".shtml"/>
277 <Define key="storageSuffix" value=".shtml"/>
279 <Batch key="articles" infokey="batch" table="content"
280 process="pages" batchsize="20" minbatchsize="10"
281 selection="is_published='1' and to_article_type in (${articletype.feature}, ${articletype.startspecial})"
282 order="webdb_create asc">
285 <Define key="pagePrefix" value="${pathprefix}/feature/archive"/>
286 <Define key="storagePrefix" value="${config["Producer.StorageRoot"]}/${pagePrefix}"/>
287 <Define key="docPrefix" value="${config["Producer.DocRoot"]}/${pagePrefix}"/>
290 generator="featurearchive.template"
291 destination="${storagePrefix}${batch.current.identifier}${storageSuffix}"/>
297 <Define key="pagePrefix" value="${pathprefix}/feature/archive"/>
298 <Define key="storagePrefix" value="${config["Producer.StorageRoot"]}/${pagePrefix}"/>
299 <Define key="docPrefix" value="${config["Producer.DocRoot"]}/${pagePrefix}"/>
301 generator="batchnav.template"
302 destination="${storagePrefix}nav${storageSuffix}"/>
309 <producer name="topicpages">
312 <Set key="_topics" value="-1"/>
313 <Set key="pages" value="3"/>
316 <Set key="_topics" value="-1"/>
317 <Set key="pages" value="-1"/>
320 <Set key="_topics" value="2"/>
321 <Set key="pages" value="4"/>
325 <Enumerate key="topic" table="topic" limit="_topics">
326 <Define key="docSuffix" value=".shtml"/>
327 <Define key="storageSuffix" value=".shtml"/>
329 <List key="special" table="content c"
330 selection="c.is_published='1' and c.to_article_type = ${articletype.topicspecial} and c.id=cxt.content_id and cxt.topic_id = ${topic.id}"
331 order = "webdb_create desc" limit="1"
332 extratables="content_x_topic cxt"/>
334 <Batch key="articles" infokey="batch" table="content c"
335 process="pages" batchsize="20" minbatchsize="10"
336 selection="c.is_published='1' and c.to_article_type in (${articletype.newswire}, ${articletype.feature}) and c.id=cxt.content_id and cxt.topic_id = ${topic.id}"
337 order="webdb_create asc" extratables="content_x_topic cxt">
340 <Define key="pagePrefix" value="${pathprefix}/${topic.filename}/archive"/>
341 <Define key="storagePrefix" value="${config["Producer.StorageRoot"]}/${pagePrefix}"/>
342 <Define key="docPrefix" value="${config["Producer.DocRoot"]}/${pagePrefix}"/>
345 generator="topicpage.template"
346 destination="${storagePrefix}${batch.current.identifier}${storageSuffix}"/>
352 <Define key="pagePrefix" value="${pathprefix}/${topic.filename}/archive"/>
353 <Define key="storagePrefix" value="${config["Producer.StorageRoot"]}/${pagePrefix}"/>
354 <Define key="docPrefix" value="${config["Producer.DocRoot"]}/${pagePrefix}"/>
356 generator="batchnav.template"
357 destination="${storagePrefix}nav${storageSuffix}"/>
365 <producer name="startpage">
367 <verb name="generate" default="1" description="Generates the startpage"/>
371 <List key="startspecial" table="content" limit="1"
372 selection="is_published=true and to_article_type=${articletype.startspecial}"
373 order="webdb_create desc"/>
375 <List key="features" table="content" limit="10"
376 selection="is_published=true and to_article_type=${articletype.feature}"
377 order="webdb_create desc"/>
379 <List key="newswire" table="content" limit="30"
380 selection="is_published=true and to_article_type=${articletype.newswire}"
381 order="webdb_create desc"/>
383 <List key="breakingnews" table="breakingNews" limit="10"
384 order="webdb_create desc"/>
388 generator="/startpage.template"
389 destination="${config.storageRoot}/${pathprefix}/index.shtml"/>
394 <producer name="synchronization">
396 <verb name="run" default="1" description="Synchronizes the publication site with the production site"/>
400 <If condition="config['Rsync'] in ('1', 'y', 'yes', 'Y')">
402 <Execute command="${config['Rsync.Script.Path']}"/>
409 <producer name="media">
411 <verb name="new" default="1">
412 <Define key="verbcondition" value="(not is_produced)"/>
413 <Set key="limit" value="10"/>
416 <Define key="verbcondition" value=""/>
417 <Set key="limit" value="-1"/>
421 <Define key="verbcondition" value=""/>
422 <Set key="limit" value="10"/>
427 key="media" table="image"
428 selection="${verbcondition}"
430 order="webdb_create desc">
432 <GenerateMedia key="media" />
435 key="media" table="video"
436 selection="${verbcondition}"
438 order="webdb_create desc">
440 <GenerateMedia key="media" />
443 key="media" table="audio"
444 selection="${verbcondition}"
446 order="webdb_create desc">
448 <GenerateMedia key="media" />
451 key="media" table="otherMedia"
452 selection="${verbcondition}"
454 order="webdb_create desc">
456 <GenerateMedia key="media" />
461 <producer name="syndication">
463 <verb name="generate" />
466 <!-- the main features and newswire -->
469 <!-- the topic features and newswires -->
470 <Enumerate key="topic" table="topic">
472 basefilename="${topic.filename}"
473 selection="c.id=cxt.content_id and cxt.topic_id = ${topic.id}"
474 extratables="content_x_topic cxt"