Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

Strange error with img-BB-code

Asked Modified Viewed 4,315 times
J
J_Bear
J
J_Bear 10
Jelle.
------
For every 60 seconds of anger, you lose one minute of happiness
  • Member, joined since
  • Contributed 74 posts on the community forums.
  • Started 11 threads in the forums
  • Started this discussions
asked
Member

Sorry for my English it is terrible.

I have a strange problem.
I've updated my website 6.0.15 -> 7
I did the DB-update and replaced all the files. It runs almost 100% OK.

The only thing is a issue with the img BB-code in the forum. All the 'large' pictures have a ugly scrollbar. Example.

I've used the same files from the update of my site to create a Testsite. Here it is not a problem Example.

It's not an issue of the themes, tested that by put both site on the same theme.
Both site are on the same server, so no problem there.

I have re-uploaded all the files under [forum], [includes/bbcodes], [locale/Dutch/forum], [locale/English/forum], [locale/Dutch/bbcodes], [locale/English/bbcodes].

And still got this strange problem.

Can someone please help me to solve this problem?
0 replies

8 posts

M
muscapaul
M
Paul

Time flies like an arrow, fruit flies like banana (Groucho Marx)

Sites: Diptera.info (site owner); Online-Keys.net (site owner); Sciomyzidae.info (site co-owner); muscapaul.com (defunct; site owner)
  • Veteran Member, joined since
  • Contributed 1,075 posts on the community forums.
  • Started 8 threads in the forums
answered
Veteran Member

Jelle, the example on your test site is not visible. Probably because the thread there is not visible to guests.
0 replies
J
J_Bear
J
J_Bear 10
Jelle.
------
For every 60 seconds of anger, you lose one minute of happiness
  • Member, joined since
  • Contributed 74 posts on the community forums.
  • Started 11 threads in the forums
  • Started this discussions
answered
Member

sorry, my mistake..
is corrected now.


To make it all equal, I've post in both forums the same picture.
On my personal site: Example 1


On my Testsite: Example 2

.
Edited by J_Bear on 29-09-2008 20:47,
0 replies
M
muscapaul
M
Paul

Time flies like an arrow, fruit flies like banana (Groucho Marx)

Sites: Diptera.info (site owner); Online-Keys.net (site owner); Sciomyzidae.info (site co-owner); muscapaul.com (defunct; site owner)
  • Veteran Member, joined since
  • Contributed 1,075 posts on the community forums.
  • Started 8 threads in the forums
answered
Veteran Member

I think it has to do with the function resize_forum_imgs() in includes/jscript.js. I know very little about those kind of scripts but I think it has to do with whether a theme has set a fixed width (for example 1024 pixels) or a realtive window width. There are a few categories of different viewport_widths and what should be done. When the viewportwidth is fixed, then the function places the images in either of three resize categories and determines how they should be resized. I don't think the scroll bars appear there. It is different when the theme goes to 100%. I cannot determine how the function then really deals with the viewport_width, but a result is that scroll bars appear on a non-resized image.

Mind you, this is based on just looking at the function (I was not satisfied with resizing in my forum) and then checking a single resized image in one of my forums using a fixed width theme and a 100% width theme.
0 replies
J
J_Bear
J
J_Bear 10
Jelle.
------
For every 60 seconds of anger, you lose one minute of happiness
  • Member, joined since
  • Contributed 74 posts on the community forums.
  • Started 11 threads in the forums
  • Started this discussions
answered
Member

Unfortunately, the problem has nothing to do with the themes. As you can see in both of the examples I have given, the test site and the normal site, one site has the scroll-bars and the other does not. I have switched both themse on both the sites, so I tried the theme of the test site on the normal site and vice versa. The problem with the scrollbars remained on the normal site despite of the themes used. I have also tried several other themes but the problem remained. This would indicate that the themes have nothing to do with the problem.
0 replies
W
Wooya
W
Wooya 10
PHP-Fusion DEV Team
It's not a bug, it's undocumented feature...
  • Senior Member, joined since
  • Contributed 205 posts on the community forums.
  • Started 11 threads in the forums
answered
Senior Member

As I see you have some kind of spoiler BB code and that's may be the problem. Shot from debugger:
Error: $ is not a function
Source: http://jelle.berenpaleis.nl/forum/viewthread.php?thread_id=54&pid=144#post_144
Row: 36
Edited by Wooya on 01-10-2008 20:18,
0 replies
J
J_Bear
J
J_Bear 10
Jelle.
------
For every 60 seconds of anger, you lose one minute of happiness
  • Member, joined since
  • Contributed 74 posts on the community forums.
  • Started 11 threads in the forums
  • Started this discussions
answered
Member

Also the spoiler BB-Code is not causing the problem. If so, the test site would be affected also.

Like I wrote before the two sites are exactly equal. Same files, same infusions, same mod's. same panels, on the same server. I've also tried 14 different themes on both sites.

Whatever I do, the scrollbars are and stay on one site and not on the other site.

I have tried every thing possible,

The only conclusion I can make is: the current img BB-code is not usable for every PHPFusion site due to an unknown reason(s).

But, there is a solution I believe.
If it is possible to transform this code to a new img BB-Code the problem is solved.
if ($size[0] != $img_w || $size[1] != $img_h) {
      $res = "<a href=\"javascript:;\" onclick=\"window.open('".FORUM."attachments/".$file."','','scrollbars=yes,toolbar=no,status=no,resizable=yes,width=".($size[0]+20).",height=".($size[1]+20)."')\"><img src='".FORUM."attachments/".$file."' width='".$img_w."' height='".$img_h."' style='border:0' /></a>";


The only problem is: I don't have the skills to do it.
Edited by J_Bear on 01-10-2008 21:38,
0 replies
W
WEC
W
WEC 10
  • Veteran Member, joined since
  • Contributed 946 posts on the community forums.
  • Started 5 threads in the forums
answered
Veteran Member

The two sites are obviously not identical since one of them fails and the other one don't.

You likely have some javascript conflicts causing the bbcode to fail.

If you try to validate the two pages you get:

working site got 284 errors:

http://validator.w3.org/check?uri=htt...mp;group=0

Non working site got 418 errors:

http://validator.w3.org/check?uri=htt...or%2F1.591

Does it matter?

Maybe or maybe not, but you cannot blaim bbcode not to work if the reason should show to be conflicts caused by loads of code not validating.

One of the obvious differences is the Geovisit panel on the non working site. Try to disable that and check if the problem is still there. If it is, then continue disabling panels and addons until hopefully things suddenly start working.
0 replies
Y
ysbrand
Y
  • Junior Member, joined since
  • Contributed 15 posts on the community forums.
  • Started 4 threads in the forums
answered
Junior Member

In the IMG BBcode there is a limit size of 320 pixels, this makes the scrollbars appear for lager pictures. Change it too 100% and the scrollbars will disappear.

Don't put them too big because that could mess up the width of your site.
0 replies

Labels

None yet

Statistics

  • Views 0 views
  • Posts 8 posts
  • Votes 0 votes
  • Topic users 5 members

5 participants

M
M
Paul

Time flies like an arrow, fruit flies like banana (Groucho Marx)

Sites: Diptera.info (site owner); Online-Keys.net (site owner); Sciomyzidae.info (site co-owner); muscapaul.com (defunct; site owner)
  • Veteran Member, joined since
  • Contributed 1,075 posts on the community forums.
  • Started 8 threads in the forums
W
W
Wooya 10
PHP-Fusion DEV Team
It's not a bug, it's undocumented feature...
  • Senior Member, joined since
  • Contributed 205 posts on the community forums.
  • Started 11 threads in the forums
W
W
WEC 10
  • Veteran Member, joined since
  • Contributed 946 posts on the community forums.
  • Started 5 threads in the forums
J
J
J_Bear 10
Jelle.
------
For every 60 seconds of anger, you lose one minute of happiness
  • Member, joined since
  • Contributed 74 posts on the community forums.
  • Started 11 threads in the forums
  • Started this discussions
Y
Y
  • Junior Member, joined since
  • Contributed 15 posts on the community forums.
  • Started 4 threads in the forums

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet