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,021
  • Total Topics: 21,332
  • Online today: 744
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 245
  • Total: 245

Scrollable Recent Posts Block + Selfscrolling ShoutBox???

Started by misjka, January 09, 2006, 07:06:38 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Porky

I use to have something like that, but can't remember how to set it up.

elpvn

In TPortalBlocks.template.php file (in folder: Themes/default/) find code:

// TPortal shoutbox
function TPortal_shoutbox()
{
        global $context, $settings, $options, $scripturl, $txt, $modSettings;

        // Show the shoutbox, takes settings from tpadmin
       if(isset($context['TPortal']['querystring']))
             $tp_where=$context['TPortal']['querystring'];
       else
              $tp_where='';

       if(!isset($context['TPortal']['shoutbox']))
             $context['TPortal']['shoutbox']='';

       echo ' <table style="table-layout: fixed;" cellpadding="0" height="'.$context['TPortal']['shoutbox_height'].'" cellspacing="0" border="0" width="100%"><tr><td class="smalltext"><div style="height: '.$context['TPortal']['shoutbox_height'].'px; overflow: auto; width: 100%;">', $context['TPortal']['shoutbox'], '
       </div></td></tr></table><form style="margin-top: 8px; text-align: center;" class="smalltext" 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%; height: 50px;" wrap="off"></textarea><br /><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="'.$tp_where.'">
       </form>';
}


and replace with:

/ TPortal shoutbox
function TPortal_shoutbox()
{
        global $context, $settings, $options, $scripturl, $txt, $modSettings;

        // Show the shoutbox, takes settings from tpadmin
       if(isset($context['TPortal']['querystring']))
             $tp_where=$context['TPortal']['querystring'];
       else
              $tp_where='';

       if(!isset($context['TPortal']['shoutbox']))
             $context['TPortal']['shoutbox']='';

       echo ' <marquee  behavior="scroll" direction="up" height="100" scrolldelay="100" scrollamount="2" onmouseover="this.stop()" onmouseout="this.start()"><table style="table-layout: fixed;" cellpadding="0" height="'.$context['TPortal']['shoutbox_height'].'" cellspacing="0" border="0" width="100%"><tr><td class="smalltext"><div style="height: '.$context['TPortal']['shoutbox_height'].'px; width: 100%;">', $context['TPortal']['shoutbox'], '
       </div></td></tr></table></marquee><form style="margin-top: 8px; text-align: center;" class="smalltext" 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%; height: 50px;" type="text"></textarea><br /><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="'.$tp_where.'">
       </form>';
}


:)

whoesa

WOW

Thank you very much!

That was exactly what i was looking for  :)


misjka

I let my team mates vote if they would like it or not... Meanwhile, is there a URL where I might see what it looks like?

JDMhustle

Quote from: misjka on January 17, 2006, 06:11:28 PM
I let my team mates vote if they would like it or not... Meanwhile, is there a URL where I might see what it looks like?

Check my site: http://forum.sirfanaticsholland.com/index.php?action=forum

misjka

OK, thanks! Looks great!

Is there a way for the user to stop the autoscrolling and then activate manual scrolling up & down...? Have a look on www.sdra.se, then maybe you'll see what I mean?

JDMhustle

#17
EDIT:

Oopsie... did'nt read everything

I think Javascript has something like that... i tried to search for it but i can't seem to find it :-\

misjka


misjka

I haven't implemented this modification yet, since I was hit by a thought (yeah, well...):

- I want my shoutbox to move upwards, since that is the natural order of reading a line of text...
- I want the oldest (let's say I have 8 shouts "archived", then I want #1 to show up first of these) shout to show up first in line, not the latest...

Is this achievable in some way???

This website is proudly hosted on Crocweb Cloud Website Hosting.