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)

zethon 12-29-2006 10:00 PM

Stock Trader for vBulletin
 
Stock Trader

Summary
This add-on gives your users the ability to use the money system on your board to "invest" in stock. Users can purchase and sell stock at market values. This plugin uses a stock feed from Yahoo to get real time stock quotes.
Release Notes
This product is considered to still be in Beta.This should be ending by the end of January.

This add-on is known to be compatible with vBulletin's built-in reputation system, vbBux and iCash.
Product Specifications
  1. two plugins
  2. one cron job
  3. file uploads
  4. one new DB table
  5. one template
  6. several phrases

Installation
Approx 2-5 mins
  1. As always: Back up your Database!
  2. upload the files in the "upload" directory, preserving the directory structure
  3. Go into AdminCP and import the product-stocktrader.xml file.
  4. (OPTIONAL) add a link in the navbar template or wherever your users can find it!

Upgrading/Updating
  1. upload all files in the upload directory, overwriting any existing files
  2. re-import the XML file, setting "Overwrite" to "Yes"

Configuration
  1. vBulletin Options -> Stock Trader Options

Change History
  • 0.9.9 (07-25-01) - fixed problem with trading mutual funds, fixed cheat with buying off hours (I think)
  • 0.9.8 (07-18-01) - added new options and fixed bug with purchasing really cheap stock
  • 0.9.7 (07-15-01) - fixed bug in top portfolios when using a table prefix
  • 0.9.6 (07-15-01) - fixed table prefix issues, fixed portfolio.gif problem
  • 0.9.5 (07-14-01) - added statistics page, ability to view other user portfolios, and postbit friendly variables
  • 0.9.4 (07-09-01) - added a Capital Gains Tax option
  • 0.9.3 (07-02-01) - fixed error with purchasing negative stock, fixed compatibility with iCash
  • 0.9.2 (07-05-01) - bug fixes
  • 0.9.1 (06-30-12) - added AJAX stock info lookup
  • 0.9.0 (06-29-12) - initial Beta release

Future Features
  • stock ticker marquee for users

Official Support
http://code.google.com/p/vbtrade/
PLEASE CLICK INSTALL!

zethon 12-29-2006 11:21 PM

Reserved.

TTG 12-30-2006 12:17 AM

Looks like an interesting addition .. clicked install and await future features

rinkrat 12-30-2006 12:48 AM

This sounds like a great idea!

lordnex 12-30-2006 12:57 AM

Wow.. this is a great idea. So much potential.

TheBlackPoet 12-30-2006 01:05 AM

i cant wait to get home and test this!!!

lovelypk 12-30-2006 01:56 AM

looks kool.

Quantnet 12-30-2006 02:24 AM

this will work great on my financial engineering forum. Would be awesome if we can trade other kind of products such as options, equity along with stocks..:D

UltimateOreo! 12-30-2006 02:37 AM

I am DEFINATELY going to install this once it gets past the beta stage.

Oddjob 12-30-2006 03:35 AM

*Hopes vbbux will work with this soon".

zethon 12-30-2006 03:40 AM

Quote:

Originally Posted by Oddjob (Post 1147340)
*Hopes vbbux will work with this soon".

Give it a try. I believe vBux uses a field in the user table to keep track of that user's "money". This plug-in should be compatible with any money system which uses the user table, which I believe is most money systems.

Oddjob 12-30-2006 03:48 AM

Quote:

Originally Posted by zethon (Post 1147343)
Give it a try. I believe vBux uses a field in the user table to keep track of that user's "money". This plug-in should be compatible with any money system which uses the user table, which I believe is most money systems.


Yea, ill wait for someone more experienced to give it a whirl.

soletrader 12-30-2006 04:59 AM

I installed it and turned it on. However, all I am getting is Invalid Action Specified and can not open vbtrade.php

zethon 12-30-2006 05:19 AM

Quote:

Originally Posted by soletrader (Post 1147360)
I installed it and turned it on. However, all I am getting is Invalid Action Specified and can not open vbtrade.php

Can you confirm that you've correctly specified a valid usergroup and money row in the "vBulletin -> Stock Trade" options?

soletrader 12-30-2006 05:20 AM

I dont use reputations or any form of point system. What should I put in the money row?

zethon 12-30-2006 05:26 AM

Quote:

Originally Posted by soletrader (Post 1147364)
I dont use reputations or any form of point system. What should I put in the money row?

You need to use some kind of point/money system, whether it be reputation, vBux or something else. Otherwise what will your users use to "buy" stock?

soletrader 12-30-2006 05:47 AM

I was thinking more like virtual money where users start off with something like $1million. And when they go bust they can simply refresh their account.

I love the hack though. Nice work.

zethon 12-30-2006 05:55 AM

Quote:

Originally Posted by soletrader (Post 1147375)
I was thinking more like virtual money where users start off with something like $1million. And when they go bust they can simply refresh their account.

I love the hack though. Nice work.

That's not a bad idea for a future version. I will ponder this and maybe added it to the future features.

BigJimTheLug 12-30-2006 06:02 AM

Reserved for future use, hopefully updates.

*installed*

soulface 12-30-2006 06:13 AM

Installed on my test forum. vbbux as a money row option working fine so far..

Features request:


1. Stock Symbol lookup (AJAX will be gr8)
2. Selling Stocks to other members.

