Welcome to the E-Blah Community!
We would like to welcome you to our community and invite you to register an account or login.
Being a registered member is important, as it gives you several advantages over the normal Guest status. After registering you will be able to download files and images, post messages, and access member-only portions of the forum - just to name a few. Registration is quick and simple, and only takes about a minute of your time.

E-Blah Community    Modifications    E-Blah 10.x Mods  ›  [10.2.5] Calendar Events in Web Pages
Users Browsing Forum
No Members and 1 Guests

[10.2.5] Calendar Events in Web Pages  This thread currently has 670 views. Print
1 Pages 1 Recommend Thread
bengtang
July 15, 2007, 6:59am Report to Moderator Report to Moderator

E-Blah Member
Posts: 18
Gender: Male
Posts Per Day: 0.03
Time Online: 4 hours 46 minutes
Location: uk
Age: 37
I have extensively modified the perl script posted by riffplayer in:
http://www.eblah.com/forum/m-1117815566/
which was for E-Blah 9.6

in order to make it work in 10.2.5.

This script is not a mod of E-Blah itself but rather it is to extract the event data from the calendar and put it into a web page.

My installation of E-Blah version 10.2.5 is an upgrade from a previous version so it may differ from a fresh install of 10.2.5, but i think if you look through the perl file you can figure out how to change it if it does not work for you. In particular, check the path and file names. Some of you might have the calendar data stored in Prefs/Events.txt instead of Events2.txt (put some events in your calendar and then open those files in a text editor to see if they contain the data), and you my also wish to use a different css stylesheet.

Installation:
  • Download and unzip the attached perl file and edit it using a text editor, to make it suit your setup (path and file names etc).
  • Put it in your cgi-bin or some directory where you can run scripts.
  • Chmod it to 755 so everyone can execute it.
  • Test it by running it from your browser directly (type the URL to the perl script file in the browser address bar).
  • If it woks then you are off to a good start.


If it does not work then one of your settings (path names etc) may be wrong.
Also, try making a .htaccess file in the script directory with this in it:
Code
AddType perl-script .pl
AddHandler cgi-script .pl
Options +ExecCGI


Putting it in your web page
There are supposed to be ways of running a perl script from a php or shtml web page but i have not managed to get any of them to work for me, perhaps due to settings on my server. For those methods, see:
http://www.gadberry.com/aaron/2006/01/23/perl_from_php/
http://uk3.php.net/manual/en/ref.exec.php
http://www.webmasterworld.com/forum13/3492.htm
http://www.webmaster-forums.net/showthread.php?t=13992


What did work for me was to use the html iframe tag to include the perl file as an iframe in my web page.
The html i used was something like:
Code
<table width="100%">
	<tr><td>
		<b><a href="/forum/Blah.pl?v-cal/">Church Calendar</a></b>
	</td></tr>
	<tr><td height="200">
		<Iframe src="/includes/blahcal.pl" style="width:100%; height:100%">
		<a href="/forum/Blah.pl?v-cal/">Church Calendar</a></Iframe>
	</td></tr>
</table>

If a user is using an old browser that doesn't support iframe then he sees the link to the calendar that is inside the iframe tags.

You can see my implementation of it here:
http://www.wisdac.org.uk/news.php

What little knowlege of perl that i have comes from looking at this and other perl scripts over the past 2 days, so it is probably quite sloppy, but the script works for me. Perhaps someone who actually knows perl can tidy it up or make it more efficient. Also, i do not know what all the fields are in the calendar data file (Events2.txt) soi did not make use of all of them.



This post contains attachments; to download them you must login.


Revision History (1 edits)
Justin  -  February 29, 2008, 9:17pm
Logged Offline
Private Message Private message
1 Pages 1 Recommend Thread
Print

E-Blah Community    Modifications    E-Blah 10.x Mods  ›  [10.2.5] Calendar Events in Web Pages