Grüss euch!
Habe mir das cricca guestbook 2.2.0 und den Visual Confirmation for Cricca Guestbook 1.0.1 runtergeladen.
Ich nutze das Orion Forum und habe alle datein angepasst. zumindest die deutsche Sprachdatei, templates und admin datein. Nachdem ich den Visual Confirmation for Cricca Guestbook eingebaut habe kann ich keine einträge mehr ind GB machen. Es kommt nur die meldung
Spaming attempt. Ob es vorher schon war kann ich nicht sagen da ich nach dem mod einbau direkt den Visual Confirmation for Cricca Guestbook eingebaut habe. zudem wird auch kein Code eingebaut. Ich habe mal die anleitng für den visual confim hochgeladen zum anschauen. vieleicht ist da was falsch.
Leider habe ich zuzeit keine homepage da mir mein alter anbieter zu teuer war. ich teste erstmal alles local bevor mir nen neuen Space anschaffe.
- Code: Alles auswählen
#
#-----[ OPEN ]------------------------------------------------
#
guestbook.php
#
#-----[ FIND ]------------------------------------------------
#
$mode = ( isset($HTTP_POST_VARS['mode']) ) ? $HTTP_POST_VARS['mode'] : $HTTP_GET_VARS['mode'];
$mode = htmlspecialchars($mode);
#
#-----[ AFTER, ADD ]------------------------------------------
#
//-- mod : visual confirmation for cricca guestbook ------------------------------------------------
//-- add
if ( $mode == 'confirm' )
{
include($phpbb_root_path . 'includes/guestbook_confirm.'.$phpEx);
exit;
}
//-- fin mod : visual confirmation for cricca guestbook --------------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
if (isset($HTTP_POST_VARS['submit']))
{
if (time() - $guest_book->decrypt($mode) > intval($guest_config['session_posting'])) die("Spaming attempt");
#
#-----[ AFTER, ADD ]------------------------------------------
#
//-- mod : visual confirmation for cricca guestbook ------------------------------------------------
//-- add
if (!empty($guest_config['visual_confirm']) && !$userdata['session_logged_in'])
{
if (empty($HTTP_POST_VARS['confirm_id']))
{
$error = TRUE;
$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Confirm_code_wrong'];
}
else
{
$confirm_id = htmlspecialchars($HTTP_POST_VARS['confirm_id']);
$confirm_code= $HTTP_POST_VARS['confirm_code'];
if (!preg_match('/^[A-Za-z0-9]+$/', $confirm_id))
{
$confirm_id = '';
}
$sql = 'SELECT code
FROM ' . GUESTBOOK_CONFIRM_TABLE . "
WHERE confirm_id = '$confirm_id'
AND session_id = '" . $userdata['session_id'] . "'";
if (!($result = $db->sql_query($sql)))
{
message_die(GENERAL_ERROR, 'Could not obtain confirmation code', __LINE__, __FILE__, $sql);
}
if ($row = $db->sql_fetchrow($result))
{
if ($row['code'] != $confirm_code)
{
$error = TRUE;
$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Confirm_code_wrong'];
}
else
{
$sql = 'DELETE FROM ' . GUESTBOOK_CONFIRM_TABLE . "
WHERE confirm_id = '$confirm_id'
AND session_id = '" . $userdata['session_id'] . "'";
if (!$db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Could not delete confirmation code', __LINE__, __FILE__, $sql);
}
}
}
else
{
$error = TRUE;
$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Confirm_code_wrong'];
}
$db->sql_freeresult($result);
}
}
//-- fin mod : visual confirmation for cricca guestbook --------------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
// standard page header
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
//-- mod : visual confirmation for cricca guestbook ------------------------------------------------
//-- add
$confirm_image = '';
if (!empty($guest_config['visual_confirm']) && !$userdata['session_logged_in'])
{
$sql = 'SELECT session_id
FROM ' . SESSIONS_TABLE;
if (!($result = $db->sql_query($sql)))
{
message_die(GENERAL_ERROR, 'Could not select session data', '', __LINE__, __FILE__, $sql);
}
if ($row = $db->sql_fetchrow($result))
{
$confirm_sql = '';
do
{
$confirm_sql .= (($confirm_sql != '') ? ', ' : '') . "'" . $row['session_id'] . "'";
}
while ($row = $db->sql_fetchrow($result));
$sql = 'DELETE FROM ' . GUESTBOOK_CONFIRM_TABLE . "
WHERE session_id NOT IN ($confirm_sql)";
if (!$db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Could not delete stale confirm data', '', __LINE__, __FILE__, $sql);
}
}
$db->sql_freeresult($result);
$sql = 'SELECT COUNT(session_id) AS attempts
FROM ' . GUESTBOOK_CONFIRM_TABLE . "
WHERE session_id = '" . $userdata['session_id'] . "'";
if (!($result = $db->sql_query($sql)))
{
message_die(GENERAL_ERROR, 'Could not obtain confirm code count', '', __LINE__, __FILE__, $sql);
}
if ($row = $db->sql_fetchrow($result))
{
if ($row['attempts'] > 35)
{
message_die(GENERAL_MESSAGE, $lang['Too_many_comments']);
}
}
$db->sql_freeresult($result);
$confirm_chars = array('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '1', '2', '3', '4', '5', '6', '7', '8', '9');
list($usec, $sec) = explode(' ', microtime());
mt_srand($sec * $usec);
$max_chars = count($confirm_chars) - 1;
$code = '';
for ($i = 0; $i < 6; $i++)
{
$code .= $confirm_chars[mt_rand(0, $max_chars)];
}
$confirm_id = md5(uniqid($user_ip));
$sql = 'INSERT INTO ' . GUESTBOOK_CONFIRM_TABLE . " (confirm_id, session_id, code)
VALUES ('$confirm_id', '". $userdata['session_id'] . "', '$code')";
if (!$db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Could not insert new confirm code information', '', __LINE__, __FILE__, $sql);
}
unset($code);
$confirm_image = (@extension_loaded('zlib')) ? '<img src="' . append_sid("guestbook.$phpEx?mode=confirm&id=$confirm_id") . '" alt="" title="" />' : '<img src="' . append_sid("guestbook.$phpEx?mode=confirm&id=$confirm_id&c=1") . '" alt="" title="" /><img src="' . append_sid("guestbook.$phpEx?mode=confirm&id=$confirm_id&c=2") . '" alt="" title="" /><img src="' . append_sid("guestbook.$phpEx?mode=confirm&id=$confirm_id&c=3") . '" alt="" title="" /><img src="' . append_sid("guestbook.$phpEx?mode=confirm&id=$confirm_id&c=4") . '" alt="" title="" /><img src="' . append_sid("guestbook.$phpEx?mode=confirm&id=$confirm_id&c=5") . '" alt="" title="" /><img src="' . append_sid("guestbook.$phpEx?mode=confirm&id=$confirm_id&c=6") . '" alt="" title="" />';
$s_hidden_fields .= '<input type="hidden" name="confirm_id" value="' . $confirm_id . '" />';
$template->assign_block_vars('switch_confirm', array());
}
//-- fin mod : visual confirmation for cricca guestbook --------------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
$guest_book->guest_counter();
$template->assign_vars(array(
#
#-----[ AFTER, ADD ]------------------------------------------
#
//-- mod : visual confirmation for cricca guestbook ------------------------------------------------
//-- add
'CONFIRM_IMG' => $confirm_image,
'L_CONFIRM_CODE_IMPAIRED' => sprintf($lang['Confirm_code_impaired'], '<a href="mailto:' . $board_config['board_email'] . '">', '</a>'),
'L_CONFIRM_CODE' => $lang['Confirm_code'],
'L_CONFIRM_CODE_EXPLAIN' => $lang['Confirm_code_explain'],
//-- fin mod : visual confirmation for cricca guestbook --------------------------------------------
#
#-----[ OPEN ]------------------------------------------------
#
admin/admin_guestbook.php
#
#-----[ FIND ]------------------------------------------------
#
$permit_mod_no = ( !$guest_config['permit_mod'] ) ? "checked=\"checked\"" : "";
#
#-----[ AFTER, ADD ]------------------------------------------
#
//-- mod : visual confirmation for cricca guestbook ------------------------------------------------
//-- add
$visual_confirm_yes = ( $guest_config['visual_confirm'] ) ? "checked=\"checked\"" : "";
$visual_confirm_no = ( !$guest_config['visual_confirm'] ) ? "checked=\"checked\"" : "";
//-- fin mod : visual confirmation for cricca guestbook --------------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
"L_RESET" => $lang['Reset'],
#
#-----[ AFTER, ADD ]------------------------------------------
#
//-- mod : visual confirmation for cricca guestbook ------------------------------------------------
//-- add
"L_VISUAL_CONFIRM" => $lang['Visual_confirm'],
"VISUAL_CONFIRM_YES" => $visual_confirm_yes,
"VISUAL_CONFIRM_NO" => $visual_confirm_no,
//-- fin mod : visual confirmation for cricca guestbook --------------------------------------------
#
#-----[ OPEN ]------------------------------------------------
#
includes/guestbook_class.php
#
#-----[ FIND ]------------------------------------------------
#
define ('GUESTBOOK_CONFIG_TABLE', $table_prefix.'guest_config');
#
#-----[ AFTER, ADD ]------------------------------------------
#
//-- mod : visual confirmation for cricca guestbook ------------------------------------------------
//-- add
define ('GUESTBOOK_CONFIRM_TABLE', $table_prefix.'guest_confirm');
//-- fin mod : visual confirmation for cricca guestbook --------------------------------------------
#
#-----[ OPEN ]------------------------------------------------
#
language/lang_english/lang_guestbook.php
#
#-----[ FIND ]------------------------------------------------
#
//
// That's all Folks!
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
//-- mod : visual confirmation for cricca guestbook ------------------------------------------------
//-- add
$lang['Too_many_comments'] = 'You have exceeded the number of posting-/viewing-attempts for this session. Please try again later.';
//-- fin mod : visual confirmation for cricca guestbook --------------------------------------------
#
#-----[ OPEN ]------------------------------------------------
#
language/lang_german/lang_guestbook.php
#
#-----[ FIND ]------------------------------------------------
#
//
// That's all Folks!
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
//-- mod : visual confirmation for cricca guestbook ------------------------------------------------
//-- add
$lang['Too_many_comments'] = 'Du hast für diese Session zu oft den falschen Bestätigungscode eingegeben bzw. dir das Gästebuch angeschaut. Bitte versuche es später nochmal.';
//-- fin mod : visual confirmation for cricca guestbook --------------------------------------------
#
#-----[ OPEN ]------------------------------------------------
#
admin/style/guestbook_config_body.tpl
#
#-----[ FIND ]------------------------------------------------
#
<tr>
<td class="row1">{N_VIEW_SMILE}<br /></td>
<td class="row2"><input class="post" type="text" size="5" maxlength="4" name="smilies_row" value="{SMILIES_ROW}" /> X <input class="post" type="text" size="5" maxlength="4" name="smilies_column" value="{SMILIES_COLUMN}" /></td>
</tr>
#
#-----[ AFTER, ADD ]------------------------------------------
#
<!-- Visual Confirmation -->
<tr>
<td class="row1">{L_VISUAL_CONFIRM}<br /></td>
<td class="row2"><input type="radio" name="visual_confirm" value="1" {VISUAL_CONFIRM_YES} /> {L_YES} <input type="radio" name="visual_confirm" value="0" {VISUAL_CONFIRM_NO} /> {L_NO}</td>
</tr>
#
#-----[ OPEN ]------------------------------------------------
#
templates/cback/guestbook.tpl
#
#-----[ FIND ]------------------------------------------------
#
{L_SITE}: <br />
<input type="text" value="{FIELD_SITO}" size="30" maxlength="100" class="post" name="sito" accesskey="s" tabindex="2" title="{L_SITE}" />
</span></td>
</tr>
#
#-----[ REPLACE WITH ]----------------------------------------
#
{L_SITE}: <br />
<input type="text" value="{FIELD_SITO}" size="30" maxlength="100" class="post" name="sito" accesskey="s" tabindex="2" title="{L_SITE}" />
<!-- Visual Confirmation -->
<!-- BEGIN switch_confirm -->
<br />
{L_CONFIRM_CODE}:*<br />
<input type="text" class="post" name="confirm_code" size="30" maxlength="6" value="" />
<!-- END switch_confirm -->
</span></td>
</tr>
<!-- Visual Confirmation -->
<!-- BEGIN switch_confirm -->
<tr>
<td class="row1" width="100%">
<table border="0" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td><span class="gensmall">*{L_CONFIRM_CODE_EXPLAIN}</span></td>
</tr>
<tr>
<td>{CONFIRM_IMG}</td>
</tr>
<tr>
<td><span class="gensmall">{L_CONFIRM_CODE_IMPAIRED}</span></td>
</tr>
</table>
</td>
</tr>
<!-- END switch_confirm -->
#
#-----[ SAVE/CLOSE ALL FILES ]--------------------------------
#
# EoM
EDIT: Habe gerade festgestellt das es nur für Gäste gilt.
Ist nur die Frage mit dem
Spaming attempt
EDIT2: Habe gerade die version 2.2.3 installiert und es klappt alles wunderbar. Trotzdem Danke