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.
Post Reply
User avatar
StudioZ
Posts: 802
Joined: Fri 28. May 2004, 19:57
Location: Québec, Canada
Contact:

Post by StudioZ »

frold wrote:great!!

But you need to work more with the lang files.... there is still alot of english text need to be placed in the lang file...
Frold: Talking about the backend... don't you?
Image
PhpWCMS Evangelist, -- iRoutier.com Running phpWCMS 1.4.2, r354 -> Great Version!!!!
cyrano
Posts: 1598
Joined: Sat 31. Jan 2004, 18:33
Location: Stuttgart
Contact:

Post by cyrano »

nevertheless at first my respect for such a script and work and second for promoter and development support studioZ!!

haven't used yet, but had a look to the development and post here.
Gruß/ regards cyrano
--------------------------------------------------------
templates -> http://www.128.weitzelmedia.de
planepix -> http://www.planepix.de
XING -> https://www.xing.com/profile/Thomas_Weitzel3
frold
Posts: 2151
Joined: Tue 25. Nov 2003, 22:42

Post by frold »

StudioZ wrote:
frold wrote:great!!

But you need to work more with the lang files.... there is still alot of english text need to be placed in the lang file...
Frold: Talking about the backend... don't you?
Yes Im... :D the only thing I have tested until now :D
http://www.studmed.dk Portal for doctors and medical students in Denmark
monotv
Posts: 4
Joined: Tue 8. Feb 2005, 21:44

Post by monotv »

Ok i could really use some help here ;)

i installed the mod on phpwcms 1.1-RC4 and after some flaws it worked. Now i had to reset the tables in the database and after some fixing it should work again but now it doesnt show the Calendar, only the tag "{CAL:1:front.template.php:homepage.event.template.php:aktionen}" on the page.

I also included the snippet in /include/inc_front/content.func.inc.php to make the replacement tags working.

i really dont know what to do because all is in place, i can configure the calendar in the admin area, please help me ;)
User avatar
StudioZ
Posts: 802
Joined: Fri 28. May 2004, 19:57
Location: Québec, Canada
Contact:

Post by StudioZ »

monotov: Try using this tip-tag from Ionrock to test your install: {CAL:0:0:0:0}
but since version 2, there is a new variable for the language in which you want your calendar to appear:
{CAL:0:0:0:0:0}
Follow the "install.html" there is a good explanation in there from Ionrock that explains how to use the tag ;-)

Cheers,

Yves
Image
PhpWCMS Evangelist, -- iRoutier.com Running phpWCMS 1.4.2, r354 -> Great Version!!!!
monotv
Posts: 4
Joined: Tue 8. Feb 2005, 21:44

Post by monotv »

version 2? where do i get version 2? :D / nvm just found it

edit:

another funny thing is that sometimes it resets and offers me to install the mod again. i get this line:

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in xxx/phpwcms/include/inc_module/mod_calendar/main.inc.php on line 10

And when i press "Install Calendar Mod" i get:

Error creating the events table: Table 'cms_phpwcms_cm_events' already exists CREATE TABLE `cms_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`) )

because the tables are allready there not surprisingly ;)

Btw your response was the fastest i ever got on issues like that ;)
User avatar
StudioZ
Posts: 802
Joined: Fri 28. May 2004, 19:57
Location: Québec, Canada
Contact:

Post by StudioZ »

hmmmm... monotov: never experienced this with version 2.
Are you sure you are using v2 ?
I guess only Ionrock will be able to troubleshoot this one ;-)
I really don't see where the problem is.

I would say:
Backup first and if in a non-production envrionnement... could you try deleting your original tables and try again...? :roll:

You'll find in version 2: two folders:
core_GT-Calendar (backup and use it if you use these mods: GT + Calendar)
includes:
+++ conf.inc.php (example only)
+++ phpwcms.php
core_GT-Calendar-FEUser (backup and use it if you use these mods: GT + Calendar + FrontEnd User)
+++ conf.inc.php (example only)
+++ phpwcms.php

Cheers,

