Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2008-05-27 10:51:48

merz1
Member
From: Hamburg
Registered: 2006-05-04
Posts: 994
Website

Re: Integrating a 3rd-party app into Textpattern: EasyPHPCalendar

> It struck me that I also need to place this line just before the </head> entry:

Please read the documentation regarding the integration!

There must be a link to the CSS file in the header (just before the </HEAD> tag) of any page that displays the Easy PHP Calendar script.

<?php $CSS=1; require("calendar/calendar.php"); ?>
</head>

Textpattern translation :)

<txp:php>$CSS=1; require("calendar/calendar.php");</txp:php>
</head>

No spaces after/before the <txp:php> tags!

If you use the mouse-over option, make sure the code below is in the BODY section of any PHP page that will display the Easy PHP Calendar script (preferably the first line below the <body> tag.

<body>
<?php $OL=1; require("calendar/calendar.php"); ?>

I am not willing to copy the whole documentation to this thread so please go and have a look yourself :-)

Last edited by merz1 (2008-05-27 10:52:13)


Get all online mentions of Textpattern via OPML subscription: TXP Info Sources: Textpattern RSS feeds as dynamic OPML

Offline

#14 2008-05-27 11:39:35

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: Integrating a 3rd-party app into Textpattern: EasyPHPCalendar

merz1 wrote:

No spaces after/before the <txp:php> tags!

Er – what are you talkin’ about? You can use spaces, comments or tabs before <txp:php> tags. Spaces won’t matter :)

Offline

#15 2008-05-27 12:18:18

merz1
Member
From: Hamburg
Registered: 2006-05-04
Posts: 994
Website

Re: Integrating a 3rd-party app into Textpattern: EasyPHPCalendar

> what are you talkin’ about?

As I said: Just guessing. Thanks Jukka :)


Get all online mentions of Textpattern via OPML subscription: TXP Info Sources: Textpattern RSS feeds as dynamic OPML

Offline

#16 2008-05-27 19:01:46

dave halliday
Member
Registered: 2008-02-29
Posts: 16

Re: Integrating a 3rd-party app into Textpattern: EasyPHPCalendar

Hi merz1

Thanks for checking the EasyPHPCalendar documentation but I had already done this.

I am going to bump this question over to their forums as the first line:

<txp:php>$CSS=1; require("calendar/calendar.php");</txp:php>
</head>

Is working… The $CSS=1; snippet calls the cascading style sheet into existence and this is definitely working. (Looking at the output HTML while in debug mode.)

It’s just the $OL=1; that is not.

I’ll post back here when I get it running.

Thanks!
Dave

Offline

#17 2008-05-27 20:49:11

merz1
Member
From: Hamburg
Registered: 2006-05-04
Posts: 994
Website

Re: Integrating a 3rd-party app into Textpattern: EasyPHPCalendar

> It’s just the $OL=1; that is not.

Well, that was the main reason why I wanted to check the documentation because I didn’t want to end up clueless :)

Did you check the other calendar output modes?


Get all online mentions of Textpattern via OPML subscription: TXP Info Sources: Textpattern RSS feeds as dynamic OPML

Offline

#18 2008-05-28 19:39:36

dave halliday
Member
Registered: 2008-02-29
Posts: 16

Re: Integrating a 3rd-party app into Textpattern: EasyPHPCalendar

DOH!

The answer is so simple that I feel a right fool…

You have this line in the <HEAD> of the page:

<txp:php>$CSS=1; require("path_to/calendar.php");</txp:php>
</HEAD>

And then you have TWO instances (with a variation) in the <BODY> of the page – this:

<txp:php>$OL=1; require("path_to/calendar.php");</txp:php>

to tell it that any calendar displayed on the page should have mouse-over enabled and then this:

<txp:php>require("path_to/calendar.php");</txp:php>

to actually display the calendar.

Works great and a big thanks to everyone who helped me with this!

Dave who is walking off muttering under his breath

Offline

#19 2008-05-29 10:26:16

merz1
Member
From: Hamburg
Registered: 2006-05-04
Posts: 994
Website

Re: Integrating a 3rd-party app into Textpattern: EasyPHPCalendar

Good that the calendar works now as you had expected it to work :)

But to me the solution looks ugly. So for every instruction the calendar requires / must have a trailing require("path_to/calendar.php");?

Are those necessary two instances mentioned in the documentation? If not the calendar guys should update their installation instructions and/or develop a more elegant calendar call with parameters.


Get all online mentions of Textpattern via OPML subscription: TXP Info Sources: Textpattern RSS feeds as dynamic OPML

Offline

Board footer

Powered by FluxBB