/[drupal]/contributions/modules/user_tags/user_tags.install
ViewVC logotype

Contents of /contributions/modules/user_tags/user_tags.install

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.4 - (show annotations) (download) (as text)
Thu Nov 30 01:44:57 2006 UTC (2 years, 11 months ago) by flk
Branch: MAIN
CVS Tags: DRUPAL-5--2-0, HEAD
Branch point for: DRUPAL-5--2, DRUPAL-5, DRUPAL-6--1
Changes since 1.3: +1 -0 lines
File MIME type: text/x-php
Update module-
term_user table has a row called vid for storage of vocab id.
inputted values are displayed back to user after submit...also info is redisplayed when coming back to edit page.
there is a fixed relationship between term_user and vocabulary/term_data....
1 <?php
2
3 function user_tags_install() {
4 drupal_set_message('Installing user_tags.....');
5 switch ($GLOBALS['db_type']) {
6 case 'mysql':
7 case 'mysqli':
8 $query1 = db_query("CREATE TABLE {term_user} (
9 vid int(10) unsigned NOT NULL default '0',
10 tid int(10) unsigned NOT NULL default '0',
11 uid int(10) unsigned NOT NULL default '0'
12 ) TYPE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */;");
13
14 $query2 = db_query("CREATE TABLE {user_tags_vocabulary} (
15 vid INT NOT NULL
16 ) TYPE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */;");
17
18 if ($query1 && $query2) {
19 $success = TRUE;
20 }
21 break;
22 }
23
24 //if all the tables were installed give confirmation, otherwise display error.
25 if ($success) {
26 drupal_set_message(t("user_tags module installed successfully."));
27 }
28 else {
29 drupal_set_message(t("user_tags module was not installed. Please view the user_tags module folder and read the INSTALL.txt"), 'error');
30 }
31 }

  ViewVC Help
Powered by ViewVC 1.1.2