Attention:

Support Rules and Guidelines
Before you post your support topic, please remember to:
  • Read the support forum rules.
  • Check the wiki and use search to see if your problem can be answered there first.
  • Link your board please, and make sure that the problem on your board is visible to guests or provide a test account.
  • Do not post Board Wrappers and CSS unless requested. With a board link, this is not necessary.
  • Be as descriptive as you can and use as many details as possible when describing your problem.
  • Please briefly mark any links to forums that may not be work-safe.
This will help ensure your support issue will be attended to in a quick and efficient manner.

  Add ReplyNew TopicNew Poll

 Custom BBCode reverting
#
This actually happens with a few tags I've done on occasion, but none so used or such a hassle as my Spoiler code. When I post using it, it works perfectly. However, upon editing the post, it reverts to HTML, and consequently doesn't work when resubmitted- quite a problem when the poster doesn't notice, especially given the nature and other common uses of a spoiler tag.

This is my current Spoiler tag coding: (2 Param type, obviously)
CODE
<table width="95%" cellspacing="1" cellpadding="1" border="0" align="center" onclick="if(this.getElementsByTagName('td')[1].style.display == 'none'){ this.getElementsByTagName('td')[1].style.display = '';this.getElementsByTagName('td')[2].style.display = 'none'; }else{ this.getElementsByTagName('td')[1].style.display = 'none';this.getElementsByTagName('td')[2].style.display = '';}" style="cursor: pointer;"><tr><td width="80%"><span class="genmed"><center><button class="titlemedium" style="border: 2px ridge;"> <b>(PARAM1)</b></button></center></span></td></tr><tr><td><td style="font-size:12px; display: none; border: 1px solid; margin: 3px 3px 3px 3px;">(PARAM2)</td><div style='display: none;'></div></tr></table>
#
Have you edited the code since that tag was originally used?

signature
ΣAE
The True Gentlemen
#
Yes, that's a good question.

If you edit a BBCode's HTML in the Admin CP in any way and go back to edit an existing post that had the old stuff in it, it will break. There is no way for me to fix this except to make the bbcode activate on the topic read page. Which wouldn't be a good idea since that'd take a lot more resources to display each post.

If you're not editing it though, there's no reason it should break -- unless something else is conflicting with it.

signature
email: admin@jcink.com :: blog: John C.
#
Yes, I have. However, it happens with every use of this tag, both ones made before and after the edit, both in topics where it had originally been posted and fixed multiple times and in brand new topics. Is this normal?

--

Would I need to delete and re-add the tag, perhaps under an altered name? Or what would I do?
#
If you make a post, and THEN change/edit the BBCode then expect it to be broken up with HTML. Changes to the tag will break previous posts - it's not retroactive.

If you make a post, and then go to edit the post and the tag is broken, but you didn't change anything in the Admin CP for the particular tag, that isn't normal. There could be BBCode conflict or a different kind of incompatibility somewhere. I'd have to try the BBCode in question myself on a test board to see which.

signature
email: admin@jcink.com :: blog: John C.
#
=/ Hm... My guess is going to be an incompatibility, now. I tried it on a Test Board, and the code didn't try to break upon editing. But I deleted the code on my real board and added a slightly altered version (just specifying no margin around the button) with a different name (both different, so it should see it as a brand new code, right?), and whether I try to insert that into old posts, post it in new ones in old topics, or post it in brand new topics, it works fine upon input and breaks when I edit. :<


Edit: Also, just tested. Other codes I've since edited don't do the same thing in new topics/posts, nor when inserted into older topics. So yes, it does seem to be only normal breakage (if code existed before in post, first time editing only) for others and a special case for my spoilers.

This post has been edited by SG~: May 4 2010, 01:27 PM
#
Actually I think there's a conflict... If it works fine a test board then I wonder if there's another BBCode you might have added which is conflicting with the spoiler one on that test board. No reason it shouldn't work fine on your real board unless there's something else at play here.

Do you have a lot of BBCodes added? Any in particular you can think of which might be causing it that you could disable to see if it works?

signature
email: admin@jcink.com :: blog: John C.
#
May have found the problem

You have an extra <td> tag

QUOTE
<table width="95%" cellspacing="1" cellpadding="1" border="0" align="center" onclick="if(this.getElementsByTagName('td')[1].style.display == 'none'){ this.getElementsByTagName('td')[1].style.display = '';this.getElementsByTagName('td')[2].style.display = 'none'; }else{ this.getElementsByTagName('td')[1].style.display = 'none';this.getElementsByTagName('td')[2].style.display = '';}" style="cursor: pointer;">
<tr>
  <td width="80%">
  <span class="genmed">
    <center>
    <button class="titlemedium" style="border: 2px ridge;">
      <b>(PARAM1)</b>
    </button>
    </center>
  </span>
  </td>
</tr>
<tr>
  <td>
  <td style="font-size:12px; display: none; border: 1px solid; margin: 3px 3px 3px 3px;">(PARAM2)
  </td>
  <div style='display: none;'></div>
</tr>
</table>

signature
ΣAE
The True Gentlemen
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:
Share this topic:
« Next Oldest | General Support | Next Newest »

Options Add ReplyNew TopicNew Poll