Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > Torrent Strike
Reply
  #1  
Old 14th July 2008, 21:56
ReNeJcEk ReNeJcEk is offline
Senior Member
 
Join Date: Jul 2008
Posts: 23
Default Shoutbox
I dont get it :S on Internet Explorer is background white... but in firefox is background black.. so then is text not visibile beacuse my text is black... and i cant find in shoutbox.php which color i must replace.. pls help..
Any other ideas?
Tnx
Reply With Quote
  #2  
Old 14th July 2008, 23:30
djlee's Avatar
djlee djlee is offline
Senior Member
 
Join Date: Mar 2008
Posts: 183
Default Re: Shoutbox
post your shoutbox.php :)
Reply With Quote
  #3  
Old 14th July 2008, 23:38
ReNeJcEk ReNeJcEk is offline
Senior Member
 
Join Date: Jul 2008
Posts: 23
Default Re: Shoutbox
Code:
<?
/*****************************

Hannes' ShoutBox v1.0

*****************************/

require_once("include/bittorrent.php");
dbconn(false);

loggedinorreturn();

//deleting messages

if (isset($_GET['del']))
{
if (is_numeric($_GET['del']))
{
$query = "SELECT * FROM shoutbox WHERE id=".$_GET['del'];
$result = mysql_query($query);
}
else {echo "invalid msg id STOP TRYING TO INJECT SQL TIT HEAD";exit;
}

$row = mysql_fetch_row($result);

if ( (get_user_class() >= UC_MODERATOR) )
{
$query = "DELETE FROM shoutbox WHERE id=".$_GET['del'];
mysql_query($query);
}
}
// EDIT SHOUT ?
if (isset($_GET['edit']) && get_user_class() >= UC_MODERATOR && is_valid_id($_GET['edit']))
{	
	$sql=sql_query("SELECT id,text FROM shoutbox WHERE id=".sqlesc($_GET['edit']));
	$res=mysql_fetch_array($sql);
	?>
	<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
	<html xmlns="http://www.w3.org/1999/xhtml">
	<meta http-equiv="Pragma" content="no-cache">
	<meta http-equiv="expires" content="0">
	<head profile="http://gmpg.org/xfn/11">
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<style type="text/css">
	#specialbox{
	border: 1px solid gray;
	width: 600px;
	background: #FBFCFA;
	font: 11px verdana, sans-serif;
	color: #dfa416;
	padding: 3px;	outline: none;
	}

	#specialbox:focus{
	border: 1px solid black;
	}
	.btn {
	cursor:pointer;
	border:outset 1px #ccc;
	background:#999;
	color:#666;
	font-weight:bold;
	padding: 1px 2px;
	background:url(pic/formbg.gif) repeat-x left top;
	}	
	</style>
	</head>
	<body bgcolor=#c2c1b8>
	<?php
	echo '<form method=post action=shoutbox.php>';
	echo '<input type=hidden name=id value='.(int)$res['id'].'>';
	echo '<textarea name=text rows=3 id=specialbox>'.htmlspecialchars($res['text']).'</textarea>';
	echo '<input type=submit name=save value=save class=btn>';
	echo '</form></body></html>';
	die;
}
// UPDATE SHOUT?
if (isset($_POST['text']) && get_user_class() >= UC_MODERATOR && is_valid_id($_POST['id']))
{
	$text = trim($_POST['text']);
	$id = (int)$_POST['id'];
	if (isset($text) && isset($id) && is_valid_id($id))
		sql_query("UPDATE shoutbox SET text = ".sqlesc($text)." WHERE id=".sqlesc($id));
}

