Version: 4.0.1, by GeekyDesigns
Developer Last Online: Nov 2023
Category: Miscellaneous Hacks -
Version: 4.0.0 Beta 3
Rating:
Released: 11-13-2009
Last Update: 11-20-2009
Installs: 334
DB Changes Uses Plugins Auto-Templates
Additional Files
No support by the author.
11/20/09 - uCash 4.0.1 released, adding the option to edit a user's points when editing a user in the Admin CP. For some reason I thought that was already implemented. Whatever, it's there now. Enjoy.
Welcome to uCash 4.0.x!
uCash is a points system for vBulletin. 4.0.x is the continuation of uCash 3.9, which is a rewrite of previous uCash versions from scratch designed for vBulletin 4 and up. Simply upload the files located in the 'upload' folder and import product-ucash.xml in the Product Manager of vBulletin (allowing overwrite if you are upgrading). If you are installing this as a first time user of uCash then congrats, everything should be working and you can configure the options to your liking from there.
If you have a previous (pre-3.9) install of uCash or uCash & uShop still in the database, please read "oldupgrades.txt".
If you have any issues to report with this addon, please post it in this thread. Include all relevant details, such as vBulletin version and any previous install of uCash or uCash & uShop and its version number. Please do not PM or IM me for support unless you have a showstopping bug or exploit to report.
Wall of text aside, please enjoy the latest release of uCash, and feel free to post any ideas or comments here. Thanks!
For a more full list of current features in this beta, look at the screenshots displaying the main settings and per-forum settings. Note that screenshots may be out of date. For full-sized screenshots, go here: http://cuphat.com/mods/ucash/
Awesome! It is working, the only error seems to be that it is not giving partial points, 0.5 for example.
That has to do with the way reputation is stored in the database (it's an INT which only allows whole numbers). If you want it to accept decimal values like the uCash field can, run this query (adding your table prefix before user if you have one):
[sql] ALTER TABLE user CHANGE reputation reputation DECIMAL(24, 5) NOT NULL DEFAULT '10'[/sql]
I'm not sure what the side effects of doing this are, however. Reputation values might not be "prettied up" everywhere, so you may see people running around with long decimal points at the end of their rep values.
If you want to change it back to vB's default structure for any reason, run this query:
[sql] ALTER TABLE user CHANGE reputation reputation INT(11) NOT NULL DEFAULT '10' [/sql]
That has to do with the way reputation is stored in the database (it's an INT which only allows whole numbers). If you want it to accept decimal values like the uCash field can, run this query (adding your table prefix before user if you have one):
[sql] ALTER TABLE user CHANGE reputation reputation DECIMAL(24, 5) NOT NULL DEFAULT '10'[/sql]
I'm not sure what the side effects of doing this are, however. Reputation values might not be "prettied up" everywhere, so you may see people running around with long decimal points at the end of their rep values.
If you want to change it back to vB's default structure for any reason, run this query:
[sql] ALTER TABLE user CHANGE reputation reputation INT(11) NOT NULL DEFAULT '10' [/sql]
Instead of going 5 decimal places could I go two which would probably have a smaller chance of odd side effects?
That has to do with the way reputation is stored in the database (it's an INT which only allows whole numbers). If you want it to accept decimal values like the uCash field can, run this query (adding your table prefix before user if you have one):
[sql] ALTER TABLE user CHANGE reputation reputation DECIMAL(24, 5) NOT NULL DEFAULT '10'[/sql]
I'm not sure what the side effects of doing this are, however. Reputation values might not be "prettied up" everywhere, so you may see people running around with long decimal points at the end of their rep values.
If you want to change it back to vB's default structure for any reason, run this query:
[sql] ALTER TABLE user CHANGE reputation reputation INT(11) NOT NULL DEFAULT '10' [/sql]
When switching the Rep system to decimal value if a user has, say, 2.6, and I give them +1, it will just make it a whole number, 3.0, and they will lose the decimal value, it won't add it making it 3.6.
When switching the Rep system to decimal value if a user has, say, 2.6, and I give them +1, it will just make it a whole number, 3.0, and they will lose the decimal value, it won't add it making it 3.6.
Any idea?
Actually, yes I do. The user data manager runs an intval() on reputation, dropping the decimal point. Easiest way to deal with this is probably a code change, just remember that you'll have to re-apply it whenever you upgrade vBulletin.
In /includes/class_dm_user.php, find:
PHP Code:
$reputation = intval($reputation);
Replace with:
PHP Code:
$reputation = strval($reputation) + 0;
Save, close, upload, etc.
There's probably a way to make a clever plugin achieve the same goal, but that should get the job done for now.
Actually, yes I do. The user data manager runs an intval() on reputation, dropping the decimal point. Easiest way to deal with this is probably a code change, just remember that you'll have to re-apply it whenever you upgrade vBulletin.
In /includes/class_dm_user.php, find:
PHP Code:
$reputation = intval($reputation);
Replace with:
PHP Code:
$reputation = strval($reputation) + 0;
Save, close, upload, etc.
There's probably a way to make a clever plugin achieve the same goal, but that should get the job done for now.
It worked! You sir, are a genius.
Absolutely amazing! Other mod writers would tell me something along the lines of "I won't support that" or a different discouraging remark if messing outside the mod's initial parameters.
you are using this code to display the users points in the postbit, "{vb:raw template_hook.postbit_userinfo_right_after_posts}"
I was wondering if there is any other way to display the amount of points a user has.
because that line of code also controls the blog entries, and I dont want to display the blog entries, so I have that line of code commented out.
anyway to either display the amount of points differently, or somehow take out the blogs from that template with out effecting the points.
Uncomment that line, go to Plugins & Products -> Plugin Manager and disable the "Postbit: Add links to blog" plugin by unchecking its box and clicking "Save Active Status" at the bottom. If you want to, you can also uncheck the other blog plugins prefixed with "Postbit:", but that's the main one.