TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 196,004
  • Total Topics: 21,330
  • Online today: 468
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 222
  • Total: 222

Moving Shoutbox Entry Box to the top

Started by hvyhitter, July 21, 2007, 07:19:25 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

hvyhitter

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?

G6Cad


hvyhitter

#2
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.

IchBin

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')

hvyhitter

Wow.. seriously.. AWEsome.. You guys rock.. I havent made the change yet.. but I will right now! THANKS!

hvyhitter

update: Worked FLAWLESSLY.. Thank you very much..

IchBin


bpdc_01

Where can I find this tportal.php file and edit it? Thanks in advance.

Zetan

Off the top.. either in Sources, or the Default theme folder. Probably the Default theme folder.

G6Cad


This website is proudly hosted on Crocweb Cloud Website Hosting.