Welcome Guest [Log In] [Register]
This board has been archived and is no longer accepting new questions. If you have a support question for your ZetaBoard, please visit us at the new support board. Registration is free and easy.


Visit the NEW ZetaBoards Support forum!

Username:   Password:
Add Reply
Admin Editable Cash
Topic Started: Feb 13 2008, 04:34 AM (19,375 Views)
thelegend1987
Member
[ * ]
This is my first code: a simple editable cash code. It displays the cash both in the profile and miniprofile. If anyone notices any problems please let me know and I will fix them. It is pretty straightforward to use but if you need help:

The perPost is the amount of cash you get for every post made.
monName is the name such as "Cash:" or "Points:"
Change username to the board user you wish to add points to and the beside it to how many points they need in addition to points from posts. (Note: Case sensitive)

Works in IE and Firefox. Preview:)

Code: HTML
 

<script type="text/javascript" src="http://h1.ripway.com/thelegend1987/CM.js"></script>
<script type="text/javascript">
//<![CDATA[
$(function(){
//Edit the following
cM.MID=[];
cM.MID["username1"] = 10000;
cM.MID["username2"] = 15000;
cM.perPost=5;
cM.monName = "Cash:";
//stop editing here
cM.injectCash();
});
//]]>
</script>


Enjoy! :D
Edited by thelegend1987, Feb 13 2008, 11:47 PM.
Offline Profile Quote Post Goto Top
 
DragonHybrid
Member Avatar
Member
[ * ]
I'd adore this to work for me, but it doesn't xP I've tried putting this in Javascripts: and Below the Board:, but nothing happens. I've put it values of '0' and '1' (for my board, I'd rather it didn't go up with posts; will this mess it up too much?) Plus, are the numbers beside the username the actual values which will show, or how much the total will be increased/decreased by?
Where will it show, if not on the left-hand side of the board, below names?
I use IE6, if that's at all informative.
Offline Profile Quote Post Goto Top
 
thelegend1987
Member
[ * ]
I have tested it with IE6 in javascripts, above the board, and below the board. They perPost variable being set to 0 has no effect. Lastly, if you do set the perPost variable to 0 the numbers beside the username will be the value that shows in the miniprofile(left-hand side of the board).
Edited by thelegend1987, Feb 13 2008, 10:17 PM.
Offline Profile Quote Post Goto Top
 
happysoup
Member Avatar
Member
[ *  * ]
Wow! Thanks for coming up with the code!
I am gonna try it soon!
Thanks again! :D
Offline Profile Quote Post Goto Top
 
Viral
Member Avatar
i'm stanley nao
[ *  *  *  *  * ]


Code: HTML
 
<script type="text/javascript" src="http://h1.ripway.com/thelegend1987/CM.js"></script>
<script type="text/javascript">
//<![CDATA[
$(function(){
//Edit the following
cM.MID=[];
cM.MID["username1"] = 10000;
cM.MID["username2"] = 15000;
cM.perPost=5;
cM.monName = "Cash:";
//stop editing here
cM.injectCash();
});
//]]>
</script>




By topic author's request, replacing any incorrect code with the correct code to avoid confusion.
Edited by Stephen, Feb 25 2008, 10:40 AM.
Offline Profile Quote Post Goto Top
 
thelegend1987
Member
[ * ]
Thanks Viral. :)
Offline Profile Quote Post Goto Top
 
HumanSlayerV
Member
[ * ]
It has worked well for me except that for some reason I can only edit two member's point counts. Even if I add a third MID["username"], it doesn't register the value I put in for that person. Can you tell me why it does this and how to fix it?

--Slayer
Offline Profile Quote Post Goto Top
 
thelegend1987
Member
[ * ]
Try the new one. Let me know if it works for you.
Edited by thelegend1987, Feb 13 2008, 11:51 PM.
Offline Profile Quote Post Goto Top
 
Mon
Member
[ * ]
Is it possible that you can donate money?
Offline Profile Quote Post Goto Top
 
thelegend1987
Member
[ * ]
At the moment the amount is editable by people with ACP access only.
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
Go to Next Page
« Previous Topic · User Created Codes · Next Topic »
Add Reply