Skip to content

Commit

Permalink
Merge pull request #863 from Bopske/master
Browse files Browse the repository at this point in the history
Fix for scrolling in shoutbox
  • Loading branch information
Bopske authored Aug 5, 2021
2 parents 8382054 + 0758eff commit fec54f2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions Sources/TPShout.php
Original file line number Diff line number Diff line change
Expand Up @@ -821,13 +821,13 @@ function TPShoutBlock(&$row) {{{

if($context['TPortal']['shoutbox_usescroll'] > 0) {
$context['html_headers'] .= '
<script type="text/javascript" src="tp-files/tp-plugins/javascript/jquery.marquee.js"></script>
<script type="text/javascript" src="Themes/default/scripts/tinyportal/jquery.marquee.js"></script>
<script type="text/javascript">
$j(document).ready(function(){
$j("marquee").marquee("tp_marquee").mouseover(function () {
$j(this).trigger("stop");
$(document).ready(function(){
$("marquee").marquee("tp_marquee").mouseover(function () {
$(this).trigger("stop");
}).mouseout(function () {
$j(this).trigger("start");
$(this).trigger("start");
});
});
</script>';
Expand Down
2 changes: 1 addition & 1 deletion Themes/default/TPShout.template.php
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ function template_tpshout_shoutblock( $shoutbox_id = 0, $shoutbox_layout = null

if($context['TPortal']['shoutbox_usescroll'] > '0') {
echo '
<marquee id="tp_marquee_' . $shoutbox_id . '" behavior="scroll" direction="down" scrollamount="'. $context['TPortal']['shoutbox_scrollduration'] . '" height="'. $context['TPortal']['shoutbox_height'] . '">
<marquee id="tp_marquee_' . $shoutbox_id . '" behavior="scroll" direction="down" scrollamount="'. ($context['TPortal']['shoutbox_scrollduration'] / 2) . '" height="'. $context['TPortal']['shoutbox_height'] . '">
<div class="tp_shoutframe tp_shoutframe_'.$shoutbox_id.'">'.$context['TPortal']['shoutbox'].'</div>
</marquee>';
}
Expand Down

0 comments on commit fec54f2

Please sign in to comment.