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.

JavaScript good for PHPBB 2 does not work with PHPBB 3

3 posters

Go down

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 Sun 22 Feb - 14:06

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 Sun 22 Feb - 17:01; edited 1 time in total
HrvojeP
HrvojeP
Forumember

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

http://drvenibrodovi.forumcroatian.com/

Back to top Go down

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_ Sun 22 Feb - 15:01

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
_Twisted_Mods_
_Twisted_Mods_
Helper
Helper

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

http://liquidcode.forumotion.com

Back to top Go down

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 Sun 22 Feb - 15:10

_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.
HrvojeP
HrvojeP
Forumember

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

http://drvenibrodovi.forumcroatian.com/

Back to top Go down

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_ Sun 22 Feb - 15:20

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

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

http://liquidcode.forumotion.com

Back to top Go down

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 Sun 22 Feb - 15:24

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.
HrvojeP
HrvojeP
Forumember

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

http://drvenibrodovi.forumcroatian.com/

Back to top Go down

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_ Sun 22 Feb - 17:15

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

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

http://liquidcode.forumotion.com

Back to top Go down

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 Sun 22 Feb - 19:09

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.
HrvojeP
HrvojeP
Forumember

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

http://drvenibrodovi.forumcroatian.com/

Back to top Go down

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_ Sun 22 Feb - 19:47

make sure you have the css
_Twisted_Mods_
_Twisted_Mods_
Helper
Helper

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

http://liquidcode.forumotion.com

Back to top Go down

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 Sun 22 Feb - 22:01

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.
SLGray
SLGray
Administrator
Administrator

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

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

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 Mon 23 Feb - 2:56

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.
HrvojeP
HrvojeP
Forumember

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

http://drvenibrodovi.forumcroatian.com/

Back to top Go down

Back to top


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