|
Post by FoxtrotZero on Dec 31, 2009 18:03:45 GMT -5
It has come to my attention that posting in certain sections (I am not sure which) do NOT result in Dan-Balls. Which is one thing. But it is my understanding that the same locations also result in Post Count not Increasing, and this i find problematic.
If you post, you have posted, and there is no reason for a post to not count. I feel this needs to be fixed. I understand it was likely a side effect of not allowing Dan-Balls to be awarded when posting in this section.
Therefore, the entire Dan-Ball and Post Count script might need to be re-coded. Because it has also come to my attention that there may be (it is still being proposed) an increase in the number of posts awarded when posting in the Games Category.
Discuss?
|
|
|
Post by GGoodie on Dec 31, 2009 18:06:42 GMT -5
Its the spam board and the general talk board. Its cause by making the board, and choosing the option for posts not to count in that board.
|
|
|
Post by General Veers on Dec 31, 2009 18:20:59 GMT -5
Yes, Proboards by default (not with the addition of custom codes) gives forums the option to increase or not to increase post count in some boards.
In some of these boards, especially the Spam Board, the posts are not deserving of increasing count and, therefore, increasing your member rank. Some users would become "Forum Kings" within seconds of posting in the Spam Board or the General Talk Board.
|
|
|
Post by FoxtrotZero on Dec 31, 2009 18:41:08 GMT -5
Well how is not the point, why is.
Personally, I believe that all boards should provide increase to post count. I think Dan-Balls should be as follows, though.
>> No DBs in the Spam Board >> 1 DB per post in the General Board >> 2 DBs per post elsewhere >> 3 DB's per post in the Game Board
Opinions?
|
|
|
Post by General Veers on Dec 31, 2009 19:23:59 GMT -5
I still don't like the idea of people getting higher ranks for contributions in the Spam Board or certain other boards, and you get higher ranks by achieving certain post counts...
As for Dan-Ball counts, that seems like a good proposition assuming we can code for that...
|
|
|
Post by xShadowLordx on Dec 31, 2009 19:42:14 GMT -5
No DBs in the Spam Board 1 DB per post in the General Board 2 DBs per post elsewhere 3 DB's per post in the Game Board I think that would overcomplicate things way too much. In my opinion, it's fine the way it is.
|
|
|
Post by Qwerty on Jan 2, 2010 15:04:40 GMT -5
Yeah, I'm fine with it as it is, although we should hike up the dan-ball count for the games board.
|
|
|
Post by ~Memzak~ on Jan 2, 2010 15:11:23 GMT -5
Not possible. The only money code (which is VERY difficult to change) runs on this system: (Number Of Posts*How much Money Per Post)+ Any added money.
The any added money comes from a thing that looks like this [m:0] (for no added money) or [m:12] (for 12 more than double his post count)
This appears in your custom title and then is not shown and hidden. (just like the custom stars code)
There is no known way (believe me I've tried with many coders, even the one who made the code itself)) to allow for different numbers of dan-balls per post in different places. (because it doesn't add the dan balls as you post, it adds it when the miniprofile loads from data ON the miniprofile)
sorry... but I really liked the idea...
|
|
|
Post by FoxtrotZero on Jan 3, 2010 14:16:07 GMT -5
Now lets think here. We have several skilled coders and quite a few logical thinkers, its possible to figure something out.
Can we have a copy of the currency code?
|
|
|
Post by ~Memzak~ on Jan 3, 2010 15:00:06 GMT -5
Ok...
Here is how it looks like in the Global Footer:
<script type="text/javascript" src="http://ggoodie.50webs.com/danballs.js"> /* Add Forum Currency */ </script>
Because it is hosted by GGoodie, so the actual code his hosted by him.
Here is the code that is hosted by him:
/* Money Hack v3 - Global footer
Created by Ross, Concept by Peter
This code cannot be reposted at anywhere other than ProBoards Support without permission.
This header must stay intact at all times. */
var MoneyPerPost = 2;
var NameOfMoney = 'Dan-Balls';
var SymbolOfMoney = '';
var re = /\[M:(-)?(\d+)\]/im
function updateMon() { var monChange = document.getElementById('monChange'); var curMon = document.getElementById('monDisplay'); var monType = document.getElementById('monType'); mon = parseInt(curMon.value.replace( SymbolOfMoney , '' ),10) + parseInt( ( ( monType.value == '-' ) ? '-' : '' ) + monChange.value, 10 ) monChange.value = 0; if(isNaN(mon)) { alert('You must enter a numerical value') return false; } curMon.value = SymbolOfMoney + mon; return true; }
function fNum(num){ if(!isNaN(num)){ num = num.toLocaleString().replace(/\.\d+/, ""); } else { num = 0; } return num; }
function saveMon() { updateMon(); var newMon = document.getElementById('monDisplay').value.replace( SymbolOfMoney , '' ); newMon -= (parseInt((document.modifyForm.posts.value) * MoneyPerPost, 10)); document.modifyForm.customtitle.value += '[M:'+newMon+']'; return true; }
var td = document.getElementsByTagName('td'); for(i=0; i<td.length; i++) { if(td.item(i).width == '20%' && td.item(i).vAlign == 'top' && td.item(i).parentNode.innerHTML.match(/Posts: (.+?)</)) { curMon = (RegExp.$1.replace(/,/g,'') * MoneyPerPost); curMon += td.item(i).innerHTML.match(re)? parseInt((RegExp.$1+RegExp.$2), 10) : 0; if(td.item(i).lastChild.nodeName.toLowerCase() != 'br') td.item(i).appendChild(document.createElement('br')); td.item(i).appendChild(document.createTextNode(NameOfMoney +': '+ SymbolOfMoney + fNum(curMon))); 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,''); } else if(location.href.match(/ion=viewpro/) && td.item(i).width == '25%' && td.item(i).innerHTML.match(/>Posts:</)) { var monTitle = document.createElement('font'); monTitle.size = '2'; monTitle.appendChild(document.createTextNode(NameOfMoney+':')); var userMon = document.createElement('font'); userMon.size = '2'; userMon.appendChild(document.createTextNode(SymbolOfMoney+fNum(curMon))); monRow = td.item(i).parentNode.parentNode.insertRow(6); monRow.insertCell(0).appendChild(monTitle); monRow.insertCell(1).appendChild(userMon); break; } }
if(document.modifyForm && document.modifyForm.customtitle) {
if(document.modifyForm.personaltext.value.match(re) && !document.modifyForm.customtitle.value.match(re)) { document.modifyForm.customtitle.value += '[M:'+RegExp.$1+RegExp.$2+']'; document.modifyForm.personaltext.value = document.modifyForm.personaltext.value.replace(re,''); }
curMon = document.modifyForm.customtitle.value.match(re)? parseInt(RegExp.$1+RegExp.$2, 10) : 0; Posts = document.modifyForm.posts.value.match(/(-)?(\d+)/)? parseInt((RegExp.$1+RegExp.$2), 10) : 0; curMon += (Posts * MoneyPerPost) document.modifyForm.customtitle.value = document.modifyForm.customtitle.value.replace(re,'');
document.modifyForm.customtitle.maxLength = 490;
var display = document.createElement('input'); display.type = 'text'; display.id = 'monDisplay'; display.size = parseInt(curMon.toString().length, 10) + 2; display.disabled = true; display.value = SymbolOfMoney + curMon;
var type = document.createElement('select'); type.id = 'monType'; type.appendChild(document.createElement('option')); type.firstChild.appendChild(document.createTextNode('+')); type.appendChild(document.createElement('option')); type.lastChild.appendChild(document.createTextNode('-')); type.lastChild.value = '-';
var mon = document.createElement('input'); mon.type = 'text'; mon.id = 'monChange'; mon.size = 5; mon.value = 0;
var update = document.createElement('input'); update.type = 'button'; update.value = 'Update'; update.onclick = function(){ updateMon(); }; var editMon = document.createElement('font'); editMon.appendChild(type); editMon.appendChild(document.createTextNode(' ')); editMon.appendChild(mon); editMon.appendChild(document.createTextNode(' ')); editMon.appendChild(update);
var newTitle = document.createElement('font'); newTitle.size = '2'; newTitle.appendChild(document.createTextNode(NameOfMoney +': ')); newTitle.appendChild(display);
var newDes = document.createElement('font'); newDes.size = '1'; 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.'));
var target = document.modifyForm.customtitle.parentNode.parentNode.parentNode.parentNode.insertRow(2); target.insertCell(0).appendChild(newTitle); target.insertCell(1).appendChild(editMon) target.insertCell(2).appendChild(newDes);
document.getElementsByName('profileaction').item(0).onclick = function() { saveMon(); };
}
Just for fun...
Here is how it would look like in the global footer if it was NOT hosted:
<script type="text/javascript"> <!-- /* Money Hack v3 - Global footer
Created by Ross, Concept by Peter
This code cannot be reposted at anywhere other than ProBoards Support without permission.
This header must stay intact at all times. */
var MoneyPerPost = 2;
var NameOfMoney = 'Dan-Balls';
var SymbolOfMoney = '';
var re = /\[M:(-)?(\d+)\]/im
function updateMon() { var monChange = document.getElementById('monChange'); var curMon = document.getElementById('monDisplay'); var monType = document.getElementById('monType'); mon = parseInt(curMon.value.replace( SymbolOfMoney , '' ),10) + parseInt( ( ( monType.value == '-' ) ? '-' : '' ) + monChange.value, 10 ) monChange.value = 0; if(isNaN(mon)) { alert('You must enter a numerical value') return false; } curMon.value = SymbolOfMoney + mon; return true; }
function fNum(num){ if(!isNaN(num)){ num = num.toLocaleString().replace(/\.\d+/, ""); } else { num = 0; } return num; }
function saveMon() { updateMon(); var newMon = document.getElementById('monDisplay').value.replace( SymbolOfMoney , '' ); newMon -= (parseInt((document.modifyForm.posts.value) * MoneyPerPost, 10)); document.modifyForm.customtitle.value += '[M:'+newMon+']'; return true; }
var td = document.getElementsByTagName('td'); for(i=0; i<td.length; i++) { if(td.item(i).width == '20%' && td.item(i).vAlign == 'top' && td.item(i).parentNode.innerHTML.match(/Posts: (.+?)</)) { curMon = (RegExp.$1.replace(/,/g,'') * MoneyPerPost); curMon += td.item(i).innerHTML.match(re)? parseInt((RegExp.$1+RegExp.$2), 10) : 0; if(td.item(i).lastChild.nodeName.toLowerCase() != 'br') td.item(i).appendChild(document.createElement('br')); td.item(i).appendChild(document.createTextNode(NameOfMoney +': '+ SymbolOfMoney + fNum(curMon))); 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,''); } else if(location.href.match(/ion=viewpro/) && td.item(i).width == '25%' && td.item(i).innerHTML.match(/>Posts:</)) { var monTitle = document.createElement('font'); monTitle.size = '2'; monTitle.appendChild(document.createTextNode(NameOfMoney+':')); var userMon = document.createElement('font'); userMon.size = '2'; userMon.appendChild(document.createTextNode(SymbolOfMoney+fNum(curMon))); monRow = td.item(i).parentNode.parentNode.insertRow(6); monRow.insertCell(0).appendChild(monTitle); monRow.insertCell(1).appendChild(userMon); break; } }
if(document.modifyForm && document.modifyForm.customtitle) {
if(document.modifyForm.personaltext.value.match(re) && !document.modifyForm.customtitle.value.match(re)) { document.modifyForm.customtitle.value += '[M:'+RegExp.$1+RegExp.$2+']'; document.modifyForm.personaltext.value = document.modifyForm.personaltext.value.replace(re,''); }
curMon = document.modifyForm.customtitle.value.match(re)? parseInt(RegExp.$1+RegExp.$2, 10) : 0; Posts = document.modifyForm.posts.value.match(/(-)?(\d+)/)? parseInt((RegExp.$1+RegExp.$2), 10) : 0; curMon += (Posts * MoneyPerPost) document.modifyForm.customtitle.value = document.modifyForm.customtitle.value.replace(re,'');
document.modifyForm.customtitle.maxLength = 490;
var display = document.createElement('input'); display.type = 'text'; display.id = 'monDisplay'; display.size = parseInt(curMon.toString().length, 10) + 2; display.disabled = true; display.value = SymbolOfMoney + curMon;
var type = document.createElement('select'); type.id = 'monType'; type.appendChild(document.createElement('option')); type.firstChild.appendChild(document.createTextNode('+')); type.appendChild(document.createElement('option')); type.lastChild.appendChild(document.createTextNode('-')); type.lastChild.value = '-';
var mon = document.createElement('input'); mon.type = 'text'; mon.id = 'monChange'; mon.size = 5; mon.value = 0;
var update = document.createElement('input'); update.type = 'button'; update.value = 'Update'; update.onclick = function(){ updateMon(); }; var editMon = document.createElement('font'); editMon.appendChild(type); editMon.appendChild(document.createTextNode(' ')); editMon.appendChild(mon); editMon.appendChild(document.createTextNode(' ')); editMon.appendChild(update);
var newTitle = document.createElement('font'); newTitle.size = '2'; newTitle.appendChild(document.createTextNode(NameOfMoney +': ')); newTitle.appendChild(display);
var newDes = document.createElement('font'); newDes.size = '1'; 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.'));
var target = document.modifyForm.customtitle.parentNode.parentNode.parentNode.parentNode.insertRow(2); target.insertCell(0).appendChild(newTitle); target.insertCell(1).appendChild(editMon) target.insertCell(2).appendChild(newDes);
document.getElementsByName('profileaction').item(0).onclick = function() { saveMon(); };
} </script>
|
|
|
Post by FoxtrotZero on Jan 3, 2010 15:21:57 GMT -5
I feel i am the king of easy solutions. I know algebra, but not HTML. But i worked with LUA for a while, so;
When it says "Var MoneyPerPost = 2"
We could change this to a set of variables, based on the various boards. I know there has to be a way to determine what the URL is, what board that is in, and therefore what variable to edit.
Then the code just has to be changed to add the total of these variables, use this as the post count, and then multiply the variables accordingly.
If i knew the HTML, i would do it myself. But i'm sure someone knows the commands to pull this much off.
|
|
|
Post by ~Memzak~ on Jan 3, 2010 15:25:27 GMT -5
nope... the variable is only there to know how much to times your post count by...
as I said above, it doesn't add money every time you post, it just displays your post count*"Var MoneyPerPost"+[M:*number of danballs more or less than the equation before*]
*number of danballs more or less than the equation before* + only editable by modifying their profile and changing it.
|
|
|
Post by FoxtrotZero on Jan 3, 2010 15:34:51 GMT -5
Right. But somewhere is an equation that says its postcount*2. That equation can be modified. If you add extra variables, its all possible.
|
|
|
Post by GGoodie on Jan 3, 2010 15:48:19 GMT -5
I think your in over your head here FoxTrot. It wouldn't be possible. Like you said, you don't know the HTML. (By this i am going to assume you mean the Javascript, because HTML isn't really the main coding going on) Trust the ones who do. Its not possible.
|
|
|
Post by ~Memzak~ on Jan 3, 2010 15:48:22 GMT -5
possibly, but the problem is that there is no way to know that someone posted... all it knows is that the post count changes so it must change the DBs...
much less what was the URL of the board you posted in...
|
|
|
Post by Qwerty on Jan 3, 2010 17:51:01 GMT -5
Maybe Pickle can program some kinda database thing, not using javascript, that can work moa betta.
|
|
|
Post by General Veers on Jan 3, 2010 18:44:24 GMT -5
This is going to be weird, but what would be the consequences of putting separate money hacks, each with modified pay rates, in the local H/F? What if we put one in the General Category, one in the Games Category, etc.?
|
|
|
Post by FoxtrotZero on Jan 3, 2010 19:00:51 GMT -5
If you can modify the Header/Footers seperately. It was my understanding, naturally, that only the Global header and footer could be modified.
|
|
|
Post by GGoodie on Jan 3, 2010 20:04:19 GMT -5
GV that would not work, unfortunately. It needs to be in the global footer so that it can add the [m:(amount] to your count. If it was only in one board it would only add the DB's from that board on posts in that board.
|
|
|
Post by FoxtrotZero on Jan 3, 2010 20:55:12 GMT -5
Too bad this isn't our server. We could do whatever we wanted.
|
|