Page 2 of 10

Posted: Tue 13. Mar 2007, 10:58
by WeirdJerk
Tried it, sadly it didn't work out, still get the same error msg :(

Anybody around who got this mod running on 1.3.0 ?

qCal up and running

Posted: Wed 14. Mar 2007, 20:04
by ronnyn
Up and running!
After including "include_once (PHPWCMS_ROOT . '/include/inc_lib/dbcon.inc.php');" in file "include/inc_module/mod_qcal/backend.inc.php" the qCal is correctly displayed in backend and frontend!
It works superb on v1.3 both with $dbPrefix = DB_PREPEND and with $dbPrefix = ''!

Excelent, Jens!

Tanks
/ronnyn

Linux 2.6.12.6, PHP 5.2.1, mysql 4.1.11 and phpwcms 1.3

Posted: Sun 18. Mar 2007, 19:19
by baklavoni
@ronnyn
maybe you could help me a little bit.
have phpwcms v1.3 installed, and tried to install this calendar mod, but unsuccesfully :(
Can you give me few tips? What exactly you did with your phpwcms?
Please

Posted: Mon 26. Mar 2007, 18:13
by fardilha
Hi there!

I'm trying to use this mod with phpwcms 1.3.0 but it's impossible to follow item 5 of the read-me.

Code: Select all

5. In phpwcms.php, find:
case "modules":	//Modules
	switch ($p) 
	{

Insert after:
case 444: 	// QCalendar
	if($phpwcms["calendar_mod"]) 
	{
		include_once("./include/inc_module/mod_qcal/backend.inc.php");
	}
	break;
switch ($p) no longer exist.

Does anyone know the proper way to install this?

Thank you!
Pedro Fardilha

Posted: Tue 27. Mar 2007, 16:56
by JensZ
Hi,

It'll probably be awhile until I upgrade to 1.3.0 so that I can make qcalendar version independent. It seems like Oliver has revamped modules, so that there no longer is any need to change core code. In essence, you'll need three files: a language file, module.default.php, and backend.default.php.

Create these files in the specified directories inside the qcalendar module and I think you should be able to get it to work. Please note that this is COMPLETELY UNTESTED.

Create include/inc_module/mod_qcal/lang/en.lang.php (note: you must create the lang directory):

Code: Select all

<?php
// This file is required, but below code is really not necessary at this point
include_once (PHPWCMS_ROOT . '/include/inc_module/mod_qcal/conf.inc.php');
include_once ($qcal["path"] . '/inc_lang/en/lang.inc.php');
$BLM = $lang;
?>
Create include/inc_module/mod_qcal/module.default.php:

Code: Select all

<?php

// Module/Plug-in QCalendar

// register module name
//DO NOT USE SPECIAL CHARS HERE, NO WHITE SPACES, USE LOWER CASE!!!
$_module_name 			= 'qcalendar';

// module type - defines where used
// 0 = BE and FE, 1 = BE only, 2 = FE only
$_module_type 			= 0;

// Set if it should be listed as content part
// has content part: true or false
$_module_contentpart	= false;

?>
Create include/inc_module/mod_qcal/backend.default.php:

Code: Select all

<?php

// ----------------------------------------------------------------
// obligate check for phpwcms constants
if (!defined('PHPWCMS_ROOT')) {
   die("You Cannot Access This Script Directly, Have a Nice Day.");
}
// ----------------------------------------------------------------

if(isset($phpwcms['modules'][$module]['path'])) {

	include_once (PHPWCMS_ROOT . '/include/inc_module/mod_qcal/conf.inc.php');
	include_once ($qcal["path"] . '/backend.inc.php');
	
}

?>
With these changes, the backend should be running without any changes in phpwcms.php. You'll still need to run the database script in phpMyAdmin and make the other changes with regards to dbcon.inc.php mentioned in previous threads. This ONLY fixes fardilhas problems above.

Cheers,

Jens

Posted: Tue 27. Mar 2007, 17:13
by JensZ
Hello again,

German language pack available!!!

Dieter Missal has translated into German.

Create include/inc_module/mod_qcal/inc_lang/de/lang.inc.php:

Code: Select all

<?php

$lang["weekDays"] = array("So","Mo","Di","Mi","Do","Fr","Sa");
$lang["monthNames"] = array("Januar","Februar","März","April","Mai","Juni","Juli", "August", "September", "Oktober", "November", "Dezember");
$lang["locale"] = array("de_DE","de", "ge_GE");

$lang["today"] = "Heute";
$lang["no_events"] = "Heute keine Ereignisse.";
$lang["date"] = "Datum";
$lang["time"] = "Uhrzeit";
$lang["location"] = "Ort";
$lang["repeat"] = "wiederholen";
$lang["repeat_every"] = "wiederholen jeden";
$lang["repeat_until"] = "wiederholen bis";
$lang["day(s)"] = "Tage(e)";
$lang["week(s)"] = "Woche(n)";
$lang["month(s)"] = "Monat(e)";
$lang["year(s)"] = "Jahr(e)";
$lang["calendar"] = "Kalender";
$lang["span"] = "Zeitraum";
$lang["description"] = "Beschreibung";
$lang["set_info"] = "Dieser Eintrag gehört zu einer Serie mit %s Elementen.";
$lang["confirm_delete"] = "Wollen sie diesen Eintrag wirklich löschen ?";
$lang["confirm_delete_set"] = "Wollen Sie diese Serie wirklich löschen ?";
$lang["confirm_delete_calendar"] = "Wollen sie diesen Kalender wirklich löschen ?";
$lang["title"] = "Titel";
$lang["records_inserted"] = "%s Elemente eingefügt.";
$lang["records_updated"] = "%s Elemente aktualisiert.";
$lang["records_deleted"] = "%s Elemente gelöscht.";
$lang["records_moved"] = "%s Elemente verschoben.";
$lang["records_copied"] = "%s Element kopiert.";
$lang["all"] = "Alle";
$lang["delete_event"] = "Eintrag löschen";
$lang["delete_event_set"] = "Serie löschen";
$lang["edit_button"] = "bearbeiten";
$lang["move_button"] = "verschieben";
$lang["copy_button"] = "kopieren";
$lang["del_button"] = "löschen";
$lang["add_event"] = "Eintrag hinzufügen";
$lang["new_event"] = "Neuer Eintrag";
$lang["update"] = "aktualisieren";
$lang["update_set"] = "Serie aktualisieren";
$lang["update_single"] = "Nur diesen Eintrag aktualisieren";
$lang["cancel"] = "Abbruch";
$lang["import"] = "Import";
$lang["export"] = "Export";
$lang["add"] = "Hinzufügen";
$lang["edit"] = "Bearbeiten";
$lang["add_calendar"] = "Kalender hinzufügen";
$lang["new_calendar"] = "Neuer Kalender";
$lang["edit_calendar"] = "Kalender bearbeiten";
$lang["save"] = "Speichern";
$lang["delete"] = "Löschen";
$lang["from_date"] = "von Datum";
$lang["to_date"] = "bis datum";
$lang["export_ical"] = "nach iCal exportieren";
$lang["move_to"] = "verschieben nach";
$lang["move_set"] = "Serie verschieben";
$lang["move_single"] = "Nur diesen Eintrag verschieben";
$lang["move"] = "verschieben";
$lang["copy_to"] = "kopieren nach";
$lang["copy_set"] = "Serie kopieren";
$lang["copy_single"] = "nur diesen Eintrag kopieren";
$lang["copy"] = "kopieren";
$lang["session_timeout"] = "Session unterbrochen: bitte erneut anmelden.";
$lang["no_events_month"] = "Diesen Monat keine Einträge.";
$lang["days"] = "Tage";
$lang["h_update_event"] = "Eintrag aktualisieren";
$lang["h_add_event"] = "Eintrag hinzufügen";
$lang["h_move_event"] = "Einträge verschieben";
$lang["h_copy_event"] = "Einträge kopieren";
$lang["h_add_calendar"] = "Kalender hinzufügen";
$lang["h_edit_calendar"] = "Kalender bearbeiten";
$lang["h_ical_export"] = "nach iCalendar exportieren";
?>

Thanks Dieter!

Posted: Wed 28. Mar 2007, 11:05
by fardilha
Hi again.

Thank you so much for your help regarding this mod.
I'm certain that this will help us all making other mods work on 1.3.0

I just make the 3 new files but nothing happens.
No error, no connection problem, I simply can't see qcalendar link on the modules area.

I uploaded everything to it's proper place, added to the

Code: Select all

 /config/phpwcms/conf.inc.php
line the $phpwcms["calendar_mod"] = 1 and run the install.sql on phpmyadmin.

Latter i tried the include_once (PHPWCMS_ROOT . '/include/inc_lib/dbcon.inc.php'); inside

Code: Select all

include/inc_module/mod_qcal/backend.inc.php
but still no luck. It's as if i didn't install anyting

If you don't mind one question:
I noticed that one of the files we need to create is

Code: Select all

include/inc_module/module.default.php
Shouldn't this file be inside mod_qcal dir?
(When I tried that all I got was a blank site on both front and backend, I had to move it again to it's original place)

I'm using a fresh install of 1.3.0, maybe I'm missing some extra files?

Thank you!
Pedro Fardilha

Posted: Wed 28. Mar 2007, 11:18
by JensZ
Hi,
I noticed that one of the files we need to create is

Code: Select all

include/inc_module/module.default.php
Shouldn't this file be inside mod_qcal dir?
(When I tried that all I got was a blank site on both front and backend, I had to move it again to it's original place)
Yep, you are right! That should do it, don't know why it is not. When you hover over the "Qcalendar" link in backend, what does it say? How does this differ from "Glossary"? Does "glossary" work?
I'm using a fresh install of 1.3.0, maybe I'm missing some extra files?
I don't think so, but I'm not sure!

/Jens

Posted: Wed 28. Mar 2007, 11:34
by fardilha
Now, that was a fast response! :D

Let me try to explain what's happening here (My apologies since I'm portuguese and my English is a little rough):

• If i don't put include/inc_module/module.default.php inside mod_qcal dir nothing happens, there's no link on the backoffice.

• If i put that inside mod_qcal dir, all I've got it's a blank page.

But now that i know that it should be inside it, I'll try from there, to see if some of the other posts can give me some clue.

Thanks!
Pedro Fardilha

Small problem

Posted: Thu 29. Mar 2007, 03:53
by dracus
Hi,

I am running QCal on PHPWCMS 1.3.
Everything is working almost fine, just one think:
"You Cannot Access This Script Directly, Have a Nice Day."
I can't access QCal. Do you have any solution for this?

Thanks,
Dracus

Posted: Thu 29. Mar 2007, 09:14
by JensZ
Dracus,

PHPWCMS_ROOT is not defined, it should be done in include/inc_lib/default.inc.php, which is included in qcal.php. There's something wrong with your installation. When does it happen? Frontend or backend?

Jens

Posted: Thu 29. Mar 2007, 09:48
by tobsolution
Hello. Well done!

Is there a possibility to update the ionrock-calendermod to your qcal?

Posted: Thu 29. Mar 2007, 09:54
by JensZ
It replaces it. The SQL script as-is is not going to work. The database tables are the same with a few exceptions. You'll have to check column by column to see what the differences are. There are just a couple of new fields.

My instalation

Posted: Thu 29. Mar 2007, 10:08
by dracus
Hi,

I just did all your steps from manual and forum.
I would like to stress that i am using PhpWcms 1.3.
My installation steps:
1. Downloaded from http://www.ikfrej.se/index.php?downloads
2. Unzipped the package
3. Uploaded the contents of the qcalendar-X.X.X directory
to my web root.
4. In phpwcms.php, find:
case "modules":

Insert after:
// QCalendar jens
if($phpwcms["calendar_mod"])
{
$subnav .= subnavtext("Calendar", "phpwcms.php?do=modules&p=444", $p, "444", 0);
}

5. In phpwcms.php, find:
case "modules": //Modules
switch ($p)
{

Insert after:
case 444: // QCalendar
if($phpwcms["calendar_mod"])
{
include_once("./include/inc_module/mod_qcal/backend.inc.php");
}
break;

6. I set upped: $phpwcms["calendar_mod"] = 1 in
/config/phpwcms/conf.inc.php.

7. Chmoded /include/content/ical to 777.

8. Runed the install.sql script in phpMyAdmin.

Then I had some DB connection problems:
Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /*/*****/htdocs/phpwcms/include/inc_module/mod_qcal/inc_lib/QCalendar.php on line 434
Error:SELECT event.*, cat.name as catName FROM DB_PREPENDphpwcms_cm_events AS event INNER JOIN DB_PREPENDphpwcms_cm_categories AS cat ON cat.id = event.category WHERE approved = 1 AND ((MONTH(date) + (YEAR(date) * 12)) <= (3 + (2007 * 12))) AND ((MONTH(DATE_ADD(date, INTERVAL(span - 1) DAY)) + (YEAR(DATE_ADD(date, INTERVAL(span - 1) DAY)) * 12)) >= (3 + (2007 * 12))) ORDER BY date ASC, time ASC
I read your suggestions in the forum and i changed:

1) Added the following line to qcal.php:
Code:
require("include/inc_lib/dbcon.inc.php");

2) Replaceed:
Code:
<script language="javaScript" src="include/inc_module/mod_calendar/inc_js/overlib.js"></script>


with:
Code:
<script language="javaScript" src="include/inc_js/overlib.js"></script>

3)After included

"include_once (PHPWCMS_ROOT . '/include/inc_lib/dbcon.inc.php');"

in file "include/inc_module/mod_qcal/backend.inc.php"

And finally is working but I have got:
"You Cannot Access This Script Directly, Have a Nice Day."

in backend.

Can you help me with this, please.

Thanks,
Dracus

Posted: Fri 30. Mar 2007, 10:15
by JensZ
Qcalendar 1.0.6 ready!

* Version-independent: tested on 1.2.7+, please see new
installation instructions.
* Fix invalid path to qcal.js
* German language (thanks to Dieter Missal)

Thanks to Dieter Missal for German language and fardilha for giving me access to his 1.3.0 system.

Jens