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

Recent

Welcome to TinyPortal. Please login or sign up.

March 29, 2024, 04:55:51 AM

Login with username, password and session length
Members
Stats
  • Total Posts: 195,105
  • Total Topics: 21,213
  • Online today: 304
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 306
  • Total: 306

Got 404 on marquee.js

Started by smartmouse, August 04, 2021, 08:47:50 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

smartmouse

Hello,
I'm using TinyPortal 2.0.1 and I have a 404 error on my forum, referring to "/admin/tp-files/tp-plugins/javascript/jquery.marquee.js".

What is tp-plugins folder? I don't have it...
How to solve?

Thank you

@rjen

#1
Can you explain when you see the error message?

I assume the error is related to the scrolling effect on the shoutbox.
I see that the /tp-files/tp-plugins/ folder was removed with TP2.0.0.

There is also something funny with that function: it is supposed to stop scrolling with a mouse-over: that does not work atm...

You can edit the file: source/TPShout.php

Find:

    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">
            $j(document).ready(function(){
if ($j("marquee")) {
$j("marquee").marquee("tp_marquee").mouseover(function () {
$j(this).trigger("stop");
}).mouseout(function () {
$j(this).trigger("start");
});
});
}
        </script>';
    }


and change this to:


    if($context['TPortal']['shoutbox_usescroll'] > 0) {
        $context['html_headers'] .= '
        <script type="text/javascript" src="Themes/default/scripts/tinyportal/jquery.marquee.js"></script>
        <script type="text/javascript">
            $(document).ready(function(){
                $("marquee").marquee("tp_marquee").mouseover(function () {
                        $(this).trigger("stop");
                    }).mouseout(function () {
                        $(this).trigger("start");
                    });
                });
        </script>';
    }


But I would like to know where you exactly see that error...
Running Latest TP on SMF2.1 at: www.fjr-club.nl

tino

The error message will most likely be in the console log when you click on the networking tab.

I'd guess that's where it's being seen anyway.

@rjen

That's what I suspected, but checking that I do not get this error, hence the question
Running Latest TP on SMF2.1 at: www.fjr-club.nl

smartmouse

Quote from: @rjen on August 04, 2021, 07:37:06 PM
Can you explain when you see the error message?
In the network tab of DevTools:



QuoteI assume the error is related to the scrolling effect on the shoutbox.
I see that the /tp-files/tp-plugins/ folder was removed with TP2.0.0.
If it has been removed, why there is still reference to that file in TP 2.0.1?

QuoteThere is also something funny with that function: it is supposed to stop scrolling with a mouse-over: that does not work atm...
Maybe it is not working due a bug in the code:



Shouldn't it be like the following?

$j(document).ready(function(){
    if ($j("marquee")) {
$j("marquee").marquee("tp_marquee").mouseover(function () {
    $j(this).trigger("stop");
}).mouseout(function () {
    $j(this).trigger("start");
});
    }
});

@rjen

Quote from: smartmouse on August 04, 2021, 09:50:37 PM
In the network tab of DevTools:
Strange, I am not getting the 404..

QuoteIf it has been removed, why there is still reference to that file in TP 2.0.1?
That's a bug: the file was moved to another folder.

QuoteMaybe it is not working due a bug in the code:
Shouldn't it be like the following?

$j(document).ready(function(){
    if ($j("marquee")) {
$j("marquee").marquee("tp_marquee").mouseover(function () {
    $j(this).trigger("stop");
}).mouseout(function () {
    $j(this).trigger("start");
});
    }
});


Maybe, but you can just use the code I provided: that works as I have tested it.
That snippet comes from TP2.1.0, the code is cleaned up a bit...
Running Latest TP on SMF2.1 at: www.fjr-club.nl

smartmouse


smartmouse

I'm experiencing again the same error.

What could be wrong now?

@rjen

What TP version are you on now?
Running Latest TP on SMF2.1 at: www.fjr-club.nl

smartmouse


@rjen

Running Latest TP on SMF2.1 at: www.fjr-club.nl