PDA

View Full Version : PHPNuke / Postnuke block integration


ve9gra
05-01-2005, 08:11 PM
Hi all,

I've helped a few people manage this one and I'm confident I can get you through this as well. As this goes along, I will post the code required for the different versions. To get you started, you can have a look at this thread (http://www.easyphpcalendar.com/forums/showthread.php?t=2773).

In the meantime, if you need any help, please post in this forum and I will try to respond as quick as possible.

Gervais

Edit: I also found this one (http://www.easyphpcalendar.com/forums/showthread.php?t=2691) that might be of help.

leslie_m_david
05-24-2005, 10:24 PM
I have installed the new block, but do I have to do something to get the calendar working as a module as well. My links at the bottom of the calendar are going to modules.php?mo=05&yr=2005 and this seems like it is missing some parameters. Am I missing something?

ve9gra
05-25-2005, 11:32 AM
There is no module to speak of.... the calendar is only included in a block... it has no other ties to Postnuke.

And your links at the bottom are fine. They will take any page that you're currently on and tack on the mo and yr variables to control which month is displayed.

So if you were on the modules.php page, those links would be totally legit. The modules.php script wouldn't use those variables at all, only EPC would.

If it doesn't work, or you think it doesn't, please post a link to your installation.

leslie_m_david
05-25-2005, 01:25 PM
I had to change escal\showCalendar.php to calendar\calendar.php.

www.lesliedavid.com/index.php (http://www.lesliedavid.com/index.php)

ve9gra
05-25-2005, 04:45 PM
You missed the section about the header. As you can see, the .CSS isn't applied to your calendar. I posted a 2nd link in my first post, you might want to have a look at it.

And you are right that the links are wrong. They should show the current page (ie: index.php for the main page) instead of always modules.php. It works fine for all pages except for the homepage for some reason. This should be easily fixable. Just as a test, in your block, just before the require("calendar/calendar.php"); try adding this $thisFile = $_SERVER['PHP_SELF'];
I hope this'll help.

Zola
06-11-2005, 04:09 PM
Hi,

I've fully integrated the calendar into my Nuke site, including converting the administration of the site into Nuke's admin interface.

You can see the calendar at my site and if you are interested in checking out the admin interface, just drop me a mail.

http://www.savebigo.com/savebigo/index.php

e4indy
07-06-2005, 05:26 PM
I ran the test for compatability on my web host (www.bluehost.com (http://www.bluehost.com)) and it came back ok for Zend. So I installed it, and it works ok by itself.

I am trying to include the calendar in Dragonfly as a block. I followed ve9gra's advise and came up with the two attached documents (I added the .txt for this upload). I added the block, then refreshed the website. I get a "Zend Optimizer Not Installed" error message. I updated the PHP.ini file with what bluehost recommended, and now the calendar shows up, but there's no format; the numbers just kind of run into each other.

I did un-comment the theme in the attached block-calendar.php file, but it didn't help.

Thanks in advance for your time.

ve9gra
07-07-2005, 01:10 PM
If there's no format, it's because the CSS isn't applied. I don't have any experience with Dragonfly, but I would check to make sure that it is in fact using the custom-head stuff and not some other technique.

e4indy
07-07-2005, 06:38 PM
Dragonfly is basically PHP-NUKE, only more dressed up. I had to create the 'custom_files' directory to the 'includes' directory before adding the 'custom_head.php' file to it.

I think I have it working now. I added:

$css=1; require ("calendar/calendar.php");

before the $OL=1; require ("calendar/calendar.php"); in the block-Calendar.php file, and it worked fine. I also had to change the esstyle.css setting for the width of the calendar to fit the space available.

Great forum. Thanks for the help. Now is there a way to add a command at the bottom of the block-calendar.php to allow a link to show up for editing or viewing a TOC of the calendar (Similar or exactly the way Zola did above)

e4indy
07-08-2005, 01:26 AM
I like everything about the way your calendar functions, from the commands below the calendar at the main page to the screens that come up (the calendar table of contents and the 'add event' page). I'm interested in how you did it, if you aren't giving away trade secrets in doing so.Hi,

I've fully integrated the calendar into my Nuke site, including converting the administration of the site into Nuke's admin interface.

You can see the calendar at my site and if you are interested in checking out the admin interface, just drop me a mail.

http://www.savebigo.com/savebigo/index.php

ve9gra
07-08-2005, 08:51 AM
Dragonfly is basically PHP-NUKE, only more dressed up. I had to create the 'custom_files' directory to the 'includes' directory before adding the 'custom_head.php' file to it. If you had to add it, it means it wasn't built to accept this.

I think I have it working now. I added:

$css=1; require ("calendar/calendar.php");

before the $OL=1; require ("calendar/calendar.php"); in the block-Calendar.php file, and it worked fine. I also had to change the esstyle.css setting for the width of the calendar to fit the space available. Good to hear that this worked... note though that this might not work with some browsers because you're declaring style scripts in the middle of your <body> tags where they should be declared in the <head>. As usual, YMMV.

Great forum. Thanks for the help. Now is there a way to add a command at the bottom of the block-calendar.php to allow a link to show up for editing or viewing a TOC of the calendar (Similar or exactly the way Zola did above) To be able to do this, you will have to create a module in Dragonfly that when loaded displays the TOC, and then just add a link to that module in the code of your block-Calendar.php.