May 12, 2005

2 responses to Week 20: Introducing tsampaPRtable and a decline PR

  1. Alberto Caraballo Says:

    Question, Kris, since I’m not well versed in code. I blog through Blogger. How do I incorporate this code into my blog so that I can use this Matrix (awesome, by the way), or is this a question I should direct to their tech support?

  2. Kris Says:

    AFAIK, Blogger does not provide you with PHP required to run tsampaPRtable on the server live. But fear not, all is not lost.

    What you can do is to generate a html version on your home computer and then paste the output into a blog post (of course, your design will need to take into account the fact that the table will want to expand far right).

    Here are the steps in case you want to give it a go:

    1. Download and install PHP locally:
      assuming you are on Windows, you need to grab this package and the unzip into a folder of your choice. For the sake of illustration, let’s say you unzip into C:/php.
    2. Download tsampaPRtable:
      Grab the zip file, and then extract to a folder of your choice. For the sake of illustration, let’s say you unzip into C:/prtable
    3. Create your own PR file:
      See the tsampaPRtable documentation for how to do this.
    4. Generate the html version:
      Open a Command Prompt (Start -> All Programs -> Accessories -> Command Prompt on Windows XP) and type the following:


      cd c:\prtable


      c:\php\php.exe tsampaprtable.php > prtable.html

      You should now be able to open prtable.html in any browser to see the output.

    5. Paste html into Blogger: Open prtable.html in notepad (or cut n’ paste from View source code in your browser). Remove all code up to and including the <body> tag. Then remove the </body> tag at the end of the file and everything after it. Paste what remains into Blogger and you should have your table up.
    6. Add the stylesheet to your Blogger template: At this point you should have a vanilla PR table up. To get the default stylesheet for the table, you will need to copy everything beginning with the <style type="text/css" media="screen"> line up until the </style> tag from prtable.html into the <head> section into your Blogger template. I don’t know what the Blogger template looks like, but presumably you can modify your header. Ask tech support how to do this if need be. Edit: Better yet, if you have a CSS file for your template, just insert the styling there (omitting the starting and ending <style> tags.

    To update the table after this intial setup, you would need to repeat stages 3-5. Another alternative would be to have your matrix (or even the whole blog) hosted on my server. E-mail me if this sounds interesting.

Comments are closed.