Hangman MOD, SQL Frage
Verfasst: 11.05.2005 17:47
Moin!
Ich habe mir nen Hangman mod runtergeladen:
Wie genau muss ich denn die Tabelle anlegen?
"Tabellen name" ist klar.
"Felder" ist nicht klar.
.
....bei den folgenden bin ich mir dann auch nicht mehr sicher...
.
Feld
TypDokumentation
Länge/Set*
Attribute
Null
Standard**
Extra
Kann mir jemand helfen?
Gonzo
Ich habe mir nen Hangman mod runtergeladen:
Mit der 1. Installationsanweisung komm ich nicht ganz klar (SQL).##############################################################
## MOD Title: Hangman Mod
## MOD Author: unTouched < p.s16@web.de > Pete® http://pete.dsl-inet.com/
## MOD Description: Hangman Mod, Adds a word-quessing game to your phpBB
## board
## MOD Version: 1.5.0
##
## MOD phpBB Version needed:
## phpbb2 plus 1.52 or phpbb at least 2.0.11
## may work on older versions
##
## Installation Level: Very Easy
## Installation Time: 10 Minutes (EMC 1 Minute)
## Files To Edit: overall_header.tpl,page_header.php
## Included Files: hangman.php
## db_update.php (only for installing DB Tables)
## /template/hangman/hangman_create.tpl
## /template/hangman/hangman_overview.tpl
## /template/hangman/hangman_new.tpl
## /template/hangman/hangman_help.tpl
## /template/hangman/hangman_admin.tpl
## /template/hangman/hangman_highscore.tpl
## /template/hangman/hangman_window.tpl
## /language/lang_english/lang_hangman.php
## /language/lang_german/lang_hangman.php
## /template/hangman/admin/admin_hangman.tpl
## /template/hangman/admin/admin_hangman_import.tpl
## /admin/admin_hangman.php
## /admin/admin_hangman_import.php
## /images/hangman_pics/trans_lost_0.gif
## /images/hangman_pics/trans_lost_1.gif
## /images/hangman_pics/trans_lost_2.gif
## /images/hangman_pics/trans_lost_3.gif
## /images/hangman_pics/trans_lost_4.gif
## /images/hangman_pics/trans_lost_5.gif
## /images/hangman_pics/trans_lost_6.gif
## /images/hangman_pics/trans_lost_7.gif
## /images/hangman_pics/trans_lost_8.gif
## /images/hangman_pics/trans_lost_9.gif
## /images/hangman_pics/won.gif
## /images/hangman_pics/time.gif
## /images/hangman_pics/trans_hangman_link.gif
##############################################################
#############################################################
## Author Notes: Have a lot of fun, questions and ideas
## relating this mod could be posted in the
## support forum.
##
## if you are using phpBB - Plus Code -> use following line,
## to get a link in the header
## • <a href="{U_HANGMAN}" class="mainmenu">{L_HANGMAN}</a>
##
##
## Addons: -bbcode (more info in install_bbcode.txt
##
##############################################################
## MOD History:
##
## 18-04-2004 - Version 0.1.0
## - first test release (on local pc)
## - mod includes 6 tpls,1 php and 1 sql files (3 tables)
## - mod gives> hangman creating> hangman highscore> hangman playing> hangman overview
## - known bugs: people are able to add letters which aren't able to quess
## 0 isn't quessable
## - missing features: *administration*pictures*layout*readme.txt*language_support
## 18-04-2004 - Version 0.2.0
## - one tpl deleted (wasn't usefull)
## - bug: bug that created and lost aren't updated to score is
## - some layout >> fisubsilver is used (phpBB plus!)
## - included a lang file (lang_hangman.php) >> userfull for english support
## - known bugs: NULL ;)
## - missing features:*administration*pictures*readme.txt*lang_english
## 19-04-2004 - Version 0.2.1
## - bug that there are wrong winners in the overview (added won_by to HANGMAN_WORDS-table)
## - first release in my official forum (only for students ;)
## 19-04-2004 - Version 0.2.4
## - added navigation in the overall_header.tpl
## - bug @ showing multiple line helps ( '\n' >>> <br />)
## - changed some layout
## 19-04-2004 - Version 0.3.0
## - added administration -> 6 tpls (just deleting and hangman is avaible)
## - changed some layout
## - missing features:*pictures*readme.txt*lang_english
## 19-04-2004 - Version 0.3.1
## - some db renaming... (for better english style and releasing official
## - added navigation @ creating -> error
## 20-04-2004 - Version 0.4.0
## - added help -> 7 tpls
## - some layout
## - some lang...
## - missing features:*pictures*readme.txt*lang_english
## 20-04-2004 - Version 0.4.5
## - added 11 pictures
## - added check_word function
## - added some signs (!.?-_)
## - missing features:*readme.txt*lang_english
## 20-04-2004 - Version 0.4.6
## - some layout
## - added English lang but help is remaining in german
## 20-04-2004 Version 0.5.0 Beta
## - beta release, learn what public says ;)
## - added readme.txt with introductions
## - first release ;)
## 01-05-2004 Version 0.7.0 Beta
## - added some history and corrected the install.txt ;)
## - changed some code > ',' correct display and replaced some german (still remaining some words )
## - fixed, that if a hangman has a lease date, that when it is quessed that there isn't a remaining time in overview
## - added the picture for subSilver - Theme - Link ;)
## - creator is shown @ quess page
## - fixed offset bug
## 02-05-2004 Version 0.7.1 Beta
## - fixed bug that users already lost where counted if watching game status
## 04-06-2004 Version 0.9.0 still Beta
## - added filter to overview page
## - added administration
## - added points_mod support
## - added ACP
## - fixed bug that users lost only see there first tried letter (not all letters quessed)
## - one config table and table hangman_quess was altered
## - supported themes >bluetabs >subSilver >fisubsilversh >fiblue3d
## 10-06-2004 Version 0.9.1
## 10-06-2004 Version 0.9.2 still Beta
## - changed Wordcheck
## - added points mod -> erased cash mod (both are the same in adding points
## - added option to use other chars (edit lang_hangman.php)
## - config will load a standart config so updating TABLES in new versions is not necessary
## - fixed layout in subSilver, fisubsilversh, bluetabs, fiblue3d
## 24-06-2004 Version 1.0.0 First [non-BETA] Release
## - much code change for better understanding / working
## - added admin option to delete multiple hangmans in overview
## - added one field to HANGMAN_SCORE -> gives better highscore system ;)
## - added much more data to overview
## - changed code for word quessing -> now will work "perfect" on words (excluding words containing zeros -> never allow!)
## - changed template subSilver an fisubsilversh -> i mean looks better ^^
## - created a db_install.php -> !!!!USE AT OWN RISK!!!!
## - changed config handling -> now easier to update/add new fields
## - fixed bug on quessing page when author of hangman looks at, including changed layout of quessing page...
## - added much more security on checking the post/get vars offset,game_index and filter
## 25-06-2004 Version 1.0.1
## - fixed highscore bug
## 27-06-2004 Version 1.0.2
## - fixed zero bug
## - added [bold] for user who is looking at overview
## 08-07-2004 Version 1.0.3
## - + allowed
## - help for points/highscore system
## - fixed filter bug
## - fixed lang bugs
## - added some administration (highscore_system)
## 10-07-2004 Version 1.1.0
## - more admin features (allowed letters, auto_replace_letters)
## - fixed overview bugs (i hope these were all now!)
## - fixed highscore layout
## - added XML - Export and Import functions for admin
## 24-09-2004 Version 1.2.0
## - much much more ACP features
## - some more options fox XML feature
## - little stat in overview (ACP to click on/off)
## - filter and offset will be kept when quessing and returning overview page
## - Hangman Moderator Group can be created
## - some structure changes -> tpls will be find in /template/hangman/*.tpl
## -> there comes a includes/functions_hangman.php
## - time_play_again is now in minutes
## - per ACP allowed to configure that a user can't wait on quessing a hangman
## by pressing "F5" - he will lose one try every time he hits ;p
## 21-10-2004 Version 1.3.0
## - ACP feature -> give a standart subject to hangman
## - ACP feature -> show or not show hangman IDs in Overview
## - ACP feature -> allow guests to visit Hangman (Overview, Highscore and Help)
## - ACP feature -> min help length
## - fixed bbcode Version up to 0.0.2 (bugfixing see more in install_bbcode.txt)
## - ACP feature -> max per day value
## - XML feature - filename contains number of hangmans inside ( %number%_hangman_%timestamp%.xml)
## - Fixed subSilver style
## - Fixed if no help given - it won't be shown @ quess page
## - Fixed bugs with pafiledb and other mods including functions_% filenames in include folder (again much more install instructions...)
## - ... FINAL Version before 2.0.0! or Hangman @ phpbb2.2.x
## - mode=window added (with given game_index) ex. hangman.php?mode=window&game_index=1
## 05-12-2004 Version 1.3.1
## - fixed Layout in overview, create
## - fixed moderator group bug in admin_hangman.php
## 01-01-2005 Version 1.4.0
## - added feature give points per quessed letter
## - highscore now counts letters wrong or right quessed per user
## 22-01-2005 Version 1.5.0 EMC*
## - Maximum Word Length (DB Update Needed!)
## - fixed ACP bug (minletters unchangeable)
## - Easy Mod Compatible! (just tested on a clean phpBB2.0.11)
## - Header and Viewonline now in install.txt (EM* will process them)
## - Fixed Bug in ACP -> importing with username will updatescore @ count of hangmans
## - Added option to submit whole words by quessing
## - Fixed Bug - best Player == user with most points not with most quessed
## - Fixed Bug that letters are displayed which are "autoreplaced"
## - ANONYMOUS can visit quessed hangmans (if ANONYMOUS allowed on overview)
## 06-02-2005 Version 1.5.1 EMC
## - Fixed BBCode Bug in functions_hangman.php - just upload new functions_hangman.php
## 08-02-2005 Version 1.5.2 EMC
## - German Language - Update
## - Fixed "Zero" Bug again
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ SQL ] -----
#
CREATE TABLE phpbb_hangman_configs ( config_name varchar(20) NOT NULL default '', config_value varchar(255) NOT NULL default '' ) TYPE=MyISAM;
CREATE TABLE phpbb_hangman_quess ( userid mediumint(8) NOT NULL default '0', hangmanid mediumint(8) NOT NULL default '0', tries tinyint(2) default NULL, losttime int(11) default NULL, quesscount int(4) NOT NULL default '1' ) TYPE=MyISAM;
CREATE TABLE phpbb_hangman_score ( userid mediumint(8) NOT NULL default '0', created mediumint(8) NOT NULL default '0', won mediumint(8) NOT NULL default '0', lost mediumint(8) NOT NULL default '0', points mediumint(8) NOT NULL default '0', r_letters mediumint(8) NOT NULL default '0', w_letters mediumint(8) NOT NULL default '0' ) TYPE=MyISAM;
CREATE TABLE phpbb_hangman_words ( hangmanid mediumint(8) NOT NULL auto_increment, userid mediumint(8) NOT NULL default '0', hangman_word text, hangman_help text, hangman_subject varchar(70) NOT NULL default '', max_tries tinyint(2) default NULL, time_created int(11) NOT NULL default '0', time_limit int(11) NOT NULL default '0', bwon tinyint(1) NOT NULL default '0', quessed_letters varchar(35) default NULL, bbcodeid varchar(10) NOT NULL default '', winner mediumint(8) default '0', PRIMARY KEY (hangmanid) ) TYPE=MyISAM;
#
#-----[ COPY ]------------------------------------------
#
copy templates/subSilver/hangman/*.tpl to templates/subSilver/hangman/
copy templates/subSilver/hangman/admin/*.tpl to templates/subSilver/hangman/admin/
copy hangman.php to /
copy /language/lang_english/lang_hangman.php to /language/lang_english/
copy /language/lang_german/lang_hangman.php to /language/lang_german/
copy /images/hangman_pics/*.* to /images/hangman_pics/
copy /admin/admin_hangman.php to /admin/
copy /admin/admin_hangman_import.php to /admin/
copy /includes/functions_hangman.php to /includes/
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/overall_header.tpl
#
#-----[ FIND ]------------------------------------------
#
<td height="25" align="center" valign="top" nowrap="nowrap"><span class="mainmenu"> <a href="{U_PROFILE}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_profile.gif" width="12" height="13" border="0" alt="{L_PROFILE}" hspace="3" />{L_PROFILE}</a> <a href="{U_PRIVATEMSGS}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_message.gif" width="12" height="13" border="0" alt="{PRIVATE_MESSAGE_INFO}" hspace="3" />{PRIVATE_MESSAGE_INFO}</a> <a href="{U_LOGIN_LOGOUT}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_login.gif" width="12" height="13" border="0" alt="{L_LOGIN_LOGOUT}" hspace="3" />{L_LOGIN_LOGOUT}</a> </span></td>
#
#-----[ IN-LINE FIND ]------------------------------------------
#
<a href="{U_LOGIN_LOGOUT}" class="mainmenu">
#
#-----[ IN-LINE BEFORE, ADD ]------------------------------------------
#
<a href="{U_HANGMAN}" class="mainmenu"><img src="images/hangman_pics/hangman_link_trans.gif" width="12" height="13" border="0" alt="{L_HANGMAN}" hspace="3">{L_HANGMAN}</a>
#
#-----[ OPEN ]------------------------------------------
#
includes/page_header.php
#
#-----[ FIND ] ------
#
$template->assign_vars(array(
'SITENAME' => $board_config['sitename'],
#
#-----[ BEFORE, ADD] -----
#
$hang_stats_count = NULL;
$hang_stats_left = NULL;
if (!defined('IN_HANGMAN'))
{
define('IN_HANGMAN',true);
include($phpbb_root_path.'includes/functions_hangman.php');
}
$hang_stats = get_hangman_stats();
$hang_stats_count = intval($hang_stats['count']);
$hang_stats_left = $hang_stats_count - intval($hang_stats['won']);
#
#-----[ FIND ]------------------------------------------
#
'U_INDEX' => append_sid('index.'.$phpEx),
#
#-----[ AFTER, ADD ]------------------------------------------
#
'U_HANGMAN' => append_sid('hangman.'.$phpEx),
'L_HANGMAN'=>'Hangman('.$hang_stats_left.'/'.$hang_stats_count.')',
#
#-----[ OPEN ]------------------------------------------
#
includes/constants.php
#
#-----[ FIND ]------------------------------------------
# at the end of file
?>
#
#-----[ BEFORE, ADD ]------------------------------------------
#
/* Begin Mod HANGMAN*/
define('PAGE_HANGMAN',-212);
//define tables
define('HANGMAN_WORDS', $table_prefix.'hangman_words');
define('HANGMAN_QUESS', $table_prefix.'hangman_quess');
define('HANGMAN_SCORE', $table_prefix.'hangman_score');
define('HANGMAN_CONFIGS', $table_prefix.'hangman_configs');
define('EXPORT_LETTER_SET','ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz.!? ');
/* End Mod Hangman*/
#
#-----[ OPEN ] ------
#
viewonline.php
#
#-----[ FIND ] ------
#
case PAGE_FAQ:
$location = $lang['Viewing_FAQ'];
$location_url = "faq.$phpEx";
break;
#
#-----[AFTER, ADD] -----
#
case PAGE_HANGMAN:
$location = 'Hangman';
$location_url = "hangman.$phpEx";
break;
#
#-----[ OPEN ] ------
#
admin/index.php
#
#-----[ FIND ] ------
#
case PAGE_FAQ:
$location = $lang['Viewing_FAQ'];
$location_url = "index.$phpEx?pane=right";
break;
#
#-----[ AFTER, ADD] -----
#
case PAGE_HANGMAN:
$location = 'Hangman';
$location_url = "hangman.$phpEx";
break;
#
#-----[ FIND ] ------
#
case PAGE_FAQ:
$location = $lang['Viewing_FAQ'];
$location_url = "index.$phpEx?pane=right";
break;
#
#-----[ AFTER, ADD] -----
#
case PAGE_HANGMAN:
$location = 'Hangman';
$location_url = "hangman.$phpEx";
break;
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
#-----[ !!!CONFIGURE YOUR ACP!!! ]--------------------------------------
# EofM
Wie genau muss ich denn die Tabelle anlegen?
"Tabellen name" ist klar.
"Felder" ist nicht klar.
.
....bei den folgenden bin ich mir dann auch nicht mehr sicher...
.
Feld
TypDokumentation
Länge/Set*
Attribute
Null
Standard**
Extra
Kann mir jemand helfen?
Gonzo