SHOP

Du hast Probleme beim Einbau oder bei der Benutzung eines Mods? In diesem Forum bist du richtig.
Forumsregeln
phpBB 2.0 hat das Ende seiner Lebenszeit überschritten
phpBB 2.0 wird nicht mehr aktiv unterstützt. Insbesondere werden - auch bei Sicherheitslücken - keine Patches mehr bereitgestellt. Der Einsatz von phpBB 2.0 erfolgt daher auf eigene Gefahr. Wir empfehlen einen Umstieg auf phpBB 3.0, welches aktiv weiterentwickelt wird und für welches regelmäßig Updates zur Verfügung gestellt werden.
Antworten
Gohei
Mitglied
Beiträge: 144
Registriert: 11.12.2005 21:48

SHOP

Beitrag von Gohei »

Hallo zusammen!

Also ich wollte den shop_mod 2.2.3a oder so von Xora installieren, nur beim Ausführen der Installation geht dort was ned.
Es sollte eigendlich stehen dass die Installation erfolgreich ausgeführt wurde und dass ich den shop_install.php löschen kann jedooch kommt so was nicht, auch keinn Error-Text.
Es kommt dann nur die Navigation vom Forum ansonsten nix.
Kann mir da jemand bitte weiter helfen?

Und da die Installations-Datei der shop_mod:

Code: Alles auswählen

<?php
/*************************************************************************** 
 *                                shop_install.php 
 *                            ------------------- 
 *   copyright            : (C) 2006 fanrpg
 *   email                : fanrpg@rpggx.de 
 * 
 ***************************************************************************/ 

/*************************************************************************** 
 * 
 *   This program is free software; you can redistribute it and/or modify 
 *   it under the terms of the GNU General Public License as published by 
 *   the Free Software Foundation; either version 2 of the License, or 
 *   (at your option) any later version. 
 * 
 ***************************************************************************/
define('IN_PHPBB', true);
$phpbb_root_path = './';

include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);

define('CM_TABLE', $table_prefix.'cash');

$userdata = session_pagestart($user_ip, PAGE_INDEX); 
init_userprefs($userdata);

$page_title = 'Shop-Installer';
include($phpbb_root_path . 'includes/page_header.'.$phpEx );
$error = false;	

if( $userdata['user_level'] == ADMIN )
{
	if( isset($HTTP_POST_VARS['update_004_101']) )
    {
		$sql = "ALTER TABLE ".SHOP_ITEM_TABLE." ADD item_desc VARCHAR( 255 )";
		if( !( $result = $db->sql_query($sql) ))
		{
			$error = true;
			$message = implode('', $db->sql_error());
		}
		
		$sql = "SELECT cm.cash_dbfield FROM ".CM_TABLE." cm ORDER BY cash_id LIMIT 1";
		$result = $db->sql_query($sql);
		$field = $db->sql_fetchrow($result);
		$field = $field['cash_dbfield'];
		
		$sql = "INSERT INTO ".SHOP_CONFIG_TABLE." (config_name, config_value) VALUES ('cash_field', '$field')";
		if( !( $result = $db->sql_query($sql) ))
		{
			$error = true;
			$message = implode('', $db->sql_error());
		}
		$sql = "INSERT INTO ".SHOP_CONFIG_TABLE." (config_name, config_value) VALUES ('shop_version', '1.0.2')";
		$result = @$db->sql_query($sql);		
    }	
	else if( isset($HTTP_POST_VARS['update_100_101']) )
	{
		include($phpbb_root_path . 'includes/functions_shop.' . $phpEx );
		$shop = new Shop();
		
		$shop_config = $shop->get_shop_config();
		if( $shop_config['shop_version'] == '1.0.1' )
		{
			$sql = "UPDATE ".SHOP_CONFIG_TABLE." SET config_value = '1.0.2' WHERE config_name = 'shop_version'";
			@$db->sql_query($sql);
		}
		else
		{	
		
			$sql = "SELECT cm.cash_dbfield FROM ".CM_TABLE." cm ORDER BY cash_id LIMIT 1";
			$result = $db->sql_query($sql);
			$field = $db->sql_fetchrow($result);
			$field = $field['cash_dbfield'];
			
			$sql = "INSERT INTO ".SHOP_CONFIG_TABLE." (config_name, config_value) VALUES ('cash_field', '$field')";
			if( !( $result = $db->sql_query($sql) ))
			{
				$error = true;
				$message = implode('', $db->sql_error());
			}
			$sql = "INSERT INTO ".SHOP_CONFIG_TABLE." (config_name, config_value) VALUES ('shop_version', '1.0.2')";
			$result = @$db->sql_query($sql);
		}	
	}			
	else if( isset($HTTP_POST_VARS['install']) )
	{
		$sql = "CREATE TABLE ".$table_prefix."shop_item (
	item_id INT( 25 ) NOT NULL AUTO_INCREMENT ,
	item_name VARCHAR( 255 ) ,
	item_price INT( 25 ) ,
	item_cat INT( 25 ) ,
	item_desc VARCHAR( 255 ) ,
	PRIMARY KEY ( item_id ) 
	)";
		if( !( $result = $db->sql_query($sql) ))
		{
			$error = true;
			$message = implode('', $db->sql_error());
		}	
		
		$sql = "CREATE TABLE ".$table_prefix."shop_cat(
	cat_id INT( 25 ) NOT NULL AUTO_INCREMENT ,
	cat_name VARCHAR( 255 ) NOT NULL ,
	PRIMARY KEY ( cat_id ) 
	)";
		if( !( $result = $db->sql_query($sql) ))
		{
			$error = true;
			$message = implode('', $db->sql_error());
		}
	
		$sql = "CREATE TABLE ".$table_prefix."shop_config (
	config_name VARCHAR( 255 ) NOT NULL ,
	config_value VARCHAR( 255 ) NOT NULL 
	) ";
		if( !( $result = $db->sql_query($sql) ))
		{
			$error = true;
			$message = implode('', $db->sql_error());
		}
		$sql = "SELECT cm.cash_dbfield FROM ".CM_TABLE." cm ORDER BY cash_id LIMIT 1";
		$result = $db->sql_query($sql);
		$field = $db->sql_fetchrow($result);
		$field = $field['cash_dbfield'];

							
		$sql = "INSERT INTO ".$table_prefix."shop_config ( config_name , config_value ) 
	VALUES (
	'pn_admins', '2'
	), (
	'pn_from', '2'
	), ('waehrung', ''), ('cash_field', '$field'), ('shop_version', '1.0.2')";
		if( !( $result = $db->sql_query($sql) ))
		{
			$error = true;
			$message = implode('', $db->sql_error());
		} 
	}
	else
	{
		$no_error = true;
		echo '<form method="post"><center>
		<input type="submit" name="install" value="Install Shop Mod" /><br /><br /><br />
		<input type="submit" name="update_004_101" value="Update Shop Mod from 0.0.4 (or older) to 1.0.2" />
		<input type="submit" name="update_100_101" value="Update Shop Mod from 1.0.0, 1.0.1 (and 0.1.x) to 1.0.2" /></center>
		</form>';
	}	
	
	if( $error === false && $no_error !== true )
	{
		echo '<center><h3><span style="color:#00FF00;">Done - No Errors</span></h3>';
	}
	else if( $error === true && $no_error !== true )
	{
		echo '<center><h3><span style="color:#FF0000;">Done - Error</span></h3><br />'.$message.'</center>';
	}
}

include($phpbb_root_path . 'includes/page_tail.'.$phpEx );
?>		
SoLo1905

Beitrag von SoLo1905 »

ja eine phpbb datei als download darstellen und die code oben weg editieren :d
Gulaschk@none
Mitglied
Beiträge: 1542
Registriert: 17.01.2006 12:43

Beitrag von Gulaschk@none »

SoLo1905 hat geschrieben:ja eine phpbb datei als download darstellen und die code oben weg editieren :d
nun ist sie aber da , man kann es auch übertreiben :roll:
SoLo1905

Beitrag von SoLo1905 »

naja max0. ist ja erlaubt 10 oder 30 zeilen oda so
Antworten

Zurück zu „phpBB 2.0: Mod Support“