Smf Saldırı Botlarını Nasıl Engelleyebilir.
8
●606
- 22-05-2010, 12:59:16Sitene İçerik atmıyorlarsa sorun yok zararları olmaz..
Üyeler ziyaretçiler ve arama motorlarını ayrı ayrı göstermek için:
defaultta veya kendi temanızdaki who.template dosyanızda şu kodu bulun:
// The only template in the file. function template_main() { global $context, $settings, $options, $scripturl, $txt; // Display the table header and linktree. echo ' <div style="padding: 3px;">', theme_linktree(), '</div> <table cellpadding="3" cellspacing="0" border="0" width="100%" class="tborder"> <tr class="titlebg"> <td width="30%"><a href="' . $scripturl . '?action=who;start=', $context['start'], ';sort=user', $context['sort_direction'] != 'down' && $context['sort_by'] == 'user' ? '' : ';asc', '">', $txt['who_user'], ' ', $context['sort_by'] == 'user' ? '<img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a></td> <td style="width: 14ex;"><a href="' . $scripturl . '?action=who;start=', $context['start'], ';sort=time', $context['sort_direction'] == 'down' && $context['sort_by'] == 'time' ? ';asc' : '', '">', $txt['who_time'], ' ', $context['sort_by'] == 'time' ? '<img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a></td> <td>', $txt['who_action'], '</td> </tr>';şu kodla değiştirin:
// The only template in the file. function template_main() { global $context, $settings, $options, $scripturl, $txt; // Display the table header and linktree. $brokendown = array ( ',$txt['who is online member'],' => array(), ',$txt['who is online guest'],' => array(), ',$txt['who is online search'],' => array(), ); foreach($context['members'] AS $key => $member) { $spider = getAgent($member['query']['USER_AGENT'], $context['members'][$key]['name'], $agent, $member['id'] == 0); $context['members'][$key]['agent'] = $agent; $member['query']['USER_AGENT'] = isset($member['query']['USER_AGENT']) ? $member['query']['USER_AGENT'] : ''; if ( $member['id'] != 0 ) $brokendown[',$txt['who is online member'], '][] = &$context['members'][$key]; else if ( $spider ) $brokendown[',$txt['who is online guest'], '][] = &$context['members'][$key]; else $brokendown[',$txt['who is online search'], '][] = &$context['members'][$key]; } // echo '<pre>'; print_r($brokendown['Spiders']); echo '</pre>'; return; foreach($brokendown AS $group => $members) { echo ' <table cellpadding="3" cellspacing="0" border="0" width="100%" class="tborder"> <tr> <td class="catbg">', $group, '</td> </tr> </table> <table cellpadding="3" cellspacing="0" border="0" width="100%" class="tborder"> <tr class="titlebg"> <td width="30%"><a href="' . $scripturl . '?action=who;sort=user', $context['sort_direction'] == 'down' && $context['sort_by'] == 'user' ? ';asc' : '', '">', $txt['who_user'], ' ', $context['sort_by'] == 'user' ? '<img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" border="0" />' : '', '</a></td> <td style="width: 14ex;"><a href="' . $scripturl . '?action=who;sort=time', $context['sort_direction'] == 'down' && $context['sort_by'] == 'time' ? ';asc' : '', '">', $txt['who_time'], ' ', $context['sort_by'] == 'time' ? '<img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" border="0" />' : '', '</a></td> <td>', $txt['who_action'], '</td> </tr>';daha sonra yine aynı dosyada tekrar şu kodu bulun:
// Guests don't have information like icq, msn, y!, and aim... and they can't be messaged. if (!$member['is_guest']) { echo ' <div style="float: right; width: 14ex;"> ', $context['can_send_pm'] ? '<a href="' . $member['online']['href'] . '" title="' . $member['online']['label'] . '">' : '', $settings['use_image_buttons'] ? '<img src="' . $member['online']['image_href'] . '" alt="' . $member['online']['text'] . '" align="middle" />' : $member['online']['text'], $context['can_send_pm'] ? '</a>' : '', ' ', $member['icq']['link'], ' ', $member['msn']['link'], ' ', $member['yim']['link'], ' ', $member['aim']['link'], ' </div>'; } echo ' <span', $member['is_hidden'] ? ' style="font-style: italic;"' : '', '>', $member['is_guest'] ? $member['name'] : '<a href="' . $member['href'] . '" title="' . $txt[92] . ' ' . $member['name'] . '"' . (empty($member['color']) ? '' : ' style="color: ' . $member['color'] . '"') . '>' . $member['name'] . '</a>', '</span>'; if (!empty($member['ip'])) echo ' (<a href="' . $scripturl . '?action=trackip;searchip=' . $member['ip'] . '" target="_blank">' . $member['ip'] . '</a>)'; echo ' </td> <td nowrap="nowrap">', $member['time'], '</td> <td>', $member['action'], '</td> </tr>'; // Switch alternate to whatever it wasn't this time. (true -> false -> true -> false, etc.) $alternate = !$alternate; } echo ' <tr class="titlebg"> <td colspan="3"><b>', $txt[139], ':</b> ', $context['page_index'], '</td> </tr> </table>'; } ?>Son olarak alttaki ile değiştirin:
// Guests don't have information like icq, msn, y!, and aim... and they can't be messaged. if (!$member['is_guest']) { echo ' <div style="float: right; width: 14ex;"> ', $context['can_send_pm'] ? '<a href="' . $member['online']['href'] . '" title="' . $member['online']['label'] . '">' : '', $settings['use_image_buttons'] ? '<img src="' . $member['online']['image_href'] . '" alt="' . $member['online']['text'] . '" border="0" align="middle" />' : $member['online']['text'], $context['can_send_pm'] ? '</a>' : '', ' ', $member['icq']['link'], ' ', $member['msn']['link'], ' ', $member['yim']['link'], ' ', $member['aim']['link'], ' </div>'; } echo ' <span', $member['is_hidden'] ? ' style="font-style: italic;"' : '', '>', $member['is_guest'] ? $member['name'] : '<a href="' . $member['href'] . '" title="' . $txt[92] . ' ' . $member['name'] . '"' . (empty($member['color']) ? '' : ' style="color: ' . $member['color'] . '"') . '>' . $member['name'] . '</a>', '</span>'; if ( !empty($member['ip']) ) echo ' <br /> <span class="smalltext">(<b><a href="' . $scripturl . '?action=trackip;searchip=' . $member['ip'] . '" target="_blank" title="' . $member['ip'] . '" class="smalltext2">' . $member['ip'] . '</a></b>, <acronym title="' . $member['query']['USER_AGENT'] . '">' . $member['agent'] . '</acronym>)</span>'; echo ' </td> <td nowrap="nowrap">', $member['time'], '</td> <td>';if($member['id'] == "1")echo'<font color=red><b>',$txt['who is online admin'],'</b></font>';else echo'', $member['action'], '';echo'</td> </tr>'; // Switch alternate to whatever it wasn't this time. (true -> false -> true -> false, etc.) $alternate = !$alternate; } echo '</table><br/>'; } echo ' <table cellpadding="3" cellspacing="0" border="0" width="100%" class="tborder"><tr><td class="titlebg"> <b>', $txt[139], ':</b> ', $context['page_index'], ' </td></tr></table>'; } function getAgent( &$user_agent, &$user_name, &$result, $guest ) { $known_agents = array ( //Search Spiders array ( 'agent' => 'WISENutbot', 'spidername' => 'Looksmart spider', 'spider' => true, ), array ( 'agent' => 'MSNBot', 'spidername' => 'MSN spider', 'spider' => true, ), array ( 'agent' => 'W3C_Validator', 'spidername' => 'W3C Validaator', 'spider' => true, ), array ( 'agent' => 'Googlebot-Image', 'spidername' => 'Google-Image Spider', 'spider' => true, ), array ( 'agent' => 'Googlebot', 'spidername' => 'Google spider', 'spider' => true, ), array ( 'agent' => 'Mediapartners-Google', 'spidername' => 'Google AdSense spider', 'spider' => true, ), array ( 'agent' => 'Openbot', 'spidername' => 'Openfind spider', 'spider' => true, ), array ( 'agent' => 'Yahoo! Slurp', 'spidername' => 'Yahoo spider', 'spider' => true, ), array ( 'agent' => 'FAST-WebCrawler', 'spider' => true, ), array ( 'agent' => 'Wget', 'spider' => true, ), array ( 'agent' => 'Ask Jeeves', 'spider' => true, ), array ( 'agent' => 'Speedy Spider', 'spider' => true, ), array ( 'agent' => 'SurveyBot', 'spider' => true, ), array ( 'agent' => 'IBM_Planetwide', 'spider' => true, ), array ( 'agent' => 'GigaBot', 'spider' => true, ), array ( 'agent' => 'ia_archiver', 'spider' => true, ), array ( 'agent' => 'FAST-WebCrawler', 'spider' => true, ), array ( 'agent' => 'Inktomi Slurp', 'spider' => true, ), array ( 'agent' => 'appie', 'spidername' => 'Walhello spider', 'spider' => true, ), //mobiles array ( 'agent' => 'Nokia', ), array ( 'agent' => 'Samsung', ), array ( 'agent' => 'Ericsson', ), array ( 'agent' => 'Siemens', ), array ( 'agent' => 'Motorola', ), //Browsers array ( 'agent' => 'Opera', ), array ( 'agent' => 'Firefox', ), array ( 'agent' => 'Firebird', ), array ( 'agent' => 'Safari', ), array ( 'agent' => 'Netscape', ), array ( 'agent' => 'MyIE2', ), array ( 'agent' => 'Konqueror', ), array ( 'agent' => 'Galeon', ), array ( 'agent' => 'KMeleon', ), array ( 'agent' => 'NG/2.0', ), array ( 'agent' => 'Gecko', 'name' => 'Mozilla', ), array ( 'agent' => 'MSIE', ), ); foreach( $known_agents AS $poss ) if (strpos(strtolower($user_agent), strtolower($poss['agent'])) !== false) { if ( $guest && isset($poss['spider']) && $poss['spider'] ) $user_name = isset($poss['spidername']) ? $poss['spidername'] : (isset($poss['name']) ? $poss['name'] : $poss['agent']); $result = isset($poss['name']) ? $poss['name'] : $poss['agent']; return isset($poss['spider']) && $poss['spider']; } $result = $user_agent; return false; } ?>ve en son olarakta bunu bulun ve;
// For every member display their name, time and action (and more for admin). foreach ($context['members'] as $member) {alttakiyle değiştirin:
// For every member display their name, time and action (and more for admin). foreach ($members as $member) {dil dosyalarındaki değişiklik için defaultta languagesdaki modification.turkish.php de ?> kodundan evvel şu kodu yerleştirin;
// Kimler Online $txt['who is online member'] = 'Üyelerimiz'; $txt['who is online guest'] = 'Misafirlerimiz'; $txt['who is online search'] = 'Arama Motorları'; $txt['who is online admin'] = 'Görmeye Yetkiniz Yok';
- 22-05-2010, 14:32:36aga dediklerini yaptıktan sonra Tema Ayrıştırma Hatası! alıyorumBy_vezir adlı üyeden alıntı: mesajı görüntüle