Board Logo

 Username:    Password:    Stay logged in: Welcome Guest. Please Login or Register.  Nov 21st, 2017, 05:55am

Coding Forum
Important News
Remember to add where the code goes in the headers/footers.

Also, please check the list of codes on the Hacks board, especially if you have an error. The code may already have been corrected.
Thanks.
Welcome to the Conforums Hacks Board!

Please follow these simple rules.

1. No spamming.
2. Do not advertise your board in here!
3. Keep on topic, or the thread will be locked.
4. No flame wars.
5. No bringing up old topics.

Please note: For codes other than those submitted in the Hacks Forum, please ask for permission to use from the creator. Be aware that coding queries in the Coding Forum become public domain. If you still seek coding help but find it inconvenient to display it publicly then please PM one of the moderators. We encourage all queries to be submitted here in hopes to help other members who might have the same question. Thank you.

Helpful sites
Google
Dynamic Drive

The Staff
Roger
Dave
Gizzy



« Previous Topic | Next Topic »
Pages: 1 2  Notify Send Topic Print
 hotthread  Author  Topic: Money/Points hack?  (Read 4832 times)
Dalton
Ex-Shiny Gold Star Club Member
Conforums Administrator


member is offline

Avatar



AIM
Homepage PM

Gender: Male
Posts: 1771
xx Re: Money/Points hack?
« Reply #15 on: Jul 23rd, 2012, 07:57am »

well shortly after you asked about it I never heard from you again.
User IP Logged

User Image
LegosHurtMyFeet
Member


member is offline

Avatar




PM

Gender: Female
Posts: 80
xx Re: Money/Points hack?
« Reply #16 on: Jul 23rd, 2012, 9:22pm »

No I replied I just deleted my message before posting that one so I wouldn't double post. If this is made, is there a way to reset all members points manually? As in, a button in the admin area that says "Reset All Members' Points?"
« Last Edit: Jul 23rd, 2012, 9:25pm by LegosHurtMyFeet » User IP Logged

User ImageUser Image
Dalton
Ex-Shiny Gold Star Club Member
Conforums Administrator


member is offline

Avatar



AIM
Homepage PM

Gender: Male
Posts: 1771
xx Re: Money/Points hack?
« Reply #17 on: Jul 24th, 2012, 09:50am »

Well what you are getting in to with some of this is asking for features that are nearly impossible to implement from the client side. Infact, I think the last admin editable code I saw was 5-6 years ago.
User IP Logged

User Image
LegosHurtMyFeet
Member


member is offline

Avatar




PM

Gender: Female
Posts: 80
xx Re: Money/Points hack?
« Reply #18 on: Jul 25th, 2012, 02:03am »

Well, that's okay, I can do that manually. I just figured I'd ask!
User IP Logged

User ImageUser Image
Dalton
Ex-Shiny Gold Star Club Member
Conforums Administrator


member is offline

Avatar



AIM
Homepage PM

Gender: Male
Posts: 1771
xx Re: Money/Points hack?
« Reply #19 on: Jul 25th, 2012, 09:10am »

Points Code- Tested at gtd.conforums.com

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>  
User IP Logged

User Image
LegosHurtMyFeet
Member


member is offline

Avatar




PM

Gender: Female
Posts: 80
xx Re: Money/Points hack?
« Reply #20 on: Jul 26th, 2012, 9:41pm »

Wow, absolutely awesome. Thanks so much! grin
User IP Logged

User ImageUser Image
Pages: 1 2  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