Seite 1 von 2

SQL

Verfasst: 21.10.2008 21:24
von Heracross
Was muss man da machen?
Kann mir das jemand genau erklären?

Code: Alles auswählen

<author-notes lang="en-gb"><![CDATA[Please don't forget to set the forums for the default-Template, because at start every new user will only see the forums in this template and those who have the static-flag.
		
		If you want you can use the pre-patched files contained in the 'prepatched_<VERSION_OF_YOUR_FORUM>'-directory. Please make sure that you don't overwrite other modifications and that you only use the files for YOUR phpbb-Version.]]></author-notes>
		<author-notes lang="de"><![CDATA[Bitte vergiss nicht die Foren für das default-template eintzstellen, da jeder neue Userr am Anfang nur diese und die als statisch markierten Foren sieht.
		
		Wenn du willst kannst du die Dateien aus dem Ordner 'prepatched_<VERSIONSNUMMER_DEINES_FORUMS>' nutzen. Wenn du dies tust, achte bitte darauf dass du keine schon vorhandenen Mods überschreibst und du die Dateien für DEINE phpbb-version nutzt.]]></author-notes>
	</header>
	<action-group>
		<sql><![CDATA[CREATE TABLE `phpbb_forums_selected` (`user_id` MEDIUMINT( 8 ) NOT NULL , `forum_id` MEDIUMINT( 8 ) NOT NULL , PRIMARY KEY ( `user_id` , `forum_id` ) )]]></sql>
		<sql><![CDATA[ALTER TABLE `phpbb_forums` ADD `static` TINYINT( 1 ) NOT NULL DEFAULT '0']]></sql>
		<sql><![CDATA[CREATE TABLE `phpbb_selection_templates` (`template_id` MEDIUMINT( 8 ) NOT NULL ,`forum_id` MEDIUMINT( 8 ) NOT NULL ,PRIMARY KEY ( `template_id` , `forum_id` ))]]></sql>
		<sql><![CDATA[CREATE TABLE `phpbb_selection_template_names` (`template_id` MEDIUMINT( 8 ) NOT NULL AUTO_INCREMENT ,`template_name` VARCHAR( 255 ) NOT NULL ,PRIMARY KEY ( `template_id` ))]]></sql>
		<sql><![CDATA[INSERT INTO `phpbb_selection_template_names` (`template_id` ,`template_name`)VALUES ('-1', 'Default'), ('0', 'reserved');]]></sql>

Verfasst: 21.10.2008 22:07
von Metzle
Hallo,

du musst die SQL-Befehle in deiner Datenbank ausführen.

Verfasst: 21.10.2008 22:26
von Heracross
Hallo
Und wie soll das gehen?
Kannst du mir ne genaue Anleitung geben?
Danke

Verfasst: 22.10.2008 00:00
von Metzle
Hallo,

da ich keine Ahnung habe, wie man bei deinem Hoster zu phpMyAdmin kommt, musst du das selbst rausfinden, aber zum KB:pma_faq hab ich dir was.

Verfasst: 22.10.2008 17:28
von Heracross
Danke, aber noch eine Frage!

Die SQL Aktion,die ich machen muss steht ganz am Anfang des Modes, muss ich das am Anfang oder Ende machen?

Und was muss ich von diesem Code in SQL einfügen?

Code: Alles auswählen

	<sql><![CDATA[--
-- Change the prefix if required!
--

ALTER TABLE `phpbb_forums` ADD `forum_auto_answer` TINYINT( 1 ) UNSIGNED NOT NULL DEFAULT '1' AFTER `forum_status` ;
	
--
-- Change the prefix if required!
--

CREATE TABLE IF NOT EXISTS `phpbb_auto_a_config` (
  `config_id` tinyint(1) unsigned NOT NULL auto_increment,
  `enable` tinyint(3) unsigned NOT NULL default '0',
  `user_id` mediumint(8) unsigned NOT NULL default '2',
  `guests` tinyint(1) unsigned NOT NULL default '1',
  `multi_words` tinyint(1) unsigned NOT NULL default '0',
  `answer_edited` tinyint(1) unsigned NOT NULL default '0',
  `post_locked` tinyint(1) unsigned NOT NULL default '1',
  `post_normal` tinyint(1) unsigned NOT NULL default '1',
  `post_sticky` tinyint(1) unsigned NOT NULL default '1',
  `post_announce` tinyint(1) unsigned NOT NULL default '1',
  `post_global` tinyint(1) unsigned NOT NULL default '1',
  `no_answer` tinyint(1) unsigned NOT NULL default '0',
  `no_answer_word` varchar(255) default NULL,
  PRIMARY KEY  (`config_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;

--
-- Change the prefix if required!
--

INSERT INTO `phpbb_auto_a_config` (`config_id`, `enable`, `user_id`, `guests`, `multi_words`, `answer_edited`, `post_locked`, `post_normal`, `post_sticky`, `post_announce`, `post_global`, `no_answer`, `no_answer_word`) VALUES
(1, 1, 2, 1, 3, 0, 1, 1, 1, 1, 1, 0, 'nobot');

-- --------------------------------------------------------

--
-- Change the prefix if required!
--

CREATE TABLE IF NOT EXISTS `phpbb_auto_a_msgs` (
  `post_id` mediumint(8) unsigned NOT NULL auto_increment,
  `icon_id` mediumint(8) unsigned NOT NULL default '0',
  `enable_bbcode` tinyint(1) unsigned NOT NULL default '1',
  `enable_smilies` tinyint(1) unsigned NOT NULL default '1',
  `enable_magic_url` tinyint(1) unsigned NOT NULL default '1',
  `enable_sig` tinyint(1) unsigned NOT NULL default '1',
  `post_subject` varchar(100) character set utf8 collate utf8_unicode_ci NOT NULL,
  `post_text` mediumtext character set utf8 collate utf8_bin NOT NULL,
  `bbcode_uid` varchar(8) character set utf8 collate utf8_bin NOT NULL,
  `bbcode_bitfield` varchar(255) character set utf8 collate utf8_bin NOT NULL,
  `write_as` tinyint(1) unsigned NOT NULL default '1',
  `post_edit_locked` tinyint(1) unsigned NOT NULL default '0',
  PRIMARY KEY  (`post_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Change the prefix if required!
--

CREATE TABLE IF NOT EXISTS `phpbb_auto_a_words` (
  `post_id` mediumint(8) unsigned NOT NULL,
  `word_text` varchar(255) NOT NULL,
  `word_type` tinyint(1) unsigned NOT NULL default '0',
  `word_match` tinyint(1) unsigned NOT NULL default '0'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
]]></sql>

Verfasst: 22.10.2008 17:39
von Miriam
Mach es vorher.
Du hast zum Einem die Gewissheit, dass die Anfragen der dann geänderten Scripte von der DB auch beantwortet werden können und zum Anderen ist die Mod nach dem Hochladen der geänderten Scripte gleich einsatzklar und es gibt keine / weniger Fehlermeldungen im Moment des Hochladens, falls Du das Board nicht schliesst.

Verfasst: 22.10.2008 17:41
von Heracross
Ok Danke und zum Code?

Verfasst: 22.10.2008 17:47
von Miriam

Code: Alles auswählen

ALTER TABLE `phpbb_forums` ADD `forum_auto_answer` TINYINT( 1 ) UNSIGNED NOT NULL DEFAULT '1' AFTER `forum_status` ; 

CREATE TABLE IF NOT EXISTS `phpbb_auto_a_config` ( 
  `config_id` tinyint(1) unsigned NOT NULL auto_increment, 
  `enable` tinyint(3) unsigned NOT NULL default '0', 
  `user_id` mediumint(8) unsigned NOT NULL default '2', 
  `guests` tinyint(1) unsigned NOT NULL default '1', 
  `multi_words` tinyint(1) unsigned NOT NULL default '0', 
  `answer_edited` tinyint(1) unsigned NOT NULL default '0', 
  `post_locked` tinyint(1) unsigned NOT NULL default '1', 
  `post_normal` tinyint(1) unsigned NOT NULL default '1', 
  `post_sticky` tinyint(1) unsigned NOT NULL default '1', 
  `post_announce` tinyint(1) unsigned NOT NULL default '1', 
  `post_global` tinyint(1) unsigned NOT NULL default '1', 
  `no_answer` tinyint(1) unsigned NOT NULL default '0', 
  `no_answer_word` varchar(255) default NULL, 
  PRIMARY KEY  (`config_id`) 
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; 

INSERT INTO `phpbb_auto_a_config` (`config_id`, `enable`, `user_id`, `guests`, `multi_words`, `answer_edited`, `post_locked`, `post_normal`, `post_sticky`, `post_announce`, `post_global`, `no_answer`, `no_answer_word`) VALUES 
(1, 1, 2, 1, 3, 0, 1, 1, 1, 1, 1, 0, 'nobot'); 

CREATE TABLE IF NOT EXISTS `phpbb_auto_a_msgs` ( 
  `post_id` mediumint(8) unsigned NOT NULL auto_increment, 
  `icon_id` mediumint(8) unsigned NOT NULL default '0', 
  `enable_bbcode` tinyint(1) unsigned NOT NULL default '1', 
  `enable_smilies` tinyint(1) unsigned NOT NULL default '1', 
  `enable_magic_url` tinyint(1) unsigned NOT NULL default '1', 
  `enable_sig` tinyint(1) unsigned NOT NULL default '1', 
  `post_subject` varchar(100) character set utf8 collate utf8_unicode_ci NOT NULL, 
  `post_text` mediumtext character set utf8 collate utf8_bin NOT NULL, 
  `bbcode_uid` varchar(8) character set utf8 collate utf8_bin NOT NULL, 
  `bbcode_bitfield` varchar(255) character set utf8 collate utf8_bin NOT NULL, 
  `write_as` tinyint(1) unsigned NOT NULL default '1', 
  `post_edit_locked` tinyint(1) unsigned NOT NULL default '0', 
  PRIMARY KEY  (`post_id`) 
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; 

CREATE TABLE IF NOT EXISTS `phpbb_auto_a_words` ( 
  `post_id` mediumint(8) unsigned NOT NULL, 
  `word_text` varchar(255) NOT NULL, 
  `word_type` tinyint(1) unsigned NOT NULL default '0', 
  `word_match` tinyint(1) unsigned NOT NULL default '0' 
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
Das kannst Du alles mit einem mal ausführen lassen.

Verfasst: 22.10.2008 17:53
von 4seven
evtl. auch noch wichtig > den präfix anpassen:
phpbb_***

Verfasst: 22.10.2008 17:55
von Miriam
Nicht nur evtl. wichtig, sondern essentiell...

Code: Alles auswählen

-- Change the prefix if required!
Vor der Bereinigung stands noch drin :-P