Roundcube Community Forum

 

How to run a SQL mysql.sql file for plugin "rc-calendar"?

Started by Theet, March 26, 2010, 05:03:16 AM

Previous topic - Next topic

Theet

Quote from: dziobak;26433you can install 'phpPgAdmin' and make in easy way that table in database.
I don't know if there is only sql language used for mysql. If yes, you should contact with author of this plugin.

I don't know You mean phpMyAdmin?  Yes I have installed phpMyAdmin.
Is there a possibillity to install only the calendar part on phpMyAdmin?

How can I make a link to the database with below standing fields?

CREATE TABLE `events` (
  `event_id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
  `user_id` int(10) UNSIGNED NOT NULL DEFAULT '0',
  `start` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
  `end` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
  `summary` varchar(255) NOT NULL,
  `description` text NOT NULL,
  `location` varchar(255) NOT NULL DEFAULT '',
  `categories` varchar(255) NOT NULL DEFAULT '',
  `all_day` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY(`event_id`),
  CONSTRAINT `user_id_fk_events` FOREIGN KEY (`user_id`)
    REFERENCES `users`(`user_id`)
    /*!40008
      ON DELETE CASCADE
      ON UPDATE CASCADE */
) /*!40000 ENGINE=INNODB */ /*!40101 CHARACTER SET utf8 COLLATE utf8_general_ci */;

and something like:

/* database table name */
$rcmail_config['db_table_events'] = 'events';

password and user?

dziobak

#16
'phpMyAdmin' is a WWW interface for mysql database.
You are using PostgreSQL so you need to work o application designed for this database. If you what to use WWW interface you mus use 'phpPgAdmin'.

The code to create table is designed for mysql database. You must recode if to PostgreSQL database. For example MySQL users AUTO_INCREMENT and in PostgreSQL (if i remember this) is serial.

Theet

Quote from: dziobak;26447'phpMyAdmin' is a WWW interface for mysql database.
You are using PostgreSQL so you need to work o application designed for this database. If you what to use WWW interface you mus use 'phpPgAdmin'.

The code to create table is designed for mysql database. You must recode if to PostgreSQL database. For example MySQL users AUTO_INCREMENT and in PostgreSQL (if i remember this) is serial.

I have installed phpPgAdmin yesterday, but I can't login yet because of: "Login disallowed for security reasons".

Now I have to configure phpPgAdmin and I hope, after that login is possible, I can read the sql databases of the Synology...

After that I hope that it is possible to insert the field which are important for the calendar.
Then I think I can use all other plugins which have to use the postgreSQL database.

Thank You that I have learned much more after all Your advices, I hope it will succeeded!

Theet

Now I have installed phpPgAdmin into Synology, it works pritty well!
I can see all PostgreSQL databases and I can edit/add etc.

I cannot import a table, so I have made a table with 8 columns but the calendar is still
not working:

CREATE TABLE `events` (
  1) `event_id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
  2) `user_id` int(10) UNSIGNED NOT NULL DEFAULT '0',
  3) `start` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
  4) `end` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
  5) `summary` varchar(255) NOT NULL,
  6) `description` text NOT NULL,
  7) `category` varchar(255) NOT NULL DEFAULT '',
  8) `all_day` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY(`event_id`),
  CONSTRAINT `user_id_fk_events` FOREIGN KEY (`user_id`)
    REFERENCES `users`(`user_id`)
    /*!40008
      ON DELETE CASCADE
      ON UPDATE CASCADE */
) /*!40000 ENGINE=INNODB */ /*!40101 CHARACTER SET utf8 COLLATE utf8_general_ci */;

what to do with the last part of this sql sript? CONSTRAINT...to */; ??? How can I tell the table to do this?

Can anybody tell me how I define (commands) the fields above with phpPgAdmin?

SKaero


Theet

Quote from: skaero;26519Your going to have to convert the database to PostgreSQL here is a guild witch mite help Converting MySQL to PostgreSQL - Wikibooks, collection of open-content textbooks

Thank You, I have take some information from here.
Now I have:

This is okya now! I will not see this error anymore...
Now I will see "SERVER ERROR (OK)" after clicking on de button Calendar.
I will see the calendar and above the ERROR.

but...

The next error comes when I will make an appointment, what is probably wrong here?
When I make an appointment, I will get the message "SERVER CURRENTLY NOT AVAILABLE"

SKaero

Your most likely going to have to recode the query's that are going to the database. In the calendar.php in the plugin folder there are 5 $rcmail->db->query witch have MySQL formatted query's they will have to be reformatted for PostgreSQL.

Theet

Quote from: skaero;26555Your most likely going to have to recode the query's that are going to the database. In the calendar.php in the plugin folder there are 5 $rcmail->db->query witch have MySQL formatted query's they will have to be reformatted for PostgreSQL.

Okay, can you please tell me what You mean with the 5 $rcmail->db->query references?

SKaero

If you look in the calendar plugin folder in the calendar.php and search for "$rcmail->db->query references" you should find the query that are being sent to the database. The problem is the query are formatted for MySQL not PostgreSQL.

charan315

#24
Don't need to do any thing just delete the calendar directory with files using ftp
(previous files), download the attachment, uncompress it & upload it to plugins directory, that's it finish.


no need to run mysql file, no errors works 100%

jcreyesb

Quote from: Theet;26347I have installed the plugin "calendar":

RoundCube Calendar

In step 3: Run the SQL file in /calendar/SQL/

How do I run this SQL file?

The plugin have I uploaded into:
/volume1/@appstore/MailStation/roundcubemail/plugins/calendar

Then I have a link for the plugin to the calendar like:
/volume1/@appstore/MailStation/target/roundcubemail/config/main.inc.php

$rcmail_config['plugins'] = array(
'emoticons',
'calendar'
);

Now I will see "SERVER ERROR (OK)" after clicking on de button Calendar.
I will see the calendar and above the ERROR.

When I make an appointment, I will get the message "SERVER CURRENTLY NOT AVAILABLE"

In the forum of the rc-calendar they have write:

If the plugin has a SQL folder:

Adjust "Roundcube" Database as shown in the mysql.sql script.
By default MyRoundcube plugins support MySQL database.


Please who wants to help me?


Drop table events on roundcube database, and them use the sql file to create the drop table...

jcreyesb

Quote from: charan315;28109Don't need to do any thing just delete the calendar directory with files using ftp
(previous files), download the attachment, uncompress it & upload it to plugins directory, that's it finish.


no need to run mysql file, no errors works 100%

Is possible share calendar?

dziobak

if you use Rosali's version of calendar (Rosali's plugins), there is possibility to share it.

jcreyesb

yes... i use this is. how i can configured to share calendar?  levels

Public--all user
Private-- some users

dziobak

public - make an account, login with RC, go to calendar feed options, enable option read-only or read-write access, copy link in feed URL and paste it to calendar config file.
private - the same as public, but create another account and don't paste it to config file but into user's calendar feed options.