Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
vB Stocks 1.0.0 for vB 3.0.3 Details »»
vB Stocks 1.0.0 for vB 3.0.3
Version: 1.00, by AN-net AN-net is offline
Developer Last Online: Jan 2010 Show Printable Version Email this Page

Version: 3.0.3 Rating:
Released: 11-06-2004 Last Update: Never Installs: 19
DB Changes
 
No support by the author.

vB Stocks 1.0.0
by Antonbomb22(Anthony Scudese)

Compatiability:
Compatiable with 3.0.x(Tested on 3.0.3)

Description:
This hack uses Yahoo Finance's external CSV feature. It converts the CSV to a readable array. This allows you to get stock quotes(not realtime but updated daily) for whatever stocks Yahoo Finance provides via stock symbols(Google = GOOG). You can also get quotes on the DowJones. Also this hack allows your users to look up stocks that you may not have already being pulled from Yahoo Finance.

Author(s):
-AN-Net
-joeaic(developed code basis)

Code Based Off Of:
http://www.phpbuilder.com/snippet/de...snippet&id=163

Live Demo:
http://www.animationation.net/community/stocks.php

Support:
Any modification to the provided files is not supportable. I also hold the right to deny support to anyone at anytime.

Where to Get Support:
-Official vB Stocks Forum
-Aim: Antonbomb22
-Email: antonbomb22@animationation.net
-this thread

Special Thanks To:
Yahoo Finance for providing the CSV and great service

Zip Includes:
-install.txt
-stocks.php
-stocksmanager.php

Supporters / CoAuthors

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #72  
Old 03-29-2005, 03:07 PM
sim tech sim tech is offline
 
Join Date: Jan 2005
Location: Georgia
Posts: 140
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by interfx
Great add-on... Anyone figure out to add the actual company name yet???
Would this work? This is what I did, but I'm having problems having it write to the table & then xfer to the template.

I created a field in the stocks table in MySQL called 'comapnyname' and then modded the admin file so that it would write the company name to the table. (see image). It's close but no cigar yet. Do I have to make 'companyname' a global? Also - no data in the table as of yet. Anyone?? Thanx


PHP Code:
<?PHP

///////////////////////////////////
//vB Stocks(1.0.0) by Antonbomb22//
//Code Basis by joeaic/////////////
//May not be redisitributed,copied/
//or modifed without permission////
///////////////////////////////////

require_once('./global.php');

if(empty(
$_REQUEST['do']))
{
    
$_REQUEST['do']="showstocks";
}

if(
$_REQUEST['do']=="showstocks")
{

    
print_cp_header("Stock Manager");
    
print_table_start();
    
print_table_header("Manage Stocks"3);

    
print_cells_row("stocksymbol""Stock Status""stocktitle""companyname""Stock Options"1'', -1);
    
$getstocks$DB_site->query("SELECT stockname,active FROM ".TABLE_PREFIX."stocks");
    while(
$stock$DB_site->fetch_array($getstocks))
    {
        if(
$stock['active']==1)
        {
            
$status"Active";
        }
        else
        {
            
$status"Inactive";
        }
        print 
"<tr class=\"".fetch_row_bgclass()."\"><td><a href=\"http://finance.yahoo.com/q?s=".$stock['stockname']."\">".$stock['stockname']."</a></td><td>".$status."</td><td>[<a href=\"stocksmanager.php?do=edit&sym=".$stock['stockname']."\">Edit</a>][<a href=\"stocksmanager.php?do=delete&sym=".$stock['stockname']."\">Delete</a>]</td></tr>";
    }
    
print_table_footer();
}
if(
$_REQUEST['do']=="edit")


{
    
$stock$DB_site->query_first("SELECT stockname, active FROM ".TABLE_PREFIX."stocks");
    
print_cp_header("Stock Edit: ".$stock['stockname']."'");
    
print_form_header('stocksmanager''update');
    
construct_hidden_code("origsym"$stock['stockname']);
    
print_table_header("Stock Edit: ".$stock['stockname']."'");
    
print_input_row("Stock Symbol:<dfn>example: YHOO, ^DJI, GOOG</dfn>""stocksymbol"$stock['stockname'], "'");


//  ATG stock name mod


    
print_input_row("Company Name:<dfn>example: Northwest Airlines</dfn>""companyname"$stock['companyname'], "'");

    
print_yes_no_row("Stock Active?""active"$stock['active']);
    
print_submit_row("Update Stock");


}
if(
$_POST['do']=="update")
{
    
globalize($_POST, array(
        
'stockname' => TEXT,
//    ATG *******************************************
        
'companyname' => TEXT,
        
'active' => INT,
        
'origsym' => TEXT
    
));
    
$DB_site->query("UPDATE ".TABLE_PREFIX."stocks SET stockname='".addslashes($stocksymbol)."', active=".$active." WHERE stockname='".addslashes($origsym)."'");
// ATG ********************************************
    
$DB_site->query("UPDATE ".TABLE_PREFIX."stocks SET companyname='".addslashes($companyname). "'");

    
define('CP_REDIRECT''stocksmanager.php?do=showstocks');
    
print_stop_message('stock_updated_successfully');
}
if(
$_REQUEST['do']=="delete")
{
    
$DB_site->query("DELETE FROM ".TABLE_PREFIX."stocks WHERE stockname='".addslashes($sym)."'");
    
define('CP_REDIRECT''stocksmanager.php?do=showstocks');
    
print_stop_message('stock_deleted_successfully');
}
if(
$_REQUEST['do']=="add")
{
    
print_cp_header("Add Stock");
    
print_form_header('stocksmanager''insert');
    
print_table_header("Add Stock");
    
print_input_row("Stock Symbol:<dfn>example: YHOO, ^DJI, NWAC</dfn>""stocksymbol");
//   ATG *********************************************
    
print_input_row("Company Name:<dfn>example: Northwest Airlines</dfn>""companyname");

    
print_yes_no_row("Stock Active?""active"0);
    
print_submit_row("Add Stock");
}
if(
$_POST['do']=="insert")
{
    
globalize($_POST, array(
        
'stocksymbol' => TEXT,
        
'active' => INT
    
));
    
$DB_site->query("INSERT INTO ".TABLE_PREFIX."stocks (stockname,active) VALUES ('".addslashes($stocksymbol)."', ".intval($active).")");
    
define('CP_REDIRECT''stocksmanager.php?do=showstocks');
    
print_stop_message('stock_inserted_successfully');
}
print_cp_footer();
exit;
?>
Reply With Quote
  #73  
Old 03-29-2005, 04:04 PM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
///////////////////////////////////
//vB Stocks(1.0.0) by Antonbomb22//
//Code Basis by joeaic/////////////
//May not be redisitributed,copied/
//or modifed without permission////
///////////////////////////////////
Maybe this is the problem


Reply With Quote
  #74  
Old 03-30-2005, 04:51 PM
sim tech sim tech is offline
 
Join Date: Jan 2005
Location: Georgia
Posts: 140
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Doh!
Reply With Quote
  #75  
Old 04-22-2005, 02:25 PM
scottct1 scottct1 is offline
 
Join Date: Mar 2002
Location: Connecticut
Posts: 391
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I love this hack but my users hate it because they can not make their own portfolio.
Please start on version 2.0
Reply With Quote
  #76  
Old 10-10-2005, 06:13 PM
HHU HHU is offline
 
Join Date: Sep 2005
Posts: 99
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Would Be Nice To See This Ported With Ability To Buy Stocks With Ucash
Reply With Quote
  #77  
Old 10-10-2005, 06:35 PM
Carl Anderson's Avatar
Carl Anderson Carl Anderson is offline
 
Join Date: Apr 2003
Posts: 91
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by HHU
Would Be Nice To See This Ported With Ability To Buy Stocks With Ucash
Agreed - a vb3.5 plugin.......

I would pay to have it...........
Reply With Quote
  #78  
Old 10-22-2005, 03:54 PM
HHU HHU is offline
 
Join Date: Sep 2005
Posts: 99
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can this be shown, only in one specific forum?

I only want to have it displaying in the top of my financial forum...

Thanks... nice hack if I can do that, I'll be installing this
Reply With Quote
  #79  
Old 11-04-2005, 04:53 AM
Carl Anderson's Avatar
Carl Anderson Carl Anderson is offline
 
Join Date: Apr 2003
Posts: 91
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Anyone working on this or something like it for 3.5? Will this hack be ported?
Reply With Quote
  #80  
Old 01-10-2006, 03:30 AM
Joe Blow Joe Blow is offline
 
Join Date: Aug 2004
Posts: 40
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm also interested in whether there is a version in the works for 3.5.X...

A great hack that deserves to live on with new versions of vbulletin!
Reply With Quote
  #81  
Old 02-23-2006, 12:51 PM
Joe Blow Joe Blow is offline
 
Join Date: Aug 2004
Posts: 40
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Will this hack work with vbulletin 3.5.X?

Would love to know if anyone has got it working or if there is a new version planned.
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 12:24 AM.


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.05900 seconds
  • Memory Usage 2,348KB
  • Queries Executed 26 (?)
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
  • (1)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (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
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete