Check out Grant Acedrex, our featured variant for April, 2024.


[ Help | Earliest Comments | Latest Comments ]
[ List All Subjects of Discussion | Create New Subject of Discussion ]
[ List Earliest Comments Only For Pages | Games | Rated Pages | Rated Games | Subjects of Discussion ]

Comments/Ratings for a Single Item

Earlier Reverse Order Later
Switching from Perl headers to PHP headers[Subject Thread] [Add Response]
🕸Fergus Duniho wrote on Sun, Apr 1, 2012 03:45 PM UTC:

To add a ratings system and a login form to the header, I will need to write the header in PHP, not Perl. Maybe it could be done in Perl, but I normally write in PHP, PHP has natural integration with HTML, and its syntax is more like C. So I prefer to use PHP. The problem is that the header files called by most of the pages here are Perl CGI scripts, and I can't just write PHP in a .cgi file. Nor have I found a way to call a PHP script from a Perl script. So it looks like I will have to rewrite all the HTML files that call headerscript.cgi or other Perl headers. This seemed like a time-consuming task until I realized I could write a script to recursively load and edit all the HTML files on the site. I'll test it on one file before I go recursive through the whole site. While I'm at it, I'll also see about converting pages to UTF-8. So I'll find a page using Latin-1 and test it on that. If it works, site-wide conversion to UTF-8 will be much easier. I'll get on this after work.


🕸Fergus Duniho wrote on Mon, Apr 2, 2012 01:23 AM UTC:
I changed the headers in the HTML files, but not without mishap. The first
time through, it used the filename without the path, and the result was
that everything got written to the main directory. This caused files in the
main directory with the same name as files in subdirectories to be
overwritten. I replaced shogi.html and xiangqi.html from my harddrive, but
I lost index.html, and I'm not sure what else may be lost. Perhaps David
will have backups of anything that may be lost from the main directory.

🕸Fergus Duniho wrote on Mon, Apr 2, 2012 01:49 AM UTC:
I retrieved and edited a copy of index.html from archive.org.

3 comments displayed

Earlier Reverse Order Later

Permalink to the exact comments currently displayed.