Double post merge
Forumregels
Sinds 1 januari 2009 wordt phpBB2 niet meer ondersteund.
Onderstaande informatie is verouderd en dient uitsluitend als archief.
Sinds 1 januari 2009 wordt phpBB2 niet meer ondersteund.
Onderstaande informatie is verouderd en dient uitsluitend als archief.

Double post merge
Ik wil de double post merge mod toevoegen, maar de automatische databasefile doet het niet.
Zelf heb ik niet genoeg kennis om dit handmatig te doen.
Wie kan me helpen?
Zelf heb ik niet genoeg kennis om dit handmatig te doen.
Wie kan me helpen?
Bedoel je dit?
Code: Selecteer alles
##############################################################
## MOD Title: Double Post Control MOD
## MOD Author: Kinetix < webmaster@ikrontik.tk > (N/A) http://www.ikrontik.tk
## MOD Description: This MOD effectively stops users from posting the same message
## twice in a row.
## MOD Version: 1.0.0
##
## Installation Level: Easy
## Installation Time: 1 Minute
## Files To Edit: 2: includes/functions_post.php
## language/lang_english/lang_main.php
## Included Files: 0
##############################################################
## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered
## in our MOD-Database, located at: http://www.phpbb.com/mods/
##############################################################
## Author Notes: None.
##
##############################################################
## MOD History: None.
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
# IMPORTANT: Some FIND commands only contain partial lines. Unless the script calls for an
# "IN-LINE ADD," always add new segments of code on separate lines. Also, before an In-Line
# Find, you'll often see a FIND. These FINDS are there to help you locate the lines where
# In-Line FIND will work.
#
#-----[ OPEN ]------------------------------------------
#
includes/functions_post.php
#
#-----[ FIND ]------------------------------------------
#
//
// Flood control
//
$where_sql = ($userdata['user_id'] == ANONYMOUS) ? "poster_ip = '$user_ip'" : 'poster_id = ' . $userdata['user_id'];
$sql = "SELECT MAX(post_time) AS last_post_time
FROM " . POSTS_TABLE . "
WHERE $where_sql";
if ($result = $db->sql_query($sql))
{
if ($row = $db->sql_fetchrow($result))
{
if (intval($row['last_post_time']) > 0 && ($current_time - intval($row['last_post_time'])) < intval($board_config['flood_interval']))
{
message_die(GENERAL_MESSAGE, $lang['Flood_Error']);
}
}
}
#
#-----[ AFTER, ADD ]------------------------------------------
#
//
// Double Post Control
//
$lastposttime = intval($row['last_post_time']);
if($mode != 'editpost')
{
$sql = "SELECT pt.post_text
FROM " . POSTS_TABLE . " p, " . POSTS_TEXT_TABLE . " pt
WHERE $where_sql AND p.post_time = $lastposttime AND pt.post_id = p.post_id
LIMIT 1";
if ($result = $db->sql_query($sql))
{
if ($row = $db->sql_fetchrow($result))
{
if ($row['post_text'] == $post_message)
{
message_die(GENERAL_MESSAGE, $lang['Double_Post_Error']);
}
}
$db->sql_freeresult($result);
}
}
#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_main.php
#
#-----[ FIND ]------------------------------------------
#
$lang['Flood_Error'] = 'You cannot make another post so soon after your last; please try again in a short while.';
#
#-----[ AFTER, ADD ]------------------------------------------
#
$lang['Double_Post_Error'] = 'You cannot make another post with the exact same text as your last.';
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
Nope, ik bedoel dit
Code: Selecteer alles
##############################################################
## MOD Title: Double post merge
## MOD Author: Mercuree < mercuree@moldova.cc > ( Igor )
## MOD Description: This mod merges post text on posting
## to the last message in topic
## instead of adding a new one, only if
## the poster of the last message
## and the poster of current text is the
## same person (double post becomes one post)
## MOD Version: 1.0.1
##
## Installation Level: Easy
## Installation Time: 1 Minute
##
## Files To Edit: posting.php
## includes\function_post.php
## admin\admin_board.php
## language\lang_english\lang_admin.php
## templates\subSilver\admin\board_config_body.tpl
##
## Included Files: double_post_merge_mod_install.php
##############################################################
Die heb ik al geinstalled. Die gaat erom dat als je 2 keer achter elkaar op oke klikt dat je maar 1 keer het bericht ziet.
Ik wil degene installen dat als iemand een nieuwe reactie plaatst na een laatste reactie van hemzelf in een topic, dat dat gewoon onder zijn eigen post komt te staan en geen nieuwe post voor word geopend.
Het enige probleem is dat de automatische database update niet werkt, en ik ook niet weet hoe ik die handmatig kan toevoegen.
Ik geloof trouwens ook dat spammersheaven deze mod ook gebruikt.
Ik wil degene installen dat als iemand een nieuwe reactie plaatst na een laatste reactie van hemzelf in een topic, dat dat gewoon onder zijn eigen post komt te staan en geen nieuwe post voor word geopend.
Het enige probleem is dat de automatische database update niet werkt, en ik ook niet weet hoe ik die handmatig kan toevoegen.
Ik geloof trouwens ook dat spammersheaven deze mod ook gebruikt.
Dit is trouwens de foumelding die ik krijg.
Code: Selecteer alles
Could not update database
DEBUG MODE
SQL Error : 1064 You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'AFTER flood_interval' at line 1
INSERT INTO phpbb_config (config_name, config_value) VALUES ('join_interval', '18') AFTER flood_interval
Line : 55
File : /home/spamhotel.nl/www/double_post_merge_mod_install.php
Hier is hij
Code: Selecteer alles
<?php
/***************************************************************************
* double_post_merge_mod_install.php
* -------------------
* copyright : ©2004 Mercuree
* built for : Double post merge
*
*
***************************************************************************/
/***************************************************************************
*
* 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.
*
***************************************************************************/
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 = ( @preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE')) ) ? 'Refresh: 0; URL=' : 'Location: ';
header($header_location . append_sid('login.'.$phpEx.'?redirect=double_post_merge_mod_install.'.$phpEx));
exit;
}
if( $userdata['user_level'] != ADMIN )
{
message_die(GENERAL_MESSAGE, 'You are not authorised to access this page');
}
$sql = array();
$sql[] = "INSERT INTO " . $table_prefix . "config (config_name, config_value) VALUES ('join_interval', '18') AFTER flood_interval";
for( $i = 0; $i < count($sql); $i++ )
{
if( !$result = $db->sql_query ($sql[$i]) )
{
message_die(GENERAL_ERROR, 'Could not update database', '', __LINE__, __FILE__, $sql[$i]);
}
$sql_message .= '* ' . $sql[$i] . '<br />';
}
$message = 'Database updated successfully<br />The following queries were executed:<br /><br /><span class="genmed">' . $sql_message . '</span><br /><br />Please be sure to delete this file now<br /><br />' . sprintf ($lang['Click_return_index'], '<a href="' . append_sid ('index.'.$phpEx) . '">', '</a>');
message_die (GENERAL_MESSAGE, $message);
?>
De querycode stond verkeerd in die lijst.
Deze is het
[/code]
Deze is het
Code: Selecteer alles
INSERT INTO bbcc_config (config_name, config_value) VALUES ('join_interval', '18');