(This is handled by a Query String with special parser in script)
The field in the record that it is reading, cannot have another SSI.
I wish it could (some serious wishful thinking here)
Or is there another way?
Like in the content of what is read, something could be entered in my editor that would invoke another script or sub routine or ?
I have thought of JavaScript, which could be entered in my editor, but would rather keep away from that.
It's certainly possible for a Perl script to call another Perl script that was originally designed to be accessed via SSI. The CPAN module LWP::UserAgent makes it pretty easy, and it's not outrageously difficult to parse out the <body> content of an HTML page. But it is more complicated to get two Perl scripts to work together than it is to simply insert a <!--#include--> command in an HTML file. Do you know Perl programming or are you using ready-made scripts?
Hi Rick, I write my own (not perfect, but they work).
Let's say ascript.pl reads in the FFDB from SSI in HTML File:
Code:
1|Calling script from data|Okay I have an entry and want to include something else from another script in the entry. How do I do that?<br><br><b>This is my B content</b><br><br><!--#include virtual="/cgi-bin/someting/bbb.pl" --><br><br>The C Content could say<br><br><!--#include virtual="/cgi-bin/someting/ccc.pl" --><br><br>So the actual SSIs are in the flat file database
This returns:
Calling script from data
Okay I have an entry and want to include something else from another script in the entry. How do I do that?
This is my B content
The C Content could say:
So the actual SSIs are in the flat file database
I get the same with relative or full server path in the content SSI's. Both the little scripts just have a bit of text in for testing.
See what I mean?
PS
Thinking about if further. Since I have already grabbed the field, it could be put in a hash and then a while loop looking for certain conditions (instead of the SSI - say **bbb**) and when the condition is met, a require for the bbb script is coded into the read portion of the main script or it returns empty. I'll see if that works.
I'm going about this all wrong (that's me being half awake when I started)
First off it has to be invisible, so a tag must be used.
So - I have a block of text from my database and in it is a tag
Code:
Text text text text text text text text
<bbb>
More text more text more text more text more text more text
.... so that it shows (including from the other sub routine) ....
Text text text text text text text text
Blah blah blah blah blah blah blah
More text more text more text more text more text more text
The object would be to replace that tag with a call to a sub routine which will have changeable content in it.
The rest of the block of text will show as normal, with the sub call content in the middle of it
@td = "$fd[2]";
foreach $line (@td) {
print qq ~$line~;
if ( ~ m/<bbb>/ ) {
## need to something more with this
bbbbb();
} else {print qq ~$line~;}
}
What happens is I see the results of the sub call, but after my block of text, instead of in the middle of it. I think something is needed in the if statement. Not sure how as this is new to me.
Bookmarks