Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
65 lines (32 sloc) 3.32 KB

How to customize the editor

If you run your own 1999 server you can customize the experience for people using the 1999 editor by adding an object to your config.json file.

These customizations are totally optional.

An example

Here's an example config.json that contains a homePage object.

Two items are specified in that object, productnameForDisplay and urlPageTemplate.

productnameForDisplay

This sets the string that appears in the upper left corner of the editor.

I've set it to BloatWare for my test server. Here's a screen shot showing what that looks like.

If you're hosting blogs for other people, you might want to change that to the name of your organization.

urlPageTemplate

This sets the address of the default template used for rendering pages.

It must be the address of a plain text file containing the HTML code with macros for the template file.

It can be a local URL on your server, as shown in the example. I put the file in publicFiles/data/mytemplate.html.

But you don't have to put it on your server, you can put it anywhere that's publicly accessible by your users' machines.

If the user designs their own template it overrides this choice. It's only used when the user has not customized their template, or we can't read the user's template.

How to test

If you want to experiment with the urlPageTemplate feature, and have already edited the template using the outliner, and you're running your own server...

  1. Open your sub-folder of the publicFiles folder on the server.

  2. Delete template.opml.

Here's a screen shot showing the location of template.opml in my server folder.

Now when 1999.io renders your pages it will use the default template as specified in your homePage object.

googleAnalyticsAccount

Sets the default Google Analytics account for blogs hosted on your server.

Here's an example config.json that illustrates.

The feature is fully explained in a post on the 1999.io blog.

urlHomePageIntroText

When the user accesses the home page of your site, without being logged in, a message is displayed that says "Please sign on to Twitter to access your stuff."

You may want to say more. This option lets you control the text and the layout of the text that the user sees.

Here's an example config.json that illustrates, and this is what it looks like when you visit.

Do a view-source on the page we link to from the urlHomePageIntroText value. You can see that we put the text inside the same div that the default text is in, and we center it, as the default text is centered. You can lay it out any way you want, or stay with this way of formatting.

If you have more to say and want to link to other pages, you probably should come up with a better layout for text reading.