The Warring States of NPF  

Go Back   The Warring States of NPF > Dead threads
User Name
Password
FAQ Members List Calendar Today's Posts Join Chat

 
View First Unread View First Unread   Click to unhide all tags.Click to hide all tags.  
Thread Tools Display Modes
Unread 04-17-2009, 10:53 PM   #31
Vault Of Thrones
A Threat to the District
 
Vault Of Thrones's Avatar
 
Join Date: Sep 2007
Location: /dev/null
Posts: 444
Vault Of Thrones will become famous soon enough. Eventually. Maybe.
Send a message via ICQ to Vault Of Thrones Send a message via AIM to Vault Of Thrones Send a message via MSN to Vault Of Thrones Send a message via Yahoo to Vault Of Thrones Send a message via Skype™ to Vault Of Thrones
Default

Quote:
Originally Posted by bluestarultor View Post
I was trying to figure it out, but the best method I know had to deal with getting the field by ID, and I have no clue how that would function with multiple members floating around. I'll type it up in a moment.
Couldn't you just do something like this:

Code:
onClick="this.style.background=this.style.background=='#606060'?'#111111':'#606060';"
__________________
Twitter!

Last edited by Vault Of Thrones; 04-17-2009 at 11:15 PM.
Vault Of Thrones is offline Add to Vault Of Thrones's Reputation  
Unread 04-17-2009, 11:25 PM   #32
Sithdarth
Friendly Neighborhood Quantum Hobo
 
Sithdarth's Avatar
 
Join Date: Mar 2004
Location: Outside the M-brane look'n in
Posts: 5,403
Sithdarth is like Reed Richards, but prettier. Sithdarth is like Reed Richards, but prettier. Sithdarth is like Reed Richards, but prettier. Sithdarth is like Reed Richards, but prettier. Sithdarth is like Reed Richards, but prettier. Sithdarth is like Reed Richards, but prettier. Sithdarth is like Reed Richards, but prettier.
Default

Oh man JavaScript works in BBcode. That is totally awesome. If I was more up on standardized JavaScript and the DOM I could totally whip up some JS that would actually replace anything in the spoiler tag with say the word *spoiler* which when clicked would reveal the spoiler text. Its been a few years since I got that one to work and I think it only worked in like Firefox or something like that.
Sithdarth is offline Add to Sithdarth's Reputation  
Unread 04-17-2009, 11:30 PM   #33
bluestarultor
Blue Psychic, Programmer
 
bluestarultor's Avatar
 
Join Date: Feb 2007
Location: Home!
Posts: 8,814
bluestarultor is one of Jay-Z's 99 problems. Possibly two. bluestarultor is one of Jay-Z's 99 problems. Possibly two. bluestarultor is one of Jay-Z's 99 problems. Possibly two. bluestarultor is one of Jay-Z's 99 problems. Possibly two. bluestarultor is one of Jay-Z's 99 problems. Possibly two. bluestarultor is one of Jay-Z's 99 problems. Possibly two. bluestarultor is one of Jay-Z's 99 problems. Possibly two. bluestarultor is one of Jay-Z's 99 problems. Possibly two. bluestarultor is one of Jay-Z's 99 problems. Possibly two. bluestarultor is one of Jay-Z's 99 problems. Possibly two.
Default

Quote:
Originally Posted by Vault Of Thrones View Post
Couldn't you just do something like this:

Code:
onClick="this.style.background=this.style.background=='#606060'?'#111111':'#606060';"
Actually, for text color's sake, it would need to be this way:

Code:
onClick="this.style.background=this.style.background=='#606060'?'#111111':'#606060'; this.style.color=this.style.color=='#606060'?'white':'#606060';"
Overall, it saves very few characters over what I typed, unless he's willing to sacrifice white text.
__________________
Quote:
Originally Posted by Drake Clawfang
Aerith is clearly the most badass character ever. She saves the world. Twice. While dead. No one else can claim that, can they?
I'm gone from here for good. This place gave me many memories to take with me and shaped me greatly. I still care about you guys. I just can't stay.

Journal | Twitter | FF Wiki (Talk) | Projects | Site
bluestarultor is offline Add to bluestarultor's Reputation  
Unread 04-18-2009, 12:23 AM   #34
Sithdarth
Friendly Neighborhood Quantum Hobo
 
Sithdarth's Avatar
 
