Javascript Codes don't work

Go down

Solved Javascript Codes don't work

Post by SSYT on August 5th 2018, 10:15 am

Technical Details


Forum version : #ModernBB
Position : Administrator
Concerned browser(s) : Mozilla Firefox, Google Chrome, Internet Explorer, Opera, Safari, Other
Who the problem concerns : All members
When the problem appeared : Probleme is only javascript codes, don't work any codes, new don't work.
Forum link : https://www.depanatorul-tv.com

Description of problem

Hello, on my forum, i have 10 codes js, 3 don't execute, 6 month later work, today don't work, is a general problem? Or only my forum is problem?
And lot problem is localStorage codes dont work to save and read...


Last edited by SSYT on August 6th 2018, 9:07 am; edited 1 time in total
SSYT
SSYT
Forumember

Male Posts : 77
Reputation : 15
Language : RO-10, EN-3, FR-1
Location : Romania

View user profile http://help.forumgratuit.ro/forum

Back to top Go down

Solved Re: Javascript Codes don't work

Post by ChanelW on August 5th 2018, 10:32 am

Hi there @SSYT,

Could you please post the codes below, use the code tags please.

Are you sure you have JS codes activated? Could you also state the function of the code. Have the codes been working for 6 months and only just today they have stopped working?

Regards,
Chanel Smile
ChanelW
ChanelW
Forum Reviewer
Forum Reviewer

Female Posts : 199
Reputation : 29
Language : English
Location : United Kingdom

View user profile

Back to top Go down

Solved Re: Javascript Codes don't work

Post by SSYT on August 5th 2018, 11:00 am

Hello, this code does not work on forum, not executed.
Code:
$(function() {
    var points = null;
    var config = {
        forums: ["/f68-arhiva-softuri-statii-cb","/f86-akai","/f87-blaupunkt","/f88-grundig","/f89-jvc","/f90-lg","/f91-orion","/f92-panasonic","/f93-philips","/f94-samsung","/f95-sharp","/f96-sony","/f97-telefunken","/f98-toshiba","/f99-main-board-vestel","/f100-diverse","/f103-vortex","/f104-daewoo","/f105-thomson","/f107-acer","/f108-apple","/f109-asus","/f110-alienware","/f111-dell","/f112-fujitsu","/f113-hp","/f114-lenovo","/f115-msi","/f116-samsung","/f117-sony","/f118-toshiba","/f119-acer","/f120-alienware","/f121-apple","/f122-asus","/f123-dell","/f124-fujitsu","/f125-hp","/f126-lenovo","/f127-msi","/f128-samsung","/f129-sony","/f130-toshiba","/f131-diverse","/f132-diverse","/f155-aeg","/f156-ariston","/f157-beko","/f158-bosch","/f159-candy","/f160-daewoo","/f161-indesit","/f162-samsung","/f163-whirlpool","/f164-diverse","/f173-akai","/f174-beker","/f175-blaupunkt","/f176-jvc","/f177-kemwood","/f178-pionner","/f179-sony","/f180-diverse","/f181-akai","/f182-blaupunkt","/f183-diverse","/f184-grundig","/f185-lg","/f186-jvc","/f187-onkyo","/f188-philips","/f189-pionner","/f190-sharp","/f191-sony","/f192-yamaha","/f211-denon","/f212-denon","/f213-denon"],
        pTopic: ["\/post\?f=68&mode=newtopic","\/post\?f=86&mode=newtopic","\/post\?f=87&mode=newtopic","\/post\?f=88&mode=newtopic","\/post\?f=89&mode=newtopic","\/post\?f=90&mode=newtopic","\/post\?f=91&mode=newtopic","\/post\?f=92&mode=newtopic","\/post\?f=93&mode=newtopic","\/post\?f=94&mode=newtopic","\/post\?f=95&mode=newtopic","\/post\?f=96&mode=newtopic","\/post\?f=97&mode=newtopic","\/post\?f=98&mode=newtopic","\/post\?f=99&mode=newtopic","\/post\?f=100&mode=newtopic","\/post\?f=103&mode=newtopic","\/post\?f=104&mode=newtopic","\/post\?f=105&mode=newtopic","\/post\?f=107&mode=newtopic","\/post\?f=108&mode=newtopic","\/post\?f=109&mode=newtopic","\/post\?f=110&mode=newtopic","\/post\?f=111&mode=newtopic","\/post\?f=112&mode=newtopic","\/post\?f=113&mode=newtopic","\/post\?f=114&mode=newtopic","\/post\?f=115&mode=newtopic","\/post\?f=116&mode=newtopic","\/post\?f=117&mode=newtopic","\/post\?f=118&mode=newtopic","\/post\?f=119&mode=newtopic","\/post\?f=120&mode=newtopic","\/post\?f=121&mode=newtopic","\/post\?f=122&mode=newtopic","\/post\?f=123&mode=newtopic","\/post\?f=124&mode=newtopic","\/post\?f=125&mode=newtopic","\/post\?f=126&mode=newtopic","\/post\?f=127&mode=newtopic","\/post\?f=128&mode=newtopic","\/post\?f=129&mode=newtopic","\/post\?f=130&mode=newtopic","\/post\?f=131&mode=newtopic","\/post\?f=132&mode=newtopic","\/post\?f=155&mode=newtopic","\/post\?f=156&mode=newtopic","\/post\?f=157&mode=newtopic","\/post\?f=158&mode=newtopic","\/post\?f=159&mode=newtopic","\/post\?f=160&mode=newtopic","\/post\?f=161&mode=newtopic","\/post\?f=162&mode=newtopic","\/post\?f=163&mode=newtopic","\/post\?f=164&mode=newtopic","\/post\?f=173&mode=newtopic","\/post\?f=174&mode=newtopic","\/post\?f=175&mode=newtopic","\/post\?f=176&mode=newtopic","\/post\?f=177&mode=newtopic","\/post\?f=178&mode=newtopic","\/post\?f=179&mode=newtopic","\/post\?f=180&mode=newtopic","\/post\?f=181&mode=newtopic","\/post\?f=182&mode=newtopic","\/post\?f=183&mode=newtopic","\/post\?f=184&mode=newtopic","\/post\?f=185&mode=newtopic","\/post\?f=186&mode=newtopic","\/post\?f=187&mode=newtopic","\/post\?f=188&mode=newtopic","\/post\?f=189&mode=newtopic","\/post\?f=190&mode=newtopic","\/post\?f=191&mode=newtopic","\/post\?f=192&mode=newtopic","\/post\?f=211&mode=newtopic","\/post\?f=212&mode=newtopic","\/post\?f=213&mode=newtopic"],
        p_upload: 4,
        p_download: 2,
        field: "profile_field_10_1"
    };

    var getUserPoints = function(userid, callback) {
        if(_userdata.session_logged_in == 0) return;
        $.ajax({
            type: "GET",
            url: "/u" + userid,
            async: false,
            success: callback,
            error: function(xhr, status, error) {
                var err = eval("(" + xhr.responseText + ")");
                alert(error.Message);
            }
        });
    };

    var setUserPoints = function(userid, pointsT, callback) {
        if(_userdata.session_logged_in == 0) return;
        $.post("/ajax_profile.forum?jsoncallback=jQuery1", {
            id: "1",
            user: userid,
            active: "1",
            content: '[["profile_field_10_1", "'+ parseInt(pointsT) +'"]]'
        }, "json").done(callback);
    };

    /* Check forum url on new topic */
    var topicNou = null;
    for(var y = 0; y < config.pTopic.length; y++) {
        if(window.location.href.search(new RegExp(config.pTopic[i], "ig")) !== -1) {
            topicNou = config.pTopic[i];
            break;
        }
    }
   
    if(topicNou !== null) {
        $('input[name="post"]').click(function() {
            my_setcookie('cbHTy_Yh', 1);
        });
    }

    var FLink = $('.sub-header-path:eq(0) a.nav:last').attr('href'), checkForum = null;
   
    for(var i = 0; i < config.forums.length; i++) {
        if(new RegExp(config.forums[i], 'gi').test(FLink)) {
            checkForum = config.forums[i];
        } else { return false; }
    }
   
    if(checkForum !== null) {
        $(".post #download-link a").click(function(e) {
            var $t = $(this);
            e.preventDefault();
            console.log('try');
            getUserPoints(_userdata.user_id, function(data) {
                points = $('#field_id1 dd', data).text();
                 console.log('execute points');
                if(points < 2) return;
                if(points >= 2) {
                    setUserPoints(_userdata.user_id, parseInt(points)-2, function(data) {
                        window.open(($t.attr('data-link') != null) ? $t.attr('data-link') : $t.attr('data-href'), '_blank');
                    });
                }
            });
        });
    }

    console.log("System has been executed sucessfully.");
});
SSYT
SSYT
Forumember

Male Posts : 77
Reputation : 15
Language : RO-10, EN-3, FR-1
Location : Romania

View user profile http://help.forumgratuit.ro/forum

Back to top Go down

Solved Re: Javascript Codes don't work

Post by ChanelW on August 5th 2018, 11:11 am

JavaScript is activated, yes? What does this piece of code do so that I can take look at your forum incase it's an issue on your end.

Regards,
Chanel Smile


ModernBB - Javascript Codes don't work Chanel10
______ | What are sticker points?| ________
ChanelW
ChanelW
Forum Reviewer
Forum Reviewer

Female Posts : 199
Reputation : 29
Language : English
Location : United Kingdom

View user profile

Back to top Go down

Solved Re: Javascript Codes don't work

Post by SSYT on August 5th 2018, 11:17 am

Yeah, javascript it's enabled, problem is code does not executed .
SSYT
SSYT
Forumember

Male Posts : 77
Reputation : 15
Language : RO-10, EN-3, FR-1
Location : Romania

View user profile http://help.forumgratuit.ro/forum

Back to top Go down

Solved Re: Javascript Codes don't work

Post by ChanelW on August 5th 2018, 11:35 am

Where did you get the code from? It worked before, did you make any changes to the code recently?

Regards,
Chanel Smile


ModernBB - Javascript Codes don't work Chanel10
______ | What are sticker points?| ________
ChanelW
ChanelW
Forum Reviewer
Forum Reviewer

Female Posts : 199
Reputation : 29
Language : English
Location : United Kingdom

View user profile

Back to top Go down

Solved Re: Javascript Codes don't work

Post by SSYT on August 5th 2018, 11:47 am

The code went up to 2 days ago, for 6 months I had no problems with JS codes, but now it only runs what she wants, I'm having problems with it.
SSYT
SSYT
Forumember

Male Posts : 77
Reputation : 15
Language : RO-10, EN-3, FR-1
Location : Romania

View user profile http://help.forumgratuit.ro/forum

Back to top Go down

Solved Re: Javascript Codes don't work

Post by ChanelW on August 5th 2018, 12:04 pm

Sounds like an issue with the code. I'm sure someone will be able to help you with the code. Unfortunately, I'm not very good at JavaScript Razz

Regards,
Chanel Smile


ModernBB - Javascript Codes don't work Chanel10
______ | What are sticker points?| ________
ChanelW
ChanelW
Forum Reviewer
Forum Reviewer

Female Posts : 199
Reputation : 29
Language : English
Location : United Kingdom

View user profile

Back to top Go down

Solved Re: Javascript Codes don't work

Post by brandon_g on August 5th 2018, 2:14 pm

Hello,

Did you add the only topic to the title @SSYT ? If so only staff mwmbers are allowed to make only topics.

As for your issue? Do any of your javascripts work? Or do they all not work?
brandon_g
brandon_g
Manager
Manager

Male Posts : 9165
Reputation : 842
Language : English
Location : USA

View user profile https://www.broadcastingduo.com

Back to top Go down

Solved Re: Javascript Codes don't work

Post by Jadster on August 5th 2018, 5:48 pm

There is the possibility that some of your JS codes are conflicting with one another. I would recommend disabling all of them and enabling them one at a time to see if any of them start having issues when others are added to it. That was we can see what might be causing the issue.

Regards,
James
Jadster
Jadster
Helper
Helper

Male Posts : 656
Reputation : 69
Language : English
Location : Omaha, NE

View user profile https://ygoduelists.forumotion.com

Back to top Go down

Solved Re: Javascript Codes don't work

Post by SarkZKalie on August 5th 2018, 6:05 pm

In case your site cache didn't clear, turn JS off and re-synchronize your site. Sometime my main script (thing works in all the page) may conflicted itself, so I had to delete and re-uploaded it. Sometime this trick works, sometime don't.


ModernBB - Javascript Codes don't work Sarkzk10
SarkZKalie
SarkZKalie
Support Moderator
Support Moderator

Male Posts : 1146
Reputation : 185
Language : English

View user profile https://www.rotavn.xyz/

Back to top Go down

Solved Re: Javascript Codes don't work

Post by Draxion on August 7th 2018, 1:13 am

@SSYT, I see you marked this topic as solved. Can I go ahead and assume it is so?


NEVER provide your founder's account or email
Please provide forum's URL when dealing with design and appearance issues
Don't forget to mark the topic as ModernBB - Javascript Codes don't work Solved11 when the issue is resolved. This helps the staff greatly.
PM Support is prohibited!
TOS | General Rules | FAQ | Tricks & Tips | Latest Updates | Introduce Yourself

ModernBB - Javascript Codes don't work Draxio14
Draxion
Draxion
Support Moderator
Support Moderator

Male Posts : 2440
Reputation : 311
Language : English
Location : USA

View user profile https://www.talesoftellene.com/

Back to top Go down

Solved Re: Javascript Codes don't work

Post by APE on August 7th 2018, 10:37 pm

Problem solved & topic archived.
Please read our forum rules:  ESF General Rules


ModernBB - Javascript Codes don't work Left1212ModernBB - Javascript Codes don't work Center11ModernBB - Javascript Codes don't work Right112
ModernBB - Javascript Codes don't work Ape_b110
ModernBB - Javascript Codes don't work Ssshfm13
ModernBB - Javascript Codes don't work Ape1010
APE
APE
Administrator
Administrator

Male Posts : 15552
Reputation : 1673
Language : fluent in dork / mumbojumbo & English haha

View user profile http://chatworld.forumotion.co.uk/

Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum