Board Logo

 Username:    Password:    Stay logged in: Welcome Guest. Please Login or Register.  Aug 17th, 2017, 4:32pm


Board Hacks
Important News
Please read the notes posted with any codes carefully, as they will usually tell you where they need to go.
Welcome to the Conforums Hacks Board!

All codes here have been tested but we accept no responsibility if these codes do not work on your board, or have an adverse effect when used in combination with other codes.

This board is read only. Any queries or requests for codes should be made on the Coding Forum

Helpful sites
Google
Dynamic Drive

The Staff
Roger
Dave
GIzzy



« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: Points Hack - July 2012  (Read 1754 times)
Dalton
Ex-Shiny Gold Star Club Member
Conforums Administrator


member is offline

Avatar



AIM
Homepage PM

Gender: Male
Posts: a whole lot
xx Points Hack - July 2012
« Thread started on: Jul 25th, 2012, 09:16am »

Main Footers
Code:
<script language="javascript" type="text/javascript">
var CurrentPoints='0';
var PointsPattern=/\{Points\[<(\d+)>\]\}/i;

var PointsMiniPro='Points: ';
var PointsName='<font size="2"><b>Points:</b></font>';
var PointsProfileDesc='<font size="2"><b>Points:</b></font>';

function SavePointsChange () {
   var websiteURL=document.creator.websiteurl;
   var NewPoints=CurrentPoints;
   if (document.creator.settings6 && CurrentPoints!=document.getElementById('_Points').value) {
      NewPoints=document.getElementById('_Points').value;
   }
   if (websiteURL.value=='' || !websiteURL.value.match(/^http/i)) {
      websiteURL.value=location.href.split('?')[0];
      document.creator.websitetitle.value=document.title.split('-')[0];
   }
   websiteURL.value+=encodeURIComponent('{Points[<')+NewPoints+encodeURIComponent('>]}');
}

if (document.creator) {
   var websiteURL=document.creator.websiteurl;
   if (decodeURI(websiteURL.value).match(PointsPattern)) {
      CurrentPoints=RegExp.$1;
      websiteURL.value=decodeURI(websiteURL.value).replace(PointsPattern,'');
   }
   if (document.creator.settings6) {
      var newInput=document.createElement('input');
      newInput.type='text';
      newInput.id='_Points';
      newInput.value=CurrentPoints;
      var oneTR=document.creator.settings6.parentNode.parentNode.parentNode;
      var primaTR=oneTR.parentNode.parentNode.insertRow(oneTR.rowIndex);
      primaTR.insertCell(0).innerHTML=PointsProfileDesc;
      primaTR.insertCell(1).appendChild(newInput);
   }
   document.creator.onsubmit=SavePointsChange;
}

if (location.href.match(/action=(profile2|viewprofile)/i)) {
   var tables=document.getElementsByTagName('table');
   for (var h=0;h<tables.length;h++) {
      if (tables[h].width=='100%' && tables[h].cellPadding=='2' && tables[h].rows[0].cells[0].firstChild.firstChild.innerHTML=='Name: ') {
         var AWithPoints=tables[h].rows[11].getElementsByTagName('a')[0];
         var DecodedA=decodeURI(AWithPoints.href);
         if (AWithPoints.href!=location.href.split('index.cgi')[0] && DecodedA.match(PointsPattern)) {
            CurrentPoints=PointsPattern.exec(DecodedA)[1];
            AWithPoints.href=DecodedA.replace(PointsPattern,'');
         }
         tables[h].insertRow(13);
         tables[h].rows[13].insertCell(0).innerHTML=PointsName;
         tables[h].rows[13].insertCell(1).innerHTML='<font size="2">'+CurrentPoints+'</font>';
      }
   }
   var tds=document.getElementsByTagName('td');
   for (var e=0;e<tds.length;e++) {
      if (tds[e].width=='30%' && tds[e].vAlign=='middle' && tds[e].className=='windowbg') {
         var TDLinks=tds[e].getElementsByTagName('a');
         for (var c=0;c<TDLinks.length;c++) {
            if (decodeURI(TDLinks[c].href).match(PointsPattern)) {
               TDLinks[c].href=decodeURI(TDLinks[c].href).replace(PointsPattern,'');
            }
         }
         var newText=document.createTextNode(PointsMiniPro+CurrentPoints);
         var TDFonts=tds[e].getElementsByTagName('font');
         TDFonts[TDFonts.length-1].appendChild(newText);
      }
   }
}

if (location.href.match(/action=(calendarview|imshow)/i)) {
   var tds=document.getElementsByTagName('td');
   for (var h=0;h<tds.length;h++) {
      if (tds[h].width=='20%' && tds[h].className.match(/windowbg/i) && tds[h].rowSpan=='2' && tds[h].getElementsByTagName('a').length>0) {
         var TDLinks=tds[h].getElementsByTagName('a');
         for (var e=0;e<TDLinks.length;e++) {
            if (decodeURI(TDLinks[e].href).match(PointsPattern)) {
               CurrentPoints=RegExp.$1;
               TDLinks[e].href=decodeURI(TDLinks[e].href).replace(PointsPattern,'');
               break;
            }
         }
         var newText=document.createTextNode(PointsMiniPro+CurrentPoints);
         var TDFonts=tds[h].getElementsByTagName('font');
         TDFonts[TDFonts.length-1].appendChild(newText);
         CurrentPoints='0';
      }
   }
}

if (location.href.match(/action=ml(all|letter|top|staff)/i)) {
   var trs=document.getElementsByTagName('tr');
   for (var h=0;h<trs.length;h++) {
      if (trs[h].cells.length>2 && trs[h].cells[2].className=='windowbg' && trs[h].cells[2].firstChild.nodeName=='FONT' && trs[h].cells[2].getElementsByTagName('a').length>0) {
         var oneA=trs[h].cells[2].getElementsByTagName('a')[0];
         oneA.href=decodeURI(oneA.href).replace(PointsPattern,'');
      }
   }
}
</script>  


ALL BOARD FOOTERS

Code:
<script language="javascript" type="text/javascript">
var CurrentPoints='0';
var PointsPattern=/\{Points\[<(\d+)>\]\}/i;

var PointsMiniPro='Points: ';

if (location.href.match(/action=display/i)) {
   var tds=document.getElementsByTagName('td');
   for (var h=0;h<tds.length;h++) {
      if (tds[h].width=='20%' && tds[h].className.match(/windowbg/i) && tds[h].rowSpan=='2' && tds[h].getElementsByTagName('a').length>0) {
         var TDLinks=tds[h].getElementsByTagName('a');
         for (var e=0;e<TDLinks.length;e++) {
            if (decodeURI(TDLinks[e].href).match(PointsPattern)) {
               CurrentPoints=RegExp.$1;
               TDLinks[e].href=decodeURI(TDLinks[e].href).replace(PointsPattern,'');
               break;
            }
         }
         var newText=document.createTextNode(PointsMiniPro+CurrentPoints);
         var TDFonts=tds[h].getElementsByTagName('font');
         TDFonts[TDFonts.length-1].appendChild(newText);
         CurrentPoints='0';
      }
   }
}
</script>  



To modify the name of points look for this variable in both codes

Code:
var PointsMiniPro='Points: '; 
and change Points: to your desired form of currency
User IP Logged

User Image
Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

Back To Top
Donate $6.99 for 50,000 Ad-Free Pageviews!

| |

This forum powered for FREE by Conforums ©
Sign up for your own Free Message Board today!
Terms of Service | Privacy Policy | Conforums Support | Parental Controls