[Imc-cambridge] UK newswire on regional start pages

Liz efearon at gmail.com
Tue Jan 9 10:14:55 PST 2007


Thanks Zak!

I'd be up for reducing the number of regional articles even more than
that (at least in Cambridge) as you still have to scroll pretty far
down past where the features end to see the UK newswire. I actually
thought that I was missing something as I didn't see it at all at
first.

It might be good to have the UK newswire bit apparent as you open the
page, ie without lots of scrolling. Or do you think that would reduce
the number of immediately viewable regional articles too  much? Could
this be fixed by ensuring that the 'newswire Archive' link was more
prominent? It could maybe also sound less 'historical' by just having
a 'Read more regional articles' button.

Liz

On 1/9/07, AndyT <wheresmyhat at gmail.com> wrote:
> Nice work Zak, first steps on the way to that 'radical redesign' we
> talked about some time ago.
>
> Can you do the same with the UK features as well? Because if you could
> we could try and mock up that 'radical redesign' minus the 'Global
> Section', which would be your next task :)
>
> I'm having a bit of a 'it's the new year' tidy up of Projects and what
> not at the moment, so when I get to the 'radical redesign' stuff I'll
> try and sum up where it got to on this list.
>
> Rock on,
> a!
>
> On 07/01/07, Zak <zak at riseup.net> wrote:
> > Hi all,
> >
> > I've got a proof-of-concept here for putting the UK newswire on regional
> > start pages:
> >
> >   https://zak.dev.indymedia.org.uk/en/regions/cambridge/
> >
> >
> > I haven't touched the CSS, so there are still some minor issues there,
> > but it shows what's possible.
> >
> > Thoughts welcome.
> >
> >
> > The gory details (see attached diff):
> >
> > In order to support this, I've defined two extra lists in the
> > "regionalstartpage" producer, which may be referred to by the template
> > -- "uknewswire" and "ukpromotednewswire".
> >
> > These contain the latest 20 items from the open and promoted UK
> > newswires respectively (so regions can choose which to use), that do
> > *not* already have the region in question ticked (to avoid duplication
> > with the region's own newswire).
> >
> > This list can then be enumerated in the template in another <div> below
> > the one for the regional newswire, with eg <list ukpromotednewswire as
> > n>...</list>
> >
> > In order to stop it being shunted so far down the page though, I've
> > reduced the length of the regional newswire from 120 articles to 40 --
> > are any regions really so active that this isn't enough for the front
> > page? (If so, I think the answer is better archive navigation rather
> > than an excessively long front page in any case...)
> >
> > Of course it would be nice if this limit on the number of articles
> > fetched could be specified per-region ... though that would probably
> > need an extra column in the topic table, and/or some other way to attach
> > generic metadata to topics.
> >
> >
> > Zak.
> >
> >
> > ? etc/config.properties
> > ? etc/log4j.properties
> > Index: etc/producer/producers.xml
> > ===================================================================
> > RCS file: /cvsroot/imc-uk/setup_uk/etc/producer/producers.xml,v
> > retrieving revision 1.49
> > diff -u -r1.49 producers.xml
> > --- etc/producer/producers.xml  16 Dec 2006 13:54:59 -0000      1.49
> > +++ etc/producer/producers.xml  7 Jan 2007 13:05:14 -0000
> > @@ -834,6 +834,7 @@
> >        <List key="breakingnews" table="breakingNews" limit="10" order="webdb_create desc"/>
> >        <Enumerate key="region" table="topic" selection="archiv_url='regions' and ${topiccondition}">
> >        <Enumerate key="promotedtopic" table="topic" limit="1" selection="filename='promoted'" order="id asc"/>
> > +      <Enumerate key="uktopic" table="topic" limit="1" selection="filename='uk'" order="id asc"/>
> >
> >          <List key="startspecial" table="content c" limit="1" extratables="content_x_topic cxt"
> >            selection="is_published=true and to_article_type in (${articletype.startspecial}, ${articletype.topicspecial}) and c.id=cxt.content_id and ${region.id}=cxt.topic_id"
> > @@ -843,14 +844,26 @@
> >            selection="c.is_published=true and c.to_article_type in (${articletype.feature}, ${articletype.oldfeature}) and c.id=cxt.content_id and ${region.id}=cxt.topic_id"
> >            order="webdb_create desc"/>
> >
> > -        <List key="newswire" table="content c" limit="120" extratables="content_x_topic cxt"
> > +        <List key="newswire" table="content c" limit="40" extratables="content_x_topic cxt"
> >            selection="c.is_published=true and c.to_article_type=${articletype.newswire} and c.id=cxt.content_id and ${region.id}=cxt.topic_id"
> >            order="webdb_create desc"/>
> >
> > -        <List key="promotednewswire" table="content c" extratables="content_x_topic cxt1, content_x_topic cxt2" limit="120"
> > +        <List key="promotednewswire" table="content c" extratables="content_x_topic cxt1, content_x_topic cxt2" limit="40"
> >            selection="c.is_published=true and c.to_article_type=${articletype.newswire} and ${region.id} = cxt1.topic_id and c.id = cxt1.content_id and ${promotedtopic.id} = cxt2.topic_id and c.id=cxt2.content_id"
> >            order="webdb_create desc"/>
> >
> > +        <!-- These should use a LEFT JOIN rather than a subquery for efficiency.      -->
> > +       <!-- However, Mir's SQL generation sadly doesn't appear to be sufficiently    -->
> > +       <!-- flexible (if you put the LEFT join in extratables, it can't see "c", and -->
> > +       <!-- if you put it in table, it disappears altogether).                       -->
> > +       <List key="uknewswire" table="content c" extratables="content_x_topic xc1" limit="20"
> > +         selection="c.is_published=true and c.to_article_type=${articletype.newswire} and ${uktopic.id} = xc1.topic_id and c.id = xc1.content_id AND NOT EXISTS ( SELECT * FROM content_x_topic xc2 WHERE xc2.content_id = c.id AND xc2.topic_id = ${region.id} )"
> > +         order="webdb_create desc"/>
> > +
> > +       <List key="ukpromotednewswire" table="content c" extratables="content_x_topic xc1, content_x_topic xc2" limit="20"
> > +         selection="c.is_published=true and c.to_article_type=${articletype.newswire} and ${uktopic.id} = xc1.topic_id and c.id = xc1.content_id and ${promotedtopic.id} = xc2.topic_id and c.id=xc2.content_id AND NOT EXISTS ( SELECT * FROM content_x_topic xc3 WHERE xc3.content_id = c.id AND xc3.topic_id = ${region.id} )"
> > +         order="webdb_create desc"/>
> > +
> >          <LTGenerate
> >            generator="/${region.filename}/startpage.template"
> >            destination="${region.archiv_url}/${region.filename}/index.html"/>
> > Index: etc/producer/cambridge/startpage.template
> > ===================================================================
> > RCS file: /cvsroot/imc-uk/setup_uk/etc/producer/cambridge/startpage.template,v
> > retrieving revision 1.13
> > diff -u -r1.13 startpage.template
> > --- etc/producer/cambridge/startpage.template   16 Jan 2006 12:47:07 -0000      1.13
> > +++ etc/producer/cambridge/startpage.template   7 Jan 2007 13:05:14 -0000
> > @@ -301,6 +301,39 @@
> >  /></a></p>
> >  </div>
> >
> > +<!-- UK promoted newswire fragment -->
> > +<h2>UK Newswire</h2>
> > +
> > +<div id="newswire">
> > +<list ukpromotednewswire as n>
> > +<img alt="${n.to_media_icon.icon_alt}" src="${n.to_media_icon.tiny_icon}" width="12" height="10" />
> > +<p><a href="/${language.code}/${n.date.formatted.yyyy
> > +}/${n.date.formatted.MM}/${n.id}.html">${utility.encodeHTML(n.title)}</a> <em>${n.creationdate.formatted["dd-MM-yyyy HH:mm"]}
> > +  <if n.commentstatuscount.promoted != "0">
> > +    <if n.commentstatuscount.promoted == "1">
> > +      | 1 addition
> > +    <else>
> > +      | ${n.commentstatuscount.promoted} additions
> > +    </if>
> > +  </if>
> > +  <if n.commentstatuscount.normal != "0">
> > +    <if n.commentstatuscount.normal == "1">
> > +      | 1 comment
> > +    <else>
> > +      | ${n.commentstatuscount.normal} comments
> > +    </if>
> > +  </if>
> > +</em></p>
> > +</list>
> > +
> > +<p><strong><a
> > + href="/${language.code}/newswire/archive.html" title="The complete ${utility.encodeHTML(uk.title)} Newswire archive.">${lang("navigation.newswirearchive")}</a></strong></p>
> > +
> > +<p><a href="/${language.code}/newswire.rss" type="application/xml" hreflang="en" rel="alternate syndication"
> > + title="${utility.encodeHTML(uk.title)} ${lang("navigation.rss.newswire")}"><img src="/img/xml.gif" alt="XML" width="36" height="14" class="xml"
> > +/></a></p>
> > +</div>
> > +
> >  </div>
> >
> >  </body>
> >
> >
> > --
> > Imc-cambridge mailing list
> > Imc-cambridge at lists.indymedia.org
> > http://lists.indymedia.org/mailman/listinfo/imc-cambridge
> >
> >
> >
> --
> Imc-cambridge mailing list
> Imc-cambridge at lists.indymedia.org
> http://lists.indymedia.org/mailman/listinfo/imc-cambridge
>



More information about the Imc-cambridge mailing list