You install the executer.cgi script from www.smartcgis.com in your cgi-bin, and then you can include the results of many cgi scripts right in your standard html and cgi pages. It's working pretty well for me with the calendarscript.
A couple neat things about it with respect to the calendar is that it can cache results for a configurable amount of time, so your calendar.pl wouldn't be getting hammered as often unnecessarily. For example, if you have a 30 day list of events showing in your webpage, you could set the cache period to an hour or two.
PLUS...it appears to support command line arguments, so you can pass templates and arguments to it, which gets around some of the limitations of the SSI method. I'm passing a template at least, so I suppose you could pass some other arguments to get different displays or calendars to show.
Regards,
Matt
here's a link to what i'd like to include with the JS tags...(see output below) http://www.yullah.com/cgi-local/executer.cgi?http://www.yullah. com/cgi-local/calendar.pl?template=weekssi.shtml --and of course here's what i'd expect it to look like: http://www.yullah.com/cgi-local/calendar.pl?template=weekssi.shtml --it seems like a simple syntax issue, the script is just printing the JS stuff that shouldn't be showing up... anyone have any suggestions?--
p.s. otherwise, the JS code i run, <script src="http://www.yullah.com/cgi-local/executer.cgi?http://www.yullah.com/cgi-local/calendar.pl?template=weekssi.shtml"></script>just doesn't run in my html pages, i get a javascript error and nothing shows up where the script info should be..._______________________________________________
document.writeln(' '); document.writeln(' '); document.writeln(''); document.writeln(' '); document.writeln(' '); document.writeln(''); document.writeln(' '); document.writeln(' '); document.writeln(' '); document.writeln(' '); document.writeln(' '); document.writeln(' Monday, February 24 '); document.writeln(' '); document.writeln(' '); document.writeln(' '); document.writeln(' Location '); document.writeln(' Event '); document.writeln(' '); document.writeln(' '); document.writeln(' '); document.writeln(' '); document.writeln(' '); document.writeln(' '); document.writeln(' '); document.writeln(' Washington, DC '); document.writeln(' '); document.writeln(' '); document.writeln(' '); document.writeln(' '); document.writeln(' The Evolving Status of Women in the Arab World: Culture, Faith, and Law '); document.writeln(' '); document.writeln(' '); document.writeln(' '); document.writeln(' '); document.writeln(' '); document.writeln(' '); document.writeln(' '); document.writeln(' Tuesday, February 25 '); document.writeln(' '); document.writeln(' '); document.writeln(' '); document.writeln(' Location '); document.writeln(' Event '); document.writeln(' '); document.writeln(' '); document.writeln(' '); document.writeln(' '); document.writeln(' '); document.writeln(' '); document.writeln(' '); document.writeln(' Washington, DC '); document.writeln(' '); document.writeln(' '); document.writeln(' '); document.writeln(' '); document.writeln(' Films @ Center for Policy Analysis on Palestine '); document.writeln(' '); document.writeln(' '); document.writeln(' '); document.writeln(' '); document.writeln(' '); document.writeln(' '); document.writeln(' '); document.writeln(' '); document.writeln(' '); document.writeln(' '); document.writeln(' '); document.writeln('
Powered by Smart CGIs');
------------------
[This message has been edited by yullah (edited February 24, 2003).]
quote: but there seems to be a minor glitch in the code somehow- i get document.writeln(' '); all over the place... the script is just printing the JS stuff that shouldn't be showing up...
If you look at the calendar's output source code, you'll see there are an enormous number of blank lines. Each document.writeln(' '); statement will correspond to one of them which should not effect the operation of it.
Dan O.
[This message has been edited by DanO (edited February 24, 2003).]
for some reason when i use
code:<script src="http://www.yullah.com/cgi-local/executer.cgi?http://www.yullah.com/cgi-local/calendar.pl?template=ssi.html"></script>
<script src="http://www.yullah.com/cgi-local/executer.cgi?http://www.yullah.com/cgi-local/calendar.pl?template=ssi.html"></script>
it only works if the ssi.html is set to "&getEvents( {'duration'=>$in{duration}} );"
code:<%&getEvents( {'duration'=>$in{duration}} );$DAY = $Grid->{'grid'}->->;$EVENTS = $DAY->{events};$total_events=0;%><DL><%FOREACH EVENTLIST%> <%IF EVENTS EXIST%> <%$total_events++;%> <DT><%=$DAY->{dayname}%>, <%=$DAY->{monthname}%> <%=$DAY->{dd}%> <DD> <%FOREACH EVENT%> <% if ($EVENT->{'schedule'}->{'start_time'}) { %><%= $EVENT->{'schedule'}->{'start_time'} %><% } %> <% if ($EVENT->{'schedule'}->{'end_time'}) { %>-<%= $EVENT->{'schedule'}->{'end_time'} %><% } %> <% if ($EVENT->{'schedule'}->{'start_time'}) { %> : <% } %> <%= $EVENT->{'details'}->{'title'} %><BR> <%/FOREACH%> <%/IF%><%/FOREACH%></DL><%unless($total_events){%><CENTER><I>No Events</I></CENTER><% } %><A HREF="<%=$AdminConfig->get("calendar_url")%>?calendar=<%=$calendar_key%>">View Calendar</A>
<%&getEvents( {'duration'=>$in{duration}} );$DAY = $Grid->{'grid'}->
when i change the top part of the code to
code:<%&getEvents( {'duration'=>'3d'} );$DAY = $Grid->{'grid'}->->;$EVENTS = $DAY->{events};$total_events=0;%>
<%&getEvents( {'duration'=>'3d'} );$DAY = $Grid->{'grid'}->
this also happens if i point to any other template file other than ssi.html (i.e. weekssi.html)
I would like to include weekssi.html or .shtml with this script but i have no CLUE why it's not working. (i'm currently calling weekssi.shtml on my home page http://www.yullah.com using SSI but i'd like to be able to call it from remote servers.
i don't know if it makes any difference, but my ssi.txt is set to
code:template=ssi.shtmlduration=5d
template=ssi.shtmlduration=5d
I've been at this for like 7 hours straight and can't find an answer- I know it may not be directly a calendarscript issue, but to the extent that it might be, i'm hoping someone can help de-bug my brain a little bit here...
also i know you guys really know your stuff and any advice is really appreciated!!!
thanks in advance!!!
The ssi.txt file will only be referenced when calendar.pl file is really called via SSI. Otherwise you'll have to pass all of the variables you want used in the call to it. Eg. http://www.yullah.com/cgi-local/calendar.pl?template=weekssi.shtml&duration=5d& calendar=default
(You may not need the &calendar=default if you're just displaying the default calendar's events.)
I don't know why it's generating JavaScript errors, maybe you could ask the executer script's author for assistance? Although, it may have something to do with the javaScript code you have in the weekssi.shtml file.
quote:Although, it may have something to do with the javaScript code you have in the weekssi.shtml file.
the strange thing is that when i edit ssi.html to call 3days of events, it gives me the same error. it's like any changes made to ssi.html give an error, so i was thinking maybe there's something magical about that file name - that it;s called somewhere else or refernced somehow in a way that will give me errors if it's edited...
anyway i guess i'll have to give up on this one for now...
but if anyone has the solution i'll pay you!!! :-)
thanks for your help DanO!
You don't have to edit the template file just to call a different number of days. As I stated, you just pass that information in the query string.
Good luck.
Thanks for the tip on that duration bit DanO- that did help a bit...
my concern though is that i want to edit ssi.html further, more than just the change in duration, to format and allow the events to be linked to the details page...
(compare the two links above)
i did take the javascript out of weekssi.shtml, and i still get those errors.
anyway thanks again for your help, i do appreciate it!
maybe some things just aren't meant to be i guess :-)
code:document.writeln('<!--#include virtual="/cgi-local/calendar.pl?template=weekssi.shtml" -->');
document.writeln('<!--#include virtual="/cgi-local/calendar.pl?template=weekssi.shtml" -->');
As far as I'm aware, all Javascript statements should be on a single line like:
You'd have to contact that script's author about that.
quote:You definitely can't grab SSI tags with it. It just doesn't work well with complicated html either. I will tryt o improve it by the next version.
memobug i don't know how you got this to work but i'd love to get a look at some of your code!!!
thanks DanO for your help...
Were you expecting to? That's not the purpose of the script.
quote:** You definitely can't grab SSI tags with it. **Were you expecting to? That's not the purpose of the script.
yeah, I know that, and you know that, but the author of the script wasn't too helpful. I gave him a ton of information and he came back with this answer.
what i *was* expecting it to do was work as memobug got it to do...
quote:I found a cgi program online that will let you get a SSI Server Side Includes CGI EXEC effect with just a Javascript link.
i expected it to be able to grab info from the calendar script / template to post to other pages.
but, no such luck there.
was i inaccurate in my expectations?
Sounds right unfortunately I guess the code you asked him to look at had an SSI tag in it and that confused things?
Did you point out to him about the JavaScript tags being printed on 2 lines instead of just one?
BTW. If you can't get it to work, can you not just display the SSI template's output in an iframe tag on your other site?
quote:Did you point out to him about the JavaScript tags being printed on 2 lines instead of just one?
yeah i did point that out...
i've pretty much given up on using that method though.
I've never been a big fan of frames, but that might be worth a shot- is the iframe tag difft from regular frames?
i'd like to be able to display a line or two of code that webmasters can add to thier sites to display a few days of events on thier webpage that will link back to my calendar...
maybe frames will be the only way to do this, but it doesn't seem very efficient to have a scrolling list of events at the top / bottom / side of a site, as much as it would integrated into the rest of thier content...
i'm off to do some research on this method, thanks for the tip!!!
(if you can point me to a resource with more info on iframes it would be appreciated!)
thanks!!!
using
<iframe src="/cgi-bin/calendar.pl"><ilayer src="/cgi-bin/calendar.pl"></ilayer><nolayer><a href="/cgi-bin/calendar.pl">calendar</a></nolayer></iframe>
from the following post... http://www.calendarscript.com/support/forum/Forum5/HTML/000102.html
it seems to be working pretty well. i hope this will work cross browser etc...
Thanks so much for all your help!!!