Yves
Image
PhpWCMS Evangelist, -- iRoutier.com Running phpWCMS 1.4.2, r354 -> Great Version!!!!
User avatar
StudioZ
Posts: 802
Joined: Fri 28. May 2004, 19:57
Location: Québec, Canada
Contact:

Post by StudioZ »

oh... not to forget... something that is often overlook is this part from Ionrock's install:
The next base file your need to edit will be your function file that allows for replace ment tags. This file is /include/inc_front/content.func.inc.php 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 may give you a hand start :roll:
Just noticed there is a little typo. It should read "//enabled/disable Ionrock's Calendar MOD" :wink:

Cheers,

Yves
Image
PhpWCMS Evangelist, -- iRoutier.com Running phpWCMS 1.4.2, r354 -> Great Version!!!!
JackaL
Posts: 5
Joined: Tue 8. Feb 2005, 22:53

db connect....

Post by JackaL »

monotv wrote:version 2? where do i get version 2? :D / nvm just found it

edit:

another funny thing is that sometimes it resets and offers me to install the mod again. i get this line:

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in xxx/phpwcms/include/inc_module/mod_calendar/main.inc.php on line 10

And when i press "Install Calendar Mod" i get:

Error creating the events table: Table 'cms_phpwcms_cm_events' already exists CREATE TABLE `cms_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`) )

because the tables are allready there not surprisingly ;)

Btw your response was the fastest i ever got on issues like that ;)
^^^^^ I were wondering same thing above ^^^^^
There is no script that connects to database!!!
My sollution for this was that I ran those tables and values directly to mysql db without using this install feature....

I´m also wondering where did you make this -> PHPWCMS_ROOT value
I check through script and I think that nothing makes this PHPWCMS_ROOT value..... Do I have to go throuh every .php file in your mod and change by hand these defaults?????

Code: Select all

<?php
// calendar modules...

//     vvv - Thats what I mean - vvv 
include (PHPWCMS_ROOT.'/include/inc_module/mod_calendar/app-header.php');
include (PHPWCMS_ROOT.'/include/inc_module/mod_calendar/inc_tmpl/header.php'); // this has styles and javascript...
And I didn´t get this mod work at all even I´ve installed it three times......
Last edited by JackaL on Tue 8. Feb 2005, 23:17, edited 1 time in total.
monotv
Posts: 4
Joined: Tue 8. Feb 2005, 21:44

Post by monotv »

i installed v2 now, not sure if i had it before, now it seems to work just fine. thx for your help ;) i will post the site i'm working on as soon as its ready to show another example of this nice cms + mod.
User avatar
StudioZ
Posts: 802
Joined: Fri 28. May 2004, 19:57
Location: Québec, Canada
Contact:

Post by StudioZ »

JackaL: In resumé there is three files to edit:
include/inc_conf/conf.inc.php
include/inc_front/content.func.inc.php
phpwcms.php

then.. the install should goes smoothly, as Ionrock has smoothen the process :wink:

Note: You may edit the "main.config.php" in the distro but if you don't... all should goes smoothy, as it did for me.

Cheers,

Yves
Image
PhpWCMS Evangelist, -- iRoutier.com Running phpWCMS 1.4.2, r354 -> Great Version!!!!
User avatar
StudioZ
Posts: 802
Joined: Fri 28. May 2004, 19:57
Location: Québec, Canada
Contact:

Post by StudioZ »

monotv wrote:i installed v2 now, not sure if i had it before, now it seems to work just fine. thx for your help ;) i will post the site i'm working on as soon as its ready to show another example of this nice cms + mod.
Great! :wink:
Ionrock will also be happy to see it live ;-)

Cheers,

Yves
Image
PhpWCMS Evangelist, -- iRoutier.com Running phpWCMS 1.4.2, r354 -> Great Version!!!!
monotv
Posts: 4
Joined: Tue 8. Feb 2005, 21:44

Post by monotv »

Oups... there it is again.

First it worked like intended. Then i got the "Install Calendar Mod" Button together with this sql warning. I have to say i dont know much about php/mysql... i put in this line tho in the main.inc.php to check whats the problem: echo mysql_errno() . ": " . mysql_error(). "\n";

