Toplam Üye:
32638
Aktif Üye:
0
Aktif Ziyaretçi:
697
Blok yapiminda nasil incl ..(6404 okuma, 3 yanıt) Orta Block Resim Ekleme ..(7434 okuma, 3 yanıt) yeni flashmanset haber bl ..(12699 okuma, 9 yanıt) Ramazan Yaklaştı Block,Mo ..(6406 okuma, 2 yanıt) php Nuke Jquery Accessibl ..(9568 okuma, 6 yanıt) Dernek Modulü için Block ..(4722 okuma, 1 yanıt) Adtech Reklam Bloku ..(5643 okuma, 2 yanıt) Manşet Blok ..(5661 okuma, 2 yanıt) Flash Atatürk Vecizeleri ..(5628 okuma, 2 yanıt) TRT Haber orta bloğu ..(10088 okuma, 9 yanıt) Yeni Manşet Haber Bloklar ..(19386 okuma, 23 yanıt) New haber flash band news ..(7501 okuma, 3 yanıt) new flash nsn news block ..(17655 okuma, 23 yanıt) ATS haber blogu kurdum am ..(7623 okuma, 6 yanıt) Akordiyon Blok hatası ..(5754 okuma, 2 yanıt) Youtube videolari site de ..(6352 okuma, 3 yanıt) bugun girenler blogu ..(9442 okuma, 8 yanıt) 3 haber yeni block ..(10604 okuma, 13 yanıt) nice manset haber block ..(8996 okuma, 8 yanıt) Bytasarım Slide Kayan Hab ..(23807 okuma, 30 yanıt) need help to make this ha ..(3508 okuma, 0 yanıt) new flash block preheadli ..(5419 okuma, 2 yanıt) Facebookta Paylaşım.. ..(8570 okuma, 7 yanıt) Blok nasıl eklenir Yardım ..(9126 okuma, 7 yanıt) Super mansetler flash blo ..(4649 okuma, 2 yanıt) yeni block flash haberler ..(4889 okuma, 2 yanıt) yeni block flash accordio ..(3448 okuma, 0 yanıt) block flash haber accordi ..(4544 okuma, 2 yanıt) İstediğiniz bir bloğu baş ..(4069 okuma, 0 yanıt) Bugün Doğan Üyeler Bloğu ..(7406 okuma, 6 yanıt) Bizim Yazarlar Modülüne b ..(3980 okuma, 0 yanıt) Sonvideostream flash blco ..(7962 okuma, 8 yanıt) Yenilikler Orta Blok ist ..(7647 okuma, 6 yanıt) Akordiyon Flash Blok+Xml ..(7092 okuma, 5 yanıt) blocks nsn news flash cu ..(3633 okuma, 0 yanıt) new flash bizim yazarlar ..(4032 okuma, 1 yanıt) haber flash block send al ..(5534 okuma, 4 yanıt) userinfo bloğu çalışmıyor ..(4909 okuma, 2 yanıt) Total hits block ..(3990 okuma, 1 yanıt) katagorili haber blogu ..(11308 okuma, 13 yanıt) Dolar-Tl Dönüştürücü Blok ..(7116 okuma, 5 yanıt) Flash Haber Sistemi Çok ..(10298 okuma, 9 yanıt) Video Stream Orta Blok ..(6272 okuma, 4 yanıt) new flash block ..(5308 okuma, 3 yanıt) flash haber blogu ..(6285 okuma, 4 yanıt) Döviz ve Haber Durumu Blo ..(10481 okuma, 10 yanıt) Blokta karakter sınırlama ..(5517 okuma, 2 yanıt) Yeni Hava Durumu Block'u ..(3734 okuma, 0 yanıt) yeni flash haber block ..(4498 okuma, 2 yanıt) yeni haber flash block ..(6205 okuma, 5 yanıt)
Netopsiyon Online: Forums
Netopsiyon Online :: Başlık görüntüleniyor - Shoutbox Block
Önceki başlık :: Sonraki başlık
Yazar
Mesaj
ahududu Mesaj: 100+
Kayıt: Mar 14, 2010 Mesajlar: 132
Tarih: 2010-03-21, 18:32:49 Mesaj konusu: Shoutbox Block
arkadaşlar shoutbox bloğun kaymaması için nasıl bir düzenleme yapmalıyız ?
siteyi yenilemeye gerek kalmadan kendi blok içini yeniliyor diye bir şey okumuştum ama nerde okuduğumu bulamadım forumda.
bilen var mı acaba bu iki sorunun çözümünü ?
blok kodu
Kod:
<php>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];
if ($username == "") { $username = "Anonymous"; }
$sql = "select * from ".$prefix."_shoutbox_conf";
$result = $db->sql_query($sql);
$conf = $db->sql_fetchrow($result);
// Check if block is in center position
$sql = "select bposition from ".$prefix."_blocks where blockfile='block-Shout_Box.php'";
$SBpos = $db->sql_query($sql);
$SBpos = $db->sql_fetchrow($SBpos);
if ($SBpos['bposition'] == 'c' || $SBpos['bposition'] == 'd') {
$SBpos = 'center';
$SBborder = 1;
} else {
$SBpos = 'side';
$SBborder = 0;
}
// Find user's IP
if (getenv("HTTP_CLIENT_IP") && strcasecmp(getenv("HTTP_CLIENT_IP"), "unknown")) {
$uip = getenv("HTTP_CLIENT_IP");
} else if (getenv("HTTP_X_FORWARDED_FOR") && strcasecmp(getenv("HTTP_X_FORWARDED_FOR"), "unknown")) {
$uip = getenv("HTTP_X_FORWARDED_FOR");
} else if (getenv("REMOTE_ADDR") && strcasecmp(getenv("REMOTE_ADDR"), "unknown")) {
$uip = getenv("REMOTE_ADDR");
} else if (isset($_SERVER['REMOTE_ADDR']) && $_SERVER['REMOTE_ADDR'] && strcasecmp($_SERVER['REMOTE_ADDR'], "unknown")) {
$uip = $_SERVER['REMOTE_ADDR'];
} else {
$uip = "";
}
if ($uip == 'unknown') { $uip = $_SERVER['REMOTE_ADDR']; }
if ($uip == "") { $uip = $_SERVER['REMOTE_ADDR']; }
if ($uip == "") { $uip = "noip"; }
if ($uip == 'unknown') { $uip = "noip"; }
//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> 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 = "";
}
$ShoutComment = htmlspecialchars($ShoutComment, ENT_QUOTES);
$ShoutComment = ereg_replace("&amp;", "&",$ShoutComment);
// Scan for links in the shout. If there is, replace it with [URL] or block it if disallowed
$i = 0;
$ShoutNew = '';
$ShoutArray = explode(" ",$ShoutComment);
foreach($ShoutArray as $ShoutPart) {
if (is_array($ShoutPart) == TRUE) { $ShoutPart = $ShoutPart[0]; }
if (eregi("http:\/\/", $ShoutPart)) {
if (((!is_user($user)) AND ($conf['urlanononoff'] == "no")) OR ((is_user($user)) AND ($conf['urlonoff'] == "no"))) { $ShoutError = ""._URLNOTALLOWED.""; break; }
// fix for users adding text to the beginning of links: HACKhttp://www.website.com
$ShoutPartL = strtolower($ShoutPart);
$spot = strpos($ShoutPartL,"http://");
if ($spot > 0) { $ShoutPart = substr($ShoutPart, $spot); }
$ShoutNew[$i] = "[<a rel="nofollow\" target="_blank\" href="$ShoutPart\">URL</a>]";
} elseif (eregi("ftp:\/\/", $ShoutPart)) {
if (((!is_user($user)) AND ($conf['urlanononoff'] == "no")) OR ((is_user($user)) AND ($conf['urlonoff'] == "no"))) { $ShoutError = ""._URLNOTALLOWED.""; break; }
$ShoutPartL = strtolower($ShoutPart);
$spot = strpos($ShoutPartL,"ftp://");
if ($spot > 0) { $ShoutPart = substr($ShoutPart, $spot); }
$ShoutNew[$i] = "[<a rel="nofollow\" target="_blank\" href="$ShoutPart\">FTP</a>]";
} elseif (eregi("irc:\/\/", $ShoutPart)) {
if (((!is_user($user)) AND ($conf['urlanononoff'] == "no")) OR ((is_user($user)) AND ($conf['urlonoff'] == "no"))) { $ShoutError = ""._URLNOTALLOWED.""; break; }
$ShoutPartL = strtolower($ShoutPart);
$spot = strpos($ShoutPartL,"irc://");
if ($spot > 0) { $ShoutPart = substr($ShoutPart, $spot); }
$ShoutNew[$i] = "[<a rel="nofollow\" href="$ShoutPart\">IRC</a>]";
} elseif (eregi("teamspeak:\/\/", $ShoutPart)) {
if (((!is_user($user)) AND ($conf['urlanononoff'] == "no")) OR ((is_user($user)) AND ($conf['urlonoff'] == "no"))) { $ShoutError = ""._URLNOTALLOWED.""; break; }
$ShoutPartL = strtolower($ShoutPart);
$spot = strpos($ShoutPartL,"teamspeak://");
if ($spot > 0) { $ShoutPart = substr($ShoutPart, $spot); }
$ShoutNew[$i] = "[<a rel="nofollow\" href="$ShoutPart\">TeamSpeak</a>]";
} elseif (eregi("aim:goim", $ShoutPart)) {
if (((!is_user($user)) AND ($conf['urlanononoff'] == "no")) OR ((is_user($user)) AND ($conf['urlonoff'] == "no"))) { $ShoutError = ""._URLNOTALLOWED.""; break; }
$ShoutPartL = strtolower($ShoutPart);
$spot = strpos($ShoutPartL,"aim:goim");
if ($spot > 0) { $ShoutPart = substr($ShoutPart, $spot); }
$ShoutNew[$i] = "[<a rel="nofollow\" href="$ShoutPart\">AIM</a>]";
} elseif (eregi("gopher:\/\/", $ShoutPart)) {
if (((!is_user($user)) AND ($conf['urlanononoff'] == "no")) OR ((is_user($user)) AND ($conf['urlonoff'] == "no"))) { $ShoutError = ""._URLNOTALLOWED.""; break; }
$ShoutPartL = strtolower($ShoutPart);
$spot = strpos($ShoutPartL,"gopher://");
if ($spot > 0) { $ShoutPart = substr($ShoutPart, $spot); }
$ShoutNew[$i] = "[<a rel="nofollow\" href="$ShoutPart\">Gopher</a>]";
} elseif (eregi("mailto:", $ShoutPart)) {
$ShoutPartL = strtolower($ShoutPart);
$spot = strpos($ShoutPartL,"mailto:");
if ($spot > 0) { $ShoutPart = substr($ShoutPart, $spot); }
// email encoding to stop harvesters
$ShoutPart = bin2hex($ShoutPart);
$ShoutPart = chunk_split($ShoutPart, 2, '%');
$ShoutPart = '%' . substr($ShoutPart, 0, strlen($ShoutPart) - 1);
$ShoutNew[$i] = "[<a href="$ShoutPart\">E-Mail</a>]";
} elseif (eregi("www\.", $ShoutPart)) {
if (((!is_user($user)) AND ($conf['urlanononoff'] == "no")) OR ((is_user($user)) AND ($conf['urlonoff'] == "no"))) { $ShoutError = ""._URLNOTALLOWED.""; break; }
$ShoutPartL = strtolower($ShoutPart);
$spot = strpos($ShoutPartL,"www.");
if ($spot > 0) { $ShoutPart = substr($ShoutPart, $spot); }
$ShoutPart = "http://" . $ShoutPart;
$ShoutNew[$i] = "[<a rel="nofollow\" target="_blank\" href="$ShoutPart\">URL</a>]";
} elseif (eregi('@', $ShoutPart) AND eregi('\.', $ShoutPart)) {
// email encoding to stop harvesters
$ShoutPart = bin2hex($ShoutPart);
$ShoutPart = chunk_split($ShoutPart, 2, '%');
$ShoutPart = '%' . substr($ShoutPart, 0, strlen($ShoutPart) - 1);
$ShoutNew[$i] = "[<a href="mailto:$ShoutPart\">E-Mail</a>]";
} elseif ((eregi("\.(us|tv|cc|ws|ca|de|jp|ro|be|fm|ms|tc|ph|dk|st|ac|gs|vg|sh|kz|as|lt|to)", substr("$ShoutPart", -3,3))) OR (eregi("\.(com|net|org|mil|gov|biz|pro|xxx)", substr("$ShoutPart", -4,4))) OR (eregi("\.(info|name|mobi)", substr("$ShoutPart", -5,5))) OR (eregi("\.(co\.uk|co\.za|co\.nz|co\.il)", substr("$ShoutPart", -6,6)))) {
if (((!is_user($user)) AND ($conf['urlanononoff'] == "no")) OR ((is_user($user)) AND ($conf['urlonoff'] == "no"))) { $ShoutError = ""._URLNOTALLOWED.""; break; }
$ShoutPart = "http://" . $ShoutPart;
$ShoutNew[$i] = "[<a rel="nofollow\" target="_blank\" href="$ShoutPart\">URL</a>]";
} elseif (strlen(html_entity_decode($ShoutPart, ENT_QUOTES)) > 21) {
$ShoutNew[$i] = htmlspecialchars(wordwrap(html_entity_decode($ShoutPart, ENT_QUOTES), 21, " ", 1), ENT_QUOTES);
$ShoutNew[$i] = str_replace("[ b]", " [b]",$ShoutNew[$i]);
$ShoutNew[$i] = str_replace("[b ]", " [b]",$ShoutNew[$i]);
$ShoutNew[$i] = str_replace("[ /b]", "[/b] ",$ShoutNew[$i]);
$ShoutNew[$i] = str_replace("[/ b]", "[/b] ",$ShoutNew[$i]);
$ShoutNew[$i] = str_replace("[/b ]", "[/b] ",$ShoutNew[$i]);
$ShoutNew[$i] = str_replace("[ i]", " [i]",$ShoutNew[$i]);
$ShoutNew[$i] = str_replace("[i ]", " [i]",$ShoutNew[$i]);
$ShoutNew[$i] = str_replace("[ /i]", "[/i] ",$ShoutNew[$i]);
$ShoutNew[$i] = str_replace("[/ i]", "[/i] ",$ShoutNew[$i]);
$ShoutNew[$i] = str_replace("[/i ]", "[/i] ",$ShoutNew[$i]);
$ShoutNew[$i] = str_replace("[ u]", " [u]",$ShoutNew[$i]);
$ShoutNew[$i] = str_replace("[u ]", " [u]",$ShoutNew[$i]);
$ShoutNew[$i] = str_replace("[ /u]", "[/u] ",$ShoutNew[$i]);
$ShoutNew[$i] = str_replace("[/ u]", "[/u] ",$ShoutNew[$i]);
$ShoutNew[$i] = str_replace("[/u ]", "[/u] ",$ShoutNew[$i]);
} else { $ShoutNew[$i] = $ShoutPart; }
$i++;
}
if ($ShoutError == "") { $ShoutComment = implode(" ",$ShoutNew); }
//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."";
}
}
if ($conf['anonymouspost'] == "no" && $username == "Anonymous") {
$ShoutError = ""._ONLYREGISTERED2."";
}
if (!$ShoutError) {
$sql = "select * from ".$prefix."_shoutbox_date";
$resultD = $db->sql_query($sql);
$rowD = $db->sql_fetchrow($resultD);
// Special thanks to JRSweets for tipping me off to the timestamp option in date()
if ($conf['timeOffset'] == 0) {
$day = date("$rowD[date]");
$time = date("$rowD[time]");
} elseif (strstr($conf['timeOffset'], '+')) {
$sbTimeMultiplier = str_replace('+', '', $conf['timeOffset']);
$sbTimeOffset = $sbTimeMultiplier * 3600;
$sbTimeTemp = time();
$time = date("$rowD[time]", ($sbTimeTemp + $sbTimeOffset));
$day = date("$rowD[date]", ($sbTimeTemp + $sbTimeOffset));
} else {
$sbTimeMultiplier = str_replace('-', '', $conf['timeOffset']);
$sbTimeOffset = $sbTimeMultiplier * 3600;
$sbTimeTemp = time();
$time = date("$rowD[time]", ($sbTimeTemp - $sbTimeOffset));
$day = date("$rowD[date]", ($sbTimeTemp - $sbTimeOffset));
}
$currentTime = time();
$sql = "INSERT INTO ".$prefix."_shoutbox_shouts (id,name,comment,date,time,ip,timestamp) VALUES ('0','$username','$ShoutComment','$day','$time','$uip','$currentTime')";
$db->sql_query($sql);
// if v7.0 of nuke or higher, add points earned per shout
$sqlVer = "select * from ".$prefix."_config";
$resultVer = $db->sql_query($sqlVer);
$confVer = $db->sql_fetchrow($resultVer);
if (is_user($user) AND $confVer['Version_Num'] >= '7.0' AND $conf['pointspershout'] > 0) {
$sqlP = "select user_id,points from ".$prefix."_users WHERE username='$username'";
$resultP = $db->sql_query($sqlP);
$userP = $db->sql_fetchrow($resultP);
$userPoints = $userP['points'] + $conf['pointspershout'];
$sqlP = "UPDATE ".$prefix."_users set points='$userPoints' where user_id='$userP[user_id]'";
$db->sql_query($sqlP);
}
$PreviousShoutComment = "";
$PreviousComment = "";
} else {
if ($username != ""._NAME."") {
$PreviousUsername = $username;
}
if ($PreviousShoutComment != ""._SB_MESSAGE."") {
$PreviousComment = $PreviousShoutComment;
}
}
}
//Display Content From here on down
if (!is_user($user) && ($username) && $username != "Anonymous") { $username = "Anonymous"; }
$ThemeSel = get_theme();
$sql = "select * from ".$prefix."_shoutbox_theme_images WHERE themeName='$ThemeSel'";
$result = $db->sql_query($sql);
$themeRow = $db->sql_fetchrow($result);
if ($themeRow['blockBackgroundImage'] != '' AND file_exists("modules/Shout_Box/images/background/$themeRow[blockBackgroundImage]")) {
$showBackground = 'yes';
} else {
$showBackground = 'no';
}
if (file_exists("modules/Shout_Box/images/up/$themeRow[blockArrowColor]") AND $themeRow['blockArrowColor'] != '') {
$up_img = "modules/Shout_Box/images/up/$themeRow[blockArrowColor]";
} else {
$up_img = "modules/Shout_Box/images/up/Black.gif";
}
if (file_exists("modules/Shout_Box/images/down/$themeRow[blockArrowColor]") AND $themeRow['blockArrowColor'] != '') {
$down_img = "modules/Shout_Box/images/down/$themeRow[blockArrowColor]";
} else {
$down_img = "modules/Shout_Box/images/down/Black.gif";
}
if (file_exists("modules/Shout_Box/images/pause/$themeRow[blockArrowColor]") AND $themeRow['blockArrowColor'] != '') {
$pause_img = "modules/Shout_Box/images/pause/$themeRow[blockArrowColor]";
} else {
$pause_img = "modules/Shout_Box/images/pause/Black.gif";
}
$sql = "select * from ".$prefix."_shoutbox_shouts order by id DESC LIMIT $conf[number]";
$result = $db->sql_query($sql);
// Top half
// shout error reporting
$top_content = "";
if ($ShoutError) {
$top_content .= "<table><tr><td><b>"._SB_NOTE.":</b> $ShoutError</td></tr></table>";
}
// table that holds the scrolling area
if ($showBackground == 'yes') {
$top_content .= "<table><tr><td>\n";
} else {
$top_content .= "<table><tr><td>\n";
}
// end top content
// table of the actual scrolling content
if ($showBackground == 'yes') {
$mid_content = "<table>";
} else {
$mid_content = "<table>";
}
$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);
if ($stickyRow0) {
if ($showBackground == 'yes') {
$mid_content .= "<tr><td>";
} else {
if ($flag == 1) { $flag = 2; }
elseif ($flag == 2) { $flag = 1; }
$mid_content .= "<tr><td>";
}
$mid_content .= "<b>"._SB_ADMIN.":</b> $stickyRow0[comment]";
if ($conf['date'] == "yes") {
if (is_user($user)) {
// add time adjustment for following user's timezone
$displayTime = $userSetup['user_timezone'] - $conf['serverTimezone'];
$displayTime = $displayTime * 3600;
$newTimestamp = $stickyRow0['timestamp'] + $displayTime;
$unixTime = date("$userSetup[user_dateformat]", $newTimestamp);
$mid_content .= "<br>$unixTime";
} else {
$unixDay = date("$rowD[date]", $stickyRow0['timestamp']);
$unixTime = date("$rowD[time]", $stickyRow0['timestamp']);
$mid_content .= "<br>$unixDay $unixTime";
}
}
$mid_content .= "</td></tr>";
}
if ($stickyRow1) {
if ($showBackground == 'yes') {
$mid_content .= "<tr><td>";
} else {
if ($flag == 1) { $flag = 2; }
elseif ($flag == 2) { $flag = 1; }
$mid_content .= "<tr><td>";
}
$mid_content .= "<b>"._SB_ADMIN.":</b> $stickyRow1[comment]";
if ($conf['date'] == "yes") {
if (is_user($user)) {
// add time adjustment for following user's timezone
$displayTime = $userSetup['user_timezone'] - $conf['serverTimezone'];
$displayTime = $displayTime * 3600;
$newTimestamp = $stickyRow1['timestamp'] + $displayTime;
$unixTime = date("$userSetup[user_dateformat]", $newTimestamp);
$mid_content .= "<br>$unixTime";
} else {
$unixDay = date("$rowD[date]", $stickyRow1['timestamp']);
$unixTime = date("$rowD[time]", $stickyRow1['timestamp']);
$mid_content .= "<br>$unixDay $unixTime";
}
}
$mid_content .= "</td></tr>";
}
// end sticky shouts
$i = 0;
while ($row = $db->sql_fetchrow($result)) {
if ($flag == 1) { $bgcolor = $rowColor['blockColor1']; }
if ($flag == 2) { $bgcolor = $rowColor['blockColor2']; }
if ($showBackground == 'yes') {
$tempContent[$i] = "<tr><td>";
} else {
$tempContent[$i] = "<tr><td>";
}
$ShoutComment = str_replace('src=', 'src="', $row['comment']);
$ShoutComment = str_replace('.gif>', '.gif" alt="" />', $ShoutComment);
$ShoutComment = str_replace('.jpg>', '.jpg" alt="" />', $ShoutComment);
$ShoutComment = str_replace('.png>', '.png" alt="" />', $ShoutComment);
$ShoutComment = str_replace('.bmp>', '.bmp" alt="" />', $ShoutComment);
$ShoutComment = str_replace("http:", "".$preURL."http:", $ShoutComment);
$ShoutComment = str_replace("ftp:", "".$preURL."ftp:", $ShoutComment);
// BB code [b]word[/b] [i]word[/i] [u]word[/u]
if ((eregi("[b]", $ShoutComment)) AND (eregi("[/b]", $ShoutComment)) AND (substr_count("$ShoutComment","[b]") == substr_count("$ShoutComment","[/b]"))) {
$ShoutComment = eregi_replace("\[b\]","<span>","$ShoutComment");
$ShoutComment = eregi_replace("\[\/b\]","</span>","$ShoutComment");
}
if ((eregi("[i]", $ShoutComment)) AND (eregi("[/i]", $ShoutComment)) AND (substr_count("$ShoutComment","[i]") == substr_count("$ShoutComment","[/i]"))) {
$ShoutComment = eregi_replace("\[i\]","<span>","$ShoutComment");
$ShoutComment = eregi_replace("\[\/i\]","</span>","$ShoutComment");
}
if ((eregi("[u]", $ShoutComment)) AND (eregi("[/u]", $ShoutComment)) AND (substr_count("$ShoutComment","[u]") == substr_count("$ShoutComment","[/u]"))) {
$ShoutComment = eregi_replace("\[u\]","<span>","$ShoutComment");
$ShoutComment = eregi_replace("\[\/u\]","</span>","$ShoutComment");
}
if ($username == "Anonymous") {
$tempContent[$i] .= "<b>$row[name]:</b> $ShoutComment";
}
else {
// check to see if nickname is a user in the DB
$sqlN = "select * from ".$prefix."_users where username='$row[name]'";
$nameresultN = $db->sql_query($sqlN);
$rowN = $db->sql_fetchrow($nameresultN);
if (($rowN) AND ($row['name'] != "Anonymous")) {
$tempContent[$i] .= "<b><a href="modules.php?name=Your_Account&op=userinfo&username=$row[name]\">$row[name]</a>:</b> $ShoutComment";
} else {
$tempContent[$i] .= "<b>$row[name]:</b> $ShoutComment";
}
}
if ($conf['date'] == "yes") {
if ($row['timestamp'] != '') {
// reads unix timestamp and formats it to the viewer's timezone
if (is_user($user)) {
// time adjustment for following user's timezone
$displayTime = $userSetup['user_timezone'] - $conf['serverTimezone'];
$displayTime = $displayTime * 3600;
$newTimestamp = $row['timestamp'] + $displayTime;
$unixTime = date("$userSetup[user_dateformat]", $newTimestamp);
$tempContent[$i] .= "<br>$unixTime";
} else {
// adjustmet for timezone offset
$displayTime = $conf['timeOffset'] * 3600;
$newTimestamp = $row['timestamp'] + $displayTime;
$unixDay = date("$rowD[date]", $newTimestamp);
$unixTime = date("$rowD[time]", $newTimestamp);
$tempContent[$i] .= "<br>$unixDay $unixTime";
}
} else {
$tempContent[$i] .= "<br>$row[date] $row[time]";
}
}
$tempContent[$i] .= "</td></tr>";
if ($flag == 1) { $flag = 2; }
elseif ($flag == 2) { $flag = 1; }
$i++;
}
// Reversing the posts
if ($conf['reversePosts'] == "no") {
for ($j = 0; $j <conf>= 0; $j = $j - 1) {
$mid_content .= $tempContent[$j];
}
}
// You may not remove or edit this copyright!!! Doing so violates the GPL license.
$mid_content .= "<tr><td><a title="Free scripts!\" target="_blank\" href="http://www.ourscripts.net\"><span>Shout Box ©</span></a></td></tr></table>";
// end copyright.
// end mid content
// start bottom content $bottom_content
$bottom_content = "</td></tr></table>\n";
// bottom half
if ($conf['anonymouspost'] == "no" && $username == "Anonymous") {
$bottom_content .= "<div><a href="modules.php?name=Shout_Box\">"._SHOUTHISTORY."</a>";
$bottom_content .= " <span><img src=\"$up_img\" border=\"0\" alt=\"\" width=\"9\" height=\"5\" /></span>";
$bottom_content .= " <span><img src=\"$down_img\" border=\"0\" alt=\"\" width=\"9\" height=\"5\" /></span>";
$bottom_content .= " <span><img src=\"$pause_img\" border=\"0\" alt=\"\" width=\"9\" height=\"5\" /></span>";
$bottom_content .= "</div><div><br>"._ONLYREGISTERED." <a href="modules.php?name=Your_Account\">"._SHOUTLOGIN."</a> "._OR." <a href="modules.php?name=Your_Account&op=new_user\">"._CREATEANACCT."</a>.</div>";
} else {
$bottom_content .= "<form name=\"shoutform1\" method=\"post\" action=\"\" style=\"margin-bottom: 0px; margin-top: 0px\">";
$bottom_content .= "<table>";
$bottom_content .= "<tr><td><a href="modules.php?name=Shout_Box\">"._SHOUTHISTORY."</a>";
$bottom_content .= " <span><img src=\"$up_img\" border=\"0\" alt=\"\" width=\"9\" height=\"5\" /></span>";
$bottom_content .= " <span><img src=\"$down_img\" border=\"0\" alt=\"\" width=\"9\" height=\"5\" /></span>";
$bottom_content .= " <span><img src=\"$pause_img\" border=\"0\" alt=\"\" width=\"9\" height=\"5\" /></span>";
$bottom_content .= "</td></tr>\n";
// Start smilie Drop-Down Code
$messageDefinition = ""._SB_MESSAGE."";
if (eregi("MSIE(.*)", $_SERVER['HTTP_USER_AGENT']) || eregi("Konqueror/3(.*)", $_SERVER['HTTP_USER_AGENT']) || (eregi("Opera(.*)", $_SERVER['HTTP_USER_AGENT']))) {
$ShoutNameWidth = $conf['textWidth'];
$ShoutTextWidth = $conf['textWidth'];
} else {
// Firefox, Mozilla, NS, and any others.
$ShoutNameWidth = $conf['textWidth'] - 4;
$ShoutTextWidth = $conf['textWidth'] - 4;
}
if ($conf['anonymouspost'] == "yes" && $username == "Anonymous") {
if ($PreviousUsername) { $boxtext = $PreviousUsername; } else { $boxtext = ""._NAME.""; }
$bottom_content .= "<tr><td><input></td></tr>\n";
}
if ($PreviousComment) { $boxtext = $PreviousComment; } else { $boxtext = ""._SB_MESSAGE.""; }
$bottom_content .= "<tr><td><input></td></tr>";
$bottom_content .= "<tr><td><input>";
$bottom_content .= "<div><div><input> <span><input></span></div></div>";
$bottom_content .= "<div><div><input> <span><input></span><br><br>";
$sql = "select distinct image from ".$prefix."_shoutbox_emoticons";
$nameresult1 = $db->sql_query($sql);
$flag = 1;
$second = 0;
while ($return = $db->sql_fetchrow($nameresult1)){
$sql = "select * from ".$prefix."_shoutbox_emoticons where image='$return[0]' limit 1";
$nameresult = $db->sql_query($sql);
while ($emoticons = $db->sql_fetchrow($nameresult)){
$emoticons[3] = str_replace('>', '', $emoticons['image']);
$emoticons[3] = str_replace('src=', 'src="', $emoticons[3]);
$bottom_content .= "<span>$emoticons[3]\" border=\"0\" alt=\"\" /></span> ";
if ($flag == $conf['smiliesPerRow']) {
$bottom_content .="<br><br>\n";
$flag = 1;
continue;
}
$flag++;
}
}
$bottom_content .= "</div></div></td></tr>\n";
$bottom_content .= "</table></form>\n";
}
} else {
$top_content = "<p><b>";
$mid_content = ""._YOUAREBANNED."";
$bottom_content = "</b></p>";
}
$sql = "select * from ".$prefix."_shoutbox_conf";
$resultsize = $db->sql_query($sql);
$rowsize = $db->sql_fetchrow($resultsize);
$ShoutMarqueeheight = $rowsize['height'];
}
switch($ShoutSubmit) {
default:
ShoutBox($ShoutSubmit, $prefix, $ShoutComment, $db, $user, $c o o k i e, $shoutuid);
break;
}
?>
<s>
var SBheight = '<php>';
var SBcontent = new String('<php>');
</s>
<s></s>
</s>
anadizinde ki shoutbox.js kodu
Kod:
function allonloads(){
SBpopulate();
}
// Insert Smiles to message box
function x(){
return;
}
function DoSmilie(addSmilie, messageDef){
var addSmilie, messageDef, revisedMessage;
var currentMessage = document.shoutform1.ShoutComment.value;
if(currentMessage==messageDef){currentMessage='';}
revisedMessage = currentMessage+addSmilie;
document.shoutform1.ShoutComment.value=revisedMessage;
document.shoutform1.ShoutComment.focus();
return;
}
//Drop-Down smilies
function MM_findObj(n, d){
var p,i,x;
if(!d) d=document;
if((p=n.indexOf("?"))>0&&parent.frames.length){
d=parent.frames[n.substring(p+1)].document;
n=n.substring(0,p);
}
if(!(x=d[n])&&d.all){
x=d.all[n];
}
for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) {
x=d.getElementById(n);
}
return x;
}
//end Drop-Down smilies
/*
Original j a v a s c r i p t code by dynamic drive, modified by SuperCat http://www.ourscripts.net
Cross browser Marquee II- Dynamic Drive (www.dynamicdrive.com)
For full source code, 100's more DHTML scripts, and TOS, visit http://www.dynamicdrive.com
Credit MUST stay intact
*/
var SBspeed=1;
var SBiedom=document.all||document.getElementById;
var SBactualheight='';
var SBcross_marquee, SBns_marquee;
if(SBiedom){
SBtxt='<div><div></div></div>';
}else{
SBtxt='<ilayer><layer></layer></ilayer>';
}
function SBscroll(){
if(SBiedom){
if(parseInt(SBcross_marquee.style.top)>(SBactualheight*(-1)+2)){
SBcross_marquee.style.top=parseInt(SBcross_marquee.style.top)-SBspeed+"px";
}else{
SBcross_marquee.style.top=parseInt(SBheight)+2+"px";
}
}
else{
if(SBns_marquee.top>(SBactualheight*(-1)+2)){
SBns_marquee.top-=SBspeed;
}else{
SBns_marquee.top=parseInt(SBheight)+2;
}
}
}
function changeBoxSize(showhide) {
document.getElementById('smilies_hide').style.display='none';
document.getElementById('smilies_show').style.display='none';
document.getElementById('smilies_'+showhide).style.display='block';
}
function SBpopulate(){
if(SBiedom){
SBcross_marquee=document.getElementById? document.getElementById("SBiemarquee") : document.all.SBiemarquee;
SBcross_marquee.style.top=parseInt(SBheight)+8+"px";
SBcross_marquee.innerHTML=SBcontent;
SBactualheight=SBcross_marquee.offsetHeight;
}else{
SBns_marquee=document.SBns_marquee.document.SBns_marquee2;
SBns_marquee.top=parseInt(SBheight)+8;
SBns_marquee.document.write(SBcontent);
SBns_marquee.document.close();
SBactualheight=SBns_marquee.document.height;
}
this.setInterval("SBscroll()",50);
}
window.onload=allonloads;
Başa dön
Bu Site Google Adsense ile Gelir Elde Ediyor
Tarih: 2024-06-06, 05:49:18 Mesaj konusu: Forum Arası Reklamlar
Başa dön
ahududu Mesaj: 100+
Kayıt: Mar 14, 2010 Mesajlar: 132
Tarih: 2010-03-24, 18:03:17 Mesaj konusu:
arkadaşlar sorunum günceldir.
Başa dön
Gkhnd Mesaj: 300+
Kayıt: May 17, 2005 Mesajlar: 349 Konum: Php-Nuke - Forever Drupal
Tarih: 2010-03-24, 18:32:23 Mesaj konusu:
resresh komutu kullanılır genelde;
time 3600 geçen değerleri değiştirin.
Evolution nuke de block içi refresh-block cache sadece nuke-evo da ayarlar bölümünden ayarlanmaktadır.
Php-nuke de block cache yoktur.
Joomla-wp de kısmi kısıtlı bölümlerde olmakla birlikte drupalda ise istediğin her bölüme uygulanmaktadır.
saygılar
Başa dön
ahududu Mesaj: 100+
Kayıt: Mar 14, 2010 Mesajlar: 132
Tarih: 2010-03-24, 19:23:25 Mesaj konusu:
kaymaması konusunda ne dersin arkadaşım ?
Başa dön
ahududu Mesaj: 100+
Kayıt: Mar 14, 2010 Mesajlar: 132
Tarih: 2010-03-26, 17:15:19 Mesaj konusu:
arkadaşlar
arkadaşlar shoutbox bloğun kaymaması için nasıl bir düzenleme yapmalıyız ?
bilgisi olan.
Başa dön
ahududu Mesaj: 100+
Kayıt: Mar 14, 2010 Mesajlar: 132
Tarih: 2010-03-28, 11:21:45 Mesaj konusu:
ya arkadaşlar kimse bilmiyor mu bu mereti ya.
o kadar kod yalamış yutmuş insan var birinden biri bilir herhalde.
ustalar üstadlar mod yazıp mod yapanlar şu küçük sorunu bi halledelim ya
Başa dön
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