vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Add-On Releases - Stock Trader for vBulletin (https://vborg.vbsupport.ru/showthread.php?t=135084)

Tulsa 01-07-2007 11:30 PM

Quote:

Originally Posted by Blaine0002 (Post 1152895)
try this, i simply added a check where each preview was and it puts an error if the stocks entered was less than 1

I hope you only intended us to upload the vbtrader.php file, as that is what I did and entered a negative amount and it trapped the error! :cool:

Blaine0002 01-07-2007 11:36 PM

glad it worked for you! :D

Lionel 01-07-2007 11:37 PM

Quote:

Originally Posted by Blaine0002 (Post 1153059)
no i also stuck one in there when you sell stocks, OH! and i also added the phrase to the XML file.

All fixed. Thanks for that. Now, if someone could do a vbadvanced module that will

1-display the major indice to all

2-a register to play message

3-click here to play for registered non participant

4-A list of participant stocks (5 or more) plus a link to their full portfolio.

That will be super cool

zethon 01-08-2007 01:48 AM

Quote:

Originally Posted by Blaine0002 (Post 1152695)
Try this... Open vbtrade.php
find:
PHP Code:

            $userdata =& datamanager_init('user'$vbulletinERRTYPE_STANDARD);
            
$userdata->set_existing($vbulletin->userinfo);
            
$userdata->set($moneyrow,($vbulletin->userinfo[$moneyrow] + $total_offer));
            
$userdata->save(); 

Replace with:
PHP Code:

$db->query("update " TABLE_PREFIX "user set {$vbulletin->options['vbst_moneyrow']}={$vbulletin->options['vbst_moneyrow']}+'{$total_offer}' where userid='{$vbulletin->userinfo['userid']}'"); 


find:
PHP Code:

            $userdata =& datamanager_init('user'$vbulletinERRTYPE_STANDARD);
            
$userdata->set_existing($vbulletin->userinfo);
            
$userdata->set($moneyrow,($vbulletin->userinfo[$moneyrow] - $totalcost_fc));
            
$userdata->save(); 

Replace with:
PHP Code:

$db->query("update " TABLE_PREFIX "user set {$vbulletin->options['vbst_moneyrow']}={$vbulletin->options['vbst_moneyrow']}-'{$totalcost_fc}' where userid='{$vbulletin->userinfo['userid']}'"); 


Hope this works for you..

I wonder why using the User DataManager object broke it. I will go ahead and use the SQL queries instead since that seems to fix this plguin with iCash.

Quote:

Originally Posted by Lionel (Post 1152749)
a member discovered a major bug.

Try purchasing some stocks and for amount of shares put in -500 (negative). That will increase your points amount. In one case, the guy who had 2900 points ended with 10 billions!!!!!!

Good catch! I will implement the fix that Blaine posted.

zethon 01-08-2007 02:13 AM

All updates have been added to the distribution, and I've bumped up the version number.

Thanks to Blaine0002 for finding the fix to get this to work with iCash!

Blaine0002 01-08-2007 02:44 AM

glad to help!

TomJames 01-08-2007 03:40 AM

This is awesome! Great work
*clicks install*

Carl Anderson 01-09-2007 12:29 PM

Great hack and I got it working fine using vbux at last.. I had already started a contest using vbux and when it is over I will uninstall it and switch to icash...

Here is your list of future features..

Future Features
  • stock ticker marquee for users
  • statistics page (most popular stocks, best performers, etc.)
  • trade stocks with other board users
  • view other users' portfolios
My suggestion is to not have a trade stocks with other users as there is no need to do so - just sell them.

I would like you to consider a top ten list of % gained. Or most money in portfiolio? Something to see to compare and have contests on...

Also a stocks sold (or history) whatever you want to name it so you can view the winners and losers in your portfolio. Maybe at the time of sale it just moves them into another table for storage that can be brought up by a history or sold link?

This hack is great and I love it as people can learn to trade stocks and I run an investing site so I am a bit biased..

Voted it hack of the month.........

Thank you so much!

zethon 01-09-2007 05:44 PM

A few people on my board requested the plugin charge a capital gains tax, instead of a commissions for selling stock. I implemented this as another setting in the add-on's setting page.

Upgrade as normal

soletrader 01-09-2007 05:56 PM

Is there anyway you can create a virtual money system for this hack?


All times are GMT. The time now is 11:53 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01365 seconds
  • Memory Usage 1,757KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete