TinyPortal

Development => Support => Topic started by: hvyhitter on July 21, 2007, 07:19:25 PM

Title: Moving Shoutbox Entry Box to the top
Post by: hvyhitter on July 21, 2007, 07:19:25 PM
I searched for a few things.. shoutbox entry box shoutbox reverse (came up with something else )

what i am wondering how to move that text entry box to the top of the shoutbox.. instead of at the bottom? I looked in the tpportal.php file.. but nothing obvious..

Also.. i am wondering if it is possible to put the timestamp IN the bar on the same line as the user name..

so it will says HvyHitter Today 11:08 am

instead of

hvyhitter
today 11:08am

it saves a line.. and makes it look cleaner.

Thoughts?
Title: Re: Moving Shoutbox Entry Box to the top
Post by: G6Cad on July 21, 2007, 07:22:17 PM
Reversed order of posts in the shoutbox
http://www.tinyportal.net/index.php?topic=5481.0
Title: Re: Moving Shoutbox Entry Box to the top
Post by: hvyhitter on July 21, 2007, 07:32:37 PM
no no no. i read THAT post.  i don't want to REVERSE the order of the posts.. i like that.. I want to put the shout box message entry box on the TOP.

you can check it out at www.hvyhitter.com my home page..

also i want to put the timestamp and username on the same line if possible.

is that possible.. from looking at the code.. (I think thats where it is..)  i dont see where it does either of those..

also this topic is VERY search engine friendly for this issue.
Title: Re: Moving Shoutbox Entry Box to the top
Post by: IchBin on July 21, 2007, 09:58:33 PM
If you put the time stamp on the same line as the user and the user has a username that is long it will probably look bad.

To change this open TPortal.php and find:

$shouts .='<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;">'

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

To put the input box on top find this code in TPortalBlocks.template.php:

       echo '
       <form  accept-charset="', $context['character_set'], '" class="smalltext" style="padding: 0; margin: 0; margin-top: 8px; text-align: center;" name="tp-shoutbox" action="'.$scripturl.'?action=tpmod;id=shout" method="post">';
       if(($context['TPortal']['guest_shout']) || (!$context['TPortal']['guest_shout'] && !$context['user']['is_guest'])){
             echo '<textarea class="smalltext" name="tp-shout" style="width: 80%;margin-top: 1ex; height: 50px;" wrap="auto"></textarea><br />';
          echo '<input style="margin-top: 4px;" class="smalltext" type="submit" name="shout_send" value="'.$txt['shout!'].'">';
}
       if($context['user']['is_guest'] && $context['TPortal']['guest_shout'])
             echo '<br /><input style="margin-top: 4px;" size="20" class="smalltext" type="text" name="tp-shout-name" value="'.$txt['tp-guest'].'">';
       else
             echo '<input type="hidden" name="tp-shout-name" value="'.$context['user']['name'].'">
             ';

       echo '<input name="tp-shout-url" type="hidden" value="'.htmlspecialchars($tp_where).'"><input type="hidden" name="sc" value="', $context['session_id'], '" />
       </form>';


Move it right before this code: (which is right above the code above.

if($context['TPortal']['shoutbox_usescroll']=='1')
Title: Re: Moving Shoutbox Entry Box to the top
Post by: hvyhitter on July 21, 2007, 10:32:14 PM
Wow.. seriously.. AWEsome.. You guys rock.. I havent made the change yet.. but I will right now! THANKS!
Title: Re: Moving Shoutbox Entry Box to the top
Post by: hvyhitter on July 21, 2007, 10:40:06 PM
update: Worked FLAWLESSLY.. Thank you very much..
Title: Re: Moving Shoutbox Entry Box to the top
Post by: IchBin on July 21, 2007, 10:48:52 PM
:up: Glad I could help.
Title: Re: Moving Shoutbox Entry Box to the top
Post by: bpdc_01 on September 15, 2007, 10:59:59 AM
Where can I find this tportal.php file and edit it? Thanks in advance.
Title: Re: Moving Shoutbox Entry Box to the top
Post by: Zetan on September 15, 2007, 11:21:53 AM
Off the top.. either in Sources, or the Default theme folder. Probably the Default theme folder.
Title: Re: Moving Shoutbox Entry Box to the top
Post by: G6Cad on September 15, 2007, 03:48:07 PM
/Sources/Tportal.php
Title: Re: Moving Shoutbox Entry Box to the top
Post by: Zetan on September 15, 2007, 04:23:42 PM
Quote from: G6 on September 15, 2007, 03:48:07 PM
/Sources/Tportal.php

Was close  ^-^
Title: Re: Moving Shoutbox Entry Box to the top
Post by: michalss on May 27, 2008, 05:22:15 AM
Quote from: G6 on September 15, 2007, 03:48:07 PM
/Sources/Tportal.php

Hi i can t find this line in Tportal.php
$shouts .='<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;">'

Im using TP 1.0.5b

pls help ????
Title: Re: Moving Shoutbox Entry Box to the top
Post by: IchBin on May 28, 2008, 12:21:34 AM
Probably because its moved files. Check TPBlocksLayout perhaps. Doesn't hurt to search the other files if you can't find it there either.
Title: Re: Moving Shoutbox Entry Box to the top
Post by: michalss on May 29, 2008, 04:10:45 AM
Quote from: IchBinâ,,¢ on May 28, 2008, 12:21:34 AM
Probably because its moved files. Check TPBlocksLayout perhaps. Doesn't hurt to search the other files if you can't find it there either.
Thank you a lot i found it in the /tp-files/tp-modules/TPShout/Sources/TPshout.php

But now how can i that frame for text make smaller just 1 line please ?
Title: Re: Moving Shoutbox Entry Box to the top
Post by: michalss on May 29, 2008, 07:08:13 PM
Quote from: michalss on May 29, 2008, 04:10:45 AM
Quote from: IchBinâ,,¢ on May 28, 2008, 12:21:34 AM
Probably because its moved files. Check TPBlocksLayout perhaps. Doesn't hurt to search the other files if you can't find it there either.
Thank you a lot i found it in the /tp-files/tp-modules/TPShout/Sources/TPshout.php

But now how can i that frame for text make smaller just 1 line please ?

I got it :)
Title: Re: Moving Shoutbox Entry Box to the top
Post by: IchBin on May 29, 2008, 07:22:35 PM
If you could find that code, I had no doubt you would figure it out. :)