Help with PERL includes

Discuss news styles, css code, and other Coranto customizations in here...the possibilities are endless, so have at it!

Moderator: Spunkmeyer

Help with PERL includes

Postby Jerobi » Sun Jan 15, 2006 10:34 pm

Can someone help me out with a file include? I'm mainly a VBScript guy, so PERL isn't my strong suit.

To keep this short, I want to do a file include from within an ISay page. This won't work:

<!--#include virtual="readme.txt"-->
<!--#include file="readme.txt"-->

(and yes, this readme.txt is in the same main coranto path)

Is there something I can do with <PerlCode> blah some include code </PerlCode>? Is there some PERL code I can sneak into iSay.cgi, perhaps to make a <Insert: thisPageForMe> work from within the iSay template? I've been trying things for an hour or two now and could use some advice.

Ideally I'd like to include a test.asp page. Will this even be possible?
Jerobi
 
Posts: 72
Joined: Fri Mar 02, 2007 5:21 pm

Postby Jerobi » Sun Jan 15, 2006 11:02 pm

Additional searches led me to FakeSSI, which I was able to use to get the text inside the readme.txt file to spit out. That's a start.

Do I have any chance of the .asp file being included with this method? When I point the FakeSSI to it, it doesn't bring it up.
Jerobi
 
Posts: 72
Joined: Fri Mar 02, 2007 5:21 pm

Postby Jerobi » Sun Jan 15, 2006 11:20 pm

I'd still love to hear about a more direct solution, if anyone has a suggestion!

But for now, let me share my little hack. I changed my .asp to write to a .txt file, and include that in the iSay template. That still leaves the problem of randoming the output (which the .asp is built to do), so I'm calling that page inside my home page. That's a bit of ugly overheard I'd prefer to avoid, but for now at least it works.
Jerobi
 
Posts: 72
Joined: Fri Mar 02, 2007 5:21 pm

Postby Parahead » Mon Jan 16, 2006 7:36 pm

jerobi wrote:I'd still love to hear about a more direct solution, if anyone has a suggestion!
If you want the long story, read this thread from page one and to the bitter end, very educational... However, if you don't want to do that, I would recommend the first post on page 3 of that thread, the "LWP::Simple"-solution...
Yes, I am still around...
www.parahead.com/coranto/
User avatar
Parahead
 
Posts: 4837
Joined: Fri Jan 12, 2007 8:54 pm
Location: Stockholm - Sweden

Postby leeerickson2050 » Wed Jan 18, 2006 4:08 pm

Remember to name your .html page to .shtml (This tells your server how to treat this type of file.)
Lee Erickson
User avatar
leeerickson2050
 
Posts: 22
Joined: Wed Jan 11, 2006 7:55 pm
Location: Huntsville, AL

Postby Parahead » Wed Jan 18, 2006 9:31 pm

leeerickson2050 wrote:Remember to name your .html page to .shtml (This tells your server how to treat this type of file.)
Yes, normally this would be the case. However, the thing is that it was from a iSay page he wanted to include the file and an iSay page is actaully a style parsed by calling iSay.cgi and not a html/shtml-page, hence the same problem occurs as including files from within a style used by viewnews.cgi. That is why I provided the link to that thread above...
Yes, I am still around...
www.parahead.com/coranto/
User avatar
Parahead
 
Posts: 4837
Joined: Fri Jan 12, 2007 8:54 pm
Location: Stockholm - Sweden

Postby faithless » Thu Jan 19, 2006 12:10 pm

If it's an iSay template you're modifying, <Insert: File='FilePath'> will work in 0.16 and up.
faithless
 
Posts: 1335
Joined: Wed Oct 16, 2002 4:17 pm
Location: Infront of the Computer


Return to Customization

Who is online

Users browsing this forum: No registered users and 1 guest

cron