HOME       >>       Staff Room

Updates To The Note Bbcode


miCRoSCoPiC^eaRthLinG

Hey all
[tab][/tab]This message is specifically aimed at one of the admins.. Time to make a minor update to the NOTE BBCode. Earlier on there was a big problem with the design, such that, if you had multiple notes on the same page or post, clicking on one would collapse/expand all others. Mastercomputers fixed the problem at Antilost, with a very subtle and clever trick, bypassing the need for that huge collapse/expand javascript totally. As a result the BBCode stands much shorter and smoother

Here's the code update:

<link type="text/css" href="LINK.TO.YOUR.NOTICE.CSS" /><div > <div onClick="java script:this.nextSibling.nextSibling.style.display = (this.nextSibling.nextSibling.style.display == 'block') ? 'none' : 'block';"> <div >Notice from {option}: </div> </div> <div style="display:block;">{content}</div></div>

That's the whole of it Remember that lengthy JS code.. it's entirely gone. Also notice that the div id's are gone and we're using class only.. the id's are quite redundant and not needed anymore.

Saint_Michael

well thanks for the update, funny thing is that I never really notice that all with the note tags at least on this site.But why the need for javascript to use the note tag? was it to make the connection for the bbcode and the css? but of course that would completly idiotic to do that.but of course with the new one up above why the need for javascript though?


miCRoSCoPiC^eaRthLinG

No no - the JavaScript was there to give the note a collapsing/expanding feature, so that when you click on the note title, it either shows or hides the message body.

 

Earlier on there were bugs in the coding that resulted in funny situations when there were multiple notes on the same page/post:

When you clicked on the header of a certain note - it would collapse/expand all other notes on the page, or

It wouldn't act on any of them.

All this while we were trying to contain the collapse/expand behaviour to each specific note... That works finally.

 

You don't need JS to link the CSS to it - the <LINK REL...> is good enough for that.


Dooga

I think it shouldn't collaspe any of them... just a useless feature if you ask me.


miCRoSCoPiC^eaRthLinG

I think it shouldn't collaspe any of them... just a useless feature if you ask me.



I agree - it's pretty useless, but it helps in making an otherwise very simple BBCode into something quite snazzy Believe me, a collapsing note tag catches the fancy of many

BuffaloHelp

Update complete.m^e thank you for all your hard work. The simplified version of NOTE is just awesome!Testing

Notice from BuffaloHELP:
Testing testing...
*editNote tag is working but my browser shows error in script and note tags are not collapsing. Take for example, this testing note and my signature note.

miCRoSCoPiC^eaRthLinG

No problem But this time all the credit goes to mastercomputers - he was the one who simplified it like this. The original thread can be found here: Updates to the NOTE BBCode


Saint_Michael

ooh i never new the note tag had the collapse feature must have missed that post about it, but yeah a pretty useless feature for this version board at least but i think with the older versions it would have looked pretty good to use.On top of ie not working ff doesn't work either with the collapse either, unless the collapse was taken out completely then nevermind that.


Johnny

That's hot. Props to mastercomputers, sounds like a very nice transition.


Kubi

Really nice, from a lot of code, to a lot of nothingness. .But it doesn't collapse now, as Buffalo stated..



VIEW DESKTOP VERSION REGISTERGET FREE HOSTING

Xisto.com offers Free Web Hosting to its Members for their participation in this Community. We moderate all content posted here but we cannot warrant full correctness of all content. While using this site, you agree to have read and accepted our terms of use, cookie and privacy policy. Copyright 2001-2019 by Xisto Corporation. All Rights Reserved.