|
Post by Wormopolis on Mar 7, 2009 19:52:36 GMT -8
Browser tested: IE and FF placement: board or global footer
Creates numbered links inline with long posts that link to footnote text at the bottom. Links can be styled with CSS (class footyLink).
insert [ footnote:N]text to appear as footnote[/footnote]
no space before footnote and [. N is a unique number for that note.
<script type="text/javascript"> <!-- // footNotes v 1.5 // by Wormopolis - wormocodes.proboards.com // Please keep header intact - do not repost
// no editing necessary - use style tag to modify footyLink
tds=document.getElementsByTagName('td'); if (location.href.match(/action=post/)) { function getPrevFNcount() { txt=postForm.message.value; return txt.split('[footnote:').length; }
for (f=0; f<tds.length; f++) { if (tds[f].width=="30%" && tds[f].className=="windowbg2" && tds[f].innerHTML.match(/add tags:/i)) { destPlace=tds[f].nextSibling; FNbtn=document.createElement('a'); FNbtnImg=document.createElement('img'); FNbtnImg.src="http://i197.photobucket.com/albums/aa250/WORMOPOLIS/footNoteImg.jpg"; FNbtnImg.border=0; FNbtn.href='javascript:snum=getPrevFNcount(); fnum=prompt("What note number is this?",snum); add("[footnote:"+fnum+"]","[/footnote]")'; FNbtn.appendChild(FNbtnImg); destPlace.appendChild(document.createElement('br')); destPlace.appendChild(document.createElement('br')); destPlace.appendChild(FNbtn);
} } } else { for (f=0; f<tds.length; f++) { if (tds[f].colSpan==3 && tds[f].vAlign=="top" && tds[f].firstChild && tds[f].firstChild.nodeName.match(/hr$/i)) { pnum=tds[f].parentNode.parentNode.parentNode.parentNode.previousSibling.firstChild.name; if (tds[f].innerHTML.match(/\[footnote:(\d+?)\](.*?)\[\/footnote\]/i)) { tds[f].appendChild(document.createElement('hr')); } while (tds[f].innerHTML.match(/\[footnote:(\d+?)\](.*?)\[\/footnote\]/i)) { noteNum=RegExp.$1; noteText=RegExp.$2; newRef='<a class="footyLink" name="ref'+pnum+'_'+noteNum+'" href="#refback'+pnum+'_'+noteNum+'"><sup class="footyLink">'+noteNum+' </sup></a>'; tds[f].innerHTML=tds[f].innerHTML.replace(/\[footnote:(\d+?)\](.*?)\[\/footnote\]/i,newRef); newRefBack=document.createElement('div'); newRefBack.innerHTML='<a class="footyLink" name="refback'+pnum+'_'+noteNum+'" href="#ref'+pnum+'_'+noteNum+'"><sup class="footyLink">'+noteNum+' </sup></a>'; tds[f].appendChild(newRefBack); newNote=document.createElement('font'); newNote.size=1; newNote.innerHTML=noteText; newRefBack.appendChild(newNote); tds[f].appendChild(document.createElement('br')); } } } } // --> </script>
Preview: see post below
|
|
|
Post by Wormopolis on Mar 7, 2009 19:54:15 GMT -8
Example text taken from Wikipedia:
When all three chains went into bankruptcy, investor Philip Anschutz[footnote:1]Also owns tele-com companies, railroads, and sports franchises[/footnote] bought substantial investments in all three companies, becoming majority owner. In March 2002, Anschutz announced plans to consolidate all three of his theatre holdings under a new parent company, Regal Entertainment Group. Regal's Mike Campbell and UA's Kurt Hall were named co-CEOs, with Campbell overseeing the theatre operations from Regal Cinemas' headquarters in Knoxville, and Kurt Hall[footnote:2]He looks like kevin costner[/footnote] heading up a new subsidiary, Regal Cinemedia, from the UA offices in Centennial, Colorado. The Edwards corporate offices were closed.
Regal and United Artists had attempted to merge before, in 1998, using a similar method. Investment firms Kohlberg Kravis Roberts and Hicks, Muse, Tate & Furst announced plans to acquire Regal, then merge it with UA (which would be bought by Hicks, Muse) and Act III (controlled by KKR), with the new company using the Regal Cinemas name. UA eventually dropped out of the merger, but the merger between Regal and Act III went through.
A Regal Cinemas location in suburban PennsylvaniaAs Regal consolidated the three chains, CineMedia began work on a new digital distribution system to provide a new "preshow", replacing the slides and film advertisements with digital content. NBC and Turner were among the first to sign on to provide content for the venture, and the preshow, dubbed "The 2wenty"[footnote:3]We called it the twenty wenty[/footnote], went online in February 2003. The new distribution system was also meant to be used for special events such as concerts. Regal CineMedia merged with AMC Theatres' National Cinema Network in 2005 to form National CineMedia. In effect, this was a takeover of NCN by Regal CineMedia, as Kurt Hall stayed on as CEO and AMC adopted Regal's preshow. Regal owned 50% of the new company before it went public.
Since the 2002 formation of REG, it has acquired several smaller chains. In April 2005, Eastern Federal, which was a fairly prominent theatre company in the Southeastern United States, was brought into the Regal family. It acquired San Ramon, California-based Signature Theatres from Phil Harris on September 30, 2004, and took over the US assets of Hoyts Cinemas in 2004. Unlike the merger with UA and Edwards, Regal has rebranded all of these theatres as Regal Cinemas.[footnote:4]and they still wont give me a day off[/footnote]
|
|
|
Post by Wormopolis on May 30, 2009 12:52:39 GMT -8
added in UBBC button. clicking the button will prompt for a note number, if it finds previous notes, it will automatically increment the number in the prompt default.
|
|
ddddyyyy
Not New Member
Posts: 2
ddddyyyy said 0 great things
|
Post by ddddyyyy on Jun 22, 2009 19:12:30 GMT -8
I agree with KIKOmonster
LINKS REMOVED. YOU SURE YOU WANT TO GO DOWN THIS PATH WITH ME? I WILL COME AFTER YOU.
|
|
|
Post by Wormopolis on Jun 23, 2009 21:28:35 GMT -8
and Im sure KIKOmonster appreciates your approval, but do that again and it will end badly for you.
|
|
tutela
Not New Member
Posts: 17
tutela said 0 great things
|
Post by tutela on Mar 4, 2010 5:35:35 GMT -8
When I try applying footnotes on my site it erases the whole post and makes it completely invisible in non-accessible. I did not edit your code and I am putting it in this format [ footnote:1]Test[/footnote] without the space of course and a bunch of other text in the post as well. Any suggestions?
|
|
|
Post by Wormopolis on Mar 5, 2010 2:18:37 GMT -8
intriguing. do you have a link to that post I can look at? if you edit the message is all the text still there? The example post is running that same version, so it might be conflicting with something else.
|
|
tutela
Not New Member
Posts: 17
tutela said 0 great things
|
Post by tutela on Mar 6, 2010 0:08:51 GMT -8
Actually, my description was inaccurate, and no I do not have any links at this time as I removed all the posts out of frustration. However, what really happens is that it makes the "footnoted" post completely non-existent. For example, I had an Introductions topic called "Greetings" inside of the sub-board Introductions. In that topic, I introduced myself. A newer person replied to the topic introducing themselves as well. So then my topic had two posts. I applied the footnotes code a little bit later when I found it to test it out and everything. The footnotes button shows up in the posts correctly by the way. In any case, when I put the footnotes in my post, and then clicked "modify" to save the changes, it wiped my post completely off the topic, saying that the only post was the other member and when I looked at who started the topic, it states it was them instead of me. That's the weirdest part, since I have never heard of any code even being able to do that. So, I clicked modify to see if all my stuff was just invisible, but all I could modify was the member's post. Mine did not show up at all If you like, I can do a test post with a link to show you, but I hope I have described it well enough for you. Thanks for your assistance.
|
|
|
Post by Wormopolis on Mar 6, 2010 0:30:10 GMT -8
that... is odd.
yeah if you could make a test post so I could see this replicated that would be great. most likely it didnt actually erase your post, it just somehow merged them together. viewing the same page with NOHEADERS[footnote:1]putting &NOHEADERS in the URL will temporarily disable headers[/footnote] should have shown all the posts still there.
if you could replicate the problem again and get me a link I can investigate what is going on.
|
|
tutela
Not New Member
Posts: 17
tutela said 0 great things
|
Post by tutela on Mar 6, 2010 0:56:56 GMT -8
Another interesting effect that I just found out when making the test post. Once the footnote code has errored out my post, it can no longer be replied to. It says the reply goes through, but there is nothing new under the topic. This is so strange[footnote:1]an oddity[/footnote] :S TEST LINKFor some reason it's not linking to the site. Putting the actual address in the URL works though. www.pandemonium2010.proboards.com/index.cgi?action=display&board=improvements&thread=37&page=1The second link works as well, you must have some conflict with using [ url=""] [/url] tags? Something else I have noticed with footnote code, at least with me using Safari on your own website, is when I click on the "1" link next to yours or my footnote link, then it leads back to the original link you put in your OP instead of the footnote that is relevant, not sure if you are experiencing this as well?
|
|
|
Post by Wormopolis on Mar 6, 2010 1:08:07 GMT -8
I am actually working on that right now. I noticed it too when I did the post above. Im adding in a postnum to the link. I will be reposting the new version in a few minutes.
|
|
|
Post by Wormopolis on Mar 6, 2010 1:11:08 GMT -8
reference bug fixed. new version posted.
now going to your site to see what I can see.
|
|
tutela
Not New Member
Posts: 17
tutela said 0 great things
|
Post by tutela on Mar 6, 2010 1:12:41 GMT -8
Have you seen how my site handles the code LOL? Do you have any possible explanation for it? In any case, I am glad we found a potential error through our efforts in looking at my error lol, gotta hate those errors that go on being invisible until the actual code is implemented the right way lol, right? Will you need header/footer access? I try to make sure all the code I use is properly labeled.
|
|
|
Post by Wormopolis on Mar 6, 2010 1:13:08 GMT -8
TEST LINKFor some reason it's not linking to the site. Putting the actual address in the URL works though. The second link works as well, you must have some conflict with using [ url=""] [/url] tags? [/quote] you had quote marks around the link. UBBC use straight links.
|
|
tutela
Not New Member
Posts: 17
tutela said 0 great things
|
Post by tutela on Mar 6, 2010 1:16:15 GMT -8
aww, crap..thats embarrassing . I have been working with HTML for a bit, guess I crossed over with BBC lolz, my mistake o.O Also, just in case you didnt see my last question...will you be needing header/footer access?
|
|