Bravo List
Register
Go Back   > Bravo List > Source Code > Trackers > YSE
Reply
  #1  
Old 17-02-09, 23:48
marirds's Avatar
marirds marirds is offline
Member
 
Join Date: Feb 2009
P2P
Posts: 10
Default WYSIWYG and shoutbox
Can you guys help me tweak my shoutbox ? Look in the picture attached..
Thanks in advance
Attached Thumbnails
look.jpg  
Reply With Quote
  #2  
Old 21-02-09, 15:26
wMan's Avatar
wMan wMan is offline
Banned
 
Join Date: Feb 2008
P2P
Posts: 1,433
Default
tweak it how and maybe a bigger picture or even the code for us to help u
Reply With Quote
  #3  
Old 23-02-09, 01:58
marirds's Avatar
marirds marirds is offline
Member
 
Join Date: Feb 2009
P2P
Posts: 10
Default
Bigger picture... I don't have it .. that picture is from another tracker.
Tweak it ... wel... those button change text, like in the picture. If i press Bold button, i write with bold and sends bold to shoutbox, if i select red color, it writes with red color and send it to shoutbox. Here is my shoutbox.php
PHP Code:
<?php
require_once("include/bittorrent.php");

dbconn();
loggedinorreturn();
//maxsysop ();
//if ($CURUSER["chatpost"] == 'no')
//{
//echo "<center>Drepturile de a folosii shoutbox'u ti-au fost suspendate!<br><img src=\"pic/stop.gif\"<br><br><br><br></center>";

//exit;
//}

header("Content-Type: text/html; charset=UTF-8");


function 
decode_unicode_url$str )
{
$res '';

$i 0;

$max strlen$str ) - 6;

while ( 
$i <= $max )
{
$character $str[$i];

if ( 
$character == '%' && $str[$i 1] == 'u' )
{
$value hexdecsubstr$str$i 2) );

$i += 6;

if ( 
$value 0x0080 )
$character chr($value);
else
if (
$value 0x0800)
{
$character chr((($value 0x07c0) >> 6) | 0xc0) . chr(($value 0x3f) | 0x80);
}
else
{
$character chr((($value 0xf000) >> 12) | 0xe0) . chr((($value 0x0fc0) >> 6) | 0x80) . chr(($value 0x3f) | 0x80);
}
}
else
{
$i++;
}

$res .= $character;
}

return 
$res substr$str$i );
}

if ( 
$_GET["do"] == "shout" && $CURUSER["chatpost"] == 'yes' )
{
$shout iconv"UTF-8""UTF-8"urldecodedecode_unicode_url$_GET["shout"] ) ) );

if ( 
$shout == "/empty" && get_user_class() >= UC_MODERATOR )
{
mysql_query("TRUNCATE TABLE shoutbox");
$text "Shouts have been deleted !";
$date=time();
mysql_query("INSERT INTO shoutbox (id, userid, username, date, text) VALUES (NULL, " sqlesc('System') . ", " sqlesc('0') . ", $date, " sqlesc($text) . ")") or sqlerr(__FILE____LINE__);
write_logc("Shoutbox deleted by $CURUSER[username]","5");
die();
header("Refresh: 0; url=shoutbox.php");
}


$sender $CURUSER["id"];


if (!empty(
$shout))
{
$shout preg_replace("/\/me /"$CURUSER["username"]." "$shout);
mysql_query"INSERT INTO shoutbox (date, text, userid) VALUES (".implode(", "array_map("sqlesc", array(time(), $shout$sender))).")" );
}

}
else
{
/*
if ($_GET["do"] == "delete" && get_user_class() >= UC_MODERATOR  && is_valid_id($_GET["id"]))
{
$id = $_GET["id"];

mysql_query("DELETE FROM shoutbox WHERE id = $id") or sqlerr(__FILE__,__LINE__);
}
}*/
if($_GET['do']==='delete' && is_valid_id($_GET['id'])){
    
$id=0+$_GET['id'];
    
$tmp=mysql_query('SELECT `userid` FROM `shoutbox` WHERE `id`='.$id) or sqlerr(__FILE__,__LINE__);
    if(
mysql_num_rows($tmp)){
        
$owner=mysql_result($tmp,0);
        if(
$CURUSER['id']===$owner || $CURUSER['class']>=UC_MODERATOR)
            
$tmp=mysql_query('DELETE FROM `shoutbox` WHERE `id`='.$id) or sqlerr(__FILE__,__LINE__);
    }
}
}

$res mysql_query("SELECT * FROM shoutbox ORDER BY id DESC LIMIT 0, 30");

if ( 
mysql_num_rows$res ) == )
{
die( 
"All shouts have been deleted." );
}

while (
$arr mysql_fetch_array($res))
{
$user mysql_query("SELECT id, username, class, donor, warned FROM users WHERE id=$arr[userid]") or print(mysql_error());

$user mysql_fetch_array($user);

//$warn = $arr["warned"] == "yes";
if ($arr["warned"] == "yes"){
$warn "<img src=pic/warned8.gif alt=Warned title=Warned />";
}
if (
$arr["donor"] == "yes"){
$vip "<img src=pic/star.gif alt=VIP title=V.I.P. />";
}


$commentformat_comment$arr["text"] );

if( 
get_user_class() >= UC_MODERATOR || $user["id"] == $CURUSER["id"])
{
echo 
"<span onclick=\"deleteShout($arr[id]);\" style=\"cursor: pointer; color: red; font-weight: bold; \">X</span>";
}

echo 
"<font color=UC_USER>|".strftime("%H:%M",$arr["date"])."|</font>";
if( 
$user["username"] == NULL )
{
echo 
"<font class='UC_POWER_USER'>SYSTEM</font> :";
}
else
{
if(
$CURUSER["class"]<UC_ELITE)
echo 
"<a style='text-decoration:none' href=\"userdetails.php?id=$arr[userid]\"[".$arr["username"]."] ';return false;\"
><font class="
.clasa_useri($user['class']).">".$user["username"]."</font></a>$warn $vip : ";
else
echo 
"<a style='text-decoration:none' href=\"userdetails.php?id=$arr[userid]\"[".$arr["username"]."] ';return false;\"
><font class="
.get_class_id($user['class']).">".$user["username"]."</font></a>$warn $vip : ";
}

echo 
"$comment<br/>\n";
}

?>
Reply With Quote
Reply

Tags
shoutbox , wysiwyg

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
[FTS 1.1] Add Left, Center, Right to WYSIWYG Editor with buttos benjaminbih Mods & Themes 8 17-12-09 02:16
PM Shoutbox Tory Template Shares 1 28-11-09 16:16
Need a shoutbox on ySE pre 6 evaldas40 YSE 1 02-11-09 01:44
Wysiwyg in upload.php dapache Template Shares 0 01-08-09 22:38
Shoutbox ReNeJcEk Torrent Strike 8 16-07-08 22:51



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