?>
<html><head>
<title>Klepetalnica</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874">
<meta http-equiv="Content-Type" content="text/html; charset=TIS-602">
<META HTTP-EQUIV=REFRESH CONTENT="1000; URL=shoutbox.php">
<style type="text/css">
A {color: #dfa416; font-weight: bold; }
A:hover {color: #FF0000;}
.small {font-size: 9pt; font-family: tahoma; }
.date {font-size: 9pt;}
</style>
</head>
<body>
<?

/*
if ($CURUSER["chatpost"] == 'no')
{
print("<h2>
<center>You are banned.</center></h2>");
exit;
}
else
{
*/

if($_GET["sent"]=="yes")
{
$userid=$CURUSER["id"];
$username=$CURUSER["username"];
$date=time();
$text=trim($_GET["shbox_text"]);

mysql_query("INSERT INTO shoutbox (id, userid, username, date, text) VALUES ('id'," . sqlesc($userid) . ", " . sqlesc($username) . ", $date, " . sqlesc($text) . ")") or sqlerr(__FILE__, __LINE__);
}

$res = mysql_query("SELECT * FROM shoutbox ORDER BY date DESC LIMIT 35") or sqlerr(__FILE__, __LINE__);
if (mysql_num_rows($res) == 0)
print("\n");
else
{
print("<table border=0 cellspacing=0 cellpadding=2 width='100%' align='left' class='small'>\n");

while ($arr = mysql_fetch_assoc($res))
{
$res2 = mysql_query("SELECT username,class,avatar,donor, title,enabled,warned FROM users WHERE id=$arr[userid]") or sqlerr(__FILE__, __LINE__);
$arr2 = mysql_fetch_assoc($res2);
$resowner = mysql_query("SELECT id, username, class FROM users WHERE id=$arr[userid]") or print(mysql_error());
$rowowner = mysql_fetch_array($resowner);


if ($rowowner["class"] == "96")
$usercolor= "<font color=#FF0000>" .htmlspecialchars($rowowner["username"]). "</font>";
elseif ($rowowner["class"] == "80")
$usercolor= "<font color=#666699>" .htmlspecialchars($rowowner["username"]). "</font>";
elseif ($rowowner["class"] == "64")
$usercolor= "<font color=#9900cc>" .htmlspecialchars($rowowner["username"]). "</font>";
elseif ($rowowner["class"] == "48")
$usercolor= "<font color=#0099FF>" .htmlspecialchars($rowowner["username"]). "</font>";
elseif ($rowowner["class"] == "32")
$usercolor= "<font color=#92929e>" .htmlspecialchars($rowowner["username"]). "</font>";
elseif ($rowowner["class"] == "16")
$usercolor= "<font color=#339933>" .htmlspecialchars($rowowner["username"]). "</font>";
elseif ($rowowner["class"] == "0")
$usercolor= "<font color=#dfa416>" .htmlspecialchars($rowowner["username"]). "</font>";

if (get_user_class() >= UC_MODERATOR) {
$del="[<a href=./shoutbox.php?del=".$arr[id].">Izbrisi</a>]";
$edit="<span class='date'>[<a href=shoutbox.php?edit=".$arr[id].">Uredi</a>]</span>\n";
}
$pm = "<span class='date'>[<a target=_blank href=sendmessage.php?receiver=$arr[userid]>Pm</a>]</span>\n";
print("<tr><td><font color=gray>|<span class='date'>".strftime("%H:%M",$arr["date"])."|</font>
$del$edit$pm <a href='userdetails.php?id=".$arr["userid"]."' target='_blank'> 
</span>
$usercolor" .
($arr2["donor"] == "yes" ? "[img].[/img]" : "") .
($arr2["class"] == "96" ? "[img].[/img]" : "") .
($arr2["class"] == "80" ? "[img].[/img]" : "") .
($arr2["class"] == "64" ? "[img].[/img]" : "") .
($arr2["class"] == "48" ? "[img].[/img]" : "") .
($arr2["class"] == "32" ? "[img].[/img]" : "") .
($arr2["class"] == "16" ? "[img].[/img]" : "") .
($arr2["class"] == "0" ? "[img].[/img]" : "") .
($arr2["warned"] == "yes" ? "[img].[/img]" : "") .
" ".format_comment($arr["text"])."
</td></tr>\n");
}
print("</table>");


}


?>
</body>
</html>
Reply With Quote
  #4  
Old 15th July 2008, 01:15
djlee's Avatar
djlee djlee is offline
Senior Member
 
Join Date: Mar 2008
Posts: 183
Default Re: Shoutbox
find around line 93
Code:
<style type="text/css">
A {color: #dfa416; font-weight: bold; }
A:hover {color: #FF0000;}
.small {font-size: 9pt; font-family: tahoma; }
.date {font-size: 9pt;}
</style>
change to
Code:
<style type="text/css">
body { background-color: #FFFFFF; color: #000000; }
A {color: #dfa416; font-weight: bold; }
A:hover {color: #FF0000;}
.small {font-size: 9pt; font-family: tahoma; }
.date {font-size: 9pt;}
</style>
ive added the body tag to the style ... the #FFFFFF value of background color sets the back color to white (FFFFFF=white) and the attribute color sets the text color which ive set as black (000000=black). Hopefully that will stop the browser making its own mind up.

If that dont work post a screen pic of both an IE view and a firefox view of the shoutbox
Reply With Quote
  #5  
Old 15th July 2008, 01:36
ReNeJcEk ReNeJcEk is offline
Senior Member
 
Join Date: Jul 2008
Posts: 23
Default Re: Shoutbox
Ive try it ..but it doesnt work :(


Last edited by ReNeJcEk; 22nd August 2008 at 15:28.
Reply With Quote
  #6  
Old 15th July 2008, 02:15
djlee's Avatar
djlee djlee is offline
Senior Member
 
Join Date: Mar 2008
Posts: 183
Default Re: Shoutbox
hmm now u got me ... can i suggest posting the page which displays the shoutbox (usually index.php)
Reply With Quote
  #7  
Old 15th July 2008, 04:24
ReNeJcEk ReNeJcEk is offline
Senior Member
 
Join Date: Jul 2008
Posts: 23
Default Re: Shoutbox
Code:
//--></SCRIPT>
<?begin_frame("Klepetalnica",true,5);?>
<iframe src='./shoutbox.php' width='100%' height='200' align='center' frameborder='0' name='sbox' marginwidth='0' marginheight='0'></iframe>


<form action='./shoutbox.php' method='get' target='sbox' name='shbox' onSubmit="mySubmit()">
<p align="center">Sporocilo: <input type='text' name='shbox_text' size='80'> <input type='submit' value=' Poslji sporocilo'>
<input type='hidden' name='sent' value='yes'>

<center><font size="1">Osvezi<span class="smallfont"></center>
<center><img border=0 src=pic/smilies/smile1.gif>
<img border=0 src=pic/smilies/smile2.gif>
<img border=0 src=pic/smilies/grin.gif>
<img src=pic/smilies/evo.gif width="18" height="18" border=0>
<img border=0 src=pic/smilies/noexpression.gif>
<img border=0 src=pic/smilies/confused.gif>
<img border=0 src=pic/smilies/sad.gif>
<img src=pic/smilies/weep.gif width="18" height="18" border=0>
<img src=pic/smilies/ohmy.gif border=0>
<img src=pic/smilies/cool1.gif width="18" height="18" border=0>
<img src=pic/smilies/yawn.gif width="18" height="18" border=0>
<img src=pic/smilies/sly.gif width="18" height="18" border=0>
<img src=pic/smilies/greedy.gif width="18" height="18" border=0>
<img src=pic/smilies/weirdo.gif width="18" height="18" border=0>
<img src=pic/smilies/sneaky.gif width="18" height="18" border=0>
<img src=pic/smilies/kiss.gif width="18" height="18" border=0>
<img src=pic/smilies/geek.gif width="18" height="18" border=0>
<img src=pic/smilies/evil.gif width="18" height="18" border=0>
<img src=pic/smilies/yucky.gif width="18" height="18" border=0>
<img src=pic/smilies/shit.gif width="18" height="18" border=0>
<img src=pic/smilies/question.gif width="18" height="18" border=0>
<img src=pic/smilies/idea.gif width="18" height="18" border=0></center>
</td></form>
<?end_frame();?>
Reply With Quote
  #8  
Old 15th July 2008, 15:59
djlee's Avatar
djlee djlee is offline
Senior Member
 
Join Date: Mar 2008
Posts: 183
Default Re: Shoutbox
ok now u got me ... i cant see nothing wrong with any of it ... all i can suggest is try using a default shoutbox.php from the latest source package and see what happens .. or u can wait for someone that has used torrentstrike before to come along and help.. sorry dude :P
Reply With Quote
  #9  
Old 16th July 2008, 22:51
allroms allroms is offline
Member
 
Join Date: May 2008
Posts: 13
Default Re: Shoutbox
@ shoutbox you have to change this part :
(background-color) @ line = ~50

Code:
<STYLE>BODY {
background-color: #ffffff;
SCROLLBAR-3DLIGHT-COLOR: #004E98;
SCROLLBAR-ARROW-COLOR: #004E98;
SCROLLBAR-DARKSHADOW-COLOR: black;
SCROLLBAR-BASE-COLOR: black;
}
</STYLE>
Reply With Quote
Reply

Tags
shoutbox

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PM Shoutbox Tory Template Shares 1 28th November 2009 16:16
Need a shoutbox on ySE pre 6 evaldas40 Yuna Scatari Edition (YSE) 1 2nd November 2009 01:44
Shoutbox.php makaka123 Yuna Scatari Edition (YSE) 0 25th July 2009 18:32
E/D Shoutbox Verix Template Shares 0 22nd May 2009 04:40
Mod shoutbox Edgein Mods & Themes 2 3rd March 2009 20:46



All times are GMT +2. The time now is 13:28. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.