PDA

View Full Version : Not sure where to begin to put into a block


drdan01
04-01-2010, 08:07 PM
I've just installed the calendar (yippee!) and had found a thread about having the Nuke and calendar database being the same, so have done that. I'd like to have the calendar appear in a block but from reading the notes on adding a calendar to an existing page, and some of the integration notes I'm confused about what exactly I need to do to get the calendar into a block. Is it as easy as putting the following into a block I create?
<?php $CSS=1; require("calendar/calendar.php"); ?>
</head>

Or if the above is what only goes into a CSS head, then what do you put into a created block?

I'm using Nuke 7.6 (patched).

ve9gra
04-02-2010, 09:01 AM
At the top of this forum... there's a sticky for PHP-Nuke. That includes the block you're looking for.

drdan01
04-02-2010, 11:50 AM
Thanks for pointing that out. I did go ahead and do that install....but definitely not getting what I need to get there. What I now have is a stripped down version of the calendar, only one month shows, very tiny, and just the dates. You can see what is there at: http://www.kmpro.org/ Absent is all of the date and event color coding which shows in the directly loaded php page for the calendar. And if I try clicking on any of the dates, I get an error message saying I can't access that file directly.

So...it seems like I did install the module correctly and it's in the block....but something definitely doesn't seem right. Any help or suggestions would be greatly appreciated!

ADDED: I just saw the note about maybe having problems with Auto Theme and remembered that I do have that installed. Is that what might be causing this?

ve9gra
04-02-2010, 06:00 PM
Well the block is supposed to be placed in the sidebar. If you have Auto Theme, yes, definitely follow the extra instructions.

The reason why the calendar is small and with no color is because the theme section (the $CSS line) doesn't seem to be included anywhere.

I'm a bit fuzzy on PHP-Nuke, it's been years since I've touched it.

drdan01
04-02-2010, 06:16 PM
Well I know that I don't know Nuke. I struggle with everything.

If you have to put the calendar in a side block though, that won't work as the point of it being in a center block for me was to hopefully use TOC or at least the three months view. I did try playing with a block to try to do it as an iframe and had pretty much the same results; I'm assuming that my attempt at the block wasn't correct in some way. I have an ability to have static pages in the center of my theme (and no blocks showing) and had hoped that I'd be able to do something with that and iframe to pull the calendar there but I definitely don't know how to do it assuming it can be done. The static pages though are all just html (that's their advantage and disadvantage).

Running out of ideas though and had hoped that this would be something that I could get to work.

drdan01
04-02-2010, 10:41 PM
Okay, I think that I've stumbled around enough to get very close to what I need, but sure could use help on one thing. I created a module for adding an iframe that then called to the calendar using the below code borrowed from PHP-Nuke's "how-to" guide. And then simply added the calendar module link to my menu, and ta-da, have it and it appears neatly in my center block. So for anyone needing another approach to adding it into Nuke, try the below for using iframe.

But what I need to know though is how to switch from the three month view to the TOC view? I think that it has something to do with the demoTOC.php, but is it that I need to use that and change the name, or something else?

Other things still trying to figure out include -- is the "Name Removal from Month/Year Calendar Header" option what lets me remove the "Easy PHP Calendar" header???



Here's the module code:

<?
if (!eregi("modules.php", $_SERVER['PHP_SELF'])) {
die ("You can't access this file directly...");
}
if(!IsSet($mainfile)) { include ("mainfile.php"); }
$index=0;

$go_to_address1="http://www.mysite.org/calendar/events/index.php";
$go_to_address=rawurldecode($go_to_address1);
include("header.php");
OpenTable();
echo "<center><h4><a href=\"index.php\">Click to close.</a></h4></center>";
echo "<iframe SRC=\"".$go_to_address."\" width=\"100%\" height=\"1200\"
framespacing=0 frameborder=no border=0 scrolling=auto></iframe>";
echo "<br><center>NB. Using iframes!</center><br>";
CloseTable();
include("footer.php");
die;
?>

ve9gra
04-03-2010, 05:48 AM
You shouldn't use the /events/index.php link as that links to the Event Manager. Have a look at the demoTOC instead. The demos are there to show you how to integrate the calendar properly. You cannot change the mode used in the Event Manager.

No, you cannot remove the branding... for that you need to purchase the licence with copyrights removal.

drdan01
04-03-2010, 08:03 PM
You shouldn't use the /events/index.php link as that links to the Event Manager. Have a look at the demoTOC instead. The demos are there to show you how to integrate the calendar properly. You cannot change the mode used in the Event Manager.

No, you cannot remove the branding... for that you need to purchase the licence with copyrights removal.

So are you saying then that I have to link to the demoTOC.php page, and modify that in the demo.php file to remove the other links?

About the branding -- that was posted yesterday before I purchased and I did purchase the license to remove all of that. I just didn't know if the header graphic was part of it, and it isn't, and I figured out what to do with that already.