Welcome, Guest. Please login or register.
Did you miss your activation email?
February 12, 2012, 06:40:00 AM

Login with username, password and session length
Search:     Advanced search
Interested in joining the WebsiteBaker team?
For more Information read here or on our new website.
149621 Posts in 21098 Topics by 7537 Members
Latest Member: lotte2
* Home Help Search Login Register
Pages: 1 ... 4 5 [6] 7   Go Down
Print
Author Topic: New Event Calendar v1.21b up to V1.3  (Read 46845 times)
rsmith

Offline Offline

Posts: 194


« Reply #125 on: May 10, 2006, 02:40:59 PM »

Hi...


Where one table is being created and the other is not, there seems to be an sql issue
The only "difference" i can see between the sql statements to create the tables is the use of the stylesheet text field (and where your failing is right after that).

Try the below code in a code section as pcwacht said, the stylesheet field is adjusted since its the only different type of field between the 2 tables

Code:
  $database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_event_settings`");
  $mod_event = 'CREATE TABLE `'.TABLE_PREFIX.'mod_event_settings` ('
. ' `page_id` INT ,'
. ' `section_id` INT ,'
. ' `stylesheet` TEXT ,'
. ' `evheader` VARCHAR(128) NOT NULL DEFAULT \'\' ,'
. ' `evfooter` VARCHAR(128) NOT NULL DEFAULT \'\' ,'
. ' `event_msg` VARCHAR(128) NOT NULL DEFAULT \'\' ,'
. ' `noevents_msg` VARCHAR(128) NOT NULL DEFAULT \'\' ,'
. ' `todayevent` INT ,'
. ' `monthevent` INT ,'
. ' `showalldata` INT ,'
                . ' `date_view` INT ,'
. ' PRIMARY KEY  (`section_id`)'
. ' )';
  $database->query($mod_event);

once done.. is the table created?


Hope it helps
Rob
Logged
pcwacht
Guest
« Reply #126 on: May 10, 2006, 06:40:27 PM »

And if the above doesn't, try this (replaced the quotes with double quotes)

Code:
  $database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_event_settings`");
  $mod_event = "CREATE TABLE `".TABLE_PREFIX."mod_event_settings` ("
. " `page_id` INT ,"
. " `section_id` INT ,"
. "  `stylesheet` TEXT ,"
. " `evheader` VARCHAR(128) NOT NULL DEFAULT '' ,"
. " `evfooter` VARCHAR(128) NOT NULL DEFAULT '' ,"
. " `event_msg` VARCHAR(128) NOT NULL DEFAULT '' ,"
. " `noevents_msg` VARCHAR(128) NOT NULL DEFAULT '' ,"
. " `todayevent` INT ,"
. " `monthevent` INT ,"
. " `showalldata` INT ,"
. " `date_view` INT ,"
. " PRIMARY KEY  (`section_id`)"
. " )";
  $database->query($mod_event);


John
Logged
ami

Offline Offline

Posts: 27


« Reply #127 on: May 10, 2006, 09:01:43 PM »

I think we get closer - but not ready...

If I take Robs code, I get the same error message while saving the code in my page.

If I take Johns code (double quotes), I get no error message, the page can be saved.
But: If I view the page (so the code can be done by WB, I think) nothing happens, no table '...event_settings.. .' will be created.

Hmmm, will try some more - strange server environment.

Axel
Logged
rsmith

Offline Offline

Posts: 194


« Reply #128 on: May 10, 2006, 09:08:01 PM »

Sounds like problems with the version of MySQL.... dont think i've seen any mention of version 3 in the forum... can you update it to 4? 5?...  I would imagine if the single/double quotes are the issue alot of the sql statements in most modules would need to be adjusted


Rob
Logged
ruebenwurzel
WebsiteBaker Org e.V.

Offline Offline

Posts: 7660



WWW
« Reply #129 on: May 10, 2006, 09:35:32 PM »

Hello,

ok here what is changed in install files to get better compatibility to mysql 5:

The first thing we changed was to give all TEXT and VARCHAR fields a default value. Old "TEXT NOT NULL", New "TEXT NOT NULL DEFAULT '\'\".

The second thing we changed was to delete the NOT NULL at all INT fields. Old "INT NOT NULL", New "INT".

So as you have problems with an older version of Mysql maybe to go back on the old version should do the trick.