soletrader 12-30-2006 08:10 AM

I have another request. Perhaps a simpler version where the users can retreive stock quotes only instead of buying and selling shares. Thanks

Lionel 12-30-2006 01:57 PM

You need to fix the sql insert from VALUE to VALUES

zethon 12-30-2006 02:02 PM

Quote:

Originally Posted by Lionel (Post 1147528)
You need to fix the sql insert from VALUE to VALUES

Good catch. Thanks. I will have this change and a couple other minor changes in a release I'm going to put up in a coupe hours.

Lionel 12-30-2006 02:05 PM

A vbadvanced module displaying the major indices to all, 5 user's top stocks with a link to complete portfolio would be nice.

Total portfolio value would be nice too.

Lionel 12-30-2006 02:06 PM

This has a lot of potentials, congratulations.

zethon 12-30-2006 02:53 PM

I've uploaded a small update which includes the change of "VALUE" to "VALUES" and also includes a few more instructions about updating the navbar template (this was asked by a couple people).

For anyone who has already installed this add-on, to update, simply upload the vbtrade.php file to your forum's root directory, overwriting the old one. Also, import the product's XML file, setting "Overwrite" to yes.

Lionel 12-30-2006 03:34 PM

in the function function GetStockTable I did:

Quote:

$portfolio[] = ($info['shares'] * $shareinfo['lasttrade']);
and before the submit button in main, I did

Quote:

$tot=array_sum($portfolio);

$stocktable .= "
<tr class='alt$alt'><td colspan=7 align=right>$tot</td><td colspan=3></td></tr>";
Now I get the portfolio value

zethon 12-30-2006 04:50 PM

Quote:

Originally Posted by Lionel (Post 1147575)
in the function function GetStockTable I did:



and before the submit button in main, I did



Now I get the portfolio value

I've added similar code in the update I posted earlier.

UltimateOreo! 12-30-2006 07:25 PM

I get it now, Im going to install it. Go to phpmyadmin and see the table name that your cash system uses for its money. If you dont have any kind of points system or reputation system, I believe you will have to install one or make one just for this.

leo1977 12-30-2006 09:03 PM

I am not getting any yahoo feed, just the options to purchase stocks. running 3.6.0 and vbux. Any ideas?

zethon 12-30-2006 09:25 PM

Quote:

Originally Posted by leo1977 (Post 1147708)
I am not getting any yahoo feed, just the options to purchase stocks. running 3.6.0 and vbux. Any ideas?

Perhaps I worded it badly. You won't get any feed, the pluging pings Yahoo when it needs to get stock info. What you're seeing is the plugin (look in the screen shots).

leo1977 12-30-2006 09:33 PM

So if I undertand right, It will ping yahoo after a while and I will get the info?

This is what I have now (see the attachment)

Thanks




Quote:

Originally Posted by zethon (Post 1147713)
Perhaps I worded it badly. You won't get any feed, the pluging pings Yahoo when it needs to get stock info. What you're seeing is the plugin (look in the screen shots).


zethon 12-30-2006 09:37 PM

Quote:

Originally Posted by leo1977 (Post 1147720)
So if I undertand right, It will ping yahoo after a while and I will get the info?

This is what I have now (see the attachment)

Thanks

Go ahead and purchase stock. There's no way in this plugin to look up stock symbols or get quotes. You have to know the stock symbol ahead of time by using finance.google.com or something like it.

I'm going to look into adding an AJAX interface for looking up stock info though.

leo1977 12-30-2006 09:59 PM

From screenshot 2 I was under the impression that it's already in this mod. So how would a user know what to put in the fields? Adding an Ajax would be great

Magz 12-30-2006 10:54 PM

Great looking mod,

I am always on the lookout for giving my users extra features on my boards, but a quick question. I have a UK based site, what would be involved in making the mod UK ccompatible, ie in £'s and buying stocks from The UK as opposed to US?

regards

zethon 12-30-2006 11:09 PM

Quote:

Originally Posted by Magz (Post 1147760)
Great looking mod,

I am always on the lookout for giving my users extra features on my boards, but a quick question. I have a UK based site, what would be involved in making the mod UK ccompatible, ie in ?'s and buying stocks from The UK as opposed to US?

regards

AFAIK the Yahoo feed only supports USD. In the mod you can set an "exchange rate" that specifies how many of your board's points equal 1 USD. Perhaps you could use that somehow.

Lionel 12-31-2006 01:40 AM

Are you planning to do a vbadvanced module, besides the ticker?

Oddjob 12-31-2006 02:39 AM

Well, it seems to work flawlessly with vbbux.

Awesome mod, looking forward to the next version.

Would like to see something in the postbit legacy where you can see what stocks people have......

zethon 12-31-2006 02:47 AM

I just posted an update which implements an AJAX interface to look up stock information. This does not allow you to search for stock symbols, you must know the symbol ahead of time.

There's one extra file that needs to be uploaded in this update.

Carl Anderson 12-31-2006 06:47 AM

This looks great and I think I will install it. I do have a suggestion! Make it so you can have investing contests - issue so many bucks in a portfolio that has a start and end date? Nice job thx a bunch!


All times are GMT. The time now is 04:43 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.01486 seconds
  • Memory Usage 1,819KB
  • 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
  • (13)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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