vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   Major Additions - Forum Tournaments & Ladders (https://vborg.vbsupport.ru/showthread.php?t=189375)

powerbook 10-17-2008 07:29 PM

ALTER TABLE vb_tmnt_ladder_players ADD rank INT(10) UNSIGNED DEFAULT '1000' NOT NULL ;;


Quote:

Originally Posted by bananalive (Post 1647210)
For New Installs:
Use Attachment 88248 to completely uninstall modification tables. (Only use if you have no tournament data, it completely uninstalls the mod.)
Then import Attachment 88249 which is updated product file for mod

For upgrades:
Import Attachment 88249 which is updated product file for mod


bananalive 10-17-2008 07:31 PM

Quote:

Originally Posted by powerbook (Post 1647235)
ALTER TABLE vb_tmnt_ladder_players ADD rank INT(10) UNSIGNED DEFAULT '1000' NOT NULL ;;

Are you new install or upgrade?

conker1 10-17-2008 07:35 PM

i got this error

Code:

Database error in vBulletin 3.7.3:

Invalid SQL:

  INSERT INTO `vbtmnt_rules` (`id`, `rules`) VALUES
(1, 'Your Rules Here');

MySQL Error  : Duplicate entry '1' for key 1
Error Number  : 1062

and errorfix2008.xml

Code:

Database error in vBulletin 3.7.3:

Invalid SQL:
ALTER TABLE vbusergroup DROP COLUMN tournamentpermissions;;

MySQL Error  : Can't DROP 'tournamentpermissions'; check that column/key exists
Error Number  : 1091


powerbook 10-17-2008 07:37 PM

I had a install...Run the errorfix checked DB removed tables then run install..

Quote:

Originally Posted by bananalive (Post 1647236)
Are you new install or upgrade?


bananalive 10-17-2008 07:39 PM

Quote:

Originally Posted by conker1 (Post 1647239)
i got this error

Any errors in error-fix.xml doesnt matter.

Find and delete following code from product-tournament2008.xml then re-import.
Code:

$vbulletin->db->query_write("
  INSERT INTO `". TABLE_PREFIX ."tmnt_rules` (`id`, `rules`) VALUES
(1, 'Your Rules Here')");


powerbook 10-17-2008 07:45 PM

There is a DROP TABLE IF EXISTS ". TABLE_PREFIX ."tmnt_ladder_players; after it creates it in the xml...

Quote:

Originally Posted by powerbook (Post 1647242)
I had a install...Run the errorfix checked DB removed tables then run install..


bananalive 10-17-2008 07:45 PM

Quote:

Originally Posted by powerbook (Post 1647242)
I had a install...Run the errorfix checked DB removed tables then run install..

The product-errorfix.xml has code (see below) to remove ladder players data tables so you should not get multiple column error.
PHP Code:

$vbulletin->db->query_write("
DROP TABLE IF EXISTS "
TABLE_PREFIX ."tmnt_ladder_players;
"
); 


bananalive 10-17-2008 07:47 PM

Quote:

Originally Posted by powerbook (Post 1647251)
There is a DROP TABLE IF EXISTS ". TABLE_PREFIX ."tmnt_ladder_players; after it creates it in the xml...

it is enclosed in <uninstallcode> tags so it only execs the query on uninstall of product.

powerbook 10-17-2008 07:56 PM

From product-tournament2008.xml

Line 236:
$vbulletin->db->query_write("
CREATE TABLE IF NOT EXISTS `". TABLE_PREFIX ."tmnt_ladder_players` (


LINE 256:
$vbulletin->db->query_write("
DROP TABLE IF EXISTS ". TABLE_PREFIX ."tmnt_ladder_players;
");


Quote:

Originally Posted by bananalive (Post 1647254)
it is enclosed in <uninstallcode> tags so it only execs the query on uninstall of product.


bananalive 10-17-2008 08:07 PM

Quote:

Originally Posted by powerbook (Post 1647259)
From product-tournament2008.xml

Line 236:
$vbulletin->db->query_write("
CREATE TABLE IF NOT EXISTS `". TABLE_PREFIX ."tmnt_ladder_players` (


LINE 256:
$vbulletin->db->query_write("
DROP TABLE IF EXISTS ". TABLE_PREFIX ."tmnt_ladder_players;
");

Everything in installcode execs on product install and everything in uninstall execs on product uninstall
Code:

<code version="2.4.2.1">
                        <installcode><![CDATA[
$vbulletin->db->query_write("
  CREATE TABLE IF NOT EXISTS `". TABLE_PREFIX ."tmnt_ladders` (
  `id` int(11) NOT NULL auto_increment,
  `title` varchar(50) NOT NULL,
  `description` text NOT NULL,
  `noplayers` int(3) NOT NULL,
  `status` int(3) NOT NULL,
  `cr_userid` int(10) NOT NULL,
  `cr_username` varchar(100) NOT NULL,
  `cr_time` int(10) NOT NULL,
  `cr_ip` varchar(100) NOT NULL,
  `ed_userid` int(10) NOT NULL,
  `ed_username` varchar(100) NOT NULL,
  `ed_time` int(10) NOT NULL,
  `ed_ip` varchar(50) NOT NULL,
  `threadid` int(10) NOT NULL,
  `views` int(10) NOT NULL default '0',
  `winpoints` int(10) NOT NULL default '2',
  `drawpoints` int(10) NOT NULL default '1',
  `losepoints` int(10) NOT NULL default '0',
  PRIMARY KEY  (`id`)
) TYPE=MyISAM");
$vbulletin->db->query_write("
  CREATE TABLE IF NOT EXISTS `". TABLE_PREFIX ."tmnt_ladder_games` (
  `id` int(11) NOT NULL auto_increment,
  `u` int(10) NOT NULL,
  `u2` int(10) NOT NULL,
  `time` int(10) NOT NULL,
  `accepted` int(10) NOT NULL,
  `lid` int(11) NOT NULL,
  `score_u` int(20) NOT NULL,
  `score_u2` int(20) NOT NULL,
  `agree_u` int(10) NOT NULL,
  `agree_u2` int(10) NOT NULL,
  `finished` int(10) NOT NULL,
  PRIMARY KEY  (`id`)
) TYPE=MyISAM");
$vbulletin->db->query_write("
  CREATE TABLE IF NOT EXISTS `". TABLE_PREFIX ."tmnt_ladder_players` (
  `id` int(11) NOT NULL auto_increment,
  `userid` int(10) NOT NULL,
  `username` varchar(100) NOT NULL,
  `lid` int(11) NOT NULL,
  `time` int(10) NOT NULL,
  `ip` varchar(100) NOT NULL,
  `wins` int(10) NOT NULL,
  `draws` int(10) NOT NULL,
  `loses` int(10) NOT NULL,
  `challenges` int(10) NOT NULL,
  PRIMARY KEY  (`id`)
) TYPE=MyISAM");
]]></installcode>
                        <uninstallcode><![CDATA[
$vbulletin->db->query_write("
DROP TABLE IF EXISTS ". TABLE_PREFIX ."tmnt_ladders;
");
$vbulletin->db->query_write("
DROP TABLE IF EXISTS ". TABLE_PREFIX ."tmnt_ladder_games;
");
$vbulletin->db->query_write("
DROP TABLE IF EXISTS ". TABLE_PREFIX ."tmnt_ladder_players;
");
$vbulletin->db->query_write("ALTER TABLE ". TABLE_PREFIX ."usergroup DROP COLUMN ladderpermissions;");
]]></uninstallcode>
                </code>



All times are GMT. The time now is 08:12 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04494 seconds
  • Memory Usage 1,764KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (1)bbcode_php_printable
  • (9)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (5)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete