Syndicating Your Articles

313
Syndicating Your Articles

A great way to increase your exposure is through syndication. Allow others to put your content on their site with these simple setup instructions.

You have great articles or images or other content that people would willingly put on their sites.

That is, if it was easy for them.

Well, it is easy! Your syndicating sites put two lines of JavaScript into their pages. That’s all they have to do.

Once those two lines are on their pages, the content on the syndicating sites will update automatically — every time you change the master file on your server.

For example, to carry these WillMaster Possibilities articles on your site, put this JavaScript code on your page in the spot where you want the article to appear:

<script language="JavaScript"
 src="http://willmaster.com/possibilities/c/wmp.js">
 </script>

(It’s okay for the code to be in three lines instead of two.)

Once you have that code on your page, your page will automatically update with the new feature article every Tuesday.

Try it. See for yourself how it works.

In addition to articles, you could syndicate recipes, poems, source code, calendar events, anything on remote sites that wants frequent updating. You could even use it to serve banners and other advertisements.

This is what you do:

First —

Decide on a file name for your master file (it should have a .js file name extension). Also, decide where it will be on your server.

Once you know the name of your master file and where it will be located, then you also know its URL. It will be something like http://www.yourdomain.com/masterfile.js

When you know your master file’s URL, you also know what the JavaScript code for your syndicating sites will be:

<script language=”JavaScript” src=”[MASTERFILE_URL]”>
</script>

Just replace [MASTERFILE_URL] with your master file’s URL. Now you have the JavaScript code to give to your syndicating sites.

Second —

Create your master file.

It’s a bit easier said than done, but once learned it could become more boring than hard.

The thing to remember is that your content will be a part of a web page, not an entire page by itself. So you code your HTML tags with that in mind.

The less specific font styles you specify, the more design control you leave for your syndicating sites. Unless yours is an unusual circumstance, it can be good for syndicating site owner relationships to let them fit your content into their site design.

However you decide to code your content, put it into your master file.

Probably the easiest way is to create a web page with your content and then copy the relevant portion of the source code for pasting into your master file.

Once you have your content in your master file, you need to make it JavaScript compatible before you upload it. Do these in order:

  1. Insert this as the first line of your file:<!–
  2. Insert this as last line of your file://–>
  3. Precede each backslash ( \ ) with another backslash:\\
  4. Precede each apostrophe ( ‘ ) with a backslash:\’
  5. Except for the first and last lines, end each line with:’);(The above code is —
    apostrophe – close parenthesis – semi-colon
    — for those with small font sizes.)
  6. Except for the first and last lines, begin each line with:document.writeln(‘(That last character is an apostrophe.)

Save your file and upload it. Once your master file is uploaded, every syndicating site is automatically updated.

Here are three things you can not include in your syndicated content:

  1. JavaScript code that accesses other files. In other words, you can not include other “syndicating” code in your syndicated content. (You can use most all of the available JavaScript language, but not this.)
  2. CSS when the style sheet is on your server. If you include Cascading Style Sheet code, the definitions must be embedded in your content.
  3. Server Side Includes. SSI can only include files and launch programs that are on the same server as the web page; SSI on syndicating site’s servers can’t reach your server.

Here are two things you should not include in your syndicated content:

  1. Flash, PHP, and other recent technology that requires the domain’s server to run specific software. If you know that all your syndicating sites are on compatible servers, then go ahead and include the technology. But if you don’t know, it is best not to include it.
  2. JavaScript cookie code. It’s not that you can’t set cookies, but the cookie must be set in the name of the domain where the content is being viewed at. It would take a bit of tricky scripting to retrieve the cookie for use later on.

Here is a list of things you can include in your syndicated content:

  1. Any standard HTML tags that would normally go into the BODY section of a web page. This includes
    · sounds,
    · images,
    · forms,
    · tables,
    · headers,
    · plain text, and
    · links, Note — there is an important restriction: ALL URLs (including HREF=…, SRC=…, and ACTION=… URLs) must be complete http://… URLs. The reason is because your content will be on remote servers, and those servers will be unable to correctly resolve your relative URLs.If you use forms or other links to CGI programs, make sure those programs allow input from domains other than your own.
  2. JavaScript code, except JavaScript code that accesses other files. You can use most all of the available JavaScript language, including
    · popup windows,
    · date and time presentations,
    · JavaScript generated hidden form field values,
    · browser detection code, and
    · your own custom functions,
  3. Cascading Style Sheets, when your CSS definitions are embedded in your content. The definitions must not be on your server because the syndicating site’s servers won’t be able to access it.
  4. Hit counters and other links to CGI programs on your or other people’s servers. Just remember to use complete http://… URLs.

As you can see, there are very few restrictions. Just about anything goes so long as you remember that everything your content requires must be included in the content itself.

Happy Syndicating!


ABOUT THE AUTHOR
William Bontrager is a computer programmer and software writer. His company, WillMaster, specializes in software development and implementation that helps businesses increase productivity and run more efficiently.