Code:
$database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_event_settings`");
$mod_event = 'CREATE TABLE `'.TABLE_PREFIX.'mod_event_settings` ('
. ' `page_id` INT NOT NULL ,'
. ' `section_id` INT NOT NULL ,'
. ' `stylesheet` TEXT NOT NULL ,'
. ' `evheader` VARCHAR(128) NOT NULL ,'
. ' `evfooter` VARCHAR(128) NOT NULL  ,'
. ' `event_msg` VARCHAR(128) NOT NULL  ,'
. ' `noevents_msg` VARCHAR(128) NOT NULL ,'
. ' `todayevent` INT NOT NULL ,'
. ' `monthevent` INT NOT NULL ,'
. ' `showalldata` INT NOT NULL ,'
. ' `date_view` INT NOT NULL,'
. ' PRIMARY KEY  (`section_id`)'
. ' )';
$database->query($mod_event);

Matthias
Logged
ami

Offline Offline

Posts: 27


« Reply #130 on: May 10, 2006, 10:00:12 PM »

Hi together,

Matthias, that it is! With your code in my code page the table was created.

To correct mysef: there was something wrong with my mysql-version-numbers. I took them from phpinfo, but that  shows the API client version, correct? How could I get the version of mysql?
Its not my server, its the server of a provider for all schools of my schools town. I could not do anything at this server.

Now I will test it with Matthias' version to install the module correct.

some additions: I managed to install the event calendar correct. First installed the module, then created the settings-table (the other table was installed correct), then added a section with an event calendar.  Now it works.
But it is strange because one table was created, the other was not.

I hope it was helpful for you too, though I do not understand very much of SQL. I just tested your advices. Thank you for your help!!

Axel
« Last Edit: May 10, 2006, 10:09:09 PM by ami » Logged
pcwacht
Guest
« Reply #131 on: May 11, 2006, 07:16:33 AM »

And you for testing the different options on your particular install. It helps us improving the code.

We don't have many different settings running to test every situation Wink


To get your mysql version, try phpinfo

in a code section,
Code:
phpinfo();

It 'll show you what your server is capable of in php.


John
Logged
ami

Offline Offline

Posts: 27


« Reply #132 on: May 11, 2006, 09:08:48 AM »

Hi,

I took phpinfo, but is that the correct mysql version? In section mysql there I find Client API version 3.23.37 . Mysql version or another client to use mysql? As I wrote before, my other hoster shows me Client API version 3.23.49 - there it works!

Other problems are going on: After correct install I tried to place an event: Now my section is not displayed.

I will test more at home later, there I have access to phpmyadmin to look what happens in db (not now, I'm at school).

So I will go on trying modules with my diffenrent hosters an describe strange behaviour.  grin

Axel
Logged
ami

Offline Offline

Posts: 27


« Reply #133 on: May 16, 2006, 01:17:57 PM »

So, back again. Sorry for delay. Now I tried more with this module.

Installed it as described above, created a new section with an event calendar.
All seems to be okay - correct display of the empty calendar.

Changed some options - correct display.

Then I created a new event. It was successfully saved.
But there is no display of the calendar anymore. If I look into the source code, I can see, that there is the style-part (<style>...</style>) and nothing more.

The database entries seem to be correct.

Then I deleted the section - the database entries were not deleted.
I tried to create a section and put an event in it - no display.

I tried to create an then delete section three times. Now there are three sets in my database. I think, they should have been deleted when delting the section, right?

May be, thats all a problem of my mysql-version. But I will not get a newer one...  sad

Greetings, Axel
Logged
MikaK

Offline Offline

Posts: 14


« Reply #134 on: May 30, 2006, 09:39:34 PM »

How I can change the "Link" text what are saved to the database. I tried to find it, I think that I am blind?
Logged
rsmith

Offline Offline

Posts: 194


« Reply #135 on: May 30, 2006, 10:15:26 PM »

The text "Link" is stored in the WB database table, ....mod_event_dates
name_link is the field that holds the text

you can change this text in the save_event.php line 64 (Event Calendar v1.6)
this line:
if (!$evweb_url == "") { $name_link="Link"; }

when saved the text gets set to display "Link", you can modify the text  "Link" or edit it in the database table to change it.


Rob
Logged
cregy

Offline Offline

Posts: 3


« Reply #136 on: July 03, 2006, 05:53:05 PM »

Hi

Just install wb and am hoping to get an events calendar going. Can't install the module though - I get a blank page!

I'm just reading the thread and wonder whether there might be something with my mysql version - MySQL 4.1.20. Anyway as a total newbie I could be installing it totally wrong anyway!

Any help please!

Thanks

Rich
Logged
kweitzel
Forum administrator
*****
Offline Offline

Posts: 6819


WWW
« Reply #137 on: July 03, 2006, 06:24:11 PM »

a blank page is not a lot ... what have you been doing to install the module, do you get errors?

Have you created a page with the module as content (pagetyp: eventcalendar) and added some testevents?

cheers

Klaus
Logged

WebsiteBaker Org e.V. - for WebsiteBaker

cregy

Offline Offline

Posts: 3


« Reply #138 on: July 03, 2006, 06:38:32 PM »

Thanks Klaus

Sorry didn't give you enough info. What has happened?
1. Loaded and installed wb no worries
2. Added a page
3. Download events module
4. Navigated to events module and pressed upload
5. Nothing happened - it just produced a blank page after pressing upload.
6. Navigate to see if I can add an event.
7. No event type available

Hope that helps

Thanks

Rich
Logged
cregy

Offline Offline

Posts: 3


« Reply #139 on: July 04, 2006, 05:14:18 PM »

Oh well that is the end of wb for me.

Thanks.
Logged
kweitzel
Forum administrator
*****
Offline Offline

Posts: 6819


WWW
« Reply #140 on: July 04, 2006, 07:03:53 PM »

a couple of hoers with free support make the difference for you???

You should look at some commercial support contracts ... 12h, 24h and even 48h are not uncommon as responsetimes ... and that doesn't mean "Issue solved".

I am running my own business, and this here is my spare time ... I can not hang all the time here.

cheers

Klaus
Logged

WebsiteBaker Org e.V. - for WebsiteBaker

marccouture

Offline Offline

Posts: 216



« Reply #141 on: July 04, 2006, 07:31:09 PM »

Oh well that is the end of wb for me.

Thanks.


Your loss here. 

If you are willing to test out free software and try add-on modules, you should realize things won't necessarily always go as planned, but regardless of that, you'll still find many on this board who are friendly and who help out as much as they can, and frankly, try to get faster responses from commercial vendors, you may be in for a big surprise, service contract or not. 

Coders need feedback from end-users like us to move forward.  Kudos to Klaus, Matthias and others who take time to write and help us poor newbies.  grin

Bottom-line: I say WB rocks, even with its quirks.
Logged

Marc C.
YeShakka

Offline Offline

Posts: 146



« Reply #142 on: July 19, 2006, 11:06:36 AM »

Hi!
I have some requests for the next version:

* When I am in the actual (current) month the shouldn't be a message saying "Back to current month"
* when I did the last update, my settings in options where being overwritte by default ones. Please either backup the oold one or enshure backward compability.
* Header/Footer should be WYSIWGY or I should have space for more that just one sentence in footer
* Clean up function on the options page: delete all events earlier than a date that the user puts in (or like delet all events older than x month /days /weeks)
* include exprieing date when entering a new event

...and dear develpoers, take this as a wish list. Your module is already very nice
Logged
ruebenwurzel
WebsiteBaker Org e.V.

Offline Offline

Posts: 7660



WWW
« Reply #143 on: July 19, 2006, 11:33:44 AM »

Hello,

Quote
* When I am in the actual (current) month the shouldn't be a message saying "Back to current month"
Wich version did you use? In Version 1.6.2 this should be solved.

Quote
* when I did the last update, my settings in options where being overwritte by default ones. Please either backup the oold one or enshure backward compability.
Thats a difficult point. If there are new features we only get them in the database with overwriting user values. The second option is to let the user manually add the new features, wich i think causes more problems.

Quote
* Header/Footer should be WYSIWGY or I should have space for more that just one sentence in footer
If you wanna have more formated text in the header and the footer make a WYSIWYG section above and under the event section. Header and footer are only thought for short informations.

Quote
* Clean up function on the options page: delete all events earlier than a date that the user puts in (or like delet all events older than x month /days /weeks)
that would be a nice feature i agree, also the option to say only to show actually events, btw. actually events and events from the last X days.

Quote
* include exprieing date when entering a new event
also a nice feature. Maybe together with the one above. give a start and an end day of expiring and delete of the event is x day passed.

Think about it

thanks for your ideas

Matthias
« Last Edit: July 20, 2006, 03:19:43 PM by ruebenwurzel » Logged
YeShakka

Offline Offline

Posts: 146



« Reply #144 on: July 20, 2006, 12:54:52 PM »

Hello,

Quote
* When I am in the actual (current) month the shouldn't be a message saying "Back to current month"
Wich version did you use? In Version 1.6.2 this should be solved.
I am useing 1.62. Maybe something went wrong on a update?

Quote
* when I did the last update, my settings in options where being overwritte by default ones. Please either backup the oold one or enshure backward compability.
Thats a difficult point. If there are new features we only get them in the database with overwriting user values. The second option is to let the user manually add the new features, wich i think causes more problems.
If you stay with the actual procedure then please unclude some warning (maybe on the addons page) that the users make copy the options page to a text file and give a changelog if you changed the options radically. a update would be less toublesome.

Quote
If you wanna have more formated text in the header and the footer make a WYSIWYG section above and under the event section. Header and footer are only thought for short informations.
OK, lokking at the sections concept of WB your are absolutely right wink

Quote
* Clean up function on the options page: delete all events earlier than a date that the user puts in (or like delet all events older than x month /days /weeks)
that would be a nice feature i agree, also the option to say only to show actually events, btw. actually events and events from the last X days.

* include exprieing date when entering a new event
also a nice feature. Maybe together with the one above. give a start and an end day of expiring and delete of the event is x day passed.
Good, we agreed.
  • The first one would be a rather administrative option. So it could be included in the options page
  • the 2. one could be integrated in the add-event page

A nice day to all of you!
Logged
ruebenwurzel
WebsiteBaker Org e.V.

Offline Offline

Posts: 7660



WWW
« Reply #145 on: July 20, 2006, 03:21:33 PM »

Hello,

Quote
* When I am in the actual (current) month the shouldn't be a message saying "Back to current month"
Wich version did you use? In Version 1.6.2 this should be solved.
I am useing 1.62. Maybe something went wrong on a update?

Nothing went wrong, thought it was solved but it is in 1.62 already there. So yes should be changed in the next version.

Sorry

Matthias
Logged
Lou

Offline Offline

Posts: 6


« Reply #146 on: July 25, 2006, 12:32:17 AM »

I'm using the event calendar v1.6.2 in a production environment with the newest WB as a clean install.  I downloaded the event calendar from the WB addons repository and installation was without any problems.  However, the long description is not displaying when the event calendar is viewed.  I verified that it is in the database under event_longdesc.  Also, when I add an event with a long description and try to modify it later the long description does not appear in the WYSIWYG box.  I am using FCKeditor on one installation and Xinha on the other.

Why is the long description not being displayed?
Logged
beerman

Offline Offline

Posts: 1


« Reply #147 on: July 25, 2006, 01:32:56 AM »

Why does the description not show for events other than "Today's Events"

What I mean is that if I click on an event that is a month or more ahead of time, only the title is shown? is this an error?

Do you have a newer version out that I don't know of? I got the latest from the addons area.

Thanks.
Logged
pcwacht
Guest
« Reply #148 on: July 28, 2006, 08:20:05 PM »

tables aren't made.
Can it has something to do with
in install.php you'll see:
Code:
. ' `stylesheet` TEXT NOT NULL DEFAULT \'\' ,'
This tells mysql to add a field named stylesheet, type text, can't be empty and the default is empty....
Can't be empty and default is empty won't work with some mysql versions I think

Just change the \'\'  with \'0\'
and it is not empty anymore so it will work (I think)

Allso see : http://forum.websitebaker.org/index.php/topic,564.60.html for the same solution to diff mod

John

Edited, seems to be only so if field has type int.
« Last Edit: July 28, 2006, 08:22:25 PM by pcwacht » Logged
pcwacht
Guest
« Reply #149 on: July 28, 2006, 10:01:10 PM »

Digged and found the error

When loading the mod_event_settings I get the error:
Quote
All parts of a PRIMARY KEY must be NOT NULL

Adding NOT NULL to the section_id solved the issue
Here is the working code: (file install.php) plus the check on db error!

Code:
<?php
  
// Create table for event module settings (per page/section)
  
$database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_event_settings`");
  
$mod_event 'CREATE TABLE `'.TABLE_PREFIX.'mod_event_settings` ('
' `page_id` INT ,'
' `section_id` INT NOT NULL,'
' `stylesheet` TEXT NOT NULL  ,'
' `evheader` VARCHAR(128) NOT NULL  ,'
' `evfooter` VARCHAR(128) NOT NULL  ,'
' `event_msg` VARCHAR(128) NOT NULL  ,'
' `noevents_msg` VARCHAR(128) NOT NULL  ,'
' `todayevent` INT ,'
' `monthevent` INT ,'
' `showalldata` INT ,'
            
' `date_view` INT ,'
' PRIMARY KEY  (`section_id`)'
' )';
  
$database->query($mod_event);

// Check if there is a db error
if($database->is_error()) {  
   echo 
'Table settings : '.$database->get_error();
}

  
// Create table for events
  
$database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_event_dates`");
  
$mod_event 'CREATE TABLE `'.TABLE_PREFIX.'mod_event_dates` ('
'`page_id` INT ,'
'`section_id` INT ,'
'`event_id` INT AUTO_INCREMENT ,'
'`date` date NOT NULL ,'
'`event_desc` varchar(255) NOT NULL  ,'
'`event_longdesc` TEXT NOT NULL  ,'
'`evweb_url` varchar(128) NOT NULL  ,'
'`name_link` varchar(128) NOT NULL  ,'
'PRIMARY KEY  (`event_id`),'
'KEY `date` (`date`)'
')';
  
$database->query($mod_event);

// Check if there is a db error
if($database->is_error()) {  
   echo 
'Table settings : '.$database->get_error();
}

// Insert info into the search table
// Module query info
$field_info = array();
$field_info['page_id'] = 'page_id';
$field_info['title'] = 'page_title';
$field_info['link'] = 'link';
$field_info['description'] = 'description';
$field_info['modified_when'] = 'modified_when';
$field_info['modified_by'] = 'modified_by';
$field_info serialize($field_info);
$database->query("INSERT INTO ".TABLE_PREFIX."search (name,value,extra) VALUES ('module', 'event', '$field_info')");
// Query start
$query_start_code "SELECT [TP]pages.page_id, [TP]pages.page_title, [TP]pages.link, [TP]pages.description, [TP]pages.modified_when, [TP]pages.modified_by FROM [TP]mod_event_settings, [TP]mod_event_dates, [TP]pages WHERE ";
$database->query("INSERT INTO ".TABLE_PREFIX."search (name,value,extra) VALUES ('query_start', '$query_start_code', 'event')");
// Query body
$query_body_code "
[TP]pages.page_id = [TP]mod_event_settings.page_id AND [TP]mod_event_settings.evheader [O] \'[W][STRING][W]\' AND [TP]pages.searching = \'1\' OR
[TP]pages.page_id = [TP]mod_event_settings.page_id AND [TP]mod_event_dates.event_desc [O] \'[W][STRING][W]\' AND [TP]pages.searching = \'1\' OR
[TP]pages.page_id = [TP]mod_event_settings.page_id AND [TP]mod_event_dates.event_longdesc [O] \'[W][STRING][W]\' AND [TP]pages.searching = \'1\' OR
[TP]pages.page_id = [TP]mod_event_settings.page_id AND [TP]mod_event_dates.evweb_url [O] \'[W][STRING][W]\' AND [TP]pages.searching = \'1\' OR
[TP]pages.page_id = [TP]mod_event_settings.page_id AND [TP]mod_event_dates.name_link [O] \'[W][STRING][W]\' AND [TP]pages.searching = \'1\'
"
;
$database->query("INSERT INTO ".TABLE_PREFIX."search (name,value,extra) VALUES ('query_body', '$query_body_code', 'event')");
// Query end
$query_end_code "";
$database->query("INSERT INTO ".TABLE_PREFIX."search (name,value,extra) VALUES ('query_end', '$query_end_code', 'event')");

// Insert blank row (there needs to be at least on row for the search to work
$database->query("INSERT INTO ".TABLE_PREFIX."mod_event_settings (section_id,page_id) VALUES ('0','0')");
$database->query("INSERT INTO ".TABLE_PREFIX."mod_event_dates (section_id,page_id) VALUES ('0','0')");
}

?>

Have fun,
John
Logged
Pages: 1 ... 4 5 [6] 7   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!