Join Date: Mar 2004
Location: Outside the M-brane look'n in
Posts: 5,403
Sithdarth is like Reed Richards, but prettier. Sithdarth is like Reed Richards, but prettier. Sithdarth is like Reed Richards, but prettier. Sithdarth is like Reed Richards, but prettier. Sithdarth is like Reed Richards, but prettier. Sithdarth is like Reed Richards, but prettier. Sithdarth is like Reed Richards, but prettier.
Default

Code:
<span id='spoiler' onclick="document.getElementById('moreinfo').style.display = 'block'; document.getElementById('spoiler').style.display = 'none';">Spoiler Alert!</span>
<span style='background:black'><script type="text/javascript"><!--
document.write("<span onclick=\"document.getElementById('moreinfo').style.display = 'none'; document.getElementById('spoiler').style.display = 'block';\" style='display:none; background:black;' id='moreinfo'>");
//-->
</script>Spoilers go here!<script type="text/javascript"><!--
document.write("</span>");
//--></script></span>
I don't know how much you can fit in a BBcode but that will do what I described. Only thing is that for some strange reason it inserts a line break when it shows the spoilers that I can't seem to get rid of.
Sithdarth is offline Add to Sithdarth's Reputation  
Unread 04-18-2009, 12:36 AM   #35
MasterOfMagic
ahahah
 
MasterOfMagic's Avatar
 
Join Date: Mar 2004
Posts: 3,456
MasterOfMagic is a ray of sunshine lighting up your life. MasterOfMagic is a ray of sunshine lighting up your life. MasterOfMagic is a ray of sunshine lighting up your life. MasterOfMagic is a ray of sunshine lighting up your life.
Default

Oh my. We're starting to get fancy.

I like fancy. Highlighting spoiler text makes my head hurt.
MasterOfMagic is offline Add to MasterOfMagic's Reputation  
Unread 04-18-2009, 12:54 AM   #36
Sithdarth
Friendly Neighborhood Quantum Hobo
 
Sithdarth's Avatar
 
Join Date: Mar 2004
Location: Outside the M-brane look'n in
Posts: 5,403
Sithdarth is like Reed Richards, but prettier. Sithdarth is like Reed Richards, but prettier. Sithdarth is like Reed Richards, but prettier. Sithdarth is like Reed Richards, but prettier. Sithdarth is like Reed Richards, but prettier. Sithdarth is like Reed Richards, but prettier. Sithdarth is like Reed Richards, but prettier.
Default

Whoops made a mistake. In order to avoid spoilering people without javascript enabled or people with old browsers I had to put a span tag in that would black out the text and I forgot to make the script undo that.
Code:
 <span id='spoiler' onclick="document.getElementById('moreinfo').style.display = 'block';document.getElementById('moreinfo').style.background = ''; document.getElementById('spoiler').style.display = 'none';">Spoiler Alert!</span>
<span id='nojava' style='background:black'><script type="text/javascript"><!--
document.write("<span onclick=\"document.getElementById('moreinfo').style.display = 'none'; document.getElementById('spoiler').style.display = 'block';\" style='display:none; background:black;' id='moreinfo'>");
//-->
</script>Spoilers go here!<script type="text/javascript"><!--
document.write("</span>");
//--></script></span>
This works perfectly. You'd want to put the background of the nojava span tag as the correct spoiler color and the {param} would obviously go where it says Spoilers go here.
Sithdarth is offline Add to Sithdarth's Reputation  
Unread 04-18-2009, 01:08 AM   #37
synkr0nized
synk-ism
 
synkr0nized's Avatar
 
Join Date: Nov 2003
Location: throughout the Wired
Posts: 6,861
synkr0nized isn't just above the law -- they are the law. synkr0nized isn't just above the law -- they are the law. synkr0nized isn't just above the law -- they are the law. synkr0nized isn't just above the law -- they are the law. synkr0nized isn't just above the law -- they are the law. synkr0nized isn't just above the law -- they are the law. synkr0nized isn't just above the law -- they are the law. synkr0nized isn't just above the law -- they are the law. synkr0nized isn't just above the law -- they are the law. synkr0nized isn't just above the law -- they are the law. synkr0nized isn't just above the law -- they are the law.
Send a message via ICQ to synkr0nized Send a message via AIM to synkr0nized Send a message via MSN to synkr0nized Send a message via Skype™ to synkr0nized
Default

I am a fan of forum communities that reveal spoiler text on hover instead of requiring any clicks. A good example of this can be seen in SA LP threads, archived and otherwise. This would simply require the appropriate text styles added as events in the CSS for the spoiler tag: an onmouseover for hovering over the hidden area with a color that can be seen over the background and onmouseout for when not wishing to view the spoiler with the same color as the background.

