Author Topic: Can't get installScript.php to work  (Read 4432 times)

Offline Mattitude

Can't get installScript.php to work
« on: March 31, 2006, 11:03:29 pm »
Unfortunately after having manually installed the shop mod I can't get it to do the database stuff... it tries saying that it's already installed (I did have it installed on an earlier version yonks ago, but I'm pretty sure I deleted most of the info), so I have a request if you can please:

Either:

Do a php file that will not stop installing just because the version 2.0 is returned

OR

Do a sql file of the installScript.php

(I'd prefer the second option).

Offline Daniel15

Re: Can't get installScript.php to work
« Reply #1 on: April 01, 2006, 02:58:35 pm »
OK, here's the basic MySQL queries. I just grabbed these from the installScript.php file. Tell me how you go.

Code: [Select]

CREATE TABLE `smf_shop_items` (
   `id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
   `name` VARCHAR(50) NOT NULL,
   `desc` TEXT NOT NULL,
   `price` DECIMAL(8,2) UNSIGNED NOT NULL,
   `module` TINYTEXT NOT NULL,
   `stock` SMALLINT NOT NULL,
   `info1` TEXT NOT NULL,
   `info2` TEXT NOT NULL,
   `info3` TEXT NOT NULL,
   `info4` TEXT NOT NULL,
   `input_needed` TINYINT UNSIGNED DEFAULT '1' NOT NULL,
   `can_use_item` TINYINT UNSIGNED DEFAULT '1' NOT NULL,
   `image` TINYTEXT NOT NULL,
   PRIMARY KEY (`id`)
   );


CREATE TABLE `smf_shop_inventory` (
  `id` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
  `ownerid` INT UNSIGNED NOT NULL ,
  `itemid` INT UNSIGNED NOT NULL ,
  `amtpaid` DECIMAL(8, 2) UNSIGNED DEFAULT '0.00' NOT NULL,
              `trading` TINYINT(1) UNSIGNED NOT NULL,
  `tradecost` DECIMAL(8, 2) NOT NULL,
  PRIMARY KEY (`id`)
  );

ALTER TABLE `smf_members` ADD `money` DECIMAL(9, 2) UNSIGNED DEFAULT '0.00' NOT NULL;
ALTER TABLE `smf_members` ADD `moneyBank` DECIMAL(9, 2) UNSIGNED DEFAULT '0.00' NOT NULL;

INSERT INTO `smf_settings` (`variable`,`value`) VALUES ('shopVersion', '2.1');
INSERT INTO `smf_settings` (`variable`,`value`) VALUES ('shopDate', '11th March 2006');
INSERT INTO `smf_settings` (`variable`,`value`) VALUES ('shopBuild', '9');
INSERT INTO `smf_settings` (`variable`,`value`) VALUES ('shopCurrencyPrefix', '');
INSERT INTO `smf_settings` (`variable`,`value`) VALUES ('shopCurrencySuffix', ' credits');
INSERT INTO `smf_settings` (`variable`,`value`) VALUES ('shopPointsPerTopic', '10');
INSERT INTO `smf_settings` (`variable`,`value`) VALUES ('shopPointsPerPost', '8');
INSERT INTO `smf_settings` (`variable`,`value`) VALUES ('shopInterest', '2');
INSERT INTO `smf_settings` (`variable`,`value`) VALUES ('shopBankEnabled', '1');
INSERT INTO `smf_settings` (`variable`,`value`) VALUES ('shopImageWidth', '32'), ('shopImageHeight', '32');
INSERT INTO `smf_settings` ( `variable` , `value` ) VALUES ('shopTradeEnabled', '1');
INSERT INTO `smf_settings` VALUES ('shopItemsPerPage', '10');

UPDATE `smf_members` SET `money` = '10000' WHERE `ID_MEMBER` = '1' LIMIT 1;

INSERT INTO `smf_shop_items` ( `id` , `name` , `desc` , `price` , `module` , `stock` ) VALUES (
'', 'Test Item', 'Just a test item!', '10.00', 'testitem', '50');
INSERT INTO `smf_shop_items` ( `id` , `name` , `desc` , `price` , `module` , `stock` ) VALUES (
'', 'Random Money', 'Get a random amount of money, between -190 and 190!', '75', 'RandomMoney', '50');
INSERT INTO `smf_shop_items` ( `id` , `name` , `desc` , `price` , `module` , `stock` ) VALUES (
'', 'Add 100 to Post Count', 'Increase your Post Count by 100!', '50', 'AddToPostCount', '50');
INSERT INTO `smf_shop_items` ( `id` , `name` , `desc` , `price` , `module` , `stock` ) VALUES (
'', 'Increase Karma', 'Increase your Karma by 5', '100', 'IncreaseKarma', '50');
INSERT INTO `smf_shop_items` ( `id` , `name` , `desc` , `price` , `module` , `stock` ) VALUES (
'', 'Change Username', 'Change your Username!', '50', 'ChangeUsername', '50');
INSERT INTO `smf_shop_items` ( `id` , `name` , `desc` , `price` , `module` , `stock` ) VALUES (
'', 'Change User Title', 'Change your User Title', '50', 'ChangeUserTitle', '50');
INSERT INTO `smf_shop_items` ( `id` , `name` , `desc` , `price` , `module` , `stock` ) VALUES (
'', 'Increase Total Time', 'Increase your total time logged in by 12 hours.', '50', 'IncreaseTimeLoggedIn', '50');
INSERT INTO `smf_shop_items` ( `id` , `name` , `desc` , `price` , `module` , `stock` ) VALUES (
'', 'Change Other\\'s Title',  'Change someone else\\'s title', '200', 'ChangeOtherTitle', '50');
INSERT INTO `smf_shop_items` ( `id` , `name` , `desc` , `price` , `module` , `stock` ) VALUES (
'', 'Decrease Posts by 100', 'Decrease <i>Someone else\\'s</i> post count by 100!!', '200', 'DecreasePost', '50');

UPDATE smf_shop_items SET info1 = '100', input_needed = 0 WHERE module = 'AddToPostCount';
UPDATE smf_shop_items SET info1 = '5', input_needed = 0 WHERE module = 'IncreaseKarma';
UPDATE smf_shop_items SET info1 = '43200', input_needed = 0 WHERE module = 'IncreaseTimeLoggedIn';
UPDATE smf_shop_items SET info1 = '-190', info2 = '190', input_needed = 0 WHERE module = 'RandomMoney';
UPDATE smf_shop_items SET info1 = '40', input_needed = 1 WHERE module = 'Steal';

INSERT INTO `smf_shop_items` VALUES ('', 'Steal Credits', 'Try to steal credits from another member!', 50, 'Steal', 50, '40', '', '', '', 1, 1, 'blank.gif');
INSERT INTO `smf_shop_items` VALUES ('', 'Rock', 'Well.... It does nothing', 5, 'Rock', 50, '', '', '', '', 0, 0, 'blank.gif');


INSERT INTO `smf_shop_items` (`name`, `desc`, `price`, `module`, `stock`, `input_needed`, `can_use_item`) VALUES (
'Change Display Name', 'Change your display name!', 50.00, 'ChangeDisplayName', 49, 1, 1);


INSERT INTO `smf_shop_items` (`name`, `desc`, `price`, `module`, `stock`, `input_needed`, `can_use_item`) VALUES ('Sticky Topic', 'Make any one of your topics a sticky!', 400.00, 'StickyTopic', 50, 1, 1);


UPDATE smf_shop_items SET image = 'blank.gif';


ALTER TABLE `smf_boards` ADD `countMoney` TINYINT(1) UNSIGNED DEFAULT '1' NOT NULL;

« Last Edit: June 10, 2006, 02:27:04 pm by daniel15 »

Offline Mattitude

Re: Can't get installScript.php to work
« Reply #2 on: April 01, 2006, 06:04:49 pm »
Thanks - as I don't have access to be able to get to the port required to run phpmyadmin from public computers, it will probably be a while before I can do it as I'll have to wait until I next go to a friend's house (which wouldn't be blocked).

Offline Daniel15

Re: Can't get installScript.php to work
« Reply #3 on: April 01, 2006, 08:13:13 pm »
You mean your ISP blocks cPanel? If so, cPanel Proxy will help you. They have an auto installer where you type your server address, cPanel username and password and it installs automatically for you.

I tried cPanel Proxy, and it works. Once it's installed, you can access cPanel by going to cpanel.[domain], for example http://cpanel.dansoftaus.uni.cc

Offline Mattitude

Re: Can't get installScript.php to work
« Reply #4 on: April 11, 2006, 07:23:39 pm »
You mean your ISP blocks cPanel? If so, cPanel Proxy will help you. They have an auto installer where you type your server address, cPanel username and password and it installs automatically for you.

I tried cPanel Proxy, and it works. Once it's installed, you can access cPanel by going to cpanel.[domain], for example http://cpanel.dansoftaus.uni.cc

No, what I meant was the only internet access I have at present is via my local library - and they block access to ports.

Offline geezmo

Re: Can't get installScript.php to work
« Reply #5 on: June 10, 2006, 04:00:19 am »
followed the script above but got the following error:

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ALTER TABLE `smf_members` ADD `moneyBank` DECIMAL(9, 2) UNSIGNED

my mySQL version is 5.0.22. what do i do?

Offline Daniel15

Re: Can't get installScript.php to work
« Reply #6 on: June 10, 2006, 02:23:44 pm »
Quote
my mySQL version is 5.0.22. what do i do?
That's a version of MySQL that I haven't tested against. Unfortunately, I don't know much about the changes that MySQL 5 did to the syntax, so I can't fix it :(

EDIT: Actually, it doesn't seem to be MySQL at all. Try the edited SQL queries above again (I forgot to put a semicolon after one of the queries)
« Last Edit: June 10, 2006, 02:29:19 pm by daniel15 »