+
+
+
+
+ <producer name="generatefpincludes">
+ <verbs>
+ <verb name="doit" />
+ </verbs>
+ <body>
+
+
+ <Enumerate key="fpimage" table="image" selection="to_media_folder=8 and is_published=true" >
+ <Log message="generating include for image id: ${fpimage.id}" type="info" />
+
+ <Generate
+ generator="/fpinclude.template"
+ destination="${config.storageRoot}/fpincludes/${fpimage.id}.inc" />
+
+ </Enumerate>
+
+
+ <List key="fpincludes" table="image" selection="to_media_folder=8 and is_published=true" />
+ <Generate
+ generator="/fpmapping.template"
+ destination="${config.storageRoot}/fpincludes/map.txt" />
+
+ </body>
+ </producer>
+
+
+
+
+ <!-- generates a count for each topic -->
+
+ <!-- TODO: add date limit when we actually are going live with this -->
+ <producer name="generateTopicCounts">
+ <verbs>
+ <verb name="doit" />
+ </verbs>
+ <body>
+ <FreeQuery key="topicCounts" query=" SELECT count(c.id) AS count, t.title AS title from content c, topic t, content_x_topic x
+ WHERE c.id = x.content_id AND t.id = x.topic_id GROUP BY t.title ORDER BY length(t.title)"
+ type="set"/>
+
+ <Generate generator="/topiccount.template"
+ destination="${config.storageRoot}/${pathprefix}/topiccount.shtml" />
+ </body>
+ </producer>
+
+
+
+ <producer name="generateRandomTopics">
+ <verbs>
+ <verb name="doit" />
+ </verbs>
+ <body>
+ <Set key="counter" value="1"/>
+ <Enumerate key="category" table="topic t"
+ selection="archiv_url = 'Category' AND (SELECT count(*) from content_x_topic where topic_id = t.id) > 0" order="RANDOM()" limit="4">
+ <Log message="Getting Last 5 articles for category: ${category.title} - counter: ${counter}" />
+ <Define key="topictitle" value="${category.title}" />
+
+
+ <List key="randomarticles" table="content"
+ selection ="id in (select content_id from content_x_topic where topic_id = ${category.id})" order="date DESC"
+ limit="5" />
+
+ <Generate
+ generator="/randomcategory.template"
+ destination="${config.storageRoot}/fpincludes/random${counter}.inc" />
+
+
+ <Set key="counter" value="counter+1" />
+ </Enumerate>
+ </body>
+ </producer>
+