Now it tells me:

---
Thanks to Jérôme for his Graphical Text MOD.

Other modules might follow. GT MOD will be moved to admin section.
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in xxx/phpwcms/include/inc_module/mod_calendar/main.inc.php on line 13
Calendar Module Administration Area

Welcome to the calendar module. You can add/edit/delete items on the calendar as well as add categories to different events.

To install the mod make sure you have read the readme for the changes that needed to be made to the base. Once that is done you can click the button below to setup the database.

[Install Calendar Mod Button]

1064: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '1074194288 LIKE "%phpwcms_cm_events"' at line 1

----

Again: it worked, everything should be in place, even the tables exist :\

So, did i make a mistake or what could be the problem?

regards

edit: as i said i dont know much about php/sql... but to me it looks like it cant detect that the mod is allready installed, maybe because of this sql syntax error warning, so he keeps giving me this install message again sooner or later.
JackaL
Posts: 5
Joined: Tue 8. Feb 2005, 22:53

Post by JackaL »

StudioZ wrote:JackaL: In resumé there is three files to edit:
include/inc_conf/conf.inc.php
include/inc_front/content.func.inc.php
phpwcms.php
Hmmm....
I´m using this phpwcms_1.1.9-DEV, eg. latest version of phpwcms. So there is not folder called "inc_conf". conf.inc.php file is located in ****phpwcmsROOT****/config/phpwcms/ <-folder. So I´ve edited that as it should edit (straight by copy paste). Also I´ve edit those other two files, same way. Database i have to create by hand using externel mysql editor.
Still not working.

What comes to this content of install-folder, I don´t realise how this install script makes connection to database if there is no db infos (host, db, user, password and possible table prefix) given anywhere? So, there was prefix but still...

And where did this script parse this -> PHPWCMS_ROOT. ? Or is it getting that string from phpwcms´s original files?

I also think that this calendar MOD is great, as i´ve seen it working in some other places. As well as is this whole phpwcms system :D
JackaL
Posts: 5
Joined: Tue 8. Feb 2005, 22:53

Some sort of sollution... founded

Post by JackaL »

After I tried allkinds of tricks what have been in this topic, I´ve came to point where had to put my own little brains to working....
After i´ve made everything as it were in Installing guide I had to make little changes in phpwcms.php file....

First FIND :?: :

Code: Select all

      	case "modules":	//Modules
      	switch ($p) {
      		case 2:	 // Graphical Text MOD
      		if($phpwcms["gt_mod"]) { //enabled/disable GT MOD
      		include_once("include/inc_module/mod_graphical_text/main.inc.php");
      		}
      		break;
      		default: echo 'Thanks to J&eacute;r&ocirc;me for his <a href="phpwcms.php?do=modules&p=2">Graphical Text MOD</a>.';
      		echo '<br>&nbsp;<br>Other modules might follow. GT MOD will be moved to admin section.';
      	}
      	break;

Then REPLACE IT BY: :idea:

Code: Select all

	case "modules":		//modules
$wcsnav["modules"] = "<strong class=\"navtexta\">".$wcsnav["modules"]."</strong>";
	
		// CALENDAR MODULE...
	if ($phpwcms["calendar_mod"]) { // enabled/disable Calendar Module
		$subnav .= subnavtext("Kalenteri", "phpwcms.php?do=modules&p=99", $p, "99", 0);
	}
			// Graphical Text module
	if($phpwcms["gt_mod"]) { //enabled/disable GT MOD
	$subnav .= subnavtext($BL['be_subnav_graphicaltext_mod'], "phpwcms.php?do=modules&p=2", $p, "2", 0);
	}
                 
                  break; 

	break;

	case "messages":	//messages


So conclusion, problem was in this part of script ( but still i´ve to make db connections by hand...).
GT Mods info text breaked through calendar mod.... ( one break too much. ) .... and didn´t let this calendar mod to out put in backend.
[/b]
Post Reply