MyBB Community Forums

Full Version: MyBB 1.8.20 mycode problem
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi everyone. I was using 1.8.9 version until last week. A few days ago i uptade to 1.8.20 version and today i check my mycode(in localhost) it was not working anymore. I use my own image resizer mycode.

\[img\](.*?)\[/img\]

<div onclick="func()" class="scimage scleimages"></div>
<img onclick="func()" class="scimage" src="$1">

.scleimages:before{
 background:yellow;
 height:25px;
 width:100%;
 display:block;
 content:url(http://mybbdepo.com/ncode/xpserkan.png)' Resimin büyük hali için tıklayın!';
 font-family:Verdana;
 text-align:center;
 line-height:25px;
 font-size:12px;
 border:1px dashed;
 box-sizing:border-box;
 cursor:pointer;
}
.scimage{
   max-width:30%;
   cursor:pointer;
   transition:.3s cubic-bezier(0,.5,1,.5);
}

.toggled{
 max-width:100%;
}

function func() {
var elements = document.getElementsByClassName("scimage");
for (var i = 0, len = elements.length; i < len; i++) {
elements[i].classList.toggle("toggled");
}
} 
Hi,

any error in your browser's web inspector?

Remember that this last update changes the jquery version...
(2019-03-25, 09:04 AM)NoRules Wrote: [ -> ]Hi,

any error in your browser's web inspector?

Remember that this last update changes the jquery version...

[Image: 1i1-mVsuRzuUxpW281ID0g.png]

MyBB 1.8.20 use jquery 3.0, i know so what will i do?
@NoRules
Hi,

that's weird.., you're having errors with the "Jump to page" script.

Are you testing your mycode with the default theme? If not, try it first and see if it works.
(2019-03-27, 07:30 PM)NoRules Wrote: [ -> ]Hi,

that's weird.., you're having errors with the "Jump to page" script.

Are you testing your mycode with the default theme? If not, try it first and see if it works.

I upload clean 1.8.20 version and still same problem. I try default and other themes also.
@NoRules
Hi,

I've tested it in my forum and it works fine, but I had to change a thing.

If I change the Regular Expression to:
\[img2\](.*?)\[/img2\]

And test with a big image like:
[img2]https://example.now/big_pic.jpg[/img2]

You'll see that it works like expected.
So there is a problem when the regular expression uses the tag:
Quote:[img] [/img]

And I didn't find out why...
(2019-04-03, 06:22 PM)NoRules Wrote: [ -> ]Hi,

I've tested it in my forum and it works fine, but I had to change a thing.

If I change the Regular Expression to:
\[img2\](.*?)\[/img2\]

And test with a big image like:
[img2]https://example.now/big_pic.jpg[/img2]

You'll see that it works like expected.
So there is a problem when the regular expression uses the tag:
Quote:[img] [/img]

And I didn't find out why...

Thanks for solution, but it doesn't effect all images on forum.

Problem still continues.
By any rarest chance of incidence; if you are using CloudFlare; try disabling RocketLoader and / or put in Development mode and check.
(2019-04-08, 05:46 AM)effone Wrote: [ -> ]By any rarest chance of incidence; if you are using CloudFlare; try disabling RocketLoader and / or put in Development mode and check.

Erron in localhost and no, i don't use any extra service or plugin.
^ do you see same set of errors (in browser console) with MyBB's stock theme ?

if custom MyCode as given by NoRules works then try using bad word filter
replacing img] with img2]
Pages: 1 2