Skip to topic | Skip to bottom
Home
Search:

Local
Local.UkMirRegionalPublishPageHOWTOr1.4 - 21 Feb 2006 - 16:10 - DaMishtopic end
You are here: Local > ImcUk > ImcUkTech > UkMirRegionalPublishPageHOWTO

Start of topic | Skip to actions

This page is about the steps required to create a regional publish page.

Java Files

This is all in setup_uk/etc/extrasource/

Edit IMCUKOpenPostingLocalizer.java Copy the cambridge section (commented in code). You need to know your region number.

The Cambridge code is

    if (aSessionType!=null && "cambridgecomment".equals(aSessionType)) {
      return new IMCUKCommentPostingHandler("Cam");
    }

    if (aSessionType!=null && "cambridgearticle".equals(aSessionType)) {
      return new IMCUKArticlePostingHandler(configuration.getBoolean("Localizer.OpenSession.PersistentUploadedFiles"), "Cam");
    }

So you would have to replace "cambridgearticle" with "YOURREGIONarticle" and "Cam" with "YOURREGIONSHORT"

config.properties

You need to add

Localizer.OpenSession.article.YOURREGIONSHORTEditTemplate = YOURREGION/editarticle.template
Localizer.OpenSession.article.YOURREGIONSHORTDupeTemplate = YOURREGION/dupearticle.template
Localizer.OpenSession.article.YOURREGIONSHORTDoneTemplate = YOURREGION/donearticle.template
Localizer.OpenSession.article.YOURREGIONSHORTUnsupportedMediaTemplate = YOURREGION/unsupportedmediatype.tem

Localizer.OpenSession.comment.YOURREGIONSHORTEditTemplate = YOURREGION/editcomment.template
Localizer.OpenSession.comment.YOURREGIONSHORTDupeTemplate = YOURREGION/dupecomment.template
Localizer.OpenSession.comment.YOURREGIONSHORTDoneTemplate = YOURREGION/donecomment.template
Localizer.OpenSession.comment.YOURREGIONSHORTUnsupportedMediaTemplate = YOURREGION/unsupportedmediatype.template

Templates

You need to add a directory - etc/open/YOURREGION/

Copy the contents of etc/open/cambridge/ to your new directory

Replace the contents of header.template with the relevant stuff from your region. Edit disclaimer.inc if appropriate.

Edit editarticle.template and replace any reference to cambridge with YOURREGION

You will also need to change any links to the publish page to point to /en/regions/YOURREGION/static/prepublish.html This is normally found in etc/producer/YOURREGION/navigation.publish.template

Prepublish Page

You will need to add a static page as the prepublish page. Make sure the "context title" is filled in as "prepublish". Copy the details from the cambridge page and change the links to be

<input type="hidden" name="sessiontype" value="YOURREGIONarticle"/>

rather than cambridgearticle. (This is in multiple places). And make any other changes you want to make aswell.

CSS

You need to add a little bit to the CSS to make the forms appear nicely.

/* ------------ */
/* PUBLISH PAGE */
/* ------------ */
div.publishpage h2 {
   display: block;
   width: auto;
   border: 1px solid #aaa;
   margin: 3px 0px 10px 0px;
   padding: 4px;
   background: #eee;
}

/* ----- */
/* FORMS */
/* ----- */
form {
border: 0;
padding: 0;
margin: 0;
}
input {
margin: 4px 0 2px 0;
font: 100% Arial, Helvetica, sans-serif;
}
textarea {
margin: 4px 0 2px 0;
font: 100% Arial, Helvetica, sans-serif;
}
fieldset {
margin: 15px 10px 15px 10px;
padding: 15px;
}

/* table for checkboxes */
table.widetable {
width: 100%;
}

And maybe some other stuff. To be added the next time it's done and found to be needed.

-- DaMish - 22 Jan 2006
to top


You are here: Local > ImcUk > ImcUkTech > UkMirRegionalPublishPageHOWTO

to top

Copyright © 1999-2008 by the contributing authors.
All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding this tool? Send feedback (in English, Francais, Deutsch or Dutch).