Advertisement
Guest User

tothewater global footer

a guest
May 15th, 2012
393
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 25.12 KB | None | 0 0
  1. <!-- &&& Besides for a fuckton of scripts, not much really goes into the footer.
  2.  
  3. Here's a list of all the mods I've included below. On the off-chance that you don't want one of these, go ctrl+f and delete them.
  4.  
  5. Smagii's Side Tables Footer
  6. Remove All Borders
  7. Move Menu Bar Anywhere
  8. PopThosePringles' Category Splitter
  9. something to remove # of times read column
  10. Remove Forum Name | Topics | Posts
  11. Remove Last Edit
  12. Justify Text In Posts
  13. Remove Info Center Title Bar
  14. Images to Text
  15. Remove Folder in Author|Topic Row
  16. Style UBBC Tags v2
  17. ENHANCED UBBC TABLE TAGS
  18. Code Tag Modification
  19. Money Hack
  20. Build Your Own Mini-Profile
  21.  
  22. You'll only need to edit 1) the Money Hack to adjust the amount of money gained per post to whatever you want, and 2) Build Your Own Mini-Profile to make your own custom mini-profile.
  23. -->
  24.  
  25.  
  26. <!-- =====
  27. START Smangii's {LEFT} Side Tables *REVISED*
  28. Global Footer
  29. ===== -->
  30.  
  31. </td></tr></table>
  32.  
  33. <script type="text/javascript">
  34. <!--
  35. table = document.getElementsByTagName('table');
  36. for(i = 0; i < table.length; i ++) {
  37. with(table[i]) {
  38. if(width == '92%') {
  39. width = '100%';
  40. }}}
  41. //-->
  42. </script>
  43.  
  44.  
  45.  
  46. <script type="text/javascript">
  47. <!--
  48. /* remove all borders */
  49.  
  50. var table = document.getElementsByTagName("table");
  51. for(i=0; i<table.length; i++){
  52.    table[i].cellSpacing = "0";
  53.    table[i].border = "0";
  54. }
  55.  
  56. //-->
  57. </script>
  58.  
  59.  
  60. <script type="text/javascript"><!--
  61. /* Move Menu Bar Anywhere by iPokemon
  62. Feel free to edit and repost
  63. Just keep this header intact!
  64. */
  65. var menu_div = document.getElementById('menu_div');
  66. var menu_html = document.getElementsByTagName('font').item(3);
  67. var menuClone = menu_html.cloneNode(true);
  68. menu_div.innerHTML=menuClone.innerHTML;
  69. document.getElementsByTagName('tr')[2].style.display="none";
  70. //--></script>
  71.  
  72.  
  73. <script type="text/javascript">
  74. <!--
  75.  
  76. // Created by PopThosePringles
  77.  
  78. // Size of the gap between categories
  79. var gapSize = 15;
  80.  
  81. var tabHTML = '<td id="rr" colspan="5"></table></td></tr></table><div style="height:' + gapSize + '"></div><table width="100%" cellspacing="0" cellpadding="0" class="bordercolor"><tr><td><table cellpadding="4" cellspacing="1" width="100%"><tr>';
  82.  
  83. if(location.href.match(/\.com(\/|.+cgi(\?|#.+|\?\w+=home)?)?$/i)){
  84.     var tBod = document.getElementsByTagName("tbody");
  85.     for(tb = 0; tb < tBod.length; tb ++){
  86.          for(r = 2; r < tBod.item(tb).rows.length; r ++){
  87.              var tBodObj = tBod.item(tb).rows.item(r).cells.item(0);
  88.              if(tBodObj.className == "catbg" && tBodObj.colSpan == "5" && tBodObj.align != "right"){
  89.                  var c = tabHTML + tBod.item(tb).firstChild.innerHTML + "</tr>";
  90.                  var p = tBodObj.parentNode.innerHTML;
  91.             var tBodPar = tBod.item(tb).parentNode.parentNode.parentNode.parentNode.parentNode;
  92.                  tBodPar.parentNode.innerHTML = tBodPar.parentNode.innerHTML.replace(p, c + p);
  93.              }
  94.              if(tBod.item(tb).rows.item(r).firstChild.id == "rr"){
  95.                  tBod.item(tb).rows.item(r).style.display = "none";
  96.              }
  97.          }
  98.     }
  99. }
  100.  
  101. //-->
  102. </script>
  103.  
  104. <script type="text/javascript">
  105. <!--
  106. if(location.href.match(/ion=(display|search2|(user)?recent)/)) {
  107. var bit=document.getElementsByTagName('td')
  108. for(i=0;i<bit.length;i++){
  109. if(bit[i].innerHTML.match(/\(Read (.+?) times\)/)){
  110. var reg=RegExp.$1
  111. bit[i].innerHTML=bit[i].innerHTML.replace('(Read '+reg+' times)','')
  112. }
  113. }
  114. }
  115. //-->
  116. </script>
  117.  
  118. <script type="text/javascript">
  119. <!--
  120. /* remove Forum Name | Topics | Posts...
  121. and add thread & post info by california */
  122. var td=document.getElementsByTagName("td");
  123. if(location.href.match(/\/?((index\.cgi)?\??(action=(ma.+ad|logout|home))?(#.+)?)?$/)){
  124.    for(i=0;i<td.length;i++){
  125.        if(td[i].width=="1%" && td[i].innerHTML.match(/\d/)){
  126.            if(td[i+1].width.match(/^(1|7)%$/)){
  127.                td[i].innerHTML+="<br />threads";
  128.                td[i].width="8%";
  129.            }else{
  130.                td[i].innerHTML+="<br />posts";
  131.                td[i].width="7%";
  132.            }
  133.        }
  134.        if(td[i].width=="8%" && !td[i].innerHTML.match(/thread/)){
  135.            td[i].width="4%";
  136.        }
  137.        if(td[i].className=="titlebg" && td[i].innerHTML.match(/Forum Name/i)){
  138.            td[i].parentNode.style.display="none";
  139.        }
  140.    }
  141. }
  142. //-->
  143. </script>
  144.  
  145.  
  146. <script type="text/javascript">
  147. <!--
  148. /* remove last edit */
  149. var font=document.getElementsByTagName("font");
  150. if(location.href.match(/on=(displ|search2|(user)?rece)/)){
  151.    for(i=0;i<font.length;i++){
  152.        if(font[i].innerHTML.match(/Last\sEdit:/i) && font[i].parentNode.align=="left"){
  153.            font[i].style.display="none";
  154.        }
  155.    }
  156. }
  157. // -->
  158. </script>
  159.  
  160.  
  161.  
  162. <script type="text/javascript">
  163. <!--
  164. // Justify text in posts..
  165.  
  166. var jButton = 'http://i562.photobucket.com/albums/ss64/LUNATICxblitz/justify.png';
  167.  
  168. // Add button to posting page..
  169.  
  170. if(document.postForm)
  171. {
  172. var buttons = document.images;
  173. for(b=0; b<buttons.length; b++)
  174. {
  175. if(buttons[b].src.match(/\/right\.(gif|png)/i))
  176. {
  177. buttons = buttons[b+1].parentNode;
  178. break;
  179. }}
  180. var justifyButton = document.createElement('A');
  181. justifyButton.setAttribute('href','javascript:add("[justify]","[/justify]")');
  182. justifyButton.innerHTML = '<img src="'+jButton+'" border="0" alt="Justify">';
  183. buttons.parentNode.insertBefore(justifyButton,buttons);
  184. }
  185.  
  186. // Find and justify text in posts...
  187.  
  188. if(!document.location.href.match(/action=headersfooters/))
  189. {
  190. var posts = document.getElementsByTagName('td');
  191.  
  192. for(p=0; p<posts.length; p++)
  193. {
  194. if(((posts[p].vAlign == 'top' && posts[p].colSpan == '3') || (document.postForm && posts[p].width == '100%' && posts[p].className == 'windowbg2')) && posts[p].innerHTML.match(/\[justify\]/i))
  195. {
  196. posts[p].innerHTML = posts[p].innerHTML.replace(/\[justify\]/ig,'<div align="justify">');
  197. posts[p].innerHTML = posts[p].innerHTML.replace(/\[\/justify\]/ig,'</div>');
  198. }}}
  199. // -->
  200. </script>
  201.  
  202. <script type="text/javascript">
  203. //Remove info center titlebar
  204. if( this.location.href.match(/\.com(\/(index\.cgi(\?|#\w+)?)?)?$/))
  205. {
  206. var T = document.body.getElementsByTagName("td");
  207. for(t=0;t<T.length;t++){
  208. if(T[t].className == "titlebg" && T[t].innerHTML.match(/Info\sCenter/))
  209. T[t].parentNode.style.display = "none";
  210. }}
  211. </script>
  212.  
  213. <script type = 'text/javascript'>
  214. /*
  215. Images to Text
  216. By Michael (Wrighty)
  217. Do Not Repost, Rip, Claim or Edit
  218. */
  219. for(n = 0, i = document.getElementsByTagName('img'); n < i.length; n++)
  220. if(i[n].src.match(/(s\d+\.)?images\.proboards\.com/) && i[n].src.match(/(\/button|search2|newpoll)/) && i[n].src.match(/(png|gif)$/) && !i[n].src.match(/_sm/)){
  221. var f = document.createElement('font');
  222. f.className = 'button';
  223. i[n].parentNode.replaceChild(f.appendChild(document.createTextNode(i[n].alt.replace(/(\[|\])/g, ''))).parentNode, i[n]);
  224. n--;
  225. }
  226. </script>
  227.  
  228.  
  229. <script type="text/javascript">
  230. /* Remove Folder in Author|Topic Row by Scorpian
  231. [url]http://roddyinnovations.com/[/url] */
  232.  
  233. var riTd = document.getElementsByTagName('td');
  234. if(location.href.match(/action=display/i))
  235.     for(b=0; b<riTd.length; b++)
  236.        if(riTd[b].width == '20%' && riTd[b].className == 'catbg' && riTd[b].innerHTML.match(/Author/i))
  237.            riTd[b].firstChild.removeChild(riTd[b].firstChild.firstChild);
  238. </script>
  239.  
  240.  
  241. <script type="text/javascript"><!--
  242. /* Style UBBC Tags v2
  243. Created by iPokemon
  244. [url]http://bytemecodes.proboards.com/[/url]
  245. Do not redistribute or call as your own
  246. Updated September 2nd 2011
  247. Copyright 2011
  248. version = 1*/
  249. if(document.postForm) {
  250. document.postForm.color.parentNode.innerHTML+='<a href="javascript:add(\'[style=]\',\'[/style]\')"><img src="http://i562.photobucket.com/albums/ss64/LUNATICxblitz/style.png" alt="Style" border="0" /></a>';
  251. document.postForm.color.parentNode.innerHTML+='<a href="javascript:add(\'[newclass=]\',\'[/newclass]\')"><img src="http://i562.photobucket.com/albums/ss64/LUNATICxblitz/style.png" alt="New Class" border="0" /></a>';
  252. document.postForm.color.parentNode.innerHTML+='<a href="javascript:add(\'[classy=]\',\'[/classy]\')"><img src="http://i562.photobucket.com/albums/ss64/LUNATICxblitz/style.png" alt="Classy" border="0" /></a>';
  253. }
  254.  
  255. if(pb_action.match(/(calendar|pm|pre)view|search2|display/i)){
  256. var td = document.getElementsByTagName('td');
  257. var matCH=/\[style=(.+?)\]/gi;
  258. var matCH2=/\[\/style\]/gi;
  259.    var matCH3=/\[newclass=(.+?)\](.+?)\[\/newclass\]/gi;
  260.    var matCH4=/\[classy=(.+?)\]/gi;
  261.    var matCH5=/\[\/classy\]/gi;
  262.    var table = document.getElementsByTagName('table');
  263.    for(x=5;x<table.length;x++){
  264.        if(table[x].className == "code" && table[x].innerHTML.match(/(\[style|\[newclass|\[classy)/i)){
  265.            table[x].innerHTML=table[x].innerHTML.replace(/\[/,eval("&#<b></b>91;"))
  266.            table[x].innerHTML=table[x].innerHTML.replace(/\]/,eval("&#<b></b>93;"));
  267.        }
  268.    }
  269. for(l=0;l<td.length;l++){
  270. if(td[l].width=="80%"){
  271.            td[l].innerHTML = td[l].innerHTML.replace(matCH, '<div style="$1">').replace(matCH2, '</div>').replace(matCH3, '<style type="text/css"> .$1 {$2} </style>').replace(matCH4, '<div class="$1">').replace(matCH5, '</div>');
  272. }
  273. }
  274. }
  275. //--></script>
  276.  
  277.  
  278. <script type="text/javascript">
  279. <!--
  280. /*
  281. Name: ENHANCED UBBC TABLE TAGS
  282. Location: Global Footer
  283. Created by EtonBones at yahoo d o t com
  284. Do not redistribute without permission
  285. Feel free to edit provided a notation is
  286. added to this header stating that fact.
  287. THIS HEADER MUST REMAIN INTACT.
  288. */
  289.  
  290.  
  291. /*********** *****START EDITABLE USER OPTIONS***********************
  292. If not concerned about the security risk posed by allowing users the ability
  293. to set events such as onclick and onmouseover in their posts
  294. set the following variable to false*/
  295. var DisallowEvents=true;
  296.  
  297. /*If UBBC Undo installed and you would like enhanced tags added to history
  298. set the following variable to true*/
  299. var UUInstalled=false;
  300. /******END EDITABLE USER OPTIONS (NO FURTHER EDITING NECESSARY)*******/
  301.  
  302.  
  303. var NoGood="Enhanced tags need to be between the [td] and [/td]";
  304. function enhanceTable(){
  305. var td=document.getElementsByTagName("td");
  306. for(i=0;i<td.length;i++){
  307. /* if(td[i].width=="20%" && td[i].className.match(/windowbg/)){
  308. var msg=td[i].parentNode.getElementsByTagName('td')[1].getElementsByTagName('tr')[1]; -5/7/10 */
  309. if(td[i].width=="20%" && td[i].className.match(/windowbg/) && td[i].innerHTML.match(/>(Posts: [\d,]+|Guest)</)){
  310.            var msg=td[i].nextSibling.getElementsByTagName('tr')[1];
  311. if(msg.getElementsByTagName('table').length){
  312. for(l=0;l<msg.getElementsByTagName('table').length;l++){
  313. parseTags(msg.getElementsByTagName('table')[l]);
  314. //separate func needed since rowspans need to be set first in order to count columns
  315. parseTH(msg.getElementsByTagName('table')[l]);
  316. }
  317. }
  318. }else if(document.postForm && td[i].width=="30%" && td[i].className.match(/windowbg2/) && !document.getElementById('enhancedTable')){
  319. var TR=td[i].parentNode;
  320. var newTR=TR.parentNode.insertRow(TR.rowIndex+1);
  321. TR.id="enhancedTable";
  322. var newTD=document.createElement('td');
  323. newTD.width='30%';
  324. newTD.className='windowbg2';
  325. newTD.innerHTML='<font size="2">Enhanced Table Tags:</font>';
  326. newTR.appendChild(newTD);
  327. newTD=document.createElement('td');
  328. newTD.width='70%';
  329. newTD.className='windowbg2';
  330. newTD.innerHTML='<font size="2">Select Tag:</font><select name="etags" onChange=" addEtag(this.options[this.selectedIndex].value);this.selectedIndex=0;" ><option value="" selected="1">Enhanced Table Tags</option><option value="[th]" >Header</option><option value="[cs=2]">Span Columns</option><option value="[rs=2]">Span Rows</option><option value="[bg=white]">Background Color</option><option value="[atrb=border,0,true]">Any Attribute</option></select> ';
  331. newTR.appendChild(newTD);
  332. }else if(document.postForm && td[i].width=="100%" && td[i].className.match(/titlebg/) && td[i].innerHTML.match(/Topic Summary/)){
  333. var table=td[i].parentNode.parentNode;
  334. var re= /(?:[^\"])(\[(th|cs|rs|bg|atrb).*?\])/gim;
  335. if(table.className.match(/tbody/i))table=table.parentNode;
  336. for(l=2;l<table.rows.length;l=l+2){
  337. if(table.rows[l].cells[0].innerHTML.match(/(?:[^\"\=])(\[(th|cs|rs|bg|atrb).*?\])/gim)){
  338. while(table.rows[l].cells[0].innerHTML.match(/(?:[^\"\=])(\[(th|cs|rs|bg|atrb).*?\])/im ) ){
  339. table.rows[l].cells[0].innerHTML= table.rows[l].cells[0].innerHTML.replace(/(?:[^\"\=])(\[(th|cs|rs|bg|atrb).*?\])/im, stripAnchor(RegExp.$1,RegExp.$2) ) ;
  340. }
  341. }
  342. }
  343. }
  344. }
  345. }
  346.  
  347. function stripAnchor(str){
  348. var t=/(<A href\=.*\>(.*?)\<\/A\>)/i
  349. if(!str)return "";
  350. var s=str.substr(0,1);
  351. if(s=='\"')return str;
  352. if(s=="\[") s="";
  353. if(str.match(t))str=str.replace(RegExp.$1,RegExp.$2);
  354. return s+"<a title=\""+str+"\">*</a>";
  355. }
  356.  
  357. function parseTags(TBL){
  358. if(TBL.className !=""){
  359. TBLS=TBL.getElementsByTagName('table')
  360. for(k=0;k<TBLS.length;k++)parseTags(TBLS[k]);
  361. return true;
  362. }
  363. var cell=TBL.getElementsByTagName('td');
  364. var nada="";
  365. for (j=0;j<cell.length;j++){
  366. if(cell[j].innerHTML.match(/(\[cs\=(\d+)\])/i)){
  367. cell[j].setAttribute("colSpan",RegExp.$2);
  368. cell[j].innerHTML=cell[j].innerHTML.replace(RegExp.$1,'');
  369. }
  370. if(cell[j].innerHTML.match(/(\[rs\=(\d+)\])/i)){
  371. cell[j].setAttribute("rowSpan",RegExp.$2);
  372. cell[j].innerHTML=cell[j].innerHTML.replace(RegExp.$1,'');
  373. }
  374. if(cell[j].innerHTML.match(/(\[bg\=(.*?)\])/i)){
  375. cell[j].setAttribute("bgColor",RegExp.$2);
  376. cell[j].innerHTML=cell[j].innerHTML.replace(RegExp.$1,'');
  377. }
  378. while(cell[j].innerHTML.match(/(\[atrb\=(.*?)\])/i)){
  379. var r1=RegExp.$1;
  380. var r2=RegExp.$2;
  381. var atrb=""; var atrbVal="";
  382. var applyTable=false;
  383. var oObj;
  384. if(r2.split(',').length>0){ atrb=r2.split(',')[0]; atrb=atrb.replace(/^\s*|\s*$/g,"");}
  385. if(r2.split(',').length>1) {atrbVal=r2.split(',')[1]; atrbVal=atrbVal.replace(/^\s*|\s*$/g,"");}
  386. if(atrbVal.match(/(<A href\=.*\>(.*)\<\/A\>)/i))atrbVal=atrbVal.replace(RegExp.$1,RegExp.$2);
  387. if(r2.split(',').length>2)applyTable=r2.split(',')[2]?true:false;
  388. oObj=applyTable?TBL:cell[j];
  389. if(atrb != ""){
  390. if(atrb.toLowerCase()=="style"){
  391. oObj.style.cssText+=atrbVal;
  392. }else if(atrb.toLowerCase().substr(0,2)=="on" && DisallowEvents){
  393. nada="<a title=\"Disallowed: "+r1.replace("[","").replace("]","") +"\">*</a>";
  394. }else{
  395. document.expando=false; //IE workaround for casing
  396. try{
  397. oObj.setAttribute(atrb,atrbVal);
  398. }catch(e){
  399. nada="<a title=\"Casing Error: "+r1.replace("[","").replace("]","") +"\">*</a>";
  400. }finally{
  401. document.expando=true;
  402. }
  403. }
  404. }
  405. cell[j].innerHTML=cell[j].innerHTML.replace(r1,nada);
  406. }
  407. }
  408. }
  409.  
  410. function parseTH(TBL){
  411. if(TBL.className !=""){
  412. TBLS=TBL.getElementsByTagName('table')
  413. for(k=0;k<TBLS.length;k++)parseTags(TBLS[k]);
  414. return true;
  415. }
  416. var cell=TBL.getElementsByTagName('td');
  417. for (j=0;j<cell.length;j++){
  418. if(cell[j].innerHTML.match(/(\[th\])/i)){
  419. cell[j].setAttribute("colSpan",columns(TBL));
  420. cell[j].innerHTML=cell[j].innerHTML.replace(RegExp.$1,'');
  421. }
  422. }
  423. }
  424. function columns(TBL){
  425. //w3c states that a colSpan=0 should make a cell span all columns but IE doesn't honor this, so...
  426. var columns=0;
  427. var tmp;
  428. for(o=0;o<TBL.rows.length;o++){
  429. tmp=0;
  430. for(p=0;p<TBL.rows[o].cells.length;p++){
  431. tmp++
  432. if(TBL.rows[o].cells[p].rowSpan>1)tmp=tmp+TBL.rows[o].cells[p].rowSpan-1;
  433. }
  434. if(tmp>columns)columns=tmp;
  435. }
  436. return columns;
  437. }
  438.  
  439. function addEtag(tag){
  440. if(tag!=""){
  441. if(UUInstalled){
  442. if(isInsideCell()){
  443. addX(tag);
  444. }else{
  445. alert(NoGood);
  446. document.postForm.message.focus();
  447. }
  448. }else{
  449. if(isInsideCell()){
  450. add(tag);
  451. }else{
  452. alert(NoGood);
  453. document.postForm.message.focus();
  454. }
  455. }
  456. }
  457. }
  458.  
  459.  
  460. function isInsideCell(){
  461. //Function purpose: determine if insertion point falls within the bounds of a cell
  462. var msg=document.postForm.message;
  463. if(document.postForm.message.createTextRange){
  464. getCursorPositionIE();
  465. var tmp= document.postForm.message.value.substr(0,document.postForm.message.selectionStart).split("\n").length-1;
  466. setCursorPositionIE(msg.selectionStart-tmp);
  467. }
  468. msg.selectionStart=msg.selectionEnd;
  469. var curr=msg.selectionStart;
  470. if(msg.value.substr(0,curr).lastIndexOf("[td]")==-1 || msg.value.substr(0,curr).lastIndexOf("[td]")<msg.value.substr(0,curr).lastIndexOf("[/td]"))
  471. return false;
  472. if(msg.value.substr(curr).indexOf("[/td]")==-1 || (msg.value.substr(curr).indexOf("[/td]")>msg.value.substr(curr).indexOf("[td]") && msg.value.substr(curr).indexOf("[td]")!=-1))
  473. return false;
  474. if(msg.value.substr(0,curr).lastIndexOf("[")>msg.value.substr(0,curr).lastIndexOf("]"))
  475. return false;
  476. if(msg.value.substr(curr).indexOf("]")<msg.value.substr(curr).indexOf("[") )
  477. return false;
  478. return true;
  479. }
  480.  
  481. if(location.href.match(/action\=(display|pmview|recent|userrecent|goto|search|calendarview)/) || ( document.postForm ))
  482. enhanceTable();
  483.  
  484.  
  485. function setCursorPositionIE(start,end) {
  486. if(document.selection){
  487. var element=document.postForm.message;
  488. end=(end)?end:start;
  489. var range = element.createTextRange();
  490. range.collapse(true);
  491. range.moveEnd('character', end);
  492. range.moveStart('character', start);
  493. range.select();
  494. }
  495. }
  496.  
  497. function getCursorPositionIE(){
  498. if(document.selection){
  499. var element = document.postForm.message;
  500. element.focus();
  501. var range = document.selection.createRange();
  502. var stored_range = range.duplicate();
  503. stored_range.moveToElementText( element );
  504. stored_range.setEndPoint( 'EndToEnd', range );
  505. element.selectionStart = stored_range.text.length - range.text.length;
  506. element.selectionEnd = element.selectionStart + range.text.length;
  507. element.selectionFaux=true;
  508. }
  509. }
  510. //-->
  511. </script>
  512.  
  513.  
  514. <script type="text/javascript">
  515. /* Code Tag Modification by hpmad
  516. Do not repost or claim without permission from creator
  517. For more codes like this one go to: http://talkpark.proboards.com */
  518.  
  519. var table = document.getElementsByTagName('table');
  520. if(location.href.match(/action=(display|recent|pmview|search2)/i)){
  521.    for(i=0;i<table.length;i++){
  522.      if(table[i].className=='code'){
  523.         var codeArea = table[i].firstChild.firstChild.firstChild.firstChild.innerHTML;
  524.         codeArea = codeArea.replace(/&nb+sp;/gi,' ');
  525.         codeArea = codeArea.replace(/&a+mp;/gi,'&');
  526.   codeArea = codeArea.replace(/\t/gi,'+sp;&nb+sp; ')
  527.         codeArea = codeArea.replace(/<br\s?\/?>/gi,'\n');
  528.          table[i].parentNode.parentNode.parentNode.parentNode.parentNode.innerHTML = '<font size="1"><b>Code:</b></font><br><center><form><textarea class="codeArea" style="font-size: 8pt;" readonly name="codeArea" cols="90" rows="12">'+codeArea+'</textarea><br><input type="button" value="Highlight Code" onclick="javascript:this.form.codeArea.focus();this.form.codeArea.select();"></form></center>';
  529.          i--;
  530.       }
  531.    }
  532. }
  533. </script>
  534.  
  535.  
  536.  
  537. <script type="text/javascript">
  538. <!--
  539. /*
  540. Money Hack v3 - Global footer
  541.  
  542. Created by Ross, Concept by Peter
  543.  
  544. This code cannot be reposted at anywhere other than ProBoards Support without permission.
  545.  
  546. This header must stay intact at all times.
  547. */
  548.  
  549. // The value of money a member should gain for each post
  550. var MoneyPerPost = 5;
  551.  
  552. // What do you want to call your money?
  553. var NameOfMoney = 'Money';
  554.  
  555. // The symbol that will appear next to the money
  556. var SymbolOfMoney = '$';
  557.  
  558.  
  559. // No need to edit below
  560. var re = /\[M:(-)?(\d+)\]/im
  561.  
  562. function updateMon() {
  563. var monChange = document.getElementById('monChange');
  564. var curMon = document.getElementById('monDisplay');
  565. var monType = document.getElementById('monType');
  566.  mon = parseInt(curMon.value.replace( SymbolOfMoney , '' ),10) + parseInt( ( ( monType.value == '-' ) ? '-' : '' ) + monChange.value, 10 )
  567.  monChange.value = 0;
  568. if(isNaN(mon)) {
  569.  alert('You must enter a numerical value')
  570.  return false;
  571. }
  572.  curMon.value = SymbolOfMoney + mon;
  573. return true;
  574. }
  575.  
  576. function fNum(num){
  577.    if(!isNaN(num)){
  578.       num = num.toLocaleString().replace(/\.\d+/, "");
  579.    } else {
  580.       num = 0;
  581.    }
  582.    return num;
  583. }
  584.  
  585. function saveMon() {
  586. updateMon();
  587. var newMon = document.getElementById('monDisplay').value.replace( SymbolOfMoney , '' );
  588.  newMon -= (parseInt((document.modifyForm.posts.value) * MoneyPerPost, 10));
  589.   document.modifyForm.customtitle.value += '[M:'+newMon+']';
  590. return true;
  591. }
  592.  
  593. var td = document.getElementsByTagName('td');
  594. for(i=0; i<td.length; i++) {
  595.  if(td.item(i).width == '20%' && td.item(i).vAlign == 'top' && td.item(i).parentNode.innerHTML.match(/Posts: (.+?)</)) {
  596.   curMon = (RegExp.$1.replace(/,/g,'') * MoneyPerPost);
  597.   curMon += td.item(i).innerHTML.match(re)? parseInt((RegExp.$1+RegExp.$2), 10) : 0;
  598.    if(td.item(i).lastChild.nodeName.toLowerCase() != 'br')
  599.     td.item(i).appendChild(document.createElement('br'));
  600.   td.item(i).appendChild(document.createTextNode(NameOfMoney +': '+ SymbolOfMoney + fNum(curMon)));
  601.   td.item(i).innerHTML = td.item(i).innerHTML.replace(/<br>\[M:(-)?(\d+)\](<br>member is)/i,'$3').replace(/(<br>(.+?))\[M:(-)?(\d+)\](<br>)/i,'$1$5').replace(/\[M:(-)?(\d+)\]/gim,'');
  602. }
  603. else if(location.href.match(/ion=viewpro/) && td.item(i).width == '25%' && td.item(i).innerHTML.match(/>Posts:</)) {
  604.   var monTitle = document.createElement('font');
  605.    monTitle.size = '2';
  606.    monTitle.appendChild(document.createTextNode(NameOfMoney+':'));
  607.   var userMon = document.createElement('font');
  608.    userMon.size = '2';
  609.    userMon.appendChild(document.createTextNode(SymbolOfMoney+fNum(curMon)));
  610.   monRow = td.item(i).parentNode.parentNode.insertRow(6);
  611.   monRow.insertCell(0).appendChild(monTitle);
  612.   monRow.insertCell(1).appendChild(userMon);
  613.  break;
  614. }
  615. }
  616.  
  617. if(document.modifyForm && document.modifyForm.customtitle) {
  618.  
  619. if(document.modifyForm.personaltext.value.match(re) && !document.modifyForm.customtitle.value.match(re))
  620.  {
  621.   document.modifyForm.customtitle.value += '[M:'+RegExp.$1+RegExp.$2+']';
  622.   document.modifyForm.personaltext.value = document.modifyForm.personaltext.value.replace(re,'');
  623.  }
  624.  
  625. curMon = document.modifyForm.customtitle.value.match(re)? parseInt(RegExp.$1+RegExp.$2, 10) : 0;
  626. Posts = document.modifyForm.posts.value.match(/(-)?(\d+)/)? parseInt((RegExp.$1+RegExp.$2), 10) :  0;
  627. curMon += (Posts * MoneyPerPost)
  628. document.modifyForm.customtitle.value = document.modifyForm.customtitle.value.replace(re,'');
  629.  
  630.  document.modifyForm.customtitle.maxLength = 490;
  631.  
  632. var display = document.createElement('input');
  633.  display.type = 'text';
  634.  display.id = 'monDisplay';
  635.  display.size = parseInt(curMon.toString().length, 10) + 2;
  636.  display.disabled = true;
  637.  display.value = SymbolOfMoney + curMon;
  638.  
  639. var type = document.createElement('select');
  640.  type.id = 'monType';
  641.  type.appendChild(document.createElement('option'));
  642.   type.firstChild.appendChild(document.createTextNode('+'));
  643.  type.appendChild(document.createElement('option'));
  644.   type.lastChild.appendChild(document.createTextNode('-'));
  645.   type.lastChild.value = '-';
  646.  
  647. var mon = document.createElement('input');
  648.  mon.type = 'text';
  649.  mon.id = 'monChange';
  650.  mon.size = 5;
  651.  mon.value = 0;
  652.  
  653. var update = document.createElement('input');
  654.  update.type = 'button';
  655.  update.value = 'Update';
  656.  update.onclick = function(){ updateMon(); };
  657.  
  658. var editMon = document.createElement('font');
  659.  editMon.appendChild(type);
  660.  editMon.appendChild(document.createTextNode(' '));
  661.  editMon.appendChild(mon);
  662.  editMon.appendChild(document.createTextNode(' '));
  663.  editMon.appendChild(update);
  664.  
  665. var newTitle = document.createElement('font');
  666.  newTitle.size = '2';
  667.  newTitle.appendChild(document.createTextNode(NameOfMoney +': '));
  668.  newTitle.appendChild(display);
  669.  
  670. var newDes = document.createElement('font');
  671.  newDes.size = '1';
  672.  newDes.appendChild(document.createTextNode('Here you can edit the amount of '+NameOfMoney+' a member has. Just enter the value of ' +NameOfMoney+ ' to add or subtract.'));
  673.  
  674. var target = document.modifyForm.customtitle.parentNode.parentNode.parentNode.parentNode.insertRow(2);
  675.  target.insertCell(0).appendChild(newTitle);
  676.  target.insertCell(1).appendChild(editMon)
  677.  target.insertCell(2).appendChild(newDes);
  678.  
  679. document.getElementsByName('profileaction').item(0).onclick = function() { saveMon(); };
  680.  
  681. }
  682. //-->
  683. </script>
  684.  
  685.  
  686.  
  687. <!-- &&& The stuff below is the custom miniprofile design. It's not very inspired, so if you want to make your own, have at it. -->
  688.  
  689. <span id="mini_profile_member" style="display: none;">
  690. <center><div class="miniprofile">
  691.  
  692. <span id="user_name" name="user_name" class="mininame">##value</span>
  693. <span id="custom_title" name="custom_title" class="minititle">##value</span>
  694. <br><span id="avatar" name="avatar">##value</span><br>
  695.  
  696. <span id="personal_text" name="personal_text" class="ptext">##value</span>
  697.  
  698. <div class="ministuff">
  699. <span id="posts" name="posts">##value</span> posts<br>
  700. and <span id="money" name="money">##value</span></div>
  701. </div></center></span>
  702.  
  703.  
  704.  
  705. <script type="text/javascript">
  706. <!--
  707. /******************************************
  708. *
  709. * Build Your Own Mini-Profile v 0.2
  710. * Coded by Ross of http://support.proboards.com
  711. * and http://101support.proboards43.com
  712. * and http://swg.proboards4.com
  713. * this code cannot be reposted outside of the
  714. * forums listed above unless done so by myself
  715. *
  716. *******************************************/
  717.  
  718. if(location.href.match(/(ion=(display|(pm|calendar)?view|search2|(user)?recent)|error)/)) {
  719. var new_script = document.createElement('script');
  720. new_script.type = "text/javascript";
  721. new_script.src = "http://freelancedev.net/ecreations/codes/build_your_own_mini_profile/v0-2.js";
  722. document.getElementsByTagName('head').item(0).appendChild(new_script);
  723. }
  724. //-->
  725. </script>
  726.  
  727. <!-- &&& if you're here for the custom profile, you scrolled too far down. Go back up a little, sorry. -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement