hack`s op een andere Prefix

Hulp nodig bij een modificaties of op zoek naar een MOD? Bekijk ons archief. Support wordt helaas niet meer verleend.
Forumregels

Sinds 1 januari 2009 wordt phpBB2 niet meer ondersteund.
Onderstaande informatie is verouderd en dient uitsluitend als archief.
phpBB2.0.x
Gesloten
Gebruikersavatar
Diablo Gamer
Berichten: 1394
Lid geworden op: 02 jan 2004, 20:33
Locatie: Dalen/Drenthe/Holland
Contacteer:

hack`s op een andere Prefix

Bericht door Diablo Gamer » 23 aug 2005, 02:21

kan dat geen kwaat als ik hacks instaleer op een andere Prefix ?

en hoe pas ik de SQL dan aan ?

en het zelfde geld voor db_update.php bestande gaan gelijk naar de goede Prefix toe of moet ik die ook aan passen ?

ElbertF
Berichten: 5803
Lid geworden op: 12 okt 2004, 08:34
Contacteer:

Bericht door ElbertF » 23 aug 2005, 09:45

Kan natuurlijk geen kwaad, gewoon voor het uitvoeren van de SQL-queries deze aanpassen.

INSERT INTO phpbb_users...

..wordt dan gewoon:

INSERT INTO nieuweprefix_users...

Gebruikersavatar
Diablo Gamer
Berichten: 1394
Lid geworden op: 02 jan 2004, 20:33
Locatie: Dalen/Drenthe/Holland
Contacteer:

Bericht door Diablo Gamer » 23 aug 2005, 12:12

en hoe zit het dan met de db_update.php bestande zo als deze 2X een voor beeld

Code: Selecteer alles

<?php
#########################################################
## SQL commands to phpBB2
## Author: Niels Chr. Rød
## Nickname: Niels Chr. Denmark
## Email: ncr@db9.dk
##
## Ver 1.0.7
##
## phpBB2 database update script for mods
## this file is intended to use with phpBB2, when installing mods
## after so you may delete this file, but only admin can use so it really doesen't matter
## The script will look what prefix you are using, and use the existing DB defined by congig.php
## The execution of this script's included SQL is harmless, so you can run it as meny times you like
## note, though that the users last visit, will be set back to his/her last login, 
## but that is a minor cosmetic isue, that will correct it self next time the use  logs in
##
## the following example are from my mods, and you can add some self, for other mods if you like
## you will after execution get a list over those commands that are run with succes and those with warnings !
## delete the sample lines if you are using it only for other mods
##
#########################################################

define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
include($phpbb_root_path . 'includes/functions_selects.'.$phpEx);
define('SITE_HISTORY_TABLE', $table_prefix.'site_history');

###################################################################################################
##
## put the SQL commands below here, the SQL commands listed below are only exampels, substitude them with the one you need ##
##
###################################################################################################
$sql=array(
'ALTER TABLE '.USERS_TABLE.' ADD user_birthday INT DEFAULT "999999" not null  ',
'ALTER TABLE '.USERS_TABLE.' ADD user_next_birthday_greeting INT DEFAULT "0" not null ',
'INSERT INTO '.CONFIG_TABLE.' (config_name, config_value) VALUES ("birthday_required", "0")',
'INSERT INTO '.CONFIG_TABLE.' (config_name, config_value) VALUES ("birthday_greeting", "1")',
'INSERT INTO '.CONFIG_TABLE.' (config_name, config_value) VALUES ("max_user_age", "100")',
'INSERT INTO '.CONFIG_TABLE.' (config_name, config_value) VALUES ("min_user_age", "5")',
'INSERT INTO '.CONFIG_TABLE.' (config_name, config_value) VALUES ("birthday_check_day", "7")'
);

$mods = array ( 
'Birthday PART 1 Mod','Birthday PART 1 Mod','Birthday PART 2 Mod','Birthday PART 2 Mod','Birthday PART 2 Mod','Birthday PART 2 Mod','Birthday PART 2 Mod',
);

############################################### Do not change anything below this line #######################################

//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//
// End session management
//

if ($userdata['user_level']!=ADMIN)
      message_die(GENERAL_ERROR, "You are not Authorised to do this"); 
$n=0;
$message="<b>This list is a result of the SQL queries needed for the additional mods in the pre-moded pack</b><br/><br/>";
while($sql[$n])
{
	$message .= ($mods[$n-1] != $mods[$n]) ? '<p><b><font size=3>'.$mods[$n].'</font></b><br/>' : '';
	if(!$result = $db->sql_query($sql[$n])) 
	$message .= '<b><font color=#FF0000>[Already added]</font></b> line: '.($n+1).' , '.$sql[$n].'<br />';
	else $message .='<b><font color=#0000fF>[Added/Updated]</font></b> line: '.($n+1).' , '.$sql[$n].'<br />';
	$n++;
}
 message_die(GENERAL_MESSAGE, $message); 
?>

Code: Selecteer alles

<?php
#########################################################
## SQL commands to phpBB2
## Author: Niels Chr. Rød
## Nickname: Niels Chr. Denmark
## Email: ncr@db9.dk
##
## Ver 1.0.7
##
## phpBB2 database update script for mods
## this file is intended to use with phpBB2, when installing mods
## after so you may delete this file, but only admin can use so it really doesen't matter
## The script will look what prefix you are using, and use the existing DB defined by congig.php
## The execution of this script's included SQL is harmless, so you can run it as meny times you like
## note, though that the users last visit, will be set back to his/her last login, 
## but that is a minor cosmetic isue, that will correct it self next time the use  logs in
##
## the following example are from my mods, and you can add some self, for other mods if you like
## you will after execution get a list over those commands that are run with succes and those with warnings !
## delete the sample lines if you are using it only for other mods
##
#########################################################

define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
include($phpbb_root_path . 'includes/functions_selects.'.$phpEx);
define('SITE_HISTORY_TABLE', $table_prefix.'site_history');

###################################################################################################
##
## put the SQL commands below here, the SQL commands listed below are only exampels, substitude them with the one you need ##
##
###################################################################################################
$sql=array(
'ALTER TABLE '.USERS_TABLE.' ADD user_gender TINYINT not null DEFAULT "0"' 
);

$mods = array ( 
'Gender Mod'
);

############################################### Do not change anything below this line #######################################

//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//
// End session management
//

if ($userdata['user_level']!=ADMIN)
      message_die(GENERAL_ERROR, "You are not Authorised to do this"); 
$n=0;
$message="<b>This list is a result of the SQL queries needed for the additional mods in the pre-moded pack</b><br/><br/>";
while($sql[$n])
{
	$message .= ($mods[$n-1] != $mods[$n]) ? '<p><b><font size=3>'.$mods[$n].'</font></b><br/>' : '';
	if(!$result = $db->sql_query($sql[$n])) 
	$message .= '<b><font color=#FF0000>[Already added]</font></b> line: '.($n+1).' , '.$sql[$n].'<br />';
	else $message .='<b><font color=#0000fF>[Added/Updated]</font></b> line: '.($n+1).' , '.$sql[$n].'<br />';
	$n++;
}
 message_die(GENERAL_MESSAGE, $message); 
?>

Gebruikersavatar
Paul
Beheerder
Beheerder
Berichten: 20316
Lid geworden op: 23 okt 2003, 11:38
Locatie: Utrecht
Contacteer:

Bericht door Paul » 23 aug 2005, 12:56

Das geen probleem, USERS_TABLE heeft gewoon de goede prefix ;)

Gebruikersavatar
Diablo Gamer
Berichten: 1394
Lid geworden op: 02 jan 2004, 20:33
Locatie: Dalen/Drenthe/Holland
Contacteer:

Bericht door Diablo Gamer » 23 aug 2005, 13:07

dus dat gaat gewoon naar de goede prefix ?

Gebruikersavatar
Bee
Berichten: 13403
Lid geworden op: 29 aug 2004, 10:30

Bericht door Bee » 23 aug 2005, 18:51

De databaseinstallatie van Niels zijn zo gemaakt dat ze op elke phpBB installatie ter wereld ondersteund worden.
... Maar ik modereer (nog) niet.

Gesloten