Mod'un Çalışması için
point yada cash mod yüklü olmalı..
PHP yorumlayıcısı 4.2.0 olmalıdır (şu anki resmi php versiyonu 4.4.4)
Kod: Tümünü seç
##############################################################
## MOD Title: Lottery Modification
## MOD Author: Zarath < null@null.com > ( Jamie ) http://www.zarath.com
## MOD Description: Allows you to set up a lottery for your forum.
## MOD Version: 2.1.1
##
## Installation Level: Easy
## Installation Time: 5 Minutes
## Files To Edit: includes/constants.php
## includes/page_header.php
## language/lang_*/lang_main.php
## language/lang_*/lang_admin.php
## templates/*/overall_header.tpl
## Included Files: lottery.php
## admin_lottery.php
## lottery_index_body.tpl
## lottery_history_body.tpl
## lottery_config_body.tpl
##############################################################
## Author Notes: Please check
## http://www.zarath.com/mods/extended.php?action=faq
## and http://www.zarath.com/mods/extended.php?action=bugs
## if you're having any troubles before posting/emailing me.
## Any major problems or bug fixes will be posted there. Also
## make sure you're using the latest version of the mod.
##
## If you're upgrading from 2.x.x simply upload the new lottery.php
## over your old one! No need for other changes.
##############################################################
## MOD History:
## v1.0.0 First version.
## v1.1.0 Fixed several bugs.
## v2.0.0 Complete overhaul.
## V2.0.1 Fixed a bug with register_globals off, where it didn't
## register the buying actions.
## v2.0.1 Fixed a critical bug reguarding multiple items.
## v2.0.2 Fixed a problem with registering 2 variables that set them 0.
## v2.0.3 Changed the way items are added, for people who don't have the
## shop installed.
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ COPY ]------------------------------------------
#
copy lottery.php to lottery.php
copy mod_install.php to mod_install.php
copy /admin/admin_lottery.php to /admin/admin_lottery.php
copy /templates/lottery_index_body.tpl to /templates/subSilver/lottery_index_body.tpl
copy /templates/lottery_history_body.tpl to /templates/subSilver/lottery_history_body.tpl
copy /templates/admin/lottery_config_body.tpl to /templates/subSilver/admin/lottery_config_body.tpl
#
#-----[ SQL ]------------------------------------------
#
# Only do these SQL queries if you can not run the mod_install.php file.
# Otherwise, please run (go to it in your browswer) that as it's easier.
#
# If you don't use MySQL, you'll need to edit these queries accordingly
#
# If you have a different table prefix then change these commands accordingly.
# These currently use the default table prefix.
CREATE TABLE `phpbb_lottery`
(`id` INT UNSIGNED NOT NULL AUTO_INCREMENT, `user_id` INT (20) NOT NULL, PRIMARY KEY(`id`), INDEX(`user_id`));
INSERT INTO `phpbb_config` (config_name, config_value) VALUES ('lottery_cost', '1');
INSERT INTO `phpbb_config` (config_name, config_value) VALUES ('lottery_ticktype', 'single');
INSERT INTO `phpbb_config` (config_name, config_value) VALUES ('lottery_length', '500000');
INSERT INTO `phpbb_config` (config_name, config_value) VALUES ('lottery_name', 'Lottery');
INSERT INTO `phpbb_config` (config_name, config_value) VALUES ('lottery_base', '50');
INSERT INTO `phpbb_config` (config_name, config_value) VALUES ('lottery_start', '0');
INSERT INTO `phpbb_config` (config_name, config_value) VALUES ('lottery_reset', '0');
INSERT INTO `phpbb_config` (config_name, config_value) VALUES ('lottery_status', '0');
INSERT INTO `phpbb_config` (config_name, config_value) VALUES ('lottery_items', '0');
INSERT INTO `phpbb_config` (config_name, config_value) VALUES ('lottery_win_items', '');
INSERT INTO `phpbb_config` (config_name, config_value) VALUES ('lottery_show_entries', '0');
INSERT INTO `phpbb_config` (config_name, config_value) VALUES ('lottery_mb', '0');
INSERT INTO `phpbb_config` (config_name, config_value) VALUES ('lottery_mb_amount', '1');
INSERT INTO `phpbb_config` (config_name, config_value) VALUES ('lottery_history', '1');
INSERT INTO `phpbb_config` (config_name, config_value) VALUES ('lottery_currency', '');
INSERT INTO `phpbb_config` (config_name, config_value) VALUES ('lottery_item_mcost', '1');
INSERT INTO `phpbb_config` (config_name, config_value) VALUES ('lottery_item_xcost', '500');
INSERT INTO `phpbb_config` (config_name, config_value) VALUES ('lottery_random_shop', '');
CREATE TABLE `phpbb_lottery_history`
(
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`user_id` INT (20) NOT NULL,
`amount` INT (20) NOT NULL,
`currency` CHAR (32) NOT NULL,
`time` INT (20) NOT NULL, PRIMARY KEY(`id`), INDEX(`user_id`)
);
#
#-----[ OPEN ]------------------------------------------
#
includes/page_header.php
#
#-----[ FIND ]------------------------------------------
#
'PAGE_TITLE' => $page_title,
#
#-----[ AFTER, ADD ]------------------------------------------
#
'L_LOTTERY' => $lang['lottery'],
#
#-----[ FIND ]------------------------------------------
#
'U_FAQ' => append_sid('faq.'.$phpEx),
#
#-----[ AFTER, ADD ]------------------------------------------
#
'U_LOTTERY' => append_sid('lottery.'.$phpEx),
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/overall_header.tpl
#
#-----[ FIND ]------------------------------------------
#
<a href="{U_LOGIN_LOGOUT}
#
#-----[ BEFORE, ADD ]------------------------------------------
#
<a href="{U_LOTTERY}" class="mainmenu">{L_LOTTERY}</a>
#
#-----[ OPEN ]------------------------------------------
#
includes/constants.php
#
#-----[ FIND ]------------------------------------------
#
?>
#
#-----[ BEFORE, ADD ]------------------------------------------
#
define('LOTTERY_TABLE', $table_prefix.'lottery');
define('LOTTERY_HISTORY_TABLE', $table_prefix.'lottery_history');
#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_main.php
#
#-----[ FIND ]------------------------------------------
#
?>
#
#-----[ BEFORE, ADD ]------------------------------------------
#
// Lottery Variables
$lang['lottery_second'] = 'Second';
$lang['lottery_seconds'] = 'Seconds';
$lang['lottery_minute'] = 'Minute';
$lang['lottery_minutes'] = 'Minutes';
$lang['lottery_hour'] = 'Hour';
$lang['lottery_hours'] = 'Hours';
$lang['lottery_day'] = 'Day';
$lang['lottery_days'] = 'Days';
$lang['lottery_current_history'] = 'Current History';
$lang['lottery_no_history'] = 'There is currently no history recorded!';
$lang['lottery_history_disabled'] = 'Lottery history is disabled on these forums!';
$lang['lottery_ticket_bought'] = 'Your ticket in the %s has been successfully purchased.';
$lang['lottery_tickets_bought'] = 'Your %s tickets in the %s have been successfully purchased.';
$lang['lottery_purchased_ticket'] = ' to purchase a ticket!';
$lang['lottery_purchased_tickets'] = ' to purchase %s tickets!';
$lang['lottery_purchased_ne'] = 'You do not have enough ';
$lang['lottery_too_many_tickets'] = 'You have already purchased the maximum amount of tickets allowed in this lottery! Please wait until the next draw.';
$lang['lottery_information'] = 'Information';
$lang['lottery_actions'] = 'Lottery Actions';
$lang['lottery_disabled'] = 'The lottery is currently turned off!<br /><br />Try again later.';
$lang['lottery_ID'] = 'ID';
$lang['lottery_winner'] = 'Winner';
$lang['lottery_amount_won'] = 'Amount Won';
$lang['lottery_time_won'] = 'Time Won';
$lang['lottery_total_history'] = 'There are a total of %s lottery history entries.';
$lang['lottery_history'] = 'History';
$lang['lottery_tickets_owned'] = 'Tickets Owned';
$lang['lottery_ticket_cost'] = 'Ticket Cost';
$lang['lottery_base_pool'] = 'Base Prize Pool';
$lang['lottery_current_entries'] = 'Current Entries';
$lang['lottery_total_pool'] = 'Total Prize Pool';
$lang['lottery_item_draw'] = 'Items in Draw';
$lang['lottery_time_draw'] = 'Time Until Drawn';
$lang['lottery_last_winner'] = 'Last Winner';
$lang['lottery_buy_ticket'] = 'Buy Ticket';
$lang['lottery_buy_tickets'] = 'Buy Tickets';
$lang['lottery_view_history'] = 'View Lottery History';
$lang['lottery_view_phistory'] = 'View Personal History';
$lang['lottery'] = 'Lottery';
// Lottery Error Variables
$lang['lottery_error_updating'] = 'Error updating %s table!';
$lang['lottery_error_deleting'] = 'Error deleting from %s table!';
$lang['lottery_error_selecting'] = 'Error getting information from %s table!';
$lang['lottery_error_inserting'] = 'Error inserting into %s table!';
$lang['lottery_error_variable'] = 'Could not read %s variable!';
$lang['lottery_invalid_command'] = 'That is not a valid command!';
$lang['lottery_no_history_type'] = 'No history type selected!';
#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_admin.php
#
#-----[ FIND ]------------------------------------------
#
?>
#
#-----[ BEFORE, ADD ]------------------------------------------
#
// Lottery Variables
$lang['lottery_second'] = 'Second';
$lang['lottery_seconds'] = 'Seconds';
$lang['lottery_minute'] = 'Minute';
$lang['lottery_minutes'] = 'Minutes';
$lang['lottery_hour'] = 'Hour';
$lang['lottery_hours'] = 'Hours';
$lang['lottery_day'] = 'Day';
$lang['lottery_days'] = 'Days';
$lang['lottery_no_items'] = 'There are no items in the shop database!';
$lang['lottery_rand'] = 'Random';
$lang['lottery_statistics'] = 'Lottery Statistics';
$lang['lottery_edit_settings'] = 'Edit Lottery Settings';
$lang['lottery_no_one'] = 'No One';
$lang['lottery_editor'] = 'Lottery Editor';
$lang['lottery_index_explain'] = 'This section allows you to edit the lottery settings.';
$lang['lottery_no_item'] = 'No such item exists!';
$lang['lottery_invalid_action'] = 'Invalid Action!';
$lang['lottery_click_to_return'] = 'Click %sHere%s to return to Lottery Settings.';
$lang['lottery_random_items_updated'] = 'Random item settings sucessfully updated!';
$lang['lottery_item_added'] = 'Item successfully added to item pool!';
$lang['lottery_item_removed'] = 'Item successfully removed from item pool!';
$lang['lottery_updated'] = 'Lottery sucessfully updated!';
$lang['lottery_status'] = 'Lottery Status';
$lang['lottery_add_item'] = 'Add Item';
$lang['lottery_add_items'] = 'Add Item to Pool';
$lang['lottery_remove_item'] = 'Remove Item';
$lang['lottery_current_items'] = 'Current Item Pool';
$lang['lottery_update_settings'] = 'Update Settings';
$lang['lottery_max_cost'] = 'Maximum Cost';
$lang['lottery_min_cost'] = 'Minimum Cost';
$lang['lottery_all_shops'] = 'All Shops';
$lang['lottery_from_shop'] = 'From Shop';
$lang['lottery_update'] = 'Update';
$lang['lottery_currency'] = 'Currency to Use';
$lang['lottery_history'] = 'Lottery History';
$lang['lottery_item_pool'] = 'Item Pool';
$lang['lottery_full_display'] = 'Full Display';
$lang['lottery_max'] = 'max';
$lang['lottery_off'] = 'Off';
$lang['lottery_on'] = 'On';
$lang['lottery_mult_tickets'] = 'Multiple Tickets';
$lang['lottery_multiple'] = 'Multiple';
$lang['lottery_single'] = 'Single';
$lang['lottery_tickets_allowed'] = 'Tickets Allowed';
$lang['lottery_draw_periods'] = 'Lottery Draw Periods';
$lang['lottery_entry_cost'] = 'Entry Cost';
$lang['lottery_base_amount'] = 'Lottery Base Amount';
$lang['lottery_name'] = 'Lottery Name';
$lang['lottery_auto_restart'] = 'Auto Restart';
$lang['lottery_last_won'] = 'Last Won';
$lang['lottery_pool'] = 'Lottery Pool';
$lang['lottery_time_left'] = 'Time Left';
$lang['lottery_duration_left'] = 'Duration Left';
$lang['lottery_total_entries'] = 'Total Entries';
$lang['lottery_items_table'] = 'Edit Item Pool';
$lang['lottery_items_settings'] = 'Edit Item Settings';
// Lottery Error Variables
$lang['lottery_error_updating'] = 'Error updating %s table!';
$lang['lottery_error_deleting'] = 'Error deleting from %s table!';
$lang['lottery_error_selecting'] = 'Error getting information from %s table!';
$lang['lottery_error_inserting'] = 'Error inserting into %s table!';
$lang['lottery_error_variable'] = 'Could not read %s variable!';
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM