| We hope you enjoy your visit. You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free. Join our community! If you're already a member please log in to your account to access all of our features: |
| Simple Money/Points Script with Per-Post, Admit Edit | |
|---|---|
| Tweet Topic Started: Nov 25 2010, 09:37 PM (11,067 Views) | |
| Joe | Nov 25 2010, 09:37 PM Post #1 |
![]() ![]()
|
Code name: Simple Money Script [rewritten] Date created: 5/6/2015 Author(s): Joe Description: Admin-editable money system. You can define a currency name, starting amount, and a per-post amount. Money is displayed underneath the post count area. Preview: Fiddle around on this board. To get a members id, check their profile link like so: [bbc_code]http://support.zathyus.com/profile/349609/[/bbc_code]`Board Template → Below the Board` If anyone new to jQuery is interested how this script works (which is quite basic), a non-minified, commented version can be viewed here. Older Version
Edited by Joe, May 6 2015, 01:15 PM.
|
![]() |
|
| Replies: | |
|---|---|
| Strangeness | Apr 23 2013, 06:18 PM Post #31 |
|
Member
![]() ![]() ![]()
|
does this work for Invision board as well? |
![]() |
|
| Quozzo | Apr 25 2013, 02:42 PM Post #32 |
|
By the blood of Sanguinius!
![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
No |
![]() |
|
| another | May 21 2013, 09:48 PM Post #33 |
|
Member
![]() ![]() ![]()
|
I would like to know the answer to this as well. |
![]() |
|
| FriendlyWarren | Jul 17 2013, 06:04 AM Post #34 |
|
Member
![]() ![]() ![]()
|
I was wondering how do I attach a donation button where members could use their Forum Currencies to purchase deals and such that the forum offers please? For example Say for $20 ZBIDS I will do 50 posts on your forum OR You can do 100 posts on my forum and I'll give you $100 ZBIDS (ZBIDS = Zetaboards and InvisionFree Dollars) for instance. |
![]() |
|
| StarsoftheSpiral | Mar 6 2014, 01:26 AM Post #35 |
|
Member
![]() ![]() ![]()
|
I would like a forum gold shop that does not touch the posts' "points." I would like for my members to be able to earn badges AND gold at the same time without taking anything away from each other. They should earn gold anyway for posting and be able to donate it if they wish without destroying their post counts. Is this even possible? Edited by StarsoftheSpiral, Mar 6 2014, 01:26 AM.
|
![]() |
|
| Joe | May 6 2015, 01:20 PM Post #36 |
![]() ![]()
|
Code rewritten, see original post. Nothing new in terms of features, however. If anyone is just starting out with jQuery, this script covers a lot of basics and would be a good learning tool. For that reason, a non-minified, commented version can be found here. |
![]() |
|
| Quozzo | May 6 2015, 03:29 PM Post #37 |
|
By the blood of Sanguinius!
![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
It looks good but you might want to explain why you're multiplying the member ID and post count by 1. You will want to cache `$(this)` if you use it multiple times within a handler too, as it's expensive converting the element into jQuery several times. Also, instead of using `location.href.indexOf('/topic/') !== -1` if you don't need the index number, then you can use `location.href.indexOf('/topic/')+1` as that will return 0 if not found and >0 if it is. Not really necessary but saves milliseconds of my life typing out those extra characters
|
![]() |
|
| Joe | May 6 2015, 06:06 PM Post #38 |
![]() ![]()
|
Good points Quozzo! Thanks for that, I appreciate it. I put in some extra comments for the `* 1`. Good point regarding `$(this)`, too.. didn't cross my mind despite using it three times per `$('td.c_username > a.member')` on the page, eeek! |
![]() |
|
| Viral | May 6 2015, 07:25 PM Post #39 |
![]()
Viral
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
You don't need my advice, but I'll also chime in with a small addition. Instead of `variable * 1` for type casting I usually use `+variable`. As far as I can remember there's no downsides to it, and it looks a lot neater in my opinion .
|
![]() |
|
| Joe | May 6 2015, 08:30 PM Post #40 |
![]() ![]()
|
Feel free my friend! Little tid-bits like that are awesome, cool to share and to learn from each other. That's neat, hadn't seen that one before.
|
![]() |
|
| Quozzo | May 7 2015, 03:18 PM Post #41 |
|
By the blood of Sanguinius!
![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
I've not seen that either. Good to know, thanks. |
![]() |
|
| Harvyy | Sep 11 2016, 03:42 PM Post #42 |
|
Member
![]() ![]() ![]() ![]() ![]()
|
thanks, i enjoy using this.
Edited by Harvyy, Nov 15 2016, 05:02 PM.
|
![]() |
|
| 1 user reading this topic (1 Guest and 0 Anonymous) | |
| « Previous Topic · ZetaBoards Codes & Modifications · Next Topic » |
| Track Topic · E-mail Topic |
4:33 AM Jul 11
|








![]](http://b1.ifrm.com/0/1/0/p601690/pipright.png)

4:33 AM Jul 11