Page 1 of 1

Board updates

Posted: 2016-01-26 03:38pm
by AdmiralKanos
Just FYI, I added back the spoiler tags, and I also updated the Imperial Wiki. Please let me know if there are any problems.

The phpBB software has a point-update as of Jan 11, so I'll see if I can get that installed this week as well.

Re: Board updates

Posted: 2016-01-26 04:18pm
by Jub
That's good news. Any word on the issues with editing posts that some parts of the forum are having?

Re: Board updates

Posted: 2016-01-26 04:21pm
by Thanas
AdmiralKanos wrote:Just FYI, I added back the spoiler tags, and I also updated the Imperial Wiki. Please let me know if there are any problems.

The phpBB software has a point-update as of Jan 11, so I'll see if I can get that installed this week as well.
Spoiler
Thank you very much
EDIT: That is strange, it won't show itself....

Re: Board updates

Posted: 2016-01-26 04:52pm
by madd0ct0r
Thanas - i do not seem able to unclick the spoiler - was there anything there?
Spoiler
like this example

Re: Board updates

Posted: 2016-01-26 06:16pm
by AdmiralKanos
I don't know why Thanas' post doesn't work. Let me try another one: Spoiler
Test #2

Re: Board updates

Posted: 2016-01-26 06:17pm
by AdmiralKanos
AdmiralKanos wrote:I don't know why Thanas' post doesn't work. Let me try another one: Spoiler
Test #2
He had a quote in his post; maybe that was the problem. Trying a third test. Spoiler
Test #3

Re: Board updates

Posted: 2016-01-26 06:18pm
by AdmiralKanos
Ah, that's it. When there's a quote in the same post, the tag doesn't work. Damn.

I'm going to post the code, and maybe somebody can figure out the problem:
<div style="margin-bottom: 2px;"> <b>Spoiler </b><input value="Show" style="margin: 0px; padding: 0px; width: 60px; font-size: 10px;" onclick="if(this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != 'inline') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'inline'; this.innerText = ''; this.value = 'Hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value='Show'; }" type="button"> </div> <div style="border: 1px inset; padding: 6px;"> <div style="display: none;">{TEXT}</div> </div>
The software substitutes this code whenever you use a spoiler tag, with {TEXT} replaced by whatever's enclosed in the tags.

Re: Board updates

Posted: 2016-01-26 08:10pm
by Napoleon the Clown
Testing: Spoiler
Text goes here.
Jub wrote:That's good news. Any word on the issues with editing posts that some parts of the forum are having?
Okay, with great amounts of dicking around I found the bug: Quotes above a spoiler tag break it, regardless of what you put in there. I'm guessing that an image above it will do the same thing. Other testing of the spoiler tag showed that if there aren't any quotes above a spoiler, but there are those below, only the top one seems to function properly.

I've been using preview to test this shit out, and as you can see by clicking, with the quote beneath the spoiler the spoiler opens just fine. If you include spoiler multiple times only the topmost opens.

Re: Board updates

Posted: 2016-01-26 08:39pm
by Purple
It's not just quotes. Through some poking I've found that essentially any div above the code breaks it. In essence the code you have treats all divs on the page as being the 1st div on the page. So if you were to say copy paste it 5 times into a HTML document all the buttons will toggle the 1st spoiler. I am looking for a code solution for this now. But figured I might as well report my findings so far.

EDIT: It's definitively an issue with the nesting and code. I've managed to get the spoilers to hide properly by testing it as raw HTML but I can't get the visual style right.

Code: Select all

<div style="margin-bottom: 2px;">
	<b>Spoiler </b>
	<input value="Show" 
		style="margin: 0px; padding: 0px; width: 60px; font-size: 10px;"
		onclick="
			if(this.parentNode.getElementsByTagName('div')[0].style.display != 'inline')
			{ 
				this.parentNode.getElementsByTagName('div')[0].style.display = 'inline'; this.innerText = '';
				this.value = 'Hide';
			} 
			else 
			{
				this.parentNode.getElementsByTagName('div')[0].style.display = 'none';
				this.innerText = ''; this.value='Show'; 
			}" 
		type="button">
	</br>
	<div style="border: 1px inset; padding: 6px;">
		<div style="display: none;">{TEXT}</div> 
	</div>
</div>
This code produces spoilers that work fine but display as tiny boxes next to the button as opposed to a full width one like you have now. But it might be a good starting point.

Re: Board updates

Posted: 2016-01-26 08:55pm
by Purple
An update. I think this code should work. It certainly does in my browser. Test it when you can and if you are willing.

