• Hello —

    WordPress and php newbie. I need general instructions on including non-Wordpress php files in a WordPress page. Specifically I am trying to include the month view from Webcalendar in a WordPress page. I do not want to do this with an Iframe.

    I have created a template where I have hardcoded an include pointing at ‘portable-month.php’ which is the Webcalendar month.php file with the html head and tail pulled out. The idea is to wrap the WordPress theme around the Webcalendar month view.

    The parser seems to be choking on the include because of path and config issues. I have tried several different paths, all to no avail.

    My calendar and wordpress directories are peer directories just under the root. How do I go about making them talk to each other?

Viewing 8 replies - 1 through 8 (of 8 total)
  • have you figured anything out yet? I would LOVE to get this going on my site. Thanks

    -Cody
    codywalker@gmail.com

    I’ve been having nothing but problems with trying to get webcalendar’s upcoming.php working as an include in wordpress. I keep getting an error “dbi_connect(): db_type not defined”. The upcoming.php file works fine when accessed individually. I’ve tried changing include paths to absolute, and even tried copying the entire webcalendar folder structure into the same root as the wordpress stuff, but no luck.

    Would the global variables need to be declared in a wordpress php file?

    This is running on a Windows 2003 server with PHP & MySQL installed (unfortunately the only option that I have to work with)

    Some more info on this:
    I was poking around in the code, and discovered that the WordPress settings don’t allow global variables to be modified. It turns Register Globals off in wp-settings.php

    This poses a problem, as WebCalendar uses globals to define most of it’s settings. That’s why webcalendar works fine as a stand-alone item, but doesn’t work when included in a wordpress page (using a local path, not a http:// URL)

    I haven’t had time to have a decent tinker with it, but I included some of webcalendar’s files up the top of wp-settings.php (above the unregister_GLOBALS function) instead of in upcoming.php, and got a bit of progress. I then started running into path issues due to my setup. I’m going to have a bit more of a play with it soon.

    Once I figure out a workaround i’ll post it here. Might take a while as i’m a complete newbie to PHP. I’ve done ASP before, but am now looking leave the dark side and learn PHP. 🙂

    Have you considered “re-skinning” your WebCalendar page so that it matches your Worpress theme?

    Don seems to have done a good job on his site here:

    http://www.losangelesfalcons.com/

    also DivideSpace @ http://vitw.org/

    I’m currently working on re-skinning WebCalendar, but like the others above I would much rather have it work inside my WP theme. Has anyone successfully pulled it into WP? Has anyone’s tinkering gotten any further to a solution?

    Maybe I’m not reading the problem correctly…in which case this suggestion will be too simplistic.

    If you enable the the exec php plugin from: http://www.soeren-weber.net/post/2005/08/18/50/
    then call for the php file on the wp page where you want the calendar appear…will that work?

    I tried using the exec php, but I think you need to use an include. I am not having any luck. I have some progress inserting the iframe code from the documentation in the webcalendar website.

    litlfred

    (@litlfred)

    I was frustrated with the same problem. I decided to write a plugin to handle it.

    http://www.ibiblio.org/litlfred/mathBlog/projects/webcalendar

    There is a file webCalendar.css in the plugins directory that you can modify to make it compatible with your theme.

    hope this helps.
    -frederick

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Webcalendar as include’ is closed to new replies.