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    Mod Requests and Support  ›  Adding Calendar Events to web page Moderators: 10 Series Support Team
Users Browsing Forum
No Members and 1 Guests

Adding Calendar Events to web page  This thread currently has 399 views. Print
1 Pages 1 Recommend Thread
bengtang
July 14, 2007, 1:55am Report to Moderator Report to Moderator

E-Blah Member
Posts: 18
Gender: Male
Posts Per Day: 0.04
Time Online: 4 hours 46 minutes
Location: uk
Age: 37
Hi about the mod that lets you extract calendar info from E-Blah and put it in a web page:
http://www.eblah.com/forum/m-1117815566/

I saved the perl script to a file called calendar.pl which i chmodded to 755. In the same directory as that file i also have a .htaccess file which has:
AddHandler cgi-script .pl
Options -Indexes +ExecCGI


I tried including it into a table cell within a php web page, index.php, using the php directive
<? include('includes/calendar.pl'); ?>
but when i view the web page, instead of the calendar info, i see the source code of the calendar.pl file in the table cell.

So the problem seems to be that the perl script is not executing in my index.php file. It is just treated as text. Am i doing something wrong?
Logged Offline
Private Message Private message
bengtang
July 14, 2007, 2:11am Report to Moderator Report to Moderator

E-Blah Member
Posts: 18
Gender: Male
Posts Per Day: 0.04
Time Online: 4 hours 46 minutes
Location: uk
Age: 37
Ok i think i have been using the wrong php directive. I changed it to:
<? exec('perl includes/calendar.pl'); ?>
And the source code is no longer appearing in the table cell. However, nothing is appearing in the cell.

I also changed the .htaccess in the perl file directory to say:
AddType perl-script .pl
AddHandler perl-script .pl


i will go tinker with it more. Maybe something setting the perl file is not set right.

Logged Offline
Private Message Private message Reply: 1 - 4
bengtang
July 14, 2007, 3:13am Report to Moderator Report to Moderator

E-Blah Member
Posts: 18
Gender: Male
Posts Per Day: 0.04
Time Online: 4 hours 46 minutes
Location: uk
Age: 37
I have now managed to the the perl file to execute in its directory, with htaccess settings:
AddType perl-script .pl
AddHandler cgi-script pl
Options -Indexes +ExecCGI


However i still can't get it to execute within the php file.

Also, although the perl script runs when i access it directly by typing it's url in the browser address bar (i know it runs because i added some print commands to the bottom of it to test it), it does not display the calendar info.

I had a look at Prefs/Events.txt and it was 0 bytes long! There are calendar events in my E-Blah calendar, i can see them when i log in, but they are not stored in Prefs/Events.txt. I found a perl file called Calendar.pl in the E-Blah Code directory and it uses a file called Prefs/Events2.txt but that contains only things like users registering, not the events that i see in the calendar.
Any idea where they are stored? My E-Blah version is 10.2.5
Logged Offline
Private Message Private message Reply: 2 - 4
bengtang
July 15, 2007, 2:13am Report to Moderator Report to Moderator

E-Blah Member
Posts: 18
Gender: Male
Posts Per Day: 0.04
Time Online: 4 hours 46 minutes
Location: uk
Age: 37
I have since found out that it is Events2.txt after all that the calendar data is stored in, at least in my upgrade version of E-Blah 10.2.5. I have also managed to get the script to read the data from it and process it correctly. Now my challlenge is to get it to execute within a php file.
Logged Offline
Private Message Private message Reply: 3 - 4
bengtang
July 15, 2007, 7:00am Report to Moderator Report to Moderator

E-Blah Member
Posts: 18
Gender: Male
Posts Per Day: 0.04
Time Online: 4 hours 46 minutes
Location: uk
Age: 37
I have now got it working for my installation of E-Blah 10.2.5, see this thread to download the updated version:
http://www.eblah.com/forum/m-1184504363/
Logged Offline
Private Message Private message Reply: 4 - 4
1 Pages 1 Recommend Thread
Print

E-Blah Community    Modifications    Mod Requests and Support  ›  Adding Calendar Events to web page