שלום לכם,
רק רציתי לשאול האם יש צורך להריץ SQL במוד הזה, או שזה מוד פשוט של :"מצא" ,"שנה"
"שמור וכו'..
הנה המוד:
Author Notes:
## Please Run before you mod the files the wpm_db_update.php file in the root of your forum
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ SQL ]-------------------------------------------------
#
CREATE TABLE phpbb_wpm (name varchar(255) NOT NULL default '', value text NOT NULL) TYPE=MyISAM;
INSERT INTO phpbb_wpm VALUES ('wpm_version', '1.0.9');
INSERT INTO phpbb_wpm VALUES ('active_wpm', '1');
INSERT INTO phpbb_wpm VALUES ('wpm_username', 'Anonymous');
INSERT INTO phpbb_wpm VALUES ('wpm_userid', '-1');
INSERT INTO phpbb_wpm VALUES ('wpm_subject', 'Welcome to [sitename]!');
INSERT INTO phpbb_wpm VALUES ('wpm_message', 'Hi, there [username]!
I hope you enjoy your stay here at [sitename]!
If you have any questions about the site, please ask. If it goes about this mod please
visit: http://www.vitrax.vze.com thnx you!');
#
#-----[ OPEN ]------------------------------------------
#
includes/constants.php
#
#-----[ FIND ]------------------------------------------
#
define('VOTE_USERS_TABLE', $table_prefix.'vote_voters');
#
#-----[ AFTER, ADD ]------------------------------------------
#
define('WPM', $table_prefix.'wpm');
#
#-----[ OPEN ]------------------------------------------
#
includes/usercp_register.php
#
#-----[ FIND ]------------------------------------------
#
message_die(GENERAL_MESSAGE, $message);
} // if mode == register
}
} // End of submit
#
#-----[ BEFORE, ADD ]------------------------------------------
#
//
// START wpm mod by Duvelske (http://www.vitrax.vze.com)
{
$sql = "SELECT *
FROM " . WPM;
if(!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, "", "", __LINE__, __FILE__, $sql);
}
else
{
while($row = $db->sql_fetchrow($result))
{
$swpm_config[$row['name']] = $row['value'];
}
}
if($swpm_config['active_wpm'])
{
// add functions wpm
include_once($phpbb_root_path . 'includes/functions_wpm.' . $phpEx);
// Just a couple of replaces for better customisation on a per user basis
// no point making a special function since there are so few needed
$wpm_subject = str_replace("[username]", $username, $swpm_config['wpm_subject']);
$wpm_subject = str_replace("[user_id]", $user_id, $wpm_subject);
$wpm_subject = str_replace("[sitename]", $board_config['sitename'], $wpm_subject);
$wpm_message = str_replace("[username]", $username, $swpm_config['wpm_message']);
$wpm_message = str_replace("[user_id]", $user_id, $wpm_message);
$wpm_message = str_replace("[sitename]", $board_config['sitename'], $wpm_message);
// Will not send a pm notification via email (already sent the standard welcome email)
// Simply change the 0 to a 1 to turn it on
wpm_send_pm($user_id, $wpm_subject, $wpm_message, 0);
}
}
// END wpm mod
//
#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_main.php
#
#-----[ FIND ]------------------------------------------
#
?>
#
#-----[ BEFORE, ADD ]------------------------------------------
#
$lang['not_delete_pm'] = 'Could not delete your oldest privmsgs';
$lang['non_existing_user'] = 'Tried obtaining data for a non-existent user';
$lang['No_entry_wpm'] = 'Thank you for register at [sitename]!';
$lang['no_sent_pm_insert'] = 'Could not insert private message sent info!';
#
#-----[ COPY ]------------------------------------------
#
copy root/admin/admin_wpm.php to admin/admin_wpm.php
copy root/includes/functions_wpm.php to includes/functions_wpm.php
copy root/templates/sibSilver/admin/wpm_body.tpl to templates/subSilver/admin/wpm_body.tpl
copy root/language/lang_english/lang_admin_wpm.php to language/lang_english/lang_admin_wpm.php
copy root/language/lang_dutch/lang_admin_wpm.php to language/lang_dutch/lang_admin_wpm.php
copy root/language/lang_german/lang_admin_wpm.php to language/lang_german/lang_admin_wpm.php
copy root/language/lang_french/lang_admin_wpm.php to language/lang_french/lang_admin_wpm.php
copy root/language/lang_russian/lang_admin_wpm.php to language/lang_russian/lang_admin_wpm.php
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM