Pagina 4 din 6

Scris: 30-Iul-2006, 19:11:07
de Berti
roadiro: Asta e un inceput bun! Multam!

La codul furnizat de tine SQl mi-a returnat:
Your SQL query has been executed successfully (Query took 0.0366 sec)

Crezi ca poti sa ne ajuti mai departe, deoarece asta era doar o secventa din install_kb_tables.php, pun aici tot continutul fisierului si daca poti spune-ne ce trebuie sa rulam din el in SQL query...

Cod: Selectaţi tot


<php>

<DOCTYPE>
<html>
<title>Install File for MOD's</title>
<head>
<meta>
<meta>
<style>

</style>
</head>
<body>

<table> 
	<tr>
		<td><table>
			<tr>
				<td><a href="./index.php"><img></a></td>
				<td><span>Installing Knowledge Base</span></td>
			</tr>
		</table></td>
	</tr>
</table>

<br>

<h2>Information</h2>

<php>sql_query($sql)) )
{
	die("Couldn't obtain version info");
}
$row = $db->sql_fetchrow($result);
$phpBB_version = $row['config_value'] ;
$sql = array();

// output some info
echo '<p>Database type &nbsp;  :: <b>' . SQL_LAYER . '</b><br>';

echo 'phpBB version &nbsp;  :: <b>2' . $phpBB_version . '</b><br>';

echo 'Knowledge Base MOD version  :: <b>' . KB_VERSION . '</b></p>' ."\n";

?>

<br>

<h3>What are you going to do ?</h3>
This file is used to do the changes to your database (adding/modifying a table) to make the MOD working properly.
If you have any problem during this part, you can contact me to get support. Now, if you are ready, click on the button.

<br>

<center>
	<form>
		<input>
	</form>
</center>

<?php

$submit = ( isset($HTTP_POST_VARS['submit']) ) ? $HTTP_POST_VARS['submit'] : 0;

if ( $submit )
{
	switch ( SQL_LAYER )
	{
		case 'mysql':
		case 'mysql4':
		    $sql[]= 'CREATE TABLE '. KB_ARTICLES_TABLE .' (
						article_id mediumint(8) unsigned NOT NULL auto_increment,
  						article_category_id mediumint(8) unsigned NOT NULL default "0",
  						article_title varchar(255) binary NOT NULL default "",
  						article_description varchar(255) binary NOT NULL default "",
  						article_date varchar(255) binary NOT NULL default "",
  						article_author_id mediumint(8) NOT NULL,
						username VARCHAR(255),
  						bbcode_uid varchar(10) binary NOT NULL default "",
  						article_body text NOT NULL,
  						article_type mediumint(8) unsigned NOT NULL default "0",
  						approved tinyint(1) unsigned NOT NULL default "0",
  						topic_id mediumint(8) unsigned NOT NULL default "0",
  						views BIGINT(8) NOT NULL DEFAULT "0",
  						article_rating double(6,4) NOT NULL default "0.0000",
  						article_totalvotes int(255) NOT NULL default "0",
  						KEY article_id (article_id)
				    ) TYPE=MyISAM;';
					
			$sql[] = 'INSERT INTO '. KB_ARTICLES_TABLE .' VALUES (
				   	      1, 1, "Test Article", "This is a test article for your KB", "1057708235", 2, "", "93074f48a9", "This is a test article for your Knowledge Base. This MOD is based on code written by wGEric < eric@egcnetwork.com > (Eric Faerber) - http://eric.best-1.biz/, now supervised by _Haplo < jonohlsson@hotmail.com > (Jon Ohlsson) - http://www.mx-system.com/ \r\n\r\nBe sure you add categories and article types in the ACP and also change the Configuration to your liking.\r\n\r\nHave fun and enjoy your new Knowledge Base!  :D", 1, 1, 0, 0,0,0
					  );';

			$sql[] = 'CREATE TABLE '.KB_CATEGORIES_TABLE.' (
  			 	   	    category_id mediumint(8) unsigned NOT NULL auto_increment, 
  						category_name VARCHAR(255) binary NOT NULL, 
  						category_details VARCHAR(255) binary NOT NULL, 
 						number_articles mediumint(8) unsigned NOT NULL,
						parent mediumint(8) unsigned,
						cat_order mediumint(8) unsigned NOT NULL,
					  	auth_view tinyint(3) NOT NULL DEFAULT "0",
						auth_post tinyint(3) NOT NULL DEFAULT "0",
						auth_rate tinyint(3) NOT NULL DEFAULT "0",
						auth_comment tinyint(3) NOT NULL DEFAULT "0",
						auth_edit tinyint(3) NOT NULL DEFAULT "0",
						auth_delete tinyint(3) NOT NULL DEFAULT "2",
						auth_approval tinyint(3) NOT NULL DEFAULT "0",
						auth_approval_edit tinyint(3) NOT NULL DEFAULT "0",
						auth_view_groups varchar(255),
						auth_post_groups varchar(255),
						auth_rate_groups varchar(255),
						auth_comment_groups varchar(255),
						auth_edit_groups varchar(255),
						auth_delete_groups varchar(255),
						auth_approval_groups varchar(255),
						auth_approval_edit_groups varchar(255),
						auth_moderator_groups varchar(255),
						comments_forum_id tinyint(3) NOT NULL DEFAULT "-1",
  						KEY category_id (category_id)
					) TYPE=MyISAM';
					
			  
		    $sql[] = 'INSERT INTO '.KB_CATEGORIES_TABLE.' VALUES (1, "Test Category 1", "This is a test category", "0", "0", "10", "0", "0", "0", "0", "0", "2", "0", "0", "", "", "", "", "", "", "", "", "", "0" );';

			$sql[] = 'CREATE TABLE '.KB_CONFIG_TABLE.' (
			  			config_name VARCHAR(255) NOT NULL default "", 
						config_value varchar(255) NOT NULL default "",
						PRIMARY KEY  (config_name)
						) TYPE=MyISAM';
			
			$sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("allow_new", "1")';
			$sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("notify", "1")';
			$sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("admin_id", "2")';
			$sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) values("show_pretext",0);';
			$sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) values("pt_header","Article Submission Instructions");';
			$sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) values("pt_body","Please check your references and include as much information as you can.");';
			$sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("use_comments", "1");';
			$sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("del_topic", "1");';
			$sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("use_ratings", "0");';
			$sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("comments_show", "1");';
			$sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("bump_post", "1");';
			$sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("stats_list", "1");';
			$sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("header_banner", "1");';

			$sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("votes_check_userid", "1");';
			$sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("votes_check_ip", "1");';
			$sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("art_pagination", "5");';

			$sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("comments_pagination", "5");';
			$sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("news_sort", "Alphabetic");';
			$sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("news_sort_par", "ASC");';

			$sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("wysiwyg", "0");';
			$sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("wysiwyg_path", "modules/");';
			$sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("allow_html", "1");';
			$sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("allow_bbcode", "1");';
			$sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("allow_smilies", "1");';
			$sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("formatting_fixup", "0");';
			$sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("allowed_html_tags", "b,i,u,a");';
					
			$sql[] = 'CREATE TABLE ' . KB_TYPES_TABLE . ' (
  				 	       	id mediumint(8) unsigned NOT NULL auto_increment, 
  						   	type varchar(255) binary DEFAULT "" NOT NULL, 
  						   	KEY id (id)
					  ) TYPE=MyISAM';
					  
			$sql[] = 'INSERT INTO '. KB_TYPES_TABLE . ' VALUES (1, "Test Type 1")';

			$sql[] = 'CREATE TABLE '. KB_VOTES_TABLE . ' (
  							votes_ip varchar(50) NOT NULL default "0",
  							votes_userid int(50) NOT NULL default "0",
  							votes_file int(50) NOT NULL default "0"
					  ) TYPE=MyISAM';

			$sql[] = 'CREATE TABLE ' . KB_SEARCH_TABLE . ' (
	  				 	    search_id int(11) unsigned NOT NULL default "0",
	  						session_id varchar(32) NOT NULL default "",
	  						search_array text NOT NULL,
	  						PRIMARY KEY  (search_id),
	  						KEY session_id (session_id)
					   ) TYPE=MyISAM;';

			$sql[] = 'CREATE TABLE ' . KB_WORD_TABLE . ' (
	  				 	   	word_text varchar(50) binary NOT NULL default "",
		  					word_id mediumint(8) unsigned NOT NULL auto_increment,
		  					word_common tinyint(1) unsigned NOT NULL default "0",
		  					PRIMARY KEY  (word_text),
		  					KEY word_id (word_id)
					   ) TYPE=MyISAM;';

			$sql[] = 'CREATE TABLE ' . KB_MATCH_TABLE . ' (
		  				 	article_id mediumint(8) unsigned NOT NULL default "0",
		  					word_id mediumint(8) unsigned NOT NULL default "0",
		  					title_match tinyint(1) NOT NULL default "0",
		  					KEY post_id (article_id),
		  					KEY word_id (word_id)
					  	) TYPE=MyISAM;';	

			$sql[] = 'CREATE TABLE ' . KB_CUSTOM_TABLE . ' (
							custom_id int(50) NOT NULL auto_increment,
							custom_name text NOT NULL,
							custom_description text NOT NULL,
							data text NOT NULL,
							field_order int(20) NOT NULL default "0",
							field_type tinyint(2) NOT NULL default "0",
							regex varchar(255) NOT NULL default "",
							PRIMARY KEY  (custom_id)
						) TYPE=MyISAM;'; 
			
			$sql[] = 'CREATE TABLE ' . KB_CUSTOM_DATA_TABLE . ' (
							customdata_file int(50) NOT NULL default "0",
							customdata_custom int(50) NOT NULL default "0",
							data text NOT NULL
						) TYPE=MyISAM;';		
						
			break;
		
		case 'mssql':
		case 'mssql-odbc':
		
		default:
			die("/!\ No Database Abstraction Layer (DBAL) found /!\\");
			break;
	}
	echo("<h2>Adding/modifying tables to your database</h2>\n");
	for ($i=0; $i <count>sql_query($sql[$i])) )
		{
			$error_code = TRUE;
			$error = $db->sql_error();

			echo(" -> <b><span>ERROR - QUERY FAILED</span></b> ----> <u>" . $error['message'] . "</u><br><br>\n\n");
		}
		else
		{
			echo(" -> <b><span>GOOD - QUERY OK</span></b><br><br>\n\n");
		}
	}

		$error_message = "";

		if ( $error_code )
		{
			$error_message .= "<br>At least one query failed : check the error message and contact me if you need help to resolve the problem. <br>";
		}
		else
		{
			$error_message .= "<br>All the queries have been successfully done - Enjoy. <br>";
		}

		echo("\n<br>\n<b>COMPLETE - INSTALLATION IS ENDED</b><br>\n");
		echo($error_message . "<br>");
		echo("<br><b>NOW, DELETE THIS FILE FROM YOUR SERVER</b><br>\n");
}

?>
</body>
</html>


Scris: 30-Iul-2006, 19:36:10
de roadiro
Pentru ca este destul de lunga, nu o trec aici, o gasiti transpunerea in comenzi MySQL la adresa:

http://194.150.217.11/phpbb2/viewtopic.php?p=332#332

am rugamintea sa va inscrieti in grupul "phpBB" sa nu va incurc cu ceilalti utilizatori.

multumesc

Scris: 30-Iul-2006, 20:20:53
de Gaby Stan
lol trebuie sa-mi fac cont pe your 4um...sper ca nu e cu aprobarea adminiilor...pai posteaza tabelele ce trebuie create exact..si facem un install cu ajutorul adresei pe care am postat-o aici pe 4um e un topic creat de mine curand phpbb sql generator parca ...daca tabelele sunt corect trebuie sa mearga parerea mea...pacat ca nu pot sa testez din cauza ca a cazut hostul...dar hai ca intru in off

Scris: 30-Iul-2006, 23:36:10
de Berti
Se pare ca merge solutia data de roadiro, doar cu o mica corectura, comanda:

CREATE TABLE phpbb_kb_custom_data (
trebuie inlocuita cu

CREATE TABLE phpbb_kb_customdata (
Fiindca altfel da o eroare...

Dar din pacate se pare ca acesta versiune de KB e plina de bug-uri,
-nu poti creea categorii noi de articole, dai click pe Create si te duce la index.php
-la Optimize tables daca dai click pe buton iti returneaza eroarea:
Could not insert new word
DEBUG MODE
SQL Error : 1146 Table 'inginer_phpbb2.phpbb_kb_wordlist' doesn't exist

M-am uitat in install_kb_tables.php, nici nu se pomenste de tabela wordlist...
-nu am gasit nicaieri vreun buton pentru a scrie un articol nou...

In concluzie cred ca renunt la versiunea 2.0.2, dar pe aceasta cale rog administratorii forumul, daca se poate sa publice versiunea instalata de ei... sau macar sa ne-o trimita pe mail.

Va multumesc!

Scris: 30-Iul-2006, 23:41:24
de roadiro
$sql[] = 'CREATE TABLE ' . KB_CUSTOM_DATA_TABLE . ' (
customdata_file int(50) NOT NULL default "0",
customdata_custom int(50) NOT NULL default "0",
data text NOT NULL
) TYPE=MyISAM;';

deci trebuie sa fie phpbb_kb_custom_data
daca de eroare este din alta parte sa mai ma uit odata

am mai verificat odata si este bine cred eu asa ca nu ar trebui sa dea eroare. Ce eroare iti da ?
CREATE TABLE phpbb_kb_custom_data (
customdata_file int(50) NOT NULL default "0",
customdata_custom int(50) NOT NULL default "0",
data text NOT NULL
) TYPE=MyISAM;
iat tabela phpbb_kb_wordlist nu o vad in installul dat de voi deci nu este creata, de acolo si mesajul de eroare

Scris: 31-Iul-2006, 00:26:23
de Berti
Pai da eroarea urmatoare, ca nu gaseste tabela: KB_CUSTOM_DATATABLE... am verificat in MyAdmin si am vazut ca-i diferenta de un underscore, asa ca am sters-o pe cea care a creat-o scriptu dat de tine, si am refacut-o cu numele pe care nu-l gasea, dupa asta problema s-a rezolvat...

Dar au ramas restu!

Scris: 31-Iul-2006, 00:42:37
de roadiro
am descarcat modul si m-am uitat in fisiere

in functions_kb_field.php am gasit
$sql = "SELECT *
FROM " . KB_CUSTOM_TABLE . "
ORDER BY field_order ASC";
si
$sql = "SELECT *
FROM " . KB_CUSTOM_DATA_TABLE;
de unde trag concluzi ca este totusi phpbb_kb_custom_data . Sa nu fie alta problema, mai verifica odata cum ai bagat codul.

Scris: 24-Aug-2006, 20:53:53
de octaviansan
deci...am instalat tabelele , totul...si imi da urmatorarea eroare cand vreau sa intru pe kb :
Couldnt Query Custom field

DEBUG MODE

SQL Error : 1054 Unknown column 'field_order' in 'order clause'

SELECT * FROM phpbb_kb_custom ORDER BY field_order ASC

Line : 50
File : functions_kb_field.php

va rog , cine stie ?

KB si crearea tabelelor..

Scris: 06-Ian-2007, 19:45:49
de sorelsorel
Am instalat modificarea Knowledge Base si cand rulez install_kb_tables.php imi spune ca nu se poate conecta la baza de date, eu m-am uitat in fisier dar am vazut ca ia detaliile din config.php.. totusi nu ma puteti ajuta? Am mai intrebat pe la Aliniuz si la un prieten coder, dar nu au stiut nici unul, voi aveti instalat aici si as fi recunoscator..

[edit="flowers"]Subiect unit cu altul care dezbate aceeaşi problemă.[/edit]

Scris: 06-Ian-2007, 19:48:10
de Aliniuz
Si eu as fi interesat de o eventuala solutie . :)