- Shout_Box\sql\phpMyAdmin_install\ içinde Shout_Box.sql isimli dosya var bu dosya ile sitenizde sql sorgusunu yapın 12 tane tablo yüklenmiş olacak.
- public_html içindeki dosyaları anadizinine ilgili yerlere yollayın
- Shout_Box\public_html\shoutbox.js dosyasını ana dizine yollayın
- Shout_Box\sql\SB_SQL_installer.php dosyasını ana dizine yollayın
- sitenizde admin panelinden modüllerdeki ve bloklardaki Shout_Box'ları seçerek hem modülü hem de bloğu aktif edin
- www.siteadi.com/SB_SQL_installer.php dosyasını çalıştırarak install ediyoruz. Çıkan sayfada "configure SQL for v.8.5" seçeneğini tıklıyoruz ve kurulumu bitiriyoruz. (install ettikten sonra bu dosyayı ana dizinden silmeyi unutmuyoruz)
kurulumu doğru tamamlamışsanız admin menüsende 2 adet shoutBox menü olması gerekir. Bu menüler sayesinde gerekli ayarlamaları yapabilirsiniz.
her mesaj yazdığında sayfayı indexleme problemi vardı
bankocu abimin dediğini yapabildinmi.? Ben iş yerindeyim de burdan yapamıyorum ama çok merak ettim.
alttaki kodları block-shoutboxsohbet.php olarak kaydedip blokların altına atıp etkinleştiriyoruz.
Kod:
<?php
#### Generated by Block Creator by Disipal Site (www.disipal.net) ###
if (eregi("block-shoutboxsohbet.php",$PHP_SELF)) {
Header("Location: index.php");
die();
}
$content .="<i f r a m e SRC=http://www.siteadi.com/shoutbox.php frameborder=0 width=100% height=230 marginwidth=0 marginheight=0 scrolling=no></i f r a m e>";
?>
daha sonra ana dizinde shoutbox.php altına bir dosya daha ekleyip içine şu kodları ekliyoruz.
global $prefix, $ShoutSubmit, $ShoutComment, $db, $user, $c o o k i e, $shoutuid, $top_content, $mid_content, $bottom_content, $ShoutMarqueewidth, $ShoutMarqueeheight, $currentlang;
function ShoutBox($ShoutSubmit, $prefix, $ShoutComment, $db, $user, $c o o k i e, $shoutuid) {
global $admin, $admin_file, $currentlang, $top_content, $mid_content, $bottom_content, $ShoutMarqueewidth, $ShoutMarqueeheight;
$self = ereg_replace("/", "",$_SERVER['PHP_SELF']);
if ($admin_file == '') { $admin_file = 'admin'; }
if ((is_admin($admin)) AND ("".$admin_file.".php" == $self)) {
$sqlV = "select * from ".$prefix."_config";
$resultV = $db->sql_query($sqlV);
$confV = $db->sql_fetchrow($resultV);
if ($confV['Version_Num'] >= '7.6') {
$preURL = 'index.php?url=';
} else {
$preURL = '';
}
}
if ($currentlang) {
include_once("modules/Shout_Box/lang-block/lang-$currentlang.php");
} else {
include_once("modules/Shout_Box/lang-block/lang-english.php");
}
$PreviousShoutComment = $ShoutComment;
include("config.php");
c o o k i edecode($user);
$username = $c o o k i e[1];
//do IP test then ban if on list
if($conf['ipblock'] == "yes") {
$sql = "select * from ".$prefix."_shoutbox_ipblock";
$ipresult = $db->sql_query($sql);
while ($badips = $db->sql_fetchrow($ipresult)) {
if (eregi("\*", $badips['name'])) { // Allow for Subnet bans like 123.456.*
$badipsArray = explode(".",$badips['name']);
$uipArray = explode(".",$uip);
$i = 0;
foreach($badipsArray as $badipsPart) {
if ($badipsPart == "*") { $BannedShouter = "yes"; break; }
if ($badipsPart != $uipArray[$i] AND $badipsPart != "*") { break; }
$i++;
}
} else {
if($uip == $badips['name']) { $BannedShouter = "yes"; break; }
}
}
}
//do name test then ban if on list (only applies to registered users)
if ($conf['nameblock'] == "yes" AND $BannedShouter != "yes") {
$sql = "select * from ".$prefix."_shoutbox_nameblock";
$nameresult = $db->sql_query($sql);
while ($badname = $db->sql_fetchrow($nameresult)){
if ($username == $badname['name']) { $BannedShouter = "yes"; break; }
}
}
if ($BannedShouter != "yes") {
if ($ShoutSubmit == "ShoutPost") {
// start processing shout
if ($shoutuid) { $username = "$shoutuid"; }
//shoutuid tests
$username = trim($username); // remove whitespace off ends of nickname
if($conf['anonymouspost'] == "yes") {
$unum = strlen($username);
if ($unum < 2) { $ShoutError = ""._NICKTOOSHORT.""; }
if (!$username OR $username == ""._NAME."") { $ShoutError = ""._NONICK.""; }
if (eregi(".xxx", $username) AND $conf['blockxxx'] == "yes") { $username = "Anonymous"; }
if (eregi("j a v a s c r i p t:(.*)", $username)) { $username = "Anonymous"; }
$username = htmlspecialchars($username, ENT_QUOTES);
$username = ereg_replace("&amp;", "&",$username);
}
if (!is_user($user) && ($username) && $username != "Anonymous") {
$username = ereg_replace(" ", "_",$username);
}
$ShoutComment = trim($ShoutComment); // remove whitespace off ends of shout
$ShoutComment = preg_replace('/\s+/', ' ', $ShoutComment); // convert double spaces in middle of shout to single space
$num = strlen($ShoutComment);
if ($num < 1) { $ShoutError = ""._SHOUTTOOSHORT.""; }
if ($num > 2500) { $ShoutError = ""._SHOUTTOOLONG.""; }
if (!$ShoutComment) { $ShoutError = ""._NOSHOUT.""; }
if ($ShoutComment == ""._SB_MESSAGE."") { $ShoutError = ""._NOSHOUT.""; }
$ShoutComment = ereg_replace(" [.] ", ".",$ShoutComment);
if (eregi(".xxx", $ShoutComment) AND $conf['blockxxx'] == "yes") {
$ShoutError = ""._XXXBLOCKED."";
$PreviousShoutComment = "";
}
if (eregi("j a v a s c r i p t:(.*)", $ShoutComment)) {
$ShoutError = ""._JSINSHOUT."";
$PreviousShoutComment = "";
}
//Smilies from database
$ShoutArrayReplace = explode(" ",$ShoutComment);
$ShoutArrayScan = $ShoutArrayReplace;
$sql = "select * from ".$prefix."_shoutbox_emoticons";
$eresult = $db->sql_query($sql);
while ($emoticons = $db->sql_fetchrow($eresult)) {
$i = 0;
foreach($ShoutArrayScan as $ShoutPart) {
if ($ShoutPart == $emoticons['text']) { $ShoutArrayReplace[$i] = $emoticons['image']; }
$i++;
}
}
$ShoutComment = implode(" ",$ShoutArrayReplace);
//do name test then error if on list
if($conf['nameblock'] == "yes"){
$sql = "select * from ".$prefix."_shoutbox_nameblock";
$nameresult = $db->sql_query($sql);
while ($badname = $db->sql_fetchrow($nameresult)){
if($username == $badname['name']) {
$ShoutError = ""._BANNEDNICK."";
}
}
}
// check for anonymous users cloning/ghosting registered users' nicknames
c o o k i edecode($user);
if (!is_user($user) && ($username) && $username != "Anonymous") {
$sql = "select * from ".$prefix."_users where username='$username'";
$nameresult = $db->sql_query($sql);
$row = $db->sql_fetchrow($nameresult);
if ($row) {
$ShoutError = ""._NOCLONINGNICKS."";
}
}
//look for bad words, then censor them.
if($conf['censor'] == "yes") {
// start Anonymous nickname censor check here. If bad, replace bad nick with 'Anonymous'
if (!is_user($user) && ($username) && $username != "Anonymous") {
$sql = "select * from ".$prefix."_shoutbox_censor";
$cresult = $db->sql_query($sql);
while ($censor = $db->sql_fetchrow($cresult)) {
if ($username != 'Anonymous') {
$one = strtolower($censor['text']);
$usernameL = strtolower($username);
if (stristr($usernameL, $one) !== false) {
$username = "Anonymous";
}
}
}
}
// Censor of posting text
$ShoutArrayReplace = explode(" ",$ShoutComment);
$ShoutArrayScan = $ShoutArrayReplace;
$sql = "select * from ".$prefix."_shoutbox_censor";
$cresult = $db->sql_query($sql);
while ($censor = $db->sql_fetchrow($cresult)) {
$i = 0;
foreach($ShoutArrayScan as $ShoutPart) {
$ShoutPart = strtolower($ShoutPart);
$censor['text'] = strtolower($censor['text']);
if ($ShoutPart == $censor['text']) { $ShoutArrayReplace[$i] = $censor['replacement']; }
$i++;
}
}
$ShoutComment = implode(" ",$ShoutArrayReplace);
/*
// Phrase censor - Needs work before implementing
$sql = "select * from ".$prefix."_shoutbox_emoticons";
$eresult = $db->sql_query($sql);
while ($emoticons = $db->sql_fetchrow($eresult)) {
$ShoutComment = str_replace($emoticons['text'],$emoticons['image'],$ShoutComment);
}
*/
}
// duplicate posting checker. stops repeated spam attacks
$sql = "select * from ".$prefix."_shoutbox_shouts order by id DESC LIMIT 5";
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result)) {
if ($row['comment'] == $ShoutComment) {
$ShoutError = ""._DUPLICATESHOUT."";
}
}
// table that holds the scrolling area
if ($showBackground == 'yes') {
$top_content .= "<table style=\"cursor: text;\" width=\"100%\" border=\"$SBborder\" cellspacing=\"0\" cellpadding=\"0\"><tr><td style=\"background: url(modules/Shout_Box/images/background/$themeRow[blockBackgroundImage]);\" height=\"$conf[height]\">\n";
} else {
$top_content .= "<table style=\"cursor: text;\" width=\"100%\" border=\"$SBborder\" cellspacing=\"0\" cellpadding=\"0\"><tr><td height=\"$conf[height]\">\n";
}
// end top content
// table of the actual scrolling content
if ($showBackground == 'yes') {
$mid_content = "<table style=\"table-layout: fixed; width: 100%;\" border=\"0\" align=\"left\" cellspacing=\"0\" cellpadding=\"5\">";
} else {
$mid_content = "<table style=\"table-layout: fixed; width: 100%;\" border=\"0\" align=\"left\" cellspacing=\"0\" cellpadding=\"2\">";
}
$flag = 1;
$ThemeSel = get_theme();
$sql = "select * from ".$prefix."_shoutbox_themes WHERE themeName='$ThemeSel'";
$resultT = $db->sql_query($sql);
$rowColor = $db->sql_fetchrow($resultT);
if (is_user($user)) {
$username = $c o o k i e[1];
if ($username != '') {
$sqlF = "SELECT user_timezone, user_dateformat from ".$prefix."_users WHERE username='$username'";
$resultF = $db->sql_query($sqlF);
$userSetup = $db->sql_fetchrow($resultF);
}
}
$sql = "select * from ".$prefix."_shoutbox_date";
$resultD = $db->sql_query($sql);
$rowD = $db->sql_fetchrow($resultD);
// Sticky shouts
$sql = "select * from ".$prefix."_shoutbox_sticky where stickySlot=0";
$stickyResult = $db->sql_query($sql);
$stickyRow0 = $db->sql_fetchrow($stickyResult);
$sql = "select * from ".$prefix."_shoutbox_sticky where stickySlot=1";
$stickyResult = $db->sql_query($sql);
$stickyRow1 = $db->sql_fetchrow($stickyResult);
switch($ShoutSubmit) {
default:
ShoutBox($ShoutSubmit, $prefix, $ShoutComment, $db, $user, $c o o k i e, $shoutuid);
break;
}
?>
<script type="text/j a v a s c r i p t">
var SBheight = '<?php echo "$ShoutMarqueeheight"; ?>';
var SBcontent = new String('<?php echo "$mid_content"; ?>');
</script>
<script type="text/j a v a s c r i p t" src="shoutbox.js"></script>
<?php
echo " <fieldset style=\"border-color: #70c6ff; border-style: solid; border-width : 1px;\">
<legend><font color=\"boxcontent\">Mini Sohbet</font></legend>";
echo "<table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"0\">";
echo "<tr>";
echo "<td width=\"100%\">$top_content\n";
echo "<div align=\"center\"><script type=\"text/j a v a s c r i p t\">document.write(SBtxt);</script></div>\n";
echo "$bottom_content</td>\n";
echo "</tr>";
echo "</table></fieldset>";
alttaki kodları block-shoutboxsohbet.php olarak kaydedip blokların altına atıp etkinleştiriyoruz.
Kod:
<?php
#### Generated by Block Creator by Disipal Site (www.disipal.net) ###
if (eregi("block-shoutboxsohbet.php",$PHP_SELF)) {
Header("Location: index.php");
die();
}
$content .="<i f r a m e SRC=http://www.siteadi.com/shoutbox.php frameborder=0 width=100% height=230 marginwidth=0 marginheight=0 scrolling=no></i f r a m e>";
?>
daha sonra ana dizinde shoutbox.php altına bir dosya daha ekleyip içine şu kodları ekliyoruz.
global $prefix, $ShoutSubmit, $ShoutComment, $db, $user, $c o o k i e, $shoutuid, $top_content, $mid_content, $bottom_content, $ShoutMarqueewidth, $ShoutMarqueeheight, $currentlang;
function ShoutBox($ShoutSubmit, $prefix, $ShoutComment, $db, $user, $c o o k i e, $shoutuid) {
global $admin, $admin_file, $currentlang, $top_content, $mid_content, $bottom_content, $ShoutMarqueewidth, $ShoutMarqueeheight;
$self = ereg_replace("/", "",$_SERVER['PHP_SELF']);
if ($admin_file == '') { $admin_file = 'admin'; }
if ((is_admin($admin)) AND ("".$admin_file.".php" == $self)) {
$sqlV = "select * from ".$prefix."_config";
$resultV = $db->sql_query($sqlV);
$confV = $db->sql_fetchrow($resultV);
if ($confV['Version_Num'] >= '7.6') {
$preURL = 'index.php?url=';
} else {
$preURL = '';
}
}
if ($currentlang) {
include_once("modules/Shout_Box/lang-block/lang-$currentlang.php");
} else {
include_once("modules/Shout_Box/lang-block/lang-english.php");
}
$PreviousShoutComment = $ShoutComment;
include("config.php");
c o o k i edecode($user);
$username = $c o o k i e[1];
//do IP test then ban if on list
if($conf['ipblock'] == "yes") {
$sql = "select * from ".$prefix."_shoutbox_ipblock";
$ipresult = $db->sql_query($sql);
while ($badips = $db->sql_fetchrow($ipresult)) {
if (eregi("\*", $badips['name'])) { // Allow for Subnet bans like 123.456.*
$badipsArray = explode(".",$badips['name']);
$uipArray = explode(".",$uip);
$i = 0;
foreach($badipsArray as $badipsPart) {
if ($badipsPart == "*") { $BannedShouter = "yes"; break; }
if ($badipsPart != $uipArray[$i] AND $badipsPart != "*") { break; }
$i++;
}
} else {
if($uip == $badips['name']) { $BannedShouter = "yes"; break; }
}
}
}
//do name test then ban if on list (only applies to registered users)
if ($conf['nameblock'] == "yes" AND $BannedShouter != "yes") {
$sql = "select * from ".$prefix."_shoutbox_nameblock";
$nameresult = $db->sql_query($sql);
while ($badname = $db->sql_fetchrow($nameresult)){
if ($username == $badname['name']) { $BannedShouter = "yes"; break; }
}
}
if ($BannedShouter != "yes") {
if ($ShoutSubmit == "ShoutPost") {
// start processing shout
if ($shoutuid) { $username = "$shoutuid"; }
//shoutuid tests
$username = trim($username); // remove whitespace off ends of nickname
if($conf['anonymouspost'] == "yes") {
$unum = strlen($username);
if ($unum < 2) { $ShoutError = ""._NICKTOOSHORT.""; }
if (!$username OR $username == ""._NAME."") { $ShoutError = ""._NONICK.""; }
if (eregi(".xxx", $username) AND $conf['blockxxx'] == "yes") { $username = "Anonymous"; }
if (eregi("j a v a s c r i p t:(.*)", $username)) { $username = "Anonymous"; }
$username = htmlspecialchars($username, ENT_QUOTES);
$username = ereg_replace("&amp;", "&",$username);
}
if (!is_user($user) && ($username) && $username != "Anonymous") {
$username = ereg_replace(" ", "_",$username);
}
$ShoutComment = trim($ShoutComment); // remove whitespace off ends of shout
$ShoutComment = preg_replace('/\s+/', ' ', $ShoutComment); // convert double spaces in middle of shout to single space
$num = strlen($ShoutComment);
if ($num < 1) { $ShoutError = ""._SHOUTTOOSHORT.""; }
if ($num > 2500) { $ShoutError = ""._SHOUTTOOLONG.""; }
if (!$ShoutComment) { $ShoutError = ""._NOSHOUT.""; }
if ($ShoutComment == ""._SB_MESSAGE."") { $ShoutError = ""._NOSHOUT.""; }
$ShoutComment = ereg_replace(" [.] ", ".",$ShoutComment);
if (eregi(".xxx", $ShoutComment) AND $conf['blockxxx'] == "yes") {
$ShoutError = ""._XXXBLOCKED."";
$PreviousShoutComment = "";
}
if (eregi("j a v a s c r i p t:(.*)", $ShoutComment)) {
$ShoutError = ""._JSINSHOUT."";
$PreviousShoutComment = "";
}
//Smilies from database
$ShoutArrayReplace = explode(" ",$ShoutComment);
$ShoutArrayScan = $ShoutArrayReplace;
$sql = "select * from ".$prefix."_shoutbox_emoticons";
$eresult = $db->sql_query($sql);
while ($emoticons = $db->sql_fetchrow($eresult)) {
$i = 0;
foreach($ShoutArrayScan as $ShoutPart) {
if ($ShoutPart == $emoticons['text']) { $ShoutArrayReplace[$i] = $emoticons['image']; }
$i++;
}
}
$ShoutComment = implode(" ",$ShoutArrayReplace);
//do name test then error if on list
if($conf['nameblock'] == "yes"){
$sql = "select * from ".$prefix."_shoutbox_nameblock";
$nameresult = $db->sql_query($sql);
while ($badname = $db->sql_fetchrow($nameresult)){
if($username == $badname['name']) {
$ShoutError = ""._BANNEDNICK."";
}
}
}
// check for anonymous users cloning/ghosting registered users' nicknames
c o o k i edecode($user);
if (!is_user($user) && ($username) && $username != "Anonymous") {
$sql = "select * from ".$prefix."_users where username='$username'";
$nameresult = $db->sql_query($sql);
$row = $db->sql_fetchrow($nameresult);
if ($row) {
$ShoutError = ""._NOCLONINGNICKS."";
}
}
//look for bad words, then censor them.
if($conf['censor'] == "yes") {
// start Anonymous nickname censor check here. If bad, replace bad nick with 'Anonymous'
if (!is_user($user) && ($username) && $username != "Anonymous") {
$sql = "select * from ".$prefix."_shoutbox_censor";
$cresult = $db->sql_query($sql);
while ($censor = $db->sql_fetchrow($cresult)) {
if ($username != 'Anonymous') {
$one = strtolower($censor['text']);
$usernameL = strtolower($username);
if (stristr($usernameL, $one) !== false) {
$username = "Anonymous";
}
}
}
}
// Censor of posting text
$ShoutArrayReplace = explode(" ",$ShoutComment);
$ShoutArrayScan = $ShoutArrayReplace;
$sql = "select * from ".$prefix."_shoutbox_censor";
$cresult = $db->sql_query($sql);
while ($censor = $db->sql_fetchrow($cresult)) {
$i = 0;
foreach($ShoutArrayScan as $ShoutPart) {
$ShoutPart = strtolower($ShoutPart);
$censor['text'] = strtolower($censor['text']);
if ($ShoutPart == $censor['text']) { $ShoutArrayReplace[$i] = $censor['replacement']; }
$i++;
}
}
$ShoutComment = implode(" ",$ShoutArrayReplace);
/*
// Phrase censor - Needs work before implementing
$sql = "select * from ".$prefix."_shoutbox_emoticons";
$eresult = $db->sql_query($sql);
while ($emoticons = $db->sql_fetchrow($eresult)) {
$ShoutComment = str_replace($emoticons['text'],$emoticons['image'],$ShoutComment);
}
*/
}
// duplicate posting checker. stops repeated spam attacks
$sql = "select * from ".$prefix."_shoutbox_shouts order by id DESC LIMIT 5";
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result)) {
if ($row['comment'] == $ShoutComment) {
$ShoutError = ""._DUPLICATESHOUT."";
}
}
// table that holds the scrolling area
if ($showBackground == 'yes') {
$top_content .= "<table style=\"cursor: text;\" width=\"100%\" border=\"$SBborder\" cellspacing=\"0\" cellpadding=\"0\"><tr><td style=\"background: url(modules/Shout_Box/images/background/$themeRow[blockBackgroundImage]);\" height=\"$conf[height]\">\n";
} else {
$top_content .= "<table style=\"cursor: text;\" width=\"100%\" border=\"$SBborder\" cellspacing=\"0\" cellpadding=\"0\"><tr><td height=\"$conf[height]\">\n";
}
// end top content
// table of the actual scrolling content
if ($showBackground == 'yes') {
$mid_content = "<table style=\"table-layout: fixed; width: 100%;\" border=\"0\" align=\"left\" cellspacing=\"0\" cellpadding=\"5\">";
} else {
$mid_content = "<table style=\"table-layout: fixed; width: 100%;\" border=\"0\" align=\"left\" cellspacing=\"0\" cellpadding=\"2\">";
}
$flag = 1;
$ThemeSel = get_theme();
$sql = "select * from ".$prefix."_shoutbox_themes WHERE themeName='$ThemeSel'";
$resultT = $db->sql_query($sql);
$rowColor = $db->sql_fetchrow($resultT);
if (is_user($user)) {
$username = $c o o k i e[1];
if ($username != '') {
$sqlF = "SELECT user_timezone, user_dateformat from ".$prefix."_users WHERE username='$username'";
$resultF = $db->sql_query($sqlF);
$userSetup = $db->sql_fetchrow($resultF);
}
}
$sql = "select * from ".$prefix."_shoutbox_date";
$resultD = $db->sql_query($sql);
$rowD = $db->sql_fetchrow($resultD);
// Sticky shouts
$sql = "select * from ".$prefix."_shoutbox_sticky where stickySlot=0";
$stickyResult = $db->sql_query($sql);
$stickyRow0 = $db->sql_fetchrow($stickyResult);
$sql = "select * from ".$prefix."_shoutbox_sticky where stickySlot=1";
$stickyResult = $db->sql_query($sql);
$stickyRow1 = $db->sql_fetchrow($stickyResult);
switch($ShoutSubmit) {
default:
ShoutBox($ShoutSubmit, $prefix, $ShoutComment, $db, $user, $c o o k i e, $shoutuid);
break;
}
?>
<script type="text/j a v a s c r i p t">
var SBheight = '<?php echo "$ShoutMarqueeheight"; ?>';
var SBcontent = new String('<?php echo "$mid_content"; ?>');
</script>
<script type="text/j a v a s c r i p t" src="shoutbox.js"></script>
<?php
echo " <fieldset style=\"border-color: #70c6ff; border-style: solid; border-width : 1px;\">
<legend><font color=\"boxcontent\">Mini Sohbet</font></legend>";
echo "<table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"0\">";
echo "<tr>";
echo "<td width=\"100%\">$top_content\n";
echo "<div align=\"center\"><script type=\"text/j a v a s c r i p t\">document.write(SBtxt);</script></div>\n";
echo "$bottom_content</td>\n";
echo "</tr>";
echo "</table></fieldset>";
?>
kodların içindeki tema yolunu değişmeyi unutmayın
ABİ BUNU HAZIR YAPIP UPLOAD YAPSAN BİZ SADECE TEM YOLUNU DEİŞTİRSEK ÇÜNKÜ BEN TAM ANLAYAMADIM DEMEK İSTEDİGİNİ
kardeş o sorun banada olurdu söyle yap o türkce sorunu o başka bir sey deil sunu yap bak
modules/Shout_Box/language/lang-turkish.php su dosyayı bul yada "lang-english.php" ikisinin icindekileride bunla deiş işin cözülücektir sanırım ok kolay gele..
Kod:
<?php
// ==========================================
// PHP-NUKE: Shout Box
// ==========================
//
// Copyright (c) 2004 by Aric Bolf (SuperCat)
// http://www.OurScripts.net
//
// 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
// ===========================================
// Turkish Translation by: GANYANCI
// http://www.alperbalci.com
// ===========================================
KARDEŞ BEN İLK SORUNUMU HALLETTİM DE
kendi yazdığım mesajların sayfa yenilemeden anında gözükmesi sağladık. Coşkun'un katkılarıyla.
Umarım birileri dahada geliştirerek karşı tarafın gönderdiği mesajlarıda anında ekrana yazdırabilir.
alttaki kodları block-shoutboxsohbet.php olarak kaydedip blokların altına atıp etkinleştiriyoruz.
Kod:
<?php
#### Generated by Block Creator by Disipal Site (www.disipal.net) ###
if (eregi("block-shoutboxsohbet.php",$PHP_SELF)) {
Header("Location: index.php");
die();
}
$content .="<i f r a m e SRC=http://www.siteadi.com/shoutbox.php frameborder=0 width=100% height=230 marginwidth=0 marginheight=0 scrolling=no></i f r a m e>";
?>
daha sonra ana dizinde shoutbox.php altına bir dosya daha ekleyip içine şu kodları ekliyoruz.
global $prefix, $ShoutSubmit, $ShoutComment, $db, $user, $c o o k i e, $shoutuid, $top_content, $mid_content, $bottom_content, $ShoutMarqueewidth, $ShoutMarqueeheight, $currentlang;
function ShoutBox($ShoutSubmit, $prefix, $ShoutComment, $db, $user, $c o o k i e, $shoutuid) {
global $admin, $admin_file, $currentlang, $top_content, $mid_content, $bottom_content, $ShoutMarqueewidth, $ShoutMarqueeheight;
$self = ereg_replace("/", "",$_SERVER['PHP_SELF']);
if ($admin_file == '') { $admin_file = 'admin'; }
if ((is_admin($admin)) AND ("".$admin_file.".php" == $self)) {
$sqlV = "select * from ".$prefix."_config";
$resultV = $db->sql_query($sqlV);
$confV = $db->sql_fetchrow($resultV);
if ($confV['Version_Num'] >= '7.6') {
$preURL = 'index.php?url=';
} else {
$preURL = '';
}
}
if ($currentlang) {
include_once("modules/Shout_Box/lang-block/lang-$currentlang.php");
} else {
include_once("modules/Shout_Box/lang-block/lang-english.php");
}
$PreviousShoutComment = $ShoutComment;
include("config.php");
c o o k i edecode($user);
$username = $c o o k i e[1];
//do IP test then ban if on list
if($conf['ipblock'] == "yes") {
$sql = "select * from ".$prefix."_shoutbox_ipblock";
$ipresult = $db->sql_query($sql);
while ($badips = $db->sql_fetchrow($ipresult)) {
if (eregi("\*", $badips['name'])) { // Allow for Subnet bans like 123.456.*
$badipsArray = explode(".",$badips['name']);
$uipArray = explode(".",$uip);
$i = 0;
foreach($badipsArray as $badipsPart) {
if ($badipsPart == "*") { $BannedShouter = "yes"; break; }
if ($badipsPart != $uipArray[$i] AND $badipsPart != "*") { break; }
$i++;
}
} else {
if($uip == $badips['name']) { $BannedShouter = "yes"; break; }
}
}
}
//do name test then ban if on list (only applies to registered users)
if ($conf['nameblock'] == "yes" AND $BannedShouter != "yes") {
$sql = "select * from ".$prefix."_shoutbox_nameblock";
$nameresult = $db->sql_query($sql);
while ($badname = $db->sql_fetchrow($nameresult)){
if ($username == $badname['name']) { $BannedShouter = "yes"; break; }
}
}
if ($BannedShouter != "yes") {
if ($ShoutSubmit == "ShoutPost") {
// start processing shout
if ($shoutuid) { $username = "$shoutuid"; }
//shoutuid tests
$username = trim($username); // remove whitespace off ends of nickname
if($conf['anonymouspost'] == "yes") {
$unum = strlen($username);
if ($unum < 2) { $ShoutError = ""._NICKTOOSHORT.""; }
if (!$username OR $username == ""._NAME."") { $ShoutError = ""._NONICK.""; }
if (eregi(".xxx", $username) AND $conf['blockxxx'] == "yes") { $username = "Anonymous"; }
if (eregi("j a v a s c r i p t:(.*)", $username)) { $username = "Anonymous"; }
$username = htmlspecialchars($username, ENT_QUOTES);
$username = ereg_replace("&amp;", "&",$username);
}
if (!is_user($user) && ($username) && $username != "Anonymous") {
$username = ereg_replace(" ", "_",$username);
}
$ShoutComment = trim($ShoutComment); // remove whitespace off ends of shout
$ShoutComment = preg_replace('/\s+/', ' ', $ShoutComment); // convert double spaces in middle of shout to single space
$num = strlen($ShoutComment);
if ($num < 1) { $ShoutError = ""._SHOUTTOOSHORT.""; }
if ($num > 2500) { $ShoutError = ""._SHOUTTOOLONG.""; }
if (!$ShoutComment) { $ShoutError = ""._NOSHOUT.""; }
if ($ShoutComment == ""._SB_MESSAGE."") { $ShoutError = ""._NOSHOUT.""; }
$ShoutComment = ereg_replace(" [.] ", ".",$ShoutComment);
if (eregi(".xxx", $ShoutComment) AND $conf['blockxxx'] == "yes") {
$ShoutError = ""._XXXBLOCKED."";
$PreviousShoutComment = "";
}
if (eregi("j a v a s c r i p t:(.*)", $ShoutComment)) {
$ShoutError = ""._JSINSHOUT."";
$PreviousShoutComment = "";
}
//Smilies from database
$ShoutArrayReplace = explode(" ",$ShoutComment);
$ShoutArrayScan = $ShoutArrayReplace;
$sql = "select * from ".$prefix."_shoutbox_emoticons";
$eresult = $db->sql_query($sql);
while ($emoticons = $db->sql_fetchrow($eresult)) {
$i = 0;
foreach($ShoutArrayScan as $ShoutPart) {
if ($ShoutPart == $emoticons['text']) { $ShoutArrayReplace[$i] = $emoticons['image']; }
$i++;
}
}
$ShoutComment = implode(" ",$ShoutArrayReplace);
//do name test then error if on list
if($conf['nameblock'] == "yes"){
$sql = "select * from ".$prefix."_shoutbox_nameblock";
$nameresult = $db->sql_query($sql);
while ($badname = $db->sql_fetchrow($nameresult)){
if($username == $badname['name']) {
$ShoutError = ""._BANNEDNICK."";
}
}
}
// check for anonymous users cloning/ghosting registered users' nicknames
c o o k i edecode($user);
if (!is_user($user) && ($username) && $username != "Anonymous") {
$sql = "select * from ".$prefix."_users where username='$username'";
$nameresult = $db->sql_query($sql);
$row = $db->sql_fetchrow($nameresult);
if ($row) {
$ShoutError = ""._NOCLONINGNICKS."";
}
}
//look for bad words, then censor them.
if($conf['censor'] == "yes") {
// start Anonymous nickname censor check here. If bad, replace bad nick with 'Anonymous'
if (!is_user($user) && ($username) && $username != "Anonymous") {
$sql = "select * from ".$prefix."_shoutbox_censor";
$cresult = $db->sql_query($sql);
while ($censor = $db->sql_fetchrow($cresult)) {
if ($username != 'Anonymous') {
$one = strtolower($censor['text']);
$usernameL = strtolower($username);
if (stristr($usernameL, $one) !== false) {
$username = "Anonymous";
}
}
}
}
// Censor of posting text
$ShoutArrayReplace = explode(" ",$ShoutComment);
$ShoutArrayScan = $ShoutArrayReplace;
$sql = "select * from ".$prefix."_shoutbox_censor";
$cresult = $db->sql_query($sql);
while ($censor = $db->sql_fetchrow($cresult)) {
$i = 0;
foreach($ShoutArrayScan as $ShoutPart) {
$ShoutPart = strtolower($ShoutPart);
$censor['text'] = strtolower($censor['text']);
if ($ShoutPart == $censor['text']) { $ShoutArrayReplace[$i] = $censor['replacement']; }
$i++;
}
}
$ShoutComment = implode(" ",$ShoutArrayReplace);
/*
// Phrase censor - Needs work before implementing
$sql = "select * from ".$prefix."_shoutbox_emoticons";
$eresult = $db->sql_query($sql);
while ($emoticons = $db->sql_fetchrow($eresult)) {
$ShoutComment = str_replace($emoticons['text'],$emoticons['image'],$ShoutComment);
}
*/
}
// duplicate posting checker. stops repeated spam attacks
$sql = "select * from ".$prefix."_shoutbox_shouts order by id DESC LIMIT 5";
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result)) {
if ($row['comment'] == $ShoutComment) {
$ShoutError = ""._DUPLICATESHOUT."";
}
}
// table that holds the scrolling area
if ($showBackground == 'yes') {
$top_content .= "<table style=\"cursor: text;\" width=\"100%\" border=\"$SBborder\" cellspacing=\"0\" cellpadding=\"0\"><tr><td style=\"background: url(modules/Shout_Box/images/background/$themeRow[blockBackgroundImage]);\" height=\"$conf[height]\">\n";
} else {
$top_content .= "<table style=\"cursor: text;\" width=\"100%\" border=\"$SBborder\" cellspacing=\"0\" cellpadding=\"0\"><tr><td height=\"$conf[height]\">\n";
}
// end top content
// table of the actual scrolling content
if ($showBackground == 'yes') {
$mid_content = "<table style=\"table-layout: fixed; width: 100%;\" border=\"0\" align=\"left\" cellspacing=\"0\" cellpadding=\"5\">";
} else {
$mid_content = "<table style=\"table-layout: fixed; width: 100%;\" border=\"0\" align=\"left\" cellspacing=\"0\" cellpadding=\"2\">";
}
$flag = 1;
$ThemeSel = get_theme();
$sql = "select * from ".$prefix."_shoutbox_themes WHERE themeName='$ThemeSel'";
$resultT = $db->sql_query($sql);
$rowColor = $db->sql_fetchrow($resultT);
if (is_user($user)) {
$username = $c o o k i e[1];
if ($username != '') {
$sqlF = "SELECT user_timezone, user_dateformat from ".$prefix."_users WHERE username='$username'";
$resultF = $db->sql_query($sqlF);
$userSetup = $db->sql_fetchrow($resultF);
}
}
$sql = "select * from ".$prefix."_shoutbox_date";
$resultD = $db->sql_query($sql);
$rowD = $db->sql_fetchrow($resultD);
// Sticky shouts
$sql = "select * from ".$prefix."_shoutbox_sticky where stickySlot=0";
$stickyResult = $db->sql_query($sql);
$stickyRow0 = $db->sql_fetchrow($stickyResult);
$sql = "select * from ".$prefix."_shoutbox_sticky where stickySlot=1";
$stickyResult = $db->sql_query($sql);
$stickyRow1 = $db->sql_fetchrow($stickyResult);
switch($ShoutSubmit) {
default:
ShoutBox($ShoutSubmit, $prefix, $ShoutComment, $db, $user, $c o o k i e, $shoutuid);
break;
}
?>
<script type="text/j a v a s c r i p t">
var SBheight = '<?php echo "$ShoutMarqueeheight"; ?>';
var SBcontent = new String('<?php echo "$mid_content"; ?>');
</script>
<script type="text/j a v a s c r i p t" src="shoutbox.js"></script>
<?php
echo " <fieldset style=\"border-color: #70c6ff; border-style: solid; border-width : 1px;\">
<legend><font color=\"boxcontent\">Mini Sohbet</font></legend>";
echo "<table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"0\">";
echo "<tr>";
echo "<td width=\"100%\">$top_content\n";
echo "<div align=\"center\"><script type=\"text/j a v a s c r i p t\">document.write(SBtxt);</script></div>\n";
echo "$bottom_content</td>\n";
echo "</tr>";
echo "</table></fieldset>";
?>
kodların içindeki tema yolunu değişmeyi unutmayın
burada neyi anlamadın ramx 2 dosya oluşturacaksın içinede bnenim verdiğim kodları yapıştırıp dediğim yerlere atacaksın hepsi bu. Yinede yapamazsan eklerim dosyaları
KARDEŞ BEN İLK SORUNUMU HALLETTİM DE
kendi yazdığım mesajların sayfa yenilemeden anında gözükmesi sağladık. Coşkun'un katkılarıyla.
Umarım birileri dahada geliştirerek karşı tarafın gönderdiği mesajlarıda anında ekrana yazdırabilir.
BUNU NASIL YAPACAGIMI ANLAMADIM
ARKADASIM İLSORUNUN BLOKTA GÖRÜNMÜYORDU SANIRIM NASIL HALETİN SÖMYLESEN BENDEDE O SORUN VARDA
Bu forumda yeni başlıklar açamazsınız Bu forumdaki başlıklara cevap veremezsiniz Bu forumdaki mesajlarınızı değiştiremezsiniz Bu forumdaki mesajlarınızı silemezsiniz Bu forumdaki anketlerde oy kullanamazsınız