An Event Calendar Mod

Post custom hacks and enhancements for phpwcms here only. Maybe some of these things will be included in official release later.
Mosguy
Posts: 2
Joined: Mon 8. Nov 2004, 03:14

Post by Mosguy »

That did it. I knew I was making a simple mistake in the tag. Thank you.
Nemesco
Posts: 3
Joined: Sun 14. Nov 2004, 22:49

Post by Nemesco »

ionrock wrote:
1) A Category ID
2) The whole calendar template file
3) The single event template
4) The containing div id

Let me know if you have any other problems or if that doesn't work for you.
I am trying to set up the calendar but I ran into a problem. I know I must make a mistake somewhere but don't know where.

My replacement tag is:

Code: Select all

{CAL:0:maincalendar.template.php:default.event.template.php:Kalender}
when I visit the page where that tag is on I can see the calendar but when I click on the topic of an event next to the date of an event I am redirected to the frontpage of my site with the following url in the address bar:

Code: Select all

http://velden.ikhebhet.net/kalender&month=11&year=2004.phtml
Is it the containing div id I did set up wrong? Or something else?

If you want, take a look at it over here.

(the module looks great, I hope I will get it working)
jimbOO
Posts: 35
Joined: Tue 31. Aug 2004, 23:09

Post by jimbOO »

when I visit the page where that tag is on I can see the calendar but when I click on the topic of an event next to the date of an event I am redirected to the frontpage of my site
I have the same problem. Help us!!
screem of the butterfly
ionrock
Posts: 279
Joined: Fri 20. Feb 2004, 17:04

Post by ionrock »

Sorry about my previous post. I was wrong. The last element that is in the replacement tag is the alias of the structure level you want links to go to. The reason for this is if you have a main calendar on the homepage and you want to go to that specific date on your calendar page, you need to know the alias or the article number. Since the alias is a lot easier I used that.

I had originally said it was a the div id but that was wrong because you declare that in your template. You can use whatever combonation of markup you want there so the div id/class is not needed in the replacement tag. Sorry for the confusion. I was pretty confused myself ;)
jimbOO
Posts: 35
Joined: Tue 31. Aug 2004, 23:09

Post by jimbOO »

ionrock wrote:You can use whatever combonation of markup you want there so the div id/class is not needed in the replacement tag. Sorry for the confusion. I was pretty confused myself ;)
you didn't explain how to solve this problem. :roll:

sorry, but we need CODE.
i put ID number but i didn't get enything. please give us a example.

tnx
screem of the butterfly
Nemesco
Posts: 3
Joined: Sun 14. Nov 2004, 22:49

Post by Nemesco »

jimbOO wrote:
sorry, but we need CODE.
i put ID number but i didn't get enything. please give us a example.

tnx
Sample
Make a site structure and give it a name like 'Calendar' (without the ' quotes) and give it an alias like 'calendar'
Create an article inside the 'Calendar' structure
Place on that page the code:

Code: Select all

{CAL:0:front.template.php:default.event.template.php:events}
Make a site structure inside the 'Calendar' structure called 'Events' and give it an alias like 'events'
Create an article inside the 'Events' structure
Place on that page the code:

Code: Select all

{CAL:0:maincalendar.template.php:default.event.template.php:calendar}
I did this with the help from ionrock..... ionrock rocks! :)

Nemesco
ionrock
Posts: 279
Joined: Fri 20. Feb 2004, 17:04

Post by ionrock »

Thanks Namesco, I couldn't have answered any better myself. Also, if someone is having problems, please don't hesitate to PM me. I don't get to check the messageboard but if you PM me then I will know to stop by.

On a side note, one of the goals for the calendar mod was to make it as versatile as possible. That is why I made a bit of template system for it. That allows for the greatest flexibility. At the same time, it can be a little more confusing and for that I apologize. If anyone needs help don't hesitate to ask (PM) :)
User avatar
StudioZ
Posts: 802
Joined: Fri 28. May 2004, 19:57
Location: Québec, Canada
Contact:

Post by StudioZ »

Many thanks and gratitude for that great Mod Ionrock !!! 8)
I had trouble with the install om my test site, but you made me realize that I overlooked the Install page. I was simply missing/overlooking this part:

Code: Select all

// Ionrock's Calendar MOD by Verve...
// Coypright (C) 2004 
if($phpwcms["calendar_mod"]) { //enabled/disable GT MOD
	require_once ('./include/inc_module/mod_calendar/inc_front/func.inc.php');
} 
I have the feeling that it should be part of the main distribution :wink:

Cheers,

Yves
Image
PhpWCMS Evangelist, -- iRoutier.com Running phpWCMS 1.4.2, r354 -> Great Version!!!!
ryanpratt
Posts: 74
Joined: Fri 5. Mar 2004, 16:59
Location: Hilton Head Island, SC

issues with hack ?

Post by ryanpratt »

i instaled the hack and it shows up in back end but not in front end, i can add events in admin but if i eddit i get this error

Code: Select all

