News:

Want to get involved in developing SMF? Why not lend a hand on our GitHub!

Main Menu

Calendar integration

Started by XzeroD, July 18, 2009, 05:52:37 PM

Previous topic - Next topic

XzeroD

Hello,

I want to integrate my calendar into a page of my current website, now i tried the following things:


<?php
require(dirname(__FILE__) . "\forum\SSI.php");
require(
$sourcedir . "\Calendar.php");
CalendarMain();
?>


this doesn't do anything.
When i print_r the $context var i can see the $context var has arrays of the calendar, so i tried loading the template again like this:


<?php
require(dirname(__FILE__) . "\forum\SSI.php");
require(
$sourcedir . "\Calendar.php");
CalendarMain();
loadTemplate("Calendar");
?>


Sadly this also doesn't work.  :(

Now i lost it and hope somebody can help me out here.
I want the exact layout like the ?action=calendar page.

Regards,
XzeroD


Orstio

<?php

global $txt, $context, $modSettings, $scripturl, $options, $sourcedir;

require(
dirname(__FILE__) . "\forum\SSI.php");
require(
$sourcedir . "\Calendar.php");
CalendarMain();
?>


XzeroD

This doesn't work for me, sorry any other solution?

-- edit --
i forgot to mention i'm using SMF 1.1.10

Orstio

Anything at all, or just a blank screen?

XzeroD

i just get a blank screen, somehow i guess loadTemplate doesn't echo anything.

Orstio

<?php

global $txt, $context, $modSettings, $scripturl, $options, $sourcedir;

require(
dirname(__FILE__) . "\forum\SSI.php");
require(
$sourcedir . "\Calendar.php");

echo
'If this sentence appears on the screen, the script gets this far.';
CalendarMain();
?>

XzeroD

I get the sentence and still it doesn't work  :'(

Orstio

Good, then let's do this:

<?php

global $txt, $context, $modSettings, $scripturl, $options, $sourcedir;

require(
dirname(__FILE__) . "\forum\SSI.php");
require(
$sourcedir . "\Calendar.php");

CalendarMain();
echo
'If this sentence appears on the screen, the script gets this far.';

?>

XzeroD

Quote from: Orstio on July 19, 2009, 04:15:05 PM
Good, then let's do this:

<?php

global $txt, $context, $modSettings, $scripturl, $options, $sourcedir;

require(
dirname(__FILE__) . "\forum\SSI.php");
require(
$sourcedir . "\Calendar.php");

CalendarMain();
echo
'If this sentence appears on the screen, the script gets this far.';

?>


nope :(

here's the link: hxxp:starlight-design.nl/obm/core/pages/events.php [nonactive]

Orstio

OK, now how about this?

<?php

global $txt, $context, $modSettings, $scripturl, $options, $sourcedir;

require(
dirname(__FILE__) . "\forum\SSI.php");
require(
$sourcedir . "\Calendar.php");

CalendarMain();
template_main();
?>

XzeroD

Quote from: Orstio on July 19, 2009, 04:38:59 PM
OK, now how about this?

<?php

global $txt, $context, $modSettings, $scripturl, $options, $sourcedir;

require(
dirname(__FILE__) . "\forum\SSI.php");
require(
$sourcedir . "\Calendar.php");

CalendarMain();
template_main();
?>


Works!! ty very much  :D

Advertisement: