Back to Imc UK |
Back to UK Tech | Back to
UkMovingToMir
UK IMC Regional Pages Setup HOWTO
Please note the process of changing regional templates are set up and updated is in flux. These instructions should only be used as a guide in consultion with those developing these new working practises who can be found via the
uk tech list or often on irc.indymedia.org in #uk.
Dev Server
There is a new dev server being set up, see
UkDevServer, so new templates can be tested - watch this space - if you manage to set up one before let us know.
Codecoop
There is a CVS respository on
codecoop where the templates can be checked into instead of directly into live site. They can be looked over there before going to new site. Anyone can check out templates to look at and work on. The module name is setup_uk, the
uk templates project page has links the the
cvs details and the the
new account page. Ask in #uk to have your login added to the project.
To check out the template with write access you need to use SSH, there is some
documentation, which explains
how to use cvs on codecoop and
how to upload a SSH-key.
UkMirRegionalPagesSetupOptions
Also these instructions are to set up layout and colour scheme and features of regional page not the content itself that is done with much more ease via web based admin interface.
The regional pages on UK MIR
Regional IMC's have their own subdirectory in setup_uk/etc/producer (
View directory in CVS (updated via codecoop for dev before live), where they can put all their regional templates. The idea is that the regional IMC's can fully customize all their regional pages. The current regional subdirectories are: cambridge, london, manchester, oxford, scotland, sheffield, southcoast, westcountry, world. The current regions in the list of UK regional IMC's in the left column are: cambridge, london, manchester, oxford, sheffield, southcoast, westcountry, world. Also included in this left column are links to Bristol and Scotland IMC's, which are for now treated as completely independent IMC's.
Step-by-step HOWTO set up a fully customizable regional IMC from the cambridge templates
1) Make sure you read the
UkMirCvsWorkflowHOWTO. Then check out the templates using "cvs co setup_uk".
2) If your region doesn't have its subdirectory, create it in /etc/producer and cvs add it. It is important to note that each region has a "region_filename", which is the name of the subdirectory (lower case), and a "region_title", which is the name of the region as you want it to appear in the left column navigation.
3) Copy all the files from /etc/producer/cambridge (or which ever existing regional page you like look and style of ) to your regional subdirectory, and cvs add all of them.
4) The templates are built in such a way that the whole layout is done in the stylesheet "stylesheet.template". So to fully customize your regional site, you just have to modify as you wish your stylesheet. You don't have to change the html codes of the templates unless you really want to (there are no Tables or Fonts or stuff like that anymore in the html codes). To customize your stylesheet, either you go through all the templates to fully understand what means what in the stylesheet (it shouldn't be too difficult, although there are no comments in the stylesheet yet unfortunately), either you only change the colours using some sort of "find and replace" functions. See:
ImcScotlandMirStyle
There is not a moment a good set of plain well documented templates / stylesheets as a copy starting point, but in future there may be.
5) To put your own banner, copy it to /site/img (no longer in this location - check first), cvs add it (don't forget it's a binary file, i.e. cvs add -kb filename.png), then in "stylesheet.template", go in "div.header" and change "url(/img/oxford-imc.jpg)" for your own url.
image now in header.template
6) Commit your changes (cvs ci), ssh
uk@kosmos.indymediaSTOPSPAM.de,
cd /var/www/uk.indymedia.de/mir/etc/producer/~newregion~/, cvs up -dP, cd /var/www/uk.indymedia.de/mir, ant (see
UkMirCvsWorkflowHOWTO for more details).
where ~newregion~ is your new region name eg westmidlands
7) To add your name to the list of UK regions in the left column, go to the
admin section, in "super-user functions", "manage topics", and click on "add". Fill in the following fields:
Name: Your region_title (as you want it to appear in the left column, with capital letters)
description: The description of your regional IMC.
Filename: Your region_filename (lower case, i.e. the name of your subdirectory)
Name of startpage template in etc/producer: The name of your startpage file, i.e. "region_filename/startpage.template".
Archive url: regions
8) In the admin section, go to "EXTRA - edit include files", click on your region, then edit "events.inc" to put your local events in the right column of your regional page, and edit "links.inc" to put your local links in the left column. You have to use html codes in these two files, have a look at the code in events.inc and links.inc of oxford to know how to do it (just copy it and change the events and links and titles). If your region is not there, come to the irc channel and ask for it, we'll have to ask zapata to add your .inc files in the admin section.
9) To make your changes effective and put your pages online, go back to "start", then in "advanced page", and generate in this order: stylesheets, navigation, regionalstartpage (generate), regionalnewswirearchive (update), regionalfeaturearchive (update), regionaltopicstartpage (quickupdate), regionatopicnewswirearchive (update), regionaltopicfeaturearchive (update), articles (sample, not all please!

), and finally synchronization (run).
10) In the admin section, to create your own static pages (i.e. editorial, mission, about us, contact, support us, help), you have to write articles in the "regional static" type. To know how to do that, have a look at the actual cambridge regional static pages in "regional static", and do the same for your region! (don't forget to put the correct "context title" in your article and to tick your region). Then "generate all new" and your static pages will be online.
more on creating static pages in admin
You're done! It should work (it might take a couple of minutes for the site to be updated, be patient)! Then just play with the stylesheet to customize your regional site!
Details of all the files in your regional subdirectory
All these pages can be created using the above HOWTO or from scratch in your regional subdirectory. I put in brackets links to the oxford pages to give examples of what is produced by the regional templates.
Note: to view the cvs of any file, go to
http://cvs.codecoop.org/cgi-bin/cvsweb.cgi/setup_uk/url?cvsroot=imc-uk, with url replaced by the local url of the file you want to view, for example etc/producer/cambridge/startpage.template.
Dynamic templates
startpage.template: your regional startpage (
cambridge startpage)
article.template: when you read an article from your regional startpage (
an example of an oxford article)
archive.template: archive template used for feature archive, newswire archive, topic feature archive and topic newswire archive (
cambridge feature archive)
topicpage.template: topic or action page for your region (
an example of an cambridge topic page)
All these regional pages except the article ones are produced by the corresponding regionalxxxxxxx producers in the admin section (regional. For the article ones, technically, when an article is published on UK indymedia, a general UK html page is produced from the uk article.template and a regional html page is produced from its regional article.template for each regions in which this article is published.
Static templates
static.template: template from which your static pages (i.e. articles editable in the admin section with type "regional static") are produced ( for example
cambridge about us page)
These pages are produced by the "articles" producer, so if you change them you just have to either "generate all new" or "articles.changed" and "synchronization".
The content of static pages are created in admin interface.
Navigation templates
navigation.actions.template: the list of actions pointing to your regional action pages (located at region_filename/navigation.actions.inc).
navigation.archives.template: your regional archive bar, including links to your regional newswire archive and features archive (located at region_filename/navigation.archives.inc).
navigation.banners.template: your regional left "banners", linking to your regional video, radio, offline and cinema static pages (located at region_filename/navigation.banners.inc).
navigation.events.template: your regional hand-coded list of upcoming events (editable from the admin section in "edit include files").
navigation.links.template: your regional list of links (editable from the admin section in "edit include files").
navigation.publish.template: your publish button, linking to the publish from with your region already selected (located at region_filename/navigation.publish.inc).
navigation.top.template: your regional "static pages" bar situated at the top of the pages (located at region_filename/navigation.top.inc).
navigation.topics.template: the list of topics pointing to your regional topic pages (located at region_filename/navigation.topics.inc).
All these navigation tools are produced by the "navigation" producer in the admin section.
Stylesheet
stylesheet.template: your regional stylesheet (located at style/region_filename.css).
The stylesheet is produced by the "stylesheet" producer in the admin section.
For passwords please see your local IMC collective or ask on the
uk-network list to be contacted.
This is a collaborative effort so I guess we'll develop things further even now we're live already. And please don't think I understand everything yet, if I get stuck I have to ask myself

I do this on the #mir channel on
http://chat.indymedia.org . These twiki pages will hopefully help others to start helping out, and help to document it too... Remember, you can edit these pages too! Just register as a twiki user and mail to the uk-network or the uk-tech list to be added to the
ImcUkGroup. Good luck!
--
AndiE - 07 Apr 2003
Added link to
UkMovingToMir --
IonNec 10 Apr 2003
Added 'How to create a new regional startpage', and that (and how) I took off Northern Ireland.
AndiE - 17 Apr 2003
Rearranged the templates in subdirectories --
SocieteLibre - 26 Apr 2003
Added "Details of other regional pages to be customized" --
SocieteLibre - 26 Apr 2003
Added navigation.archives.template --
SocieteLibre - 26 Apr 2003
Added the CSS part --
SocieteLibre - 27 Apr 2003
Added the "Static pages" part --
SocieteLibre - 28 Apr 2003
Added more static pages (linked from the banner) and navigation.banners.template --
SocieteLibre - 05 May 2003
Completely changed the whole page, to fit with the current regional setup. Added a step-by-step HOWTO setup a regional site, and a description of all the files in the regional subdirectories, which can be applied to the UK files as well --
SocieteLibre - 08 Jun 2003
Removed the navigation.publish.template which wasn't relevant anymore --
SocieteLibre - 11 Jun 2003
Updated with the new templates set, new urls, new editable files in the admin section and new generators --
SocieteLibre - 21 Jun 2003
New update for the static pages --
SocieteLibre - 25 Jun 2003
updated a little bit for new live set and changes since
--
SpaceBunny - 07 Jul 2003
chnages linsk from test to live site, and used cambridge rather than oxford as example to copy as more generic in template code and more floating layout
--
SpaceBunny - 04 Jan 2005
Back to Imc UK |
Back to UK Tech | Back to
UkMovingToMir
to top