php & tcl
HejsaJeg vil lige høre om en af jer genier herinde, kunne fortælle mig om det er muligt at lave følgende:
1. Lave så den KUN poster i de ids jeg sætter i scriptet.
2. Ja jeg tror kun der var nr.1 :D
her kommer koden. (den er halv lang)
#################################################################
## MOD Title: Eggdrop Announce
## MOD Author: WyriHaximus < webmaster@wyrihaximus.net > (Cees-Jan Kiewiet) http://www.wyrihaximus.net/
## MOD Description: This MOD wil announce new topics and reply's in your IRC channel.
## MOD Version: 1.0.0
##
## Installation Level: Easy
## Installation Time: 1 Minute
## Files To Edit: 1
## includes/functions_post.php
## Included Files: 1
## includes/eggdrop.class.php
## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2
##############################################################
## For security purposes, please check: http://www.phpbb.com/mods/
## for the latest version of this MOD. Although MODs are checked
## before being allowed in the MODs Database there is no guarantee
## that there are no security problems within the MOD. No support
## will be given for MODs not found within the MODs Database which
## can be found at http://www.phpbb.com/mods/
##############################################################
## Author Notes:
##
## This mod was created as a request here: http://www.phpbb.com/phpBB/viewtopic.php?t=339597
##
#################################################################
##
## MOD History:
##
## 08-11-2005 - Version 1.0
## - This version never came out
##
#################################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
#################################################################
#
#-----[ COPY ]------------------------------------------
#
copy eggdrop.class.php to includes/eggdrop.class.php
#
#-----[ OPEN ]------------------------------------------
#
includes/functions_post.php
#
#-----[ FIND ]------------------------------------------
#
$sql = ($mode != 'editpost') ? "INSERT INTO " . POSTS_TEXT_TABLE . " (post_id, post_subject, bbcode_uid, post_text) VALUES ($post_id, '$post_subject', '$bbcode_uid', '$post_message')" : "UPDATE " . POSTS_TEXT_TABLE . " SET post_text = '$post_message', bbcode_uid = '$bbcode_uid', post_subject = '$post_subject' WHERE post_id = $post_id";
if (!$db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql);
}
#
#-----[ AFTER, ADD ]------------------------------------------
#
if($mode=='newtopic' || $mode=='reply')
{
$url = 'http://' . $board_config['server_name'] . (($board_config['server_port']==80) ? '' : ':' . $board_config['server_port']) . $board_config['script_path']. 'viewtopic.' . $phpEx . '?' .POST_POST_URL . '=' . $post_id . '#' . $post_id;
if(function_exists('replace_for_mod_rewrite'))
{
$url = replace_for_mod_rewrite($url);
}
include($phpbb_root_path . 'includes/eggdrop.class.' . $phpEx);
$tmp = new eggdrop_class;
$tmp->send_msg($board_config['eggdrop_server'],$board_config['eggdrop_port'],$board_config['eggdrop_username'],$board_config['eggdrop_password'],$board_config['eggdrop_channel'],str_replace(array('{POSTER}','{SUBJECT}','{LINK}'),array($userdata['username'],$post_subject,$url),$board_config['eggdrop_message' . (($mode=='newtopic') ? '' : '2')]));
unset($tmp);
}
#
#-----[ SQL ]------------------------------------------
#
INSERT INTO `phpbb_config` ( `config_name` , `config_value` )VALUES ('eggdrop_server', ''), ('eggdrop_port', ''),('eggdrop_username', ''), ('eggdrop_password', ''), ('eggdrop_channel', ''), ('eggdrop_message', ''),('eggdrop_message2', '');
#
#-----[ OPEN ]------------------------------------------
#
admin/admin_board.php
#
#-----[ FIND ]------------------------------------------
#
"L_SMTP_PASSWORD" => $lang['SMTP_password'],
"L_SMTP_PASSWORD_EXPLAIN" => $lang['SMTP_password_explain'],
"L_SUBMIT" => $lang['Submit'],
"L_RESET" => $lang['Reset'],
#
#-----[ AFTER, ADD ]------------------------------------------
#
"L_EGGDROP" => $lang['Eggdrop'],
"L_EGGDROP_SERVER" => $lang['Eggdrop_server'],
"L_EGGDROP_PORT" => $lang['Eggdrop_port'],
"L_EGGDROP_USERNAME" => $lang['Eggdrop_username'],
"L_EGGDROP_PASSWORD" => $lang['Eggdrop_password'],
"L_EGGDROP_CHANNEL" => $lang['Eggdrop_channel'],
"L_EGGDROP_MESSAGE" => $lang['Eggdrop_message'],
"L_EGGDROP_MESSAGE2" => $lang['Eggdrop_message2'],
"EGGDROP_SERVER" => $new['eggdrop_server'],
"EGGDROP_PORT" => $new['eggdrop_port'],
"EGGDROP_USERNAME" => $new['eggdrop_username'],
"EGGDROP_PASSWORD" => $new['eggdrop_password'],
"EGGDROP_CHANNEL" => $new['eggdrop_channel'],
"EGGDROP_MESSAGE" => $new['eggdrop_message'],
"EGGDROP_MESSAGE2" => $new['eggdrop_message2'],
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/admin/board_config_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<tr>
<td class="row1">{L_SMTP_SERVER}</td>
<td class="row2"><input class="post" type="text" name="smtp_host" value="{SMTP_HOST}" size="25" maxlength="50" /></td>
</tr>
<tr>
<td class="row1">{L_SMTP_USERNAME}<br /><span class="gensmall">{L_SMTP_USERNAME_EXPLAIN}</span></td>
<td class="row2"><input class="post" type="text" name="smtp_username" value="{SMTP_USERNAME}" size="25" maxlength="255" /></td>
</tr>
<tr>
<td class="row1">{L_SMTP_PASSWORD}<br /><span class="gensmall">{L_SMTP_PASSWORD_EXPLAIN}</span></td>
<td class="row2"><input class="post" type="password" name="smtp_password" value="{SMTP_PASSWORD}" size="25" maxlength="255" /></td>
</tr>
#
#-----[ AFTER, ADD ]------------------------------------------
#
<tr>
<th class="thHead" colspan="2">{L_EGGDROP}</th>
</tr>
<tr>
<td class="row1">{L_EGGDROP_SERVER}</td>
<td class="row2"><input class="post" type="text" name="eggdrop_server" value="{EGGDROP_SERVER}" size="25" maxlength="255" /></td>
</tr>
<tr>
<td class="row1">{L_EGGDROP_PORT}</td>
<td class="row2"><input class="post" type="text" name="eggdrop_port" value="{EGGDROP_PORT}" size="25" maxlength="255" /></td>
</tr>
<tr>
<td class="row1">{L_EGGDROP_USERNAME}</td>
<td class="row2"><input class="post" type="text" name="eggdrop_username" value="{EGGDROP_USERNAME}" size="25" maxlength="255" /></td>
</tr>
<tr>
<td class="row1">{L_EGGDROP_PASSWORD}</td>
<td class="row2"><input class="post" type="text" name="eggdrop_password" value="{EGGDROP_PASSWORD}" size="25" maxlength="255" /></td>
</tr>
<tr>
<td class="row1">{L_EGGDROP_CHANNEL}</td>
<td class="row2"><input class="post" type="text" name="eggdrop_channel" value="{EGGDROP_CHANNEL}" size="25" maxlength="255" /></td>
</tr>
<tr>
<td class="row1">{L_EGGDROP_MESSAGE}</td>
<td class="row2"><input class="post" type="text" name="eggdrop_message" value="{EGGDROP_MESSAGE}" size="25" maxlength="255" /></td>
</tr>
<tr>
<td class="row1">{L_EGGDROP_MESSAGE2}</td>
<td class="row2"><input class="post" type="text" name="eggdrop_message2" value="{EGGDROP_MESSAGE2}" size="25" maxlength="255" /></td>
</tr>
#
#-----[ OPEN ]------------------------------------------
#
languages/lang_english/lang_admin.php
#
#-----[ FIND ]------------------------------------------
#
//
// That's all Folks!
// -------------------------------------------------
#
#-----[ BEFORE, ADD ]------------------------------------------
#
//
// Eggdrop Announce MOD (by WyriHaximus)
//
$lang['Eggdrop'] = "Eggdrop Announce";
$lang['Eggdrop_server'] = "Eggdrop Bot Server Name";
$lang['Eggdrop_port'] = "Eggdrop Bot Server Port";
$lang['Eggdrop_username'] = "Eggdrop Username";
$lang['Eggdrop_password'] = "Eggdrop Password for the Username";
$lang['Eggdrop_channel'] = "Channel";
$lang['Eggdrop_message'] = "Message on new topic (user {LINK} for the link, {SUBJECT} for the post subject and {POSTER} for the poster)";
$lang['Eggdrop_message2'] = "Message on reply (user {LINK} for the link, {SUBJECT} for the post subject and {POSTER} for the poster)";
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