However, I see that the advantage of the click method is that it remains visible without worrying about mouse placement, so maybe folks prefer that. I've just grown fond of the highlighting version.

You would still need the catch for those without javascript enabled.
__________________

Find love.
synkr0nized is offline Add to synkr0nized's Reputation  
Unread 04-18-2009, 01:33 AM   #38
Sithdarth
Friendly Neighborhood Quantum Hobo
 
Sithdarth's Avatar
 
Join Date: Mar 2004
Location: Outside the M-brane look'n in
Posts: 5,403
Sithdarth is like Reed Richards, but prettier. Sithdarth is like Reed Richards, but prettier. Sithdarth is like Reed Richards, but prettier. Sithdarth is like Reed Richards, but prettier. Sithdarth is like Reed Richards, but prettier. Sithdarth is like Reed Richards, but prettier. Sithdarth is like Reed Richards, but prettier.
Default

That change is relatively simple really. The onclick trigger just changes to whatever you happen to want to trigger the spoiler switch. In other news I fixed the line break problem.

Code:
<span id='spoiler' onclick="document.getElementById('moreinfo').style.display = 'inline';document.getElementById('nojava').style.background = ''; document.getElementById('spoiler').style.display = 'none';">Spoiler Alert!</span>
<span id='nojava' style='background:black'><script type="text/javascript"><!--
document.write("<span onclick=\"document.getElementById('moreinfo').style.display = 'none'; document.getElementById('spoiler').style.display = 'inline';\" style='display:none;' id='moreinfo'>");
//-->
</script>Spoilers go here!<script type="text/javascript"><!--
document.write("</span>");
//--></script></span>
And I feel stupid for having not seen that fix earlier.

Last edited by Sithdarth; 04-18-2009 at 02:07 AM.
Sithdarth is offline Add to Sithdarth's Reputation  
Unread 04-18-2009, 01:52 AM   #39
synkr0nized
synk-ism
 
synkr0nized's Avatar
 
Join Date: Nov 2003
Location: throughout the Wired
Posts: 6,861
synkr0nized isn't just above the law -- they are the law. synkr0nized isn't just above the law -- they are the law. synkr0nized isn't just above the law -- they are the law. synkr0nized isn't just above the law -- they are the law. synkr0nized isn't just above the law -- they are the law. synkr0nized isn't just above the law -- they are the law. synkr0nized isn't just above the law -- they are the law. synkr0nized isn't just above the law -- they are the law. synkr0nized isn't just above the law -- they are the law. synkr0nized isn't just above the law -- they are the law. synkr0nized isn't just above the law -- they are the law.
Send a message via ICQ to synkr0nized Send a message via AIM to synkr0nized Send a message via MSN to synkr0nized Send a message via Skype™ to synkr0nized
Default and change as needed to fit this board's HTML/CSS

Quite right, it's just a matter of changing the function name used. However, you'd need to add the onmouseout for when the mouse pointer is moved away.
__________________

Find love.
synkr0nized is offline Add to synkr0nized's Reputation  
Unread 04-18-2009, 02:09 AM   #40
Meister
Pure joy
 
Meister's Avatar
 
Join Date: Nov 2003
Location: Germany
Posts: 10,689
Meister slew the jabberwocky! Callooh! Callay! Meister slew the jabberwocky! Callooh! Callay! Meister slew the jabberwocky! Callooh! Callay! Meister slew the jabberwocky! Callooh! Callay! Meister slew the jabberwocky! Callooh! Callay! Meister slew the jabberwocky! Callooh! Callay! Meister slew the jabberwocky! Callooh! Callay! Meister slew the jabberwocky! Callooh! Callay! Meister slew the jabberwocky! Callooh! Callay! Meister slew the jabberwocky! Callooh! Callay! Meister slew the jabberwocky! Callooh! Callay!
Send a message via AIM to Meister Send a message via MSN to Meister
Default

Quote:
Originally Posted by synkr0nized View Post
I am a fan of forum communities that reveal spoiler text on hover instead of requiring any clicks.
Fun fact: this is exactly what I was going for with the newly coloured spoiler text, because I saw it on SA and it's the bees knees as far as I'm concerned. But a few seconds in the project I realized I don't know jack about javascript.
Meister is offline Add to Meister's Reputation  
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 05:10 AM.
The server time is now 10:10:05 AM.


Powered by: vBulletin Version 3.8.5
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.