Jump to content

  • Log in with Facebook Log in with Twitter Log In with Google      Sign In   
  • Create Account

Welcome to BZPower!

Hi there, while we hope you enjoy browsing through the site, there's a lot more you can do if you register. The process is easy and you can use your Google, Facebook, or Twitter account to make it even faster. Some perks of joining include:
  • Create your own topics, participate in existing discussions, and vote in polls
  • Show off your creations, stories, art, music, and movies and play member and staff-run games
  • Enter contests to win free LEGO sets and other prizes, and vote to decide the winners
  • Participate in raffles, including exclusive raffles for new members, and win free LEGO sets
  • Send private messages to other members
  • Organize with other members to attend or send your MOCs to LEGO fan events all over the world
  • Much, much more!
Enjoy your visit!

Posted Image


Issue Information

  • #000200

  • Issue

Issue Confirmations

  • Yes (0)No (0)
Locked 
Photo

Code box still parsing tags

Posted by Katuko on May 27 2013 - 10:06 AM

My game has a bunch of banners made for it, which people can put in their signature in order to make the game's existence apparent to others. I have one in my sig right now, just like many other members have clickable banners. A staple of such banners have been the ability to share the underlying BBCode, so that people can easily copy/paste the topic link banner into their signature.

So, I'm trying to make a properpost with all the signature banners I have, but ever since the forum upgrade it's been hard to use code boxes for displaying the BBCode as plain text. For the first banner, I put in the image on top, that works fine. I add a code box below it, with the URL and image link ready. That works. But for the next code box (even if it's a copy/paste) the editor refuses to let it work as it should. After posting or choosing preview, the /CODE tag is moved to right besides the opening tag (sometimes all the code tags except the first pair is removed entirely), and this results in every link and image being shown as... well, images. So I get a mess of a post with no code boxes and just the images posted twice over.

I've tried using the CODEBOX tag instead, which happens to work better, but it still shows the image inside the code box despite the URL tag being skipped as it should be. It seems that the new IMG tag formatting (which is just IMG= rather than a pair of IMG and /IMG tags) is not being recognized by the forum software. It's also interesting to note that if I use CODEBOX tags for two banners, followed by CODE tags for the rest, then the CODEBOX banners will display images inside the codebox while the CODE banners will actually work. If I use more CODE pairs than CODEBOX, however, the remaining CODE pairs will vanish after posting. If I go to edit the post after this, it will convert the BBCode inside the CODEBOX to HTML links (such as <A>), while the CODE tags will be removed again.

Odd. I can't seem to duplicate this error. When I run the code tags, seems to work. I remember having a problem like this in the past though, so I suggest you try it again now. 

Still happens, and it's been like this since the forum upgrade. The very first code box of the post works, and every box after that gets reformatted as the post is made or goes into preview.

For example, this is the same code copy/pasted twice:
[url=http://www.bzpower.com/board/index.php?showtopic=418][img=http://www.majhost.com/gallery/Katuko/Avatars/biofight095_banner_laser.png][/url]

[url="http://www.bzpower.com/board/index.php?showtopic=418"][img]http://www.majhost.com/gallery/Katuko/Avatars/biofight095_banner_laser.png[/img][/url]
First one works, while the second gets messed up.

EDIT: Unless I edit a few times over, it seems. The second box gets changed around a bit, but I'll retry.

EDIT 2: Works here, but not work on the blog post draft.

Edited by Katuko, May 27 2013 - 12:26 PM.


[url=http://farm9.staticflickr.com/8266/8747998775_1d1ef2b480.jpg][img]http://farm9.staticflickr.com/8266/8747998775_1d1ef2b480.jpg[/img][/url]
 
[url=http://farm9.staticflickr.com/8266/8747998775_1d1ef2b480.jpg][img]http://farm9.staticflickr.com/8266/8747998775_1d1ef2b480.jpg[/img][/url]
 
Tried both in the forums and in a blog draft of mine. Still not getting the error. 

Try making sure all the URLs are in quotes. Not sure if that's related, but it may be.

Nothing changes. The first codebox works, the BBCode for every box after that gets changed. I have tried with all boxes at once, and also by removing every box and adding in a copy-paste of the first box to see how far I could go before one messed up. It also changes every tag to remove quotes around URLs.
[img=http://www.majhost.com/gallery/Katuko/Avatars/banner_beatdown1.png] 300px × 65px, 39.08 KB (40021 bytes) [code][url="http://www.bzpower.com/board/index.php?showtopic=418"][img=http://www.majhost.com/gallery/Katuko/Avatars/banner_beatdown1.png][/url][/code]
This is the exact code I've been using. Image on top to show the user which banner they will be getting, code box below with IMG and URL tags for a linked image. I've tried both with and without quotes.

There is also an annoying tendency for line breaks to vanish, by the way, making it hard to space out content (especially multiple images) and paragraphs properly in some posts. Minor issue, but it might be related considering it is also auto-formatting at work.


EDIT: The codebox works if I use the old-styled IMG tags (with a start and an end tag) inside the codebox, but not if I use the new one (with IMG=). The forum currently auto-formats any use of old-styled IMG to new-style IMG, which is why I've been using the new style. I'll use the old style in the code boxes for now, I guess.

So I guess the error is indeed that the codebox does not handle the new-styled IMG tag and thus still parses it into an image. In the process it moves the closing CODE tag to allow the image to actually be displayed.

Edited by Katuko, May 28 2013 - 06:07 PM.


Okay, I see the error now. I don't think it has anything to do with img tags, however. It's a general forum error that has to do with rendering and the RTE, much like the quote tags I mentioned in another ticket. Fortunately, I can fix it. 
 
---------------------------------------------------------------------------------------------------------------------------------------------------
 
 Posted Image 300px × 65px, 39.08 KB (40021 bytes)
[url="http://www.bzpower.com/board/index.php?showtopic=418"][img=http://www.majhost.com/gallery/Katuko/Avatars/banner_beatdown1.png][/url]
Posted Image 300px × 65px, 39.08 KB (40021 bytes)
Posted Image
---------------------------------------------------------------------------------------------------------------------------------------------
 
This is the error, right? 
 
What you need to do is to go to BBCode mode. Should look like this: 
 
[img=http://www.majhost.com/gallery/Katuko/Avatars/banner_beatdown1.png] 300px × 65px, 39.08 KB (40021 bytes)[code=auto:0][url="http://www.bzpower.com/board/index.php?showtopic=418"][img=http://www.majhost.com/gallery/Katuko/Avatars/banner_beatdown1.png][/url][/code][img=http://www.majhost.com/gallery/Katuko/Avatars/banner_beatdown1.png] 300px × 65px, 39.08 KB (40021 bytes)[code=auto:0]
[/code]
What you need to do is cut (Ctrl-X) the code between the last code tag and the end. Toggle back to the RTE: You should see a blank code box graphic. Without leaving to the RTE, paste the text you just cut into the graphic. Should look like this: 
 
Posted Image 300px × 65px, 39.08 KB (40021 bytes)
[url=http://www.bzpower.com/board/index.php?showtopic=418][img=http://www.majhost.com/gallery/Katuko/Avatars/banner_beatdown1.png][/url]
Posted Image 300px × 65px, 39.08 KB (40021 bytes)
[url=http://www.bzpower.com/board/index.php?showtopic=418][img=http://www.majhost.com/gallery/Katuko/Avatars/banner_beatdown1.png][/url]
------------------------------------------------------------------------------------------------------
 
The reason for this error is that the forum renders things in the RTE these days. I've seen this happen with quote tags before - printing the blank tags and the text below. In your case, the forum prints the blank tags and parses the text below it, which, since they're img tags, it gives you the image. 
 
You'll probably run into this every time you edit. :( I don't know how to fix that. As a rule of thumb, switch between RTE and BBCode and back to RTE before submitting to catch errors like this. 
 
EDIT: Oh, just forget it. I keep getting cascading errors every time I even edit this post. It's monumentally exasperating. 

Edited by fishers64, May 29 2013 - 11:44 AM.


Yeah, that's the thing. I don't use the visual editor, I only use the good old BBCode mode post box. And no matter how much I try to fool the parsing by toggling back-n-forth, it fails unless I use the old-styled IMG tag in my code boxes. Previewing or updating a post breaks any meticulously constructed BBCode I might have put together because of the auto-formatting.


-Windrider-
Sep 20 2014 03:33 PM

Talked with Katuko; I think this has fixed itself!



locked issue





0 user(s) are reading this issue

0 members, 0 guests, 0 anonymous users