KW802
07-26-2004, 11:36 AM
OK, I'm waving the white flag on this one, I give up..... :o
I have an old CGI script that reads through a flat file and outputs three different HTML tables, one for birthdays, reminders, and events that took place on a particular date. If there were no birthdays, for example, found in the flat file then that particular HTML table is not created so the output could be either blank or from 1 to 3 HTML tables. The CGI script is using "print" statements for it's output.
What I've done so far in order to turn this into a CMPS module is to (a) create a PHP wrapper that executes the CGI script and captures the results into a variable and then (b) I created a template with nothing in it other than the name of the variable from the PHP wrapper (since, remember, the HTML tables are produced in the CGI script).
Now so far that went pretty easy and I was getting output like I was expecting. The problem I ran into is that the tables in the CGI script, of course, aren't looking like the rest of the modules on the screen. No problem, I thought, I'd just change the HTML code in the CGI script to mimic the usual generic CMPS template. Oh, that's when the fun began.
First problem was that when I put the variables like $vba_options[portal_blockbullet] into the CGI script it would interpret it as a local variable so since that variable wasn't assigned locally it wouldn't display anything. OK, no problem. I just put a slash "\" in front of the $ so that it would treat it as a literall instead of a local variable.
Well, now the output is literally displaying $vba_options[portal_blockbullet] instead of treating it as a local variable once it gets to the PHP wrapper. :(
Any thoughts? Am I up the river on this one?
I have an old CGI script that reads through a flat file and outputs three different HTML tables, one for birthdays, reminders, and events that took place on a particular date. If there were no birthdays, for example, found in the flat file then that particular HTML table is not created so the output could be either blank or from 1 to 3 HTML tables. The CGI script is using "print" statements for it's output.
What I've done so far in order to turn this into a CMPS module is to (a) create a PHP wrapper that executes the CGI script and captures the results into a variable and then (b) I created a template with nothing in it other than the name of the variable from the PHP wrapper (since, remember, the HTML tables are produced in the CGI script).
Now so far that went pretty easy and I was getting output like I was expecting. The problem I ran into is that the tables in the CGI script, of course, aren't looking like the rest of the modules on the screen. No problem, I thought, I'd just change the HTML code in the CGI script to mimic the usual generic CMPS template. Oh, that's when the fun began.
First problem was that when I put the variables like $vba_options[portal_blockbullet] into the CGI script it would interpret it as a local variable so since that variable wasn't assigned locally it wouldn't display anything. OK, no problem. I just put a slash "\" in front of the $ so that it would treat it as a literall instead of a local variable.
Well, now the output is literally displaying $vba_options[portal_blockbullet] instead of treating it as a local variable once it gets to the PHP wrapper. :(
Any thoughts? Am I up the river on this one?