PDA

View Full Version : Opening Spoilers in Printable Version



Cicciograna
2010-11-12, 03:44 PM
Is there, or can be easily implemented, a way to open all the Spoilers on a page in Printable Version?
The rationale behind this request is that often, using the option "Show 40 post(s) from this thread on one page" many, many Spoiler boxes appear on the page, and these are printed "as they are", not their content: this is a bit frustrating, as it requires to manually check the 40 pages for closed spoiler boxes...

Lady Tialait
2010-11-12, 04:59 PM
Try to screen capture and print the screen capture. With them open. that might work. If are worried about seeing your browzer in your print-off then try full screening it. It would be a bit tedious to do.

Jimorian
2010-11-12, 06:32 PM
What Cicciograna refers to is having to manually open all the spoilers before printing. Your solution still requires him to do that first.

It's probably the kind of deep reprogramming of the board software that even if possible, would be way down on the priorities list.

Shhalahr Windrider
2010-11-12, 06:47 PM
It's probably the kind of deep reprogramming of the board software that even if possible, would be way down on the priorities list.
I’d think it just work with a change to the printable version’s stylesheet. But if that’s not gonna change anytime soon, I can see if I can make a working Javascript bookmarklet. Something like that might work.

Irbis
2010-11-14, 06:20 PM
It's probably the kind of deep reprogramming of the board software that even if possible, would be way down on the priorities list.

I wonder why this answer seems to be a default one of non-mods in this forum, especially seeing how most people giving this answer never edited any forum code, most probably.

It irks me, as most of the new users trying to make a suggestion are most likely scared by such replies and it will be a long time before they propose anything else.

IMHO, this kind of "deep reprogramming" would take less than it did to bring 'spoiler' button, and that was done blazingly fast. I did larger upgrade in a few hours once, and it was odd job at that, in a code I had to familiarize myself during work. No idea about priorities, thought.

Shhalahr Windrider
2010-11-14, 07:29 PM
Okay, I had good luck with this in Opera, Firefox, and Safari. It opens all spoilers, but doesn’t actually register a toggle for all the buttons, so they’ll read “Show,” but I don’t think that’s particularly important.

Anyway, if you are not familiar with bookmarklets, here is the idea: they are short bits of Javascript that you can put inside a browser bookmark and can run it on any webpage by selecting the bookmark. For example, if you copy the code below into a new bookmark titled “Show GiantITP Spoilers” you can select it at any time and open all Giant in the Playground spoilers, even on printable pages. Alternatively, if your browser allows, you can just drag the link under the code box to your personal toolbar, and it should work. (BBCode URLs could be mangling the bookmarklet. Best results if you copy & paste what’s in the code box. Link still provided if you really want to try.)


javascript:function s(){var sp = new Array();var tags = document.getElementsByTagName('div');for(i=0,j=0; i<tags.length; i++) { var test = " " + tags[i].className + " ";if (test.indexOf(" spoiler ") != -1){sp[j++] = tags[i];}}for (x in sp) {sp[x].style.display="block";}} s();

Show GiantITP Spoilers (javascript:function s(){var sp = new Array();var tags = document.getElementsByTagName('div');for(i=0,j=0; i<tags.length; i++) { var test = ' ' + tags[i].className + ' ';if (test.indexOf(' spoiler ') != -1){sp[j++] = tags[i];}}for (x in sp) {sp[x].style.display='block';}} s();)

Let me know how it works for you.

crimson77
2010-11-14, 08:33 PM
Is there, or can be easily implemented, a way to open all the Spoilers on a page in Printable Version?

Why do not not just print your thread from the board archive (http://www.giantitp.com/forums/archive/index.php). Spoilers are disabled and it will just show what is contained within them.

Jimorian
2010-11-15, 12:53 AM
IMHO, this kind of "deep reprogramming" would take less than it did to bring 'spoiler' button, and that was done blazingly fast. I did larger upgrade in a few hours once, and it was odd job at that, in a code I had to familiarize myself during work. No idea about priorities, thought.

3+ years for the Spoiler Button.

Irbis
2010-11-15, 03:33 AM
3+ years for the Spoiler Button.

Out of which 2 years, 51 weeks, and 5+ days were spent saying "we'll get to it"? :smallconfused:

Just check when admins said they'll finally try and how quickly it appeared afterwards. In reality, it was probably as short line of code as the above javascript snippet was.

Which is why only mods should be saying things about 'low priorities' and 'deep programming', IMHO.

Cicciograna
2010-11-15, 04:58 AM
Why do not not just print your thread from the board archive (http://www.giantitp.com/forums/archive/index.php). Spoilers are disabled and it will just show what is contained within them.

I did it, but the result was not visually appealing: yes, spoilers are removed, but other formatting too so, for example, quotes are shown as repeated text, and in posts with multiple quotation, maybe with answers after each quote, it's a pain to find new pieces of information.


wonderful stuff

Thank you Windrider! It worked perfectly for me, and a new guest proudly sits in my RPG section of bookmarks!

Mercenary Pen
2010-11-15, 06:09 AM
Out of which 2 years, 51 weeks, and 5+ days were spent saying "we'll get to it"? :smallconfused:

Just check when admins said they'll finally try and how quickly it appeared afterwards. In reality, it was probably as short line of code as the above javascript snippet was.

Which is why only mods should be saying things about 'low priorities' and 'deep programming', IMHO.

The problem with the spoiler button wasn't- as I understand it- the programming, but getting authorisation to use a button design that fitted the design of the rest of the interface- completely different issue.

Shhalahr Windrider
2010-11-15, 09:10 AM
Thank you Windrider! It worked perfectly for me, and a new guest proudly sits in my RPG section of bookmarks!
You’re welcome.

Out of curiosity, are you using a browser other than Opera, Firefox, or Safari? Just want to check compatibility.

Cicciograna
2010-11-15, 10:58 AM
You’re welcome.

Out of curiosity, are you using a browser other than Opera, Firefox, or Safari? Just want to check compatibility.

I'm using Firefox.

Shhalahr Windrider
2010-11-15, 11:19 AM
I'm using Firefox.
Okay. So it’s not just my Firefox that it works on. :smalltongue:

lesser_minion
2010-11-15, 12:43 PM
Okay. So it’s not just my Firefox that it works on. :smalltongue:

Copy-pasting from the code block seems to work, but the hyperlink seems to have been chewed up somewhere along the line.

Shhalahr Windrider
2010-11-15, 01:07 PM
Copy-pasting from the code block seems to work, but the hyperlink seems to have been chewed up somewhere along the line.
Probably has to do with the single quotes used to mark off string literals getting encoded as URL encoding. Or (this happened in one of my browser tests) the browser adding an “http://” to the beginning of the link. In any case, I’m pretty sure it’s a matter of how the browser handles it. The URL looks just fine when I open up an Edit window.

Yeah, that’s why I provided both methods. The first is more of a sure-fire thing, but the second is easier.

Gralamin
2010-11-17, 12:24 AM
Just throwing in a confirmation it works on Google Chrome.

Zeb The Troll
2010-11-17, 03:54 AM
Interesting. Works on IE8 as well.

Rawhide
2010-11-17, 04:25 AM
I wonder why this answer seems to be a default one of non-mods in this forum, especially seeing how most people giving this answer never edited any forum code, most probably.

It irks me, as most of the new users trying to make a suggestion are most likely scared by such replies and it will be a long time before they propose anything else.

IMHO, this kind of "deep reprogramming" would take less than it did to bring 'spoiler' button, and that was done blazingly fast. I did larger upgrade in a few hours once, and it was odd job at that, in a code I had to familiarize myself during work. No idea about priorities, thought.

I dislike it too, but what I dislike more is when people make light of exactly what is involved in making a change and claim it is much easier/safer than it is and do not factor in all of the other considerations.

lesser_minion
2010-11-17, 05:20 AM
Probably has to do with the single quotes used to mark off string literals getting encoded as URL encoding. Or (this happened in one of my browser tests) the browser adding an “http://” to the beginning of the link. In any case, I’m pretty sure it’s a matter of how the browser handles it. The URL looks just fine when I open up an Edit window.

I get the same result whether I use Opera, Exploder, or Firefox, plus a random <b></b> that comes out of nowhere and also appears in the page source for your code block.

I think it's more likely that the board software's mangling the URI, either because of the quotes, or because it doesn't like javascript.

happyturtle
2010-11-17, 06:21 AM
I dislike it too, but what I dislike more is when people make light of exactly what is involved in making a change and claim it is much easier/safer than it is and do not factor in all of the other considerations.

When I worked as a seamstress, customers would think the same thing about alterations they wanted. "Oh, I just need this one quick thing done," they'd say, and then be shocked if I told them that either it couldn't be done or that it would take much longer (and cost much more) than they expected.

Since then, I've had the tendency to assume that anything I don't know how to do is probably a lot harder than it looks until an expert tells me otherwise.

Shhalahr Windrider
2010-11-17, 06:45 AM
Interesting. Works on IE8 as well.
That’s been known to happen. From time to time. :smalltongue:



I get the same result whether I use Opera, Exploder, or Firefox, plus a random <b></b> that comes out of nowhere and also appears in the page source for your code block.

I think it's more likely that the board software's mangling the URI, either because of the quotes, or because it doesn't like javascript.
Yeah. Don’t know where the bold tags are coming from. And maybe it’s the board software trying to add the “http:” as well. Probably should stick with copy/paste.


When I worked as a seamstress, customers would think the same thing about alterations they wanted. "Oh, I just need this one quick thing done," they'd say, and then be shocked if I told them that either it couldn't be done or that it would take much longer (and cost much more) than they expected.
Yeah, the Internet tends to attract a lot of people like that with regards to Web Design. All the poorly written “tutorials” on various computer subjects certainly don’t help.

Irbis
2010-11-17, 08:52 AM
I dislike it too, but what I dislike more is when people make light of exactly what is involved in making a change and claim it is much easier/safer than it is and do not factor in all of the other considerations.

Sigh. I stated that I don't know what your priorities are, and if there is not another consideration preventing you from doing so, so I did not speculate on this part. I gave answer only on a thing I knew about from my previous experience.

The thing is, though, unless I missed something, this is a suggestion subforum - and when someone posts something, he should be encouraged/his idea improved upon, not, as the trend sometimes seems to be, told by random people his idea has no point, will require 999 mods to enforce, take years to implement and generally sucks. To me, this will discourage the original poster and most of the people from making a suggestion any time again, making this subforum generally pointless.

Now, if there's something wrong with the suggestion, I'm all for correcting the person in question, but only when there's something wrong and only by people who have experience/power to do with something in question.

If my understanding was prong, please correct me.


When I worked as a seamstress, customers would think the same thing about alterations they wanted. "Oh, I just need this one quick thing done," they'd say, and then be shocked if I told them that either it couldn't be done or that it would take much longer (and cost much more) than they expected.

Tell me, if the client asked you a question, and another client interjected telling the first one the thing you know will take an hour at best would take days to weeks, and will cost horrible amounts of money - would you correct him/her, or not?

Rawhide
2010-11-17, 09:24 AM
The thing is, though, unless I missed something, this is a suggestion subforum

[...]

making this subforum generally pointless

[...]

If my understanding was prong, please correct me.

Your understanding was wrong. This forum is not and has never been a suggestions forum. It says quite clearly, "Board/Site Issues" and "Post your questions or concerns about the message board/website here". Suggestions are not even mentioned. Suggestions have never been a priority or reason of this forum. Suggestions can be posted here (or PMed directly), but it is not the primary purpose of this forum, it is for all manner of issues, questions and concerns. To be honest, if this forum were completely empty, then we would be doing our job exceedingly well. It's here for when/if people need it.


Sigh. I stated that I don't know what your priorities are, and if there is not another consideration preventing you from doing so, so I did not speculate on this part. I gave answer only on a thing I knew about from my previous experience.

So, you know exactly what is involved in the spoiler code, the message board software intergration, compatibility issues, server side issues, testing, security, future upgrades, unforseen issues, and so on? You know our situation exactly? All from previous experience in a different environment?

I'm sorry if I'm sounding rude, but there's not really any other way to say it. A simple change is never a simple change, not if you do it correctly. Though, it could be fun to start modifying JavaScript on a live server as big as this one...

You stated that it is a simple job that can be done blazingly fast. My reply had nothing to do with priorities, merely stating that I would prefer that you do not make such assumptions in the future.

Irbis
2010-11-17, 10:17 AM
This forum is not and has never been a suggestions forum.

Ech... As I stated, this is sadly the only place where such suggestion can be given, and I'd count lack of/wrongly working functionality as an issue. I'll keep that in mind, though, to me, shooting down others is simply wrong.


So, you know exactly what is involved in the spoiler code, the message board software intergration, compatibility issues, server side issues, testing, security, future upgrades, unforseen issues, and so on? You know our situation exactly? All from previous experience in a different environment?

Well, 'exactly'? I doubt you'll find anyone who can confidently say he knows 'exactly' everything to know there is to know about any given issue, and you certainly won't find it in my post.

That being said, I spent 5 years in Uni getting Master's title in Web Deployment & Development. I'm currently in the process of getting second title in Networking Multimedia technology, and I've successfully applied and passed exams for an IT DSc studies (had to put them in backburner, sadly, with my travelling 900+ km to catch opportunity for getting that Brit NM title at preferred terms interrupting them).

I have deployed and maintained a few forums in my spare time, I have worked on and deployed systems much larger and more critical than this forum (thought, that was always as junior part of the team) as part of actual work. So, I guess I can say I know a 'bit' about these.


I'm sorry if I'm sounding rude, but there's not really any other way to say it. A simple change is never a simple change, not if you do it correctly. Though, it could be fun to start modifying JavaScript on a live server as big as this one...

And where, pray tell, I've said anything about deploying changes on a live server? :smallconfused:

The way we did it, was to deploy the changes on a dummy, intranet server, try to break the new software in an array of standardized tests (and a few more custom ones), and, when it worked, we migrated to new version. With no problems, AFAIR.

And that was refreshing software from the ground up, and adding completely new functionalities, not slightly modifying existing ones.


You stated that it is a simple job that can be done blazingly fast. My reply had nothing to do with priorities, merely stating that I would prefer that you do not make such assumptions in the future.

Um... when the job can be done by a single line in Java, it is simple and blazingly fast... :smallsigh:

Of course, the above was more of a simple client-side hack, and to properly deploy it on a server side you'd need more code than that, and do a lot of testing, but I indeed do not believe it would be anything particularly long nor difficult.

That being said, I obviously have no idea how much of a day-to-day maintenance this particular server requires, how much time is needed to ensure it simply works, how you deploy changes, etc., but the systems I've worked on and have experience with, once properly set, required maintenance rarely, giving us time to focus on developing new software as and when needed.

It is perfectly possible that, due to accumulation of changes and add-ons, doing anything on this forum is no longer simple nor quick, you need to deploy changes live, and you need to spend a lot of time to simply keep it running. But, if it were the case I'd simply state that you're possibly looking into changing it into new platform to simplify these issues, and there's no point in developing functionality for this one. Or, state developing new functionalities is hard due to outside interference, instead of giving a... bit cryptic answers that give the wrong impression. But that's just me :smallsmile:

SMEE
2010-11-17, 10:36 AM
See, we don't have a development rig to deploy changes to the software.
And customizations we make would have to be heavily documented and re-implemented once the forum software is upgraded, if changes were made in the source files where such customizations were made.

Coding the change would be quite simple, yes. It usually is.
But coding is nothing but a small part of the whole thing.
The hardest part is testing it to make sure nothing else will break after it's implementation.

lesser_minion
2010-11-17, 11:11 AM
Yeah. Don’t know where the bold tags are coming from. And maybe it’s the board software trying to add the “http:” as well. Probably should stick with copy/paste.

Well, javascript: is about the only scheme that seems to have that problem -- IRC (e.g. this link (irc://irc.gamesurge.com/giantitp)), for example, works fine.

Same goes for https (https://www.google.com).

IIUC, the single biggest reason why HTML gets blocked is because it can be used to invoke javascript, so I can see why the board software might try to block people from posting javascript: links.

Also, @Irbis: I don't think this board uses Java anywhere.</pedantry>

Irbis
2010-11-17, 11:20 AM
See, we don't have a development rig to deploy changes to the software.

Well... you don't really need it. It is possible to set up additional virtual machines even on laptop, and use that, since compared to the real deal, dummy server uses tiny amount of resources. I have two on my PC right now.

The worst thing that can happen is that the heavy load test that was supposed to take 5 minutes takes 30.


And customizations we make would have to be heavily documented and re-implemented once the forum software is upgraded, if changes were made in the source files where such customizations were made.

I thought that might be the case. But, still, seeing how little work it would take on a new platform, which would have most of the functionalities you coded by hand by default, well... My advice would still be to try to develop needed functionalities on new forum software, announcing this one won't get any because it is no longer being worked on (instead of being offended when someone suggests that adding something on fresh version of forum software would have been trivial), then, after you get that working, migrate in one swoop. It was done such way, once, IIRC.

It's just... in my experience, new software done by team that is working on that exclusively usually works better than old one with custom patches bolted on. While there might be some problems, it is a better choice than throwing maintenance down the drain and experiencing even larger issues when old forum inevitably breaks down on its own.

Ok, I know you know better what is good for you, I promise to shut up now :P

Edit: @pedantry above - Rawhide said it does, not me :P

Shhalahr Windrider
2010-11-17, 03:16 PM
IIUC, the single biggest reason why HTML gets blocked is because it can be used to invoke javascript, so I can see why the board software might try to block people from posting javascript: links.
Yeah, that’s actually a good reason. I suppose the bold tags are meant to provide redundancy with the added “http:” in disabling the link for security purposes.

Rawhide
2010-11-17, 07:12 PM
*snip*

Once again, you've managed to completely ignore everything I've said in your reply.

In your original reply, you stated that this was a suggestions forum, and that if no one made suggestions then this forum would have no reason for existing. I refuted this and you appear to have accepted that refutation.

So, for further clarification: I never said suggestions cannot go here, only that this wasn't the primary of the forum. I also stated, clearly, that suggestions could indeed go here, as well as be PMed directly.

I also stated, clearly, that I disliked such "shoot down" replies as well, but what I disliked even more is when people make replies such as you have. They are inevitably quite false and are totally unhelpful, they add nothing to the conversation but requiring us to explain, time after time, that things are never as simple as they seem on the surface. They also take a lot more of our time than for us to correct the other line of argument, that it is not a simple change, on the rare occasion when that would be true.


Nice list of qualifications, but I have more. SMEE is also a professional programmer running her own business supplying her software, alongside hardware and systems, to banks with much more experience than than she would care to admit. Also, to be perfectly honest, when hiring, I barely even glance at someone's qualifications in IT. They are worth almost nothing around here, you would probably be better off gaining more experience and industry certifications.


You've contradicted yourself:

Um... when the job can be done by a single line in Java, it is simple and blazingly fast... :smallsigh:
and

The way we did it, was to deploy the changes on a dummy, intranet server, try to break the new software in an array of standardized tests (and a few more custom ones), and, when it worked, we migrated to new version.
That is not fast nor simple.



And where, pray tell, I've said anything about deploying changes on a live server? :smallconfused:
For the change to be fast and simple, it would necessitate the change going live without proper documentation and testing, or indeed the rest of the development cycle, including somehow working miraculously now and into the future.

senrath
2010-11-17, 09:32 PM
Edit: @pedantry above - Rawhide said it does, not me :P

He said JavaScript, not Java. They're two completely different languages.

Gralamin
2010-11-27, 03:53 AM
For the change to be fast and simple, it would necessitate the change going live without proper documentation and testing, or indeed the rest of the development cycle, including somehow working miraculously now and into the future.

Agreed completely. An actual development cycle tends to look a lot more complex, especially if you wish for it to keep working with future changes to the software with minimal effort. Even a relatively simple application can have huge amounts of documentation, testing, etc. And assuming you are not using waterfall model, may technically never finish. I've developed in Industry before, and am currently taking more courses on software design. There are very little changes possible that are trivial, even in an ideal environment.

Edit: Just realized this was 10 days ago. Guess the topic is already pretty much dead. :smalltongue: