JavaScript good for PHPBB 2 does not work with PHPBB 3 Hitskin_logo Hitskin.com

This is a Hitskin.com skin preview
Install the skinReturn to the skin page

The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.
3 posters

    JavaScript good for PHPBB 2 does not work with PHPBB 3

    HrvojeP
    HrvojeP
    Forumember


    Male Posts : 161
    Reputation : 2
    Language : Croatian, English
    Location : Croatia

    JavaScript good for PHPBB 2 does not work with PHPBB 3 Empty JavaScript good for PHPBB 2 does not work with PHPBB 3

    Post by HrvojeP February 22nd 2015, 9:06 pm

    Technical Details

    Forum version : phpBB3
    Position : Founder
    Concerned browser(s) : Mozilla Firefox
    Who the problem concerns : Yourself
    When the problem appeared : When comparing forum versions PHPBB3 and PHPBB2
    Forum link : http://drvenibrodovi.forumotion.eu/

    Description of problem

    I noticed that JavaScript working fine on PHPBB 2 does not work on PHPBB 3. What is the reason of this incompatibility?

    The code in question is:
    Code:
    $(function(){
          $('.bodyline #page-body:has(#i_reply[alt*="zaključan"]), #main-content:has(.i_reply[alt*="zaključan"])').prepend('<div class="topic-warning-block" align="center">Tema je zaključana, ne može se više mjenjati.</div>');
        });

    It is applied to denote locked topic. Word "zaključan" means "locked" in my native language.

    There is CSS code with this JavaScript code:
    Code:
    /* Locked topic */
        .topic-warning-block {
          border: 1px solid;
          margin: 10px 0px;
          padding: 15px 10px 15px 50px;
          background-repeat: no-repeat;
          background-position: 10px center;
          background-image: url(http://1.bp.blogspot.com/_5rlxf3T9Z9U/SsIXuytpYfI/AAAAAAAADcI/I4Tm0W5gDQk/lock_32.png);
          color: #750000 !important;
          background-color: #D26067;
          -webkit-border-radius: 10px;
          -moz-border-radius: 10px;
          border-radius: 10px;
          text-align: center;
          font-weight: bold;
          font-size: 18px;
          text-shadow: 1px 1px 1px #AAA;
        }

    Why is necessary to introduce this kind of incompatibility in so fraternal forum versions?


    Last edited by HrvojeP on February 23rd 2015, 12:01 am; edited 1 time in total
    _Twisted_Mods_
    _Twisted_Mods_
    Helper
    Helper


    Male Posts : 2108
    Reputation : 336
    Language : English
    Location : Ms

    JavaScript good for PHPBB 2 does not work with PHPBB 3 Empty Re: JavaScript good for PHPBB 2 does not work with PHPBB 3

    Post by _Twisted_Mods_ February 22nd 2015, 10:01 pm

    the issue is when you switch versions or theme's your css gets deleted .. you will need to re add your css for the warning message
    HrvojeP
    HrvojeP
    Forumember


    Male Posts : 161
    Reputation : 2
    Language : Croatian, English
    Location : Croatia

    JavaScript good for PHPBB 2 does not work with PHPBB 3 Empty Re: JavaScript good for PHPBB 2 does not work with PHPBB 3

    Post by HrvojeP February 22nd 2015, 10:10 pm

    _Twisted_Mods_ wrote:the issue is when you switch versions or theme's your css gets deleted .. you will need to re add your css for the warning message
    I have, another, experimental forum where I test solutions. You are now on my "real" forum. I do not change version, skin or something else on "real" forum. I only add new JavaScript and CSS.
    _Twisted_Mods_
    _Twisted_Mods_
    Helper
    Helper


    Male Posts : 2108
    Reputation : 336
    Language : English
    Location : Ms

    JavaScript good for PHPBB 2 does not work with PHPBB 3 Empty Re: JavaScript good for PHPBB 2 does not work with PHPBB 3

    Post by _Twisted_Mods_ February 22nd 2015, 10:20 pm

    oh then i will need your test forum and a login to see what the issue is there
    HrvojeP
    HrvojeP
    Forumember


    Male Posts : 161
    Reputation : 2
    Language : Croatian, English
    Location : Croatia

    JavaScript good for PHPBB 2 does not work with PHPBB 3 Empty Re: JavaScript good for PHPBB 2 does not work with PHPBB 3

    Post by HrvojeP February 22nd 2015, 10:24 pm

    Actually this is my grand daughter's forum. Twisted Evil 

    Test forum

    Here is locked topic Locked

    Account data are coming via PM.

    P.S. On test forum everything works fine.
    _Twisted_Mods_
    _Twisted_Mods_
    Helper
    Helper


    Male Posts : 2108
    Reputation : 336
    Language : English
    Location : Ms

    JavaScript good for PHPBB 2 does not work with PHPBB 3 Empty Re: JavaScript good for PHPBB 2 does not work with PHPBB 3

    Post by _Twisted_Mods_ February 23rd 2015, 12:15 am

    it works fine i see the message right on top .. try clearing your browser cache and history
    HrvojeP
    HrvojeP
    Forumember


    Male Posts : 161
    Reputation : 2
    Language : Croatian, English
    Location : Croatia

    JavaScript good for PHPBB 2 does not work with PHPBB 3 Empty Re: JavaScript good for PHPBB 2 does not work with PHPBB 3

    Post by HrvojeP February 23rd 2015, 2:09 am

    On my forum (PHPBB 3) I see the message like this:
    JavaScript good for PHPBB 2 does not work with PHPBB 3 2r4lrvn

    But I want the message like this one on PHPBB 2 forum (experimental forum):
    JavaScript good for PHPBB 2 does not work with PHPBB 3 Ossuir
    I cleaned the browser cash and history. JavaScript and CSS code are the same.
    _Twisted_Mods_
    _Twisted_Mods_
    Helper
    Helper


    Male Posts : 2108
    Reputation : 336
    Language : English
    Location : Ms

    JavaScript good for PHPBB 2 does not work with PHPBB 3 Empty Re: JavaScript good for PHPBB 2 does not work with PHPBB 3

    Post by _Twisted_Mods_ February 23rd 2015, 2:47 am

    make sure you have the css
    SLGray
    SLGray
    Administrator
    Administrator


    Male Posts : 51553
    Reputation : 3519
    Language : English
    Location : United States

    JavaScript good for PHPBB 2 does not work with PHPBB 3 Empty Re: JavaScript good for PHPBB 2 does not work with PHPBB 3

    Post by SLGray February 23rd 2015, 5:01 am

    phpBB 2 and 3 have different CSS selectors.  Make sure you are using phpBB 3 selectors.



    JavaScript good for PHPBB 2 does not work with PHPBB 3 Slgray10

    When your topic has been solved, ensure you mark the topic solved.
    Never post your email in public.
    HrvojeP
    HrvojeP
    Forumember


    Male Posts : 161
    Reputation : 2
    Language : Croatian, English
    Location : Croatia

    JavaScript good for PHPBB 2 does not work with PHPBB 3 Empty Re: JavaScript good for PHPBB 2 does not work with PHPBB 3

    Post by HrvojeP February 23rd 2015, 9:56 am

    Thank you, Twisted_Mod and SLGray, for marking the direction where to look for errors. Give me some time to "investigate" what is going on in my CSS code. If I solve the problem, I will let you know.

    Have a nice day! bye

    Post scriptum 23.02.2015. 20:45: It must be some problem with CSS code implementation. It is the same as I did not write CSS code at all. Even the most simple instructions have not any influence on displayed message.