Code: Select all

   <b>Spoiler </b>
   <input value="Show" 
      style="margin: 0px; padding: 0px; width: 60px; font-size: 10px;"
      onclick="
         if(this.parentNode.getElementsByTagName('div')[0].getElementsByTagName('div')[0].style.display != 'inline')
         { 
            this.parentNode.getElementsByTagName('div')[0].getElementsByTagName('div')[0].style.display = 'inline'; 
            this.value = 'Hide';
         } 
         else 
         {
            this.parentNode.getElementsByTagName('div')[0].getElementsByTagName('div')[0].style.display = 'none';
				this.value='Show'; 
         }" 
      type="button">
   </br>
   <div style="border: 1px inset; padding: 6px;">
      <div style="display: none;">{TEXT}</div> 
   </div>
</div>

Re: Board updates

Posted: 2016-01-27 10:52am
by SpottedKitty
AdmiralKanos wrote:He had a quote in his post; maybe that was the problem. Trying a third test.
Very odd; I'm not going to leave any of the spoiler tests in the quote in case Even Weirder Stuff™ happens. Did anyone else see that if they clicked the second "show" outside the quote, it changed to "hide" (with nothing in the outlined box) and the "Spoiler <show button>" label inside the quote vanished, leaving only the outlined box? I've seen phpBB boards glitch in some really weird ways, but this is a new one on me.

Re: Board updates

Posted: 2016-01-27 11:15am
by Purple
My experimentation so far has lead me to conclude that it's up to the way the software parses BB into HTML. Essentially his code for the quote tag has a bug which causes it to select the 1st <div> tag in the post and work with that every time. So if there is any element in the post that parses into a <div>, and I imagine all of them do than the button for the spoiler tries to manipulate it. You can see that behavior easily if you just post two spoilers under one another.
Spoiler
Text 1
Spoiler
Text 2

Re: Board updates

Posted: 2016-01-27 11:32am
by SpottedKitty
Oh, that's neat — it doesn't matter which button I click, I only ever see the first hidden text! Image

Re: Board updates

Posted: 2016-01-27 11:48am
by Purple
SpottedKitty wrote:Oh, that's neat — it doesn't matter which button I click, I only ever see the first hidden text! Image
Yep. The code I posted should (unless it clashes with something on the server) fix that. Assuming he uses it. You can test it out your self. Just copy paste it a couple of times into a text document, rename it as .html and open it.

Re: Board updates

Posted: 2016-01-27 01:16pm
by AdmiralKanos
Hi, Purple. I tried your code, but it still seems to be acting weird.

Re: Board updates

Posted: 2016-01-27 01:54pm
by Purple
AdmiralKanos wrote:Hi, Purple. I tried your code, but it still seems to be acting weird.
What kind of bugs are you experiencing now? Are they new bugs? Is the code in the system now so we can play around with it? Odds are it's interacting with something else that's also bugging out. I noticed that for example with the old code I could toggle bits in a nested quote tag.

EDIT: Looking at the behavior now it would seem that there are probably bugs in a lot of tags that are compounding to create a single unified problem with the spoilers. Like did you have to write all the code for all the tags your self? How much did you get with the forum software?

This is getting interesting.

Re: Board updates

Posted: 2016-01-27 04:58pm
by madd0ct0r
testing spoiler within a spolier Spoiler
textSpoiler
central text
outsdie right
outside all.


oooh, it triggers on the first [/spiler] it finds.
Spoiler
textSpoiler
central text
outsdie right
outside all.

Re: Board updates

Posted: 2016-01-27 05:57pm
by Purple
What I would not give for a glimpse at the total source code of this thing...

Re: Board updates

Posted: 2016-02-06 03:31am
by gigabytelord
Is there a way to mark an old thread as unread? I seem to remember the forum having this ability before the update. Rereading some older fairly large threads and it would be a bit easier to keep track of where I am if they were marked unread.

Re: Board updates

Posted: 2016-02-20 04:24pm
by Ubiquitous
Thanks for still investing the time in this place.

Re: Board updates

Posted: 2016-02-20 10:05pm
by Soontir C'boath
gigabytelord wrote:Is there a way to mark an old thread as unread? I seem to remember the forum having this ability before the update. Rereading some older fairly large threads and it would be a bit easier to keep track of where I am if they were marked unread.
There is a bookmark option, although I don't know if you would get in the habit of using, but it's there next to the "Post Reply" link as a wrench button.