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)

brvheart 02-10-2007 07:51 PM

I tried to install this on 3.6.4....but when I got the the vbtrade page it is nothing but jibberish meaning:

"symbol", "n" => "name", "l1" => "lasttrade", "v" => "volume", "c1" => "change", "p2" => "perchange", "d1" => "lasttradedate", "t1" => "lasttradetime", "x" => "exchange", ); var $service_url = 'http://quote.yahoo.com/d/quotes.csv'; var $format = null; var $request = null; function StockRequester() { foreach ($this->request_formats as $code => $key) $this->format .= $code; $this->request = $this->service_url."?s=%1&f=".$this->format; } function BuildHash($string) { $retval = null; $string = str_replace("\"","",$string); $stack = explode(',',$string); foreach ($this->request_formats as $code => $key) { $retval[$key] = trim(array_shift($stack)); } return $retval; } function GetSingleQuote($symbol) { $request = str_replace('%1',$symbol,$this->request); $response = implode ('', file($request)); return $this->BuildHash($response); } function

The entire page looks like this, can someone help me get this working? I love the idea behind this would love to have it up and running :)

zethon 02-11-2007 06:01 PM

Quote:

Originally Posted by brvheart (Post 1179371)
I tried to install this on 3.6.4....but when I got the the vbtrade page it is nothing but jibberish meaning:

"symbol", "n" => "name", "l1" => "lasttrade", "v" => "volume", "c1" => "change", "p2" => "perchange", "d1" => "lasttradedate", "t1" => "lasttradetime", "x" => "exchange", ); var $service_url = 'http://quote.yahoo.com/d/quotes.csv'; var $format = null; var $request = null; function StockRequester() { foreach ($this->request_formats as $code => $key) $this->format .= $code; $this->request = $this->service_url."?s=%1&f=".$this->format; } function BuildHash($string) { $retval = null; $string = str_replace("\"","",$string); $stack = explode(',',$string); foreach ($this->request_formats as $code => $key) { $retval[$key] = trim(array_shift($stack)); } return $retval; } function GetSingleQuote($symbol) { $request = str_replace('%1',$symbol,$this->request); $response = implode ('', file($request)); return $this->BuildHash($response); } function

The entire page looks like this, can someone help me get this working? I love the idea behind this would love to have it up and running :)

Re-install. Your files have been corrupted somehow. This is not a problem with the script.

brvheart 02-11-2007 08:39 PM

I did reinstall 3 times, even download the files again :(

brvheart 02-11-2007 09:41 PM

I fixed it, at the top of the php page, you have this:

PHP Code:

<?

PHP Code:

<?php


99% of the time this does not matter, in this case it does....seems ok now :)

Quantnet 02-22-2007 07:14 PM

it stops working today...something wrong with the yahoo feed ?

Lionel 02-22-2007 07:22 PM

Quote:

Originally Posted by Quantnet.org (Post 1188516)
it stops working today...something wrong with the yahoo feed ?


you saved the day for me. I was getting lots of emails about site being unaccessible. After your message I disabled the vbadvanced stock trader and all is fine. Yahoo probably closed the feed.

zethon 02-22-2007 07:25 PM

Looks like Yahoo change the subdomain of their feed, which is causing Stock Trader not to work at all. Upload the attached class_stocktrader.php file to your /includes directory, overwriting the existing one, and this should fix the problem.

Quantnet 02-22-2007 07:34 PM

Glad I spotted this early.
Overwrite with new file and all is fine.

Thanks Zethon for the quick fix. I posted a bunch on your board about this ;)

Quantnet 02-23-2007 03:50 AM

A quick question

How would I use template conditional to show in the postbit the $post[ambportval] only for members whose portfolio > 0

Otherwise, don't display that since I have lot of people with portfolio = 0

Something like this (not quite right yet)
Code:

<if condition="$post[ambportval] == 0">       

don't display anything here

Else

<if condition="$show['reputation']" >
<div class="pbit" align="left">
Portfolio: $$post[ambportval] <br>
Change: $post[ambportgainper]%</span></div></if>
</if>


Quantnet 02-23-2007 04:03 AM

After playing with it for a couple of minutes...I found out a way to do this. Hope this helps

Code:

<if condition="($show['reputation']) AND ($post[ambportval] != 0)"><div class="pbit" align="left">Portfolio: $$post[ambportval] <br>
Change: $post[ambportgainper]%</span></div></if>



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

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.01342 seconds
  • Memory Usage 1,746KB
  • 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
  • (2)bbcode_code_printable
  • (2)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)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