Easy PHP Calendar - We really take care of your dates!


Go Back   Easy PHP Calendar > Integration > PHP-Nuke Integration

PHP-Nuke Integration Information about integrating the calendar with the PHP-Nuke Content Management System.

Closed Thread
 
Thread Tools Search this Thread Display Modes

Passing a URL variable into a PHP include?
Old 11-09-2005, 11:16 PM   #1
wakalapi
Calendar User
 
wakalapi is offline
Join Date: May 2005
Posts: 33
Default Passing a URL variable into a PHP include?

RE: replace an iframe that has a static reference with a php include that has a dynamic reference

I made a module that simply uses an iframe to display the Calendar. It is located at http://www.powwowtime.com/modules.php?name=Calendar. Viewers can manipulate the Calendar within its iframe, but I would rather like to replace the iframe with a PHP include that passes variables to the Calendar.


In other words, I would like to have users view something like

"(powwowtime.com)/modules.php?name=Calendar&cat=2&mo=12&yr=2005"

and have

"?cat=2&mo=12&yr=2005"

be appended dynamically so that the included file results as

"(powwowtime.com)/calendar/demo.php?cat=2&mo=12&yr=2005"

And then, what about the nav buttons? If they are powered by the hidden source code, I suppose I could just turn off their display in the admin panel and write my own navigation into their place on the template.
 

Old 11-10-2005, 01:39 AM   #2
wakalapi
Calendar User
 
wakalapi is offline
Join Date: May 2005
Posts: 33
Default

OK I experimented with ve9gra's module and it displays nicely ... the multi-calendar's nav links appear to be relative to where it *thinks* it is residing and since I probably cannot change that, I might see if mod_rewrite can tell Calendar (or just those links) a lie about where it is.... or maybe the easy way (lol) is to turn off the nav links and put a couple of drop-down menus and a GO button that will fill in the variables.

Last edited by wakalapi; 11-10-2005 at 02:55 AM.
 

Old 11-10-2005, 07:37 AM   #3
ve9gra
Support Team
 
ve9gra's Avatar
 
ve9gra is offline
Join Date: Jun 2003
Location: New Brunswick, Canada
Posts: 4,965
Default

It would seem that you've managed to get it going...

You might want to use the $thisFile variable in config.inc.php. Change it to the name of your page (modules.php?name=Calendar). That way you shouldn't need to use mod_rewrite.
__________________
-- Gervais
EPC Tutorials... We're here to help!
Offering custom integration services. Contact me here.
* Not affiliated with EasyPHPCalendar or NashTech Inc.

Last edited by ve9gra; 11-10-2005 at 12:06 PM.
 

Old 11-11-2005, 02:29 AM   #4
wakalapi
Calendar User
 
wakalapi is offline
Join Date: May 2005
Posts: 33
Default

So I just add this key to the current list:

$thisFile="modules.php?name=Calendar"

UPDATE:

The above idea was great but it caused an additional "?" to appear after Calendar. So while Nuke ignored variables following it, so did Calendar. Don't ask me why, but I originally coded a multi-calendar display for 1x1 (one rows of one calendar). Okkkk .. so .. I changed it to a normal calendar, whose navbar I noticed already passes variables correctly. Problem solved.

However, the filter plugin didn't do so, but I found that the following line added to the drop-down form works like a charm:

<input type="hidden" name="name" value="Calendar">

I now have the Calendar doing exactly what I want it to do .... for now.

Last edited by wakalapi; 11-11-2005 at 06:03 AM.
 

Old 11-11-2005, 08:26 AM   #5
ve9gra
Support Team
 
ve9gra's Avatar
 
ve9gra is offline
Join Date: Jun 2003
Location: New Brunswick, Canada
Posts: 4,965
Default

Great! and about my previous suggestion, I think the fix for that is to add a & at the end... like this

$thisFile="modules.php?name=Calendar&"

That should take care of that if you ever needed it.
__________________
-- Gervais
EPC Tutorials... We're here to help!
Offering custom integration services. Contact me here.
* Not affiliated with EasyPHPCalendar or NashTech Inc.
 

Old 11-11-2005, 01:11 PM   #6
wakalapi
Calendar User
 
wakalapi is offline
Join Date: May 2005
Posts: 33
Default

I tried that, too. I ended up with:

(url...)modules.php?name=Calendar&? (etc.)

The question mark will get tacked on at the end of whatver you put there
$thisFile="asdoiuyasioduyaoyaiyo@#^&"
You'll get (url...) asdoiuyasioduyaoyaiyo@#^&?

The normal calendar is just fine and I don't have to fight with it. It's just the multi-calendar that did that and I only use that option on a printable calendar template that is displayed outside of CMS. So it's all good!

Thanks for your suggestions.
 

Old 11-12-2005, 08:26 AM   #7
ve9gra
Support Team
 
ve9gra's Avatar
 
ve9gra is offline
Join Date: Jun 2003
Location: New Brunswick, Canada
Posts: 4,965
Default

Note to Brian, make sure that the navigation arrows for the multi calendar use the same GET variable checking routine as the ones for the small calendar.
__________________
-- Gervais
EPC Tutorials... We're here to help!
Offering custom integration services. Contact me here.
* Not affiliated with EasyPHPCalendar or NashTech Inc.
 
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP Errors anthony General Support 2 02-07-2005 01:10 PM
getting event date variable in URL stewart.campbell General Support 1 11-22-2004 04:11 PM
Not so easy... kenrayner2 General Support 3 09-03-2004 01:02 PM
Problem with installation in windows 2k server akkam General Support 3 01-11-2004 01:03 AM
{Fixed} Problem adding an event ucb General Support 23 11-19-2003 06:31 PM



All times are GMT -4. The time now is 12:55 AM.


vBulletin skins developed by: eXtremepixels
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Copyright 2009 NashTech, Inc.

| Home | Register | Today's Posts | Search | New Posts |