View Full Version : Calendar Block help
Beta3
10-29-2005, 12:47 PM
Hi,
i read this:
http://www.easilysimplecalendar.com/forums/showthread.php?t=2773
But in my ion cube calendar demo files there are no any file called
showCalendar.php
so the block doesn´t work
i´m trying to test it, if the PHP-Nuke block works i immediatly buy tis softwear
Thanx
Brian
10-29-2005, 02:48 PM
Instead of showCalendar.php, the file in now named calendar.php. I'll update the documentation.
I'm getting this message:
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/drakesga/public_html/site/blocks/block-Calendar.php on line 2
Parse error: parse error, unexpected T_STRING in /home/drakesga/public_html/site/blocks/block-Calendar.php on line 2
Any ideas why?
KASR
ve9gra
11-03-2005, 12:55 PM
That error means that the file was corrupted somehow. If you've followed the rest of the instructions for how to set it up in PHP-Nuke, you should be able to use my .zip to get your block going.
In this .zip, it includes the blocks-Calendar.php so that you can have a little block with the calendar in (should be uploaded to the /blocks/ directory) as well as the "Calendar module" folder which should be uploaded to the /modules/ directory.
Don't mistake the "Calendar module" and the "Calendar" being EPC. The calendar module is a PHP-Nuke module that allows the EPC Calendar to be displayed in the middle part of PHP-Nuke in TOC mode.
Should you have any problems with this, post here and I'll try to help.
At the worst case, I'll set it up for you if you give me FTP access and admin access to PHP-Nuke.
Still no go. Can you email me at kasr@cox.net?
Warning: main(calendar/calendar.php): failed to open stream: No such file or directory in /home/drakesga/public_html/site/blocks/block-Calendar.php on line 11
Warning: main(calendar/calendar.php): failed to open stream: No such file or directory in /home/drakesga/public_html/site/blocks/block-Calendar.php on line 11
Fatal error: main(): Failed opening required 'calendar/calendar.php' (include_path='.:/usr/local/lib/php') in /home/drakesga/public_html/site/blocks/block-Calendar.php on line 11
KASR
Ummm...ok, I got the calendar to show up in the block - but when I click on one of the dates, it tries to go to a module called calendar.
Also, the changes I make in the EPC admin events area has no efffect on the calendar that appears on the front page.
KASR
You can view it at drakesgames.com/site/
The calendar is at the bottom right.
KASR
ve9gra
11-04-2005, 07:27 AM
Ok... from what I can see, you haven't followed the instructions for installing. And I'm sorry, that module was custom made for someone who wanted to be able to click on the small calendar and redirect to a TOC calendar built as a module.
To modify that block so it operates as normal, just comment out the line that has $epcAltLink in it...
As far as installation goes, I'll fish out the instructions and post the link here.
ve9gra
11-04-2005, 08:29 AM
I fished around for a bit and didn't find any post that had all the instructions consicely put together. I guess I was just so used to always doing it for everyone, I never posted what I was doing...
Quickly put, here's the jist of it.
1- Install the EPC package to /*your-php-nuke-root*/calendar/
2- upload block-Calendar.php to /*nuke-root*/blocks/
3- upload Calendar module folder to /*nuke-root*/modules/
4a- (for PHP-Nuke version 7.5) find /*nuke-root*/includes/my_header.php and add towards the bottom$CSS=1; require("calendar/calendar.php");or
4b- (for PHP-Nuke version 7.3, maybe 7.4 as well as newer versions, confirmed with 7.8) find /*nuke-root*/includes/custom_files/ and create a blank file called "custom_head.php" and add this to it<?php
// Custom head section to include the ESCal CSS
$CSS=1; require ("calendar/calendar.php");
?>
Then it's just a matter of adding the block to your setup, and activating the module. After that, everything should be peachy :)
Heeeey! I think it's working! Thank you for the help!!!!
Is there a way to get the calendar that shows up on the front page to have the color coded event dates as well?
KASR
ve9gra
11-04-2005, 01:31 PM
Yes. That's what #4 (a or b) is for.
As a very much worse case senario, open block-Calendar.php and just above the line
$OL=1; require("calendar/calendar.php");
add this line
$CSS=1; require("calendar/calendar.php");
This breaks the rules as to where you're supposed to have your CSS, but most times it works.
Thanks! That does it fix it - tho it screws up the entire template on the right side. Is there a way to change the size of the calendar?
KASR
ve9gra
11-04-2005, 01:58 PM
Yup... I just looked at your site and the style sheet still isn't applied...
Either way, in order to change the size of the calendar (i'm assuming the small one that's displayed in the block), edit the following file
/*path-to-calendar-install*/theme/*the-theme-you're-using*/esstyle.css
In there, look for .mainTable and .navTable, and change the width attribute for both of them. For the best results, choose a multiple of 7 so that the cells are all equal. Then if you want to change how high the calendar is, look for .rows and change the attribute line-height.
Ve9: THanks for the help - that did the trick too!! Would you happen to know where I need to edit to decrease the day number fonts? The table is set correctly, but the daily number font is too big.
KASR
ve9gra
11-04-2005, 07:44 PM
All of the following modifies the attribute "font-size"
The day number is set in .rows
The letters for the days is set in .dayNamesText
And the month and year is set in .monthYearText
Still not working. Here's the site addy: drakesgames.com/site
Here's the .css file contents. Any ideas?
.mainTableTOC {
background-color: #FFFFFF;
border: 1px solid #BBBBBB;
width: 705px;
table-layout: fixed;
}
.navTableTextTOC {
font-family: Geneva, Verdana, Arial, sans-serif;
font-size: 8px;
font-weight: Normal;
text-decoration: none;
color: #003366;
}
/* Month and Year Row Setup */
.monthYearRowTOC {
height: 32px;
background-color: #FEFFFE;
text-align: left;
vertical-align: middle;
margin: 0px;
padding: 3px;
}
/* Month and Year Text Setup */
.monthYearTextTOC {
font-family: Geneva, Verdana, Arial, sans-serif;
font-size: 18px;
font-weight: Bold;
color: #355881;
}
/* Day Names Row Setup */
.dayNamesRowTOC {
height: 20px;
background-color: #455678;
text-align: center;
vertical-align: middle;
}
/* Day Name Setup */
.dayNamesTextTOC {
font-family: Geneva, Verdana, Arial, sans-serif;
font-size: 7px;
font-weight: Bold;
color: #FFFFFF;
}
/* Alignments, Font Face, Size and Color for Date Numbers and Row Height */
.rowsTOC {
font-family: Arial, Geneva, Verdana, sans-serif;
font-size: 7px;
color: #433D27;
text-align: left;
vertical-align: top;
height: 88px;
}
/* Color of Today's Date */
.todayTOC {
font-family: Geneva, Verdana, Arial, sans-serif;
font-size: 8px;
font-weight: Bold;
color: #FFFF00;
background-color: #31528E;
text-align: left;
vertical-align: top;
padding: 2px;
margin: 0px;
}
.titleTOC {
text-overflow:ellipsis;
overflow:hidden;
white-space:nowrap;
padding: 1px;
margin: 0px;
}
.daynumTOC {
font-family: Geneva, Verdana, Arial, sans-serif;
font-size: 8px;
font-weight: Bold;
color: #FBFCEF;
background-color: #A2A3AE;
text-align: left;
vertical-align: top;
padding: 0px;
margin: 0px;
}
.formElements {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
}
.formButtons {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
}
.sOtherTOC {
background-color: #EEEEEE;
font-family: Geneva, Verdana, Arial, sans-serif;
font-size: 10px;
color: #BBBBBB;
}
.s20TOC {
background-color: #F7F7F7;
height: 88px;
}
.s20TOC0 {
background-color: #D4D4D4;
height: 88px;
}
/* Main Table Setup Incluidng Date Number Fonts, Size and Color */
.mainTable {
background-color: #FFFFFF;
border: 0px solid #003366;
width: 126px;
}
.navTable {
background-color: #FFFFFF;
border: 0px solid #FFFFFF;
width: 126px;
}
.navTableText {
font-family: Geneva, Verdana, Arial, sans-serif;
font-size: 6px;
font-weight: Normal;
text-decoration: none;
color: #003366;
}
/* Month and Year Row Setup */
.monthYearRow {
background-image: url("monthBg.gif");
line-height: 15pt;
background-color: #D8E2EC;
text-align: center;
vertical-align: middle;
}
/* Month and Year Text Setup */
.monthYearText {
font-family: Geneva, Verdana, Arial, sans-serif;
font-size: 10px;
font-weight: Bold;
color: #252216;
}
/* Day Names Row Setup */
.dayNamesRow {
line-height: 7pt;
background-color: #F5F4D3;
text-align: center;
vertical-align: middle;
}
/* Day Name Setup */
.dayNamesText {
background-image: url("dayBg.gif");
font-family: Geneva, Verdana, Arial, sans-serif;
font-size: 6px;
font-weight: Bold;
color: #433D27;
}
/* Alignments, Font Face, Size and Color for Date Numbers and Row Height */
.rows {
font-family: Geneva, Verdana, Arial, sans-serif;
font-size: 8px;
color: #433D27;
line-height: 30pt;
text-align: center;
vertical-align: middle;
}
/* Color of Today's Date */
.today {
color: #CF0000;
}
/* Pop-up Events Setup */
.popupDate {
font-family: Geneva, Verdana, Arial, sans-serif;
font-size: 10px;
font-weight: bold;
color: #FFFFFF;
text-align: left;
background-color: #336699;
}
.popupEventTitle {
font-family: Geneva, Verdana, Arial, sans-serif;
font-size: 10px;
color: #000000;
font-weight: bold;
padding: 2px;
vertical-align: middle;
}
.popupEventTime {
font-family: Geneva, Verdana, Arial, sans-serif;
font-size: 10px;
color: #000000;
font-weight: normal;
background-color: #F4F4F4;
border: 1px dotted #EFEFEF;
padding: 1px;
}
.popupEventDescription {
font-family: Geneva, Verdana, Arial, sans-serif;
font-size: 10px;
color: #000000;
font-weight: normal;
background-color: #FFFFFF;
border: 1px solid #EAEAEA;
padding: 2px;
}
.popupEventDate {
font-family: Geneva, Verdana, Arial, sans-serif;
font-size: 10px;
color: #446B93;
text-align: center;
vertical-align: middle;
background-color: #F7F8F9;
border: 1px solid #FFFFFF;
padding: 1px;
}
.popupEnd {
font-family: Geneva, Verdana, Arial, sans-serif;
font-size: 10px;
color: #A4A4A4;
}
.popupClose {
font-family: Geneva, Verdana, Arial, sans-serif;
font-size: 10px;
color: #FFFFFF;
text-align: right;
background-color: #336699;
}
.popupCloseBrackets {
font-family: Geneva, Verdana, Arial, sans-serif;
font-size: 10px;
color: #000000;
text-align: right;
background-color: #336699;
}
/*
---------------------------------------------------------------------------
The classes below determine how the calendar background markings will look.
---------------------------------------------------------------------------
/* Normal Cell Background (date number with no event markings) */
.s2 {
background-color: #E0E0E0;
}
/* Empty Cell Background (empty cells with no date numbers) */
.s20 {
background-color: #EBEBEB;
}
/* Show dates from other months */
.sOther {
background-color: #EEEEEE;
font-family: Geneva, Verdana, Arial, sans-serif;
font-size: 10px;
color: #BBBBBB;
}
/* Weekend Cell Background (date number with no event markings) */
.s200 {
background-color: #D0D0D0;
}
.categoryName {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 9px;
font-weight: bold;
color: #666666;
}
.categorySelection {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 9px;
font-weight: normal;
color: #777777;
}
.categoryDiv {
background-color: #FCF5EF;
}
KASR
ve9gra
11-07-2005, 11:16 AM
Man I love the Web Developer Toolbar for Firefox! It makes finding those problems soooo easy!
Here's what CSS are applied to the day numbers... You'll figure out what the problem is as soon as you read it.
http://drakesgames.com/site/themes/3988/style/style.css
td (line 2)
{
font-family: Verdana,Helvetica;
font-size: 11px;
}
http://drakesgames.com/site/calendar/theme/categories/categories.css
.s29999 (line 16)
{
background-color: rgb(255, 193, 138);
}
papalorax
05-31-2006, 10:11 AM
Ok - Block Display nicely.
Module Displays nicely.
Events loading just fine.
Problem --
The "<<" and ">>" buttons point to http://MY_SITE.com/modules.php?mo=6&yr=2006
which returns "Sorry, such file doesn't exist..."
http://MY_SITE.com/calendar/calendar.php?mo=6&yr=2006 seems to be what I want. Is there a way to make the block work with the advance one month options?
ve9gra
06-01-2006, 06:37 AM
What is your website? And, what version of the calendar are you using?
papalorax
06-01-2006, 09:13 AM
Installed Version: 6.3.20
WebSite: www.swccgpc.com (http://www.swccgpc.com)
Nuke version 7.8
FYI - you can change your nuke integration for 7.8 to put a file called "custom_header.php" in the Custom_files folder. I believe you have "custom_head.php" in your description.
ve9gra
06-01-2006, 04:08 PM
custom_head.php and custom_header.php are two different files. The header is for a header of the page that's displayed, not part of the head in the html code. It IS custom_head.php that you have to create.
To try to fix your problem, in the /blocks/block-Calendar.php file add the following just before the last require command:$thisFile=_SERVER["SCRIPT_NAME"];
Let me know if it works. I know PHP-Nuke has problems resolving the real URI because it includes and requires so many other scripts.
servant
07-19-2006, 07:11 AM
i have instaled epc on my nuke 7.8 site
i have the module and the block working
but it is missing all of the styles and is just plain text
i have noticed some of my other modules also do this
is there anything i need to do to get all of my css things to work?
:clap:
ve9gra
07-19-2006, 08:06 PM
Make sure that you read post #9. Your answer is in there. (hint: $CSS) :)
servant
07-20-2006, 03:13 AM
thanks but i have already tried creating the custom_head file
and i dont have a my_header file
there must be something else wrong
servant
07-21-2006, 10:41 AM
i have changed the sizes in that esstyle file and i helps the block but not the module.
how can i change this?
servant
07-21-2006, 10:51 AM
i have changed the sizes in that esstyle file and i helps the block but not the module.
how can i change this?
i can change the size of the calendar but the module is still to big for the page
url http://wright.gotdns.org/youth/index.php
ve9gra
07-26-2006, 04:02 PM
Since the module uses the TOC, you have to edit the properties that affect the TOC. They all have TOC in their name and they're at the top of the esstyle.css file.
vBulletin® v3.8.4, Copyright ©2000-2013, Jelsoft Enterprises Ltd.