error: file /home/thechurc/public_html/cms/include/inc_module/mod_calendar/inc_lib/calendar.classes.php line 690You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ' setid = 5 WHERE setid = 5' at line 1
UPDATE thechurc_phpwcms_cm_events SET span = 5, time = '10:30', title = 'Wash Sevice', category = 1, price = '', location = 'Shell Hall', description = 'for the late risers or those who like to sleep, like me!', extrainfo = '', approved = , setid = 5 WHERE setid = 5
any ideas?

and thanks Ionrock this is awsome ! :wink:
ryanpratt
Posts: 74
Joined: Fri 5. Mar 2004, 16:59
Location: Hilton Head Island, SC

ok got information showing

Post by ryanpratt »

ok, i had an error in my phpwcms.php file and i can see the calender but

i tryed to add an event that reacured and i got this error,

Code: Select all

Fatal error: Call to undefined function: get_ordinal_day() in /home/thechurc/public_html/cms/include/inc_module/mod_calendar/inc_lib/calendar.classes.php on line 525
any ideas what im missing ?
User avatar
StudioZ
Posts: 802
Joined: Fri 28. May 2004, 19:57
Location: Québec, Canada
Contact:

Post by StudioZ »

I also encountered the same problem today. I overlooked the install file where it says:

Code: Select all

The next base file your need to edit will be your function file that allows for replace ment tags. This file is [b]/include/inc_front/content.func.inc.php[/b] This is a pretty big file. Scroll down, close to the bottom. You will see a spot where Jerome's graphical text module is added. You can copy the following code directly below that.

// Ionrock's Calendar MOD by Verve...
// Coypright (C) 2004 
if($phpwcms["calendar_mod"]) { //enabled/disable GT MOD
	require_once ('./include/inc_module/mod_calendar/inc_front/func.inc.php');
} 
Hope this helps you out :wink:
Image
PhpWCMS Evangelist, -- iRoutier.com Running phpWCMS 1.4.2, r354 -> Great Version!!!!
trip
Posts: 657
Joined: Tue 17. Feb 2004, 09:56
Location: Cape Town, South Africa
Contact:

Post by trip »

Hi there
can anyone explain what the
Mail.php does, found in this file.

Code: Select all

<?php
// calendar module application header
// file for including main functions/classes/configurations
// require_once "Mail.php"; // PEAR mail class

include (PHPWCMS_ROOT.'/include/inc_module/mod_calendar/inc_lib/main.config.php');
include (PHPWCMS_ROOT.'/include/inc_module/mod_calendar/inc_lib/main.functions.php');
include (PHPWCMS_ROOT.'/include/inc_module/mod_calendar/inc_lib/main.classes.php');




?>
btw, IonRock the script works really well...
TriP
hal
Posts: 66
Joined: Mon 9. Feb 2004, 22:07

Post by hal »

When I try to install the mod (I made everything like in the Installation description that comes with the mod - double-double-double checked that!)
I get the menu item in "Modules" in the admin section that should call the "do-function" but when I click it nothing happens.

When i try to run the install.php via the browsers adress line I get the error: No database selected.

Anyone knows what the reason could be??? Did I miss anything (I can't believe that) but as some of you are running the Mod I must have done something wrong - thats for sure - I just have NO idea what. :roll:

Any help would be very much appreciated.

thanks
User avatar
StudioZ
Posts: 802
Joined: Fri 28. May 2004, 19:57
Location: Québec, Canada
Contact:

Post by StudioZ »

Hello Hal,

Must be then something to do with your main.config.php file....?
I have a standard install whre this works for me:

Code: Select all

<?php
// main config for calendar mod

// table names
$prefix 					= "phpwcms_";
$tables['cal_events'] 		= $prefix . "cm_events";
$tables['cal_categories']	= $prefix . "cm_categories";

$GLOBALS['tables'] = $tables;



?>
Image
PhpWCMS Evangelist, -- iRoutier.com Running phpWCMS 1.4.2, r354 -> Great Version!!!!
hal
Posts: 66
Joined: Mon 9. Feb 2004, 22:07

Post by hal »

My main.config.php looks like this:

<?php
// main config for calendar mod

// table names
$prefix = "";
$tables['cal_events'] = $prefix . "phpwcms_cm_events";
$tables['cal_categories'] = $prefix . "phpwcms_cm_categories";

$GLOBALS['tables'] = $tables;

?>

Looks pretty much the same except for the prefix (which should not make a difference at all).

But I tried it with your code as well and got the same error:

Error creating the events table: No Database Selected
--------------------------------------------------------------------------------
CREATE TABLE `phpwcms_cm_events` ( `id` int(11) NOT NULL auto_increment, `date` date NOT NULL default '0000-00-00', `span` int(11) NOT NULL default '1', `time` varchar(100) NOT NULL default '', `title` varchar(150) NOT NULL default '', `category` int(11) NOT NULL default '0', `price` varchar(60) NOT NULL default '', `location` varchar(100) NOT NULL default '', `description` text NOT NULL, `extrainfo` text NOT NULL, `approved` tinyint(1) NOT NULL default '0', `setid` int(11) NOT NULL default '0', `userId` int(11) NOT NULL default '0', PRIMARY KEY (`id`), KEY `id` (`id`) )

I'm sure its because the database name is for some reason not included - I just don't know where and how this is supposed to happen.
Post Reply