TinyPortal

Development => Support => Topic started by: michalss on May 27, 2008, 03:53:56 AM

Title: TP and Simple TP shoutbox question !!!
Post by: michalss on May 27, 2008, 03:53:56 AM
hi all members i was hoping you can help me with mod my tp shoutbox. I would like to put the name date and message  next each other like on the picture. Is it possible or not.

Or name and date put next each other and text under it
Or make frame for text make it smaller mabee just 1 line.

I would like to do it coz its too messy like that and you can hadly see 2 messages..

(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fimg144.imageshack.us%2Fimg144%2F9459%2Fshoutboxmq6.jpg&hash=0ec1e610169f87cc21a956ce0c852875b5413383)

Thx a lot for any help.
Title: Re: TP and Simple TP shoutbox question !!!
Post by: IchBin on May 27, 2008, 04:06:25 AM
I think this has posted before. Did you use the search?
Title: Re: TP and Simple TP shoutbox question !!!
Post by: michalss on May 27, 2008, 10:12:16 PM
Anyone help pls. I was able to found lot of topics about this problem but not even 1 how to change new one TP 105b shoutbox. Please help.... thx
Title: Re: TP and Simple TP shoutbox question !!!
Post by: chaotix on December 10, 2008, 01:20:13 PM
Does anyone have an answer to this question I tried searching but the only other thread i found similar to this was also unanswered.  I'd like the datetimestamp, followed by username then message all on the same line.  Which files should i modify or is there already a solution for this?  Thanks in advance.

SMF 1.1.7
TP v1.06
http://www.the-xclan.com/forums
Mod Name Version 
1. TinyPortal 1.063     
2. Treasury 2.31   
3. Aeva ~ Auto-Embed Video & Audio 5.0 b1 
Title: Re: TP and Simple TP shoutbox question !!!
Post by: G6Cad on December 10, 2008, 02:01:15 PM
IMHO not even worth the troubble right now, Bloc have rewritten the shoutbox for the next release, so spend time making changes in this version is not worth it  :P
Title: Re: TP and Simple TP shoutbox question !!!
Post by: chaotix on December 10, 2008, 03:35:42 PM
OH well I went through the code and found this works :) thought id post it if anyone else needs it :D
PS i only have the shoutbox on my frontpage and havent dont much testing with it yet so use at own risk!

In file tp-files>tp-modules>TPShout>Sources>TPShout.php

Find this bit of code:

// don't fetch more than a hundred - save the poor server! :D

if($limit>100) $limit=100;

$request = db_query("SELECT * FROM {$tp_prefix}shoutbox WHERE value7=0 ORDER BY value2 DESC LIMIT $limit", __FILE__, __LINE__);

if (mysql_num_rows($request) > 0)

{

$nshouts= $txt['tp-last'].' '.$limit.' '.$txt['tp-shouts'].'<hr />';



while($row = mysql_fetch_assoc($request))

{

$nshouts .='<div style="margin: 4px;"><div style="border: dotted 1px; padding: 2px 4px 2px 4px;" class="windowbg2"><b>'.$row['value3'].'</b></div><div style="padding: 2px;"> '.timeformat($row['value2']).'</div><div style="padding: 4px;">';

$myshout='';
$myshout=$row['value1'];

$nshouts .= doUBBC(censorText($myshout));

$nshouts .= '</div></div>';

}


You need to change the code on this line:

$nshouts .='<div style="margin: 4px;"><div style="border: dotted 1px; padding: 2px 4px 2px 4px;" class="windowbg2"><b>'.$row['value3'].'</b></div><div style="padding: 2px;"> '.timeformat($row['value2']).'</div><div style="padding: 4px;">';

I changed mines to this to display the dateandtime then username and then shout all on the same line:

$nshouts .='<div style="margin: 4px;"><div style="border: dotted 0px; padding: 2px 4px 2px 4px;" class="windowbg2">'.timeformat($row['value2']).' <b>'.$row['value3'].':</b>&gt; ';