Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
uCash 4.x Details »»
uCash 4.x
Version: 4.0.1, by GeekyDesigns GeekyDesigns is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

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/

Download Now

File Type: zip uCash_4.0.1_[20091120-2150].zip (10.3 KB, 2180 views)

Screenshots

File Type: jpg 3.9.0beta_forumoptions.jpg (39.8 KB, 0 views)
File Type: jpg 3.9.0beta_options.jpg (139.1 KB, 0 views)

Supporters / CoAuthors

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
2 благодарности(ей) от:
hoangserip, nchoate97

Comments
  #102  
Old 03-15-2010, 07:26 AM
Link14716's Avatar
Link14716 Link14716 is offline
 
Join Date: Jun 2002
Location: Georgia, USA
Posts: 2,519
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by sticky View Post
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]
Reply With Quote
  #103  
Old 03-15-2010, 05:50 PM
sticky sticky is offline
 
Join Date: Sep 2003
Posts: 934
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Link14716 View Post
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?
Reply With Quote
  #104  
Old 03-16-2010, 12:16 AM
Link14716's Avatar
Link14716 Link14716 is offline
 
Join Date: Jun 2002
Location: Georgia, USA
Posts: 2,519
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by sticky View Post
Instead of going 5 decimal places could I go two which would probably have a smaller chance of odd side effects?
Yeah, just change the 5 to a 2.
Reply With Quote
  #105  
Old 03-16-2010, 12:26 AM
sticky sticky is offline
 
Join Date: Sep 2003
Posts: 934
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Link14716 View Post
Yeah, just change the 5 to a 2.
Thanks, just wanted to make sure
Reply With Quote
  #106  
Old 03-16-2010, 03:05 AM
sticky sticky is offline
 
Join Date: Sep 2003
Posts: 934
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Link14716 View Post
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]
Hey, it worked!

You freaking rule!
Reply With Quote
  #107  
Old 03-16-2010, 04:48 AM
sticky sticky is offline
 
Join Date: Sep 2003
Posts: 934
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Link14716 View Post
Yeah, just change the 5 to a 2.
One glitch I noticed.

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?
Reply With Quote
  #108  
Old 03-16-2010, 05:14 AM
Link14716's Avatar
Link14716 Link14716 is offline
 
Join Date: Jun 2002
Location: Georgia, USA
Posts: 2,519
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by sticky View Post
One glitch I noticed.

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.
Reply With Quote
  #109  
Old 03-16-2010, 05:50 AM
sticky sticky is offline
 
Join Date: Sep 2003
Posts: 934
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Link14716 View Post
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.

Thank you so much!
Reply With Quote
  #110  
Old 03-18-2010, 09:32 PM
paulbhoy paulbhoy is offline
 
Join Date: Mar 2009
Posts: 47
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #111  
Old 03-19-2010, 08:26 AM
Link14716's Avatar
Link14716 Link14716 is offline
 
Join Date: Jun 2002
Location: Georgia, USA
Posts: 2,519
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by paulbhoy View Post
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.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:18 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07892 seconds
  • Memory Usage 2,360KB
  • Queries Executed 27 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_php
  • (9)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (2)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (3)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete