Jump to content
xisto Community
Sign in to follow this  
iGuest

A suggestion

Recommended Posts

Sounds good to me...I like the sound of anything that gives me more power, because eventually, I WILL TAKE OVER THE WORLD! MUAHAHA! But for now, I'm just modding FNH ;)

Share this post


Link to post
Share on other sites

I want to install it, but I need access to PhpMyAdmin to execute SQL commands...

Enter me!

 

If you still want to install it, I hacked an install file from another mod. Don't worry about the info in the header, I changed the SQL commands to fit the ModCP. Just save this code as mod_install.php in the root phpBB directory, and run it with your browser. Once you're done, delete it. And don't worry about security, you have to be logged in as admin to use it.

 

<?php/*************************************************************************** *                             shop_install.php *                            ------------------- *   Version              : 2.6.0 *   begin                : Friday, December 6th, 2002 *   released             : being built *   email                : ice_rain_@hotmail.com *   aim                  : zarath42 *   msn messanger        : ice_rain_@hotmail.com * ***************************************************************************//*************************************************************************** * *   copyright (C) 2002/2003  IcE-RaiN/Zarath * *   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. * *   This program is distributed in the hope that it will be useful, *   but WITHOUT ANY WARRANTY; without even the implied warranty of *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the *   GNU General Public License for more details. * *   http://http://www.gnu.org/copyleft/gpl.html * ***************************************************************************/ define('IN_PHPBB', true);$phpbb_root_path='./';include($phpbb_root_path.'extension.inc');include($phpbb_root_path.'common.'.$phpEx);//// Start session management//$userdata = session_pagestart($user_ip, PAGE_INDEX);init_userprefs($userdata);//// End session management//if( !$userdata['session_logged_in'] ){	header('Location: ' . append_sid("login.$phpEx?redirect=shop_install.$phpEx", true));}if( $userdata['user_level'] != ADMIN ){	message_die(GENERAL_MESSAGE, $lang['Not_Authorised']);}if( !strstr($dbms, "mysql") ){    if( !isset($bypass) )    {        $message = 'This mod has only been tested on MySQL and may only work on MySQL.<br />';        $message .= 'Click <a href="mod_install.php?bypass=true">here</a> to install anyways.';        message_die(GENERAL_MESSAGE, $message);    }}$sql = array();$sql[] = "INSERT INTO `phpbb_config` (config_name, config_value) VALUES ('enable_module_disallow', '1')";$sql[] = "INSERT INTO `phpbb_config` (config_name, config_value) VALUES ('enable_module_mass_email', '1')";$sql[] = "INSERT INTO `phpbb_config` (config_name, config_value) VALUES ('enable_module_ranks', '1')";$sql[] = "INSERT INTO `phpbb_config` (config_name, config_value) VALUES ('enable_module_smilies', '1')";$sql[] = "INSERT INTO `phpbb_config` (config_name, config_value) VALUES ('enable_module_user_ban', '1')";$sql[] = "INSERT INTO `phpbb_config` (config_name, config_value) VALUES ('enable_module_users', '1')";$sql[] = "INSERT INTO `phpbb_config` (config_name, config_value) VALUES ('enable_module_words', '1')";$sql_count = count($sql);echo "<html>n";echo "<body>n";for($i = 0; $i < $sql_count; $i++){	echo "Running :: " . $sql[$i];	flush();	if ( !$db->sql_query($sql[$i]) )	{  $errored = true;  $error = $db->sql_error();  echo " -> <b>FAILED</b> ---> <u>" . $error['message'] . "</u><br /><br />nn";	}	else	{  echo " -> <b>COMPLETED</b><br /><br />nn";	}}if( $errored ){    $message = "Some of the querys have failed, contact me so I can fix the errors.";}else{    $message = "The table have been edited successfully. You can now delete this file.";}echo "n<br />n<b>Finished!</b><br />n";echo $message . "<br />n";echo "</body>n";echo "</html>n";exit();?>

Lol, I'm God! ;) If you ever need anything phpBB, ask me.

Share this post


Link to post
Share on other sites

*Stunned* - CodeFX knows his *BLEEP*.

Bring on the mods!  CodeFX you sure know your PHP

Yes I do! ;) If anyone needs mods, I'm the person to contact. :wink:

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.