The Arcive of vBulletin Modifications Site. |
|
|
#1
|
|||
|
|||
|
Hi there,
I have noticed that a few phpBB sites have company stock quotes listed in their headers (check out http://www.xmfan.com and http://www.xm411.com for examples) I want to do the same thing on my site with vBulletin 3. Any ideas how I can do this? I believe they are pulling the info from Yahoo. Thanks for anyone who can help! |
|
#2
|
|||
|
|||
|
Ok I have been able to figure it out a little bit...
Here is what I got so far... If I put the following code in a PHP file the stock quotes will display, but only at the top of the page. Code:
$fd = fopen ("http://quote.yahoo.com/d/quotes.csv?s=DISH&f=sl1d1t1c1ohgv&e=.csv", "r");
$contents = fread ($fd, 200);
fclose ($fd);
$contents = str_replace ("\"", "", $contents);
$contents = explode (",", $contents);
echo "<ul><li>DISH Network stock tracker. Most recent trade: <b>\$$contents[1]</b>. ($contents[4]) (Prices delayed up to 20 minutes.)</li>";
I would like to be able to take this data and the Code:
<ul><li>DISH Network stock tracker. Most recent trade: <b>\$$contents[1]</b>. ($contents[4]) (Prices delayed up to 20 minutes.)</li> Any ideas? |
|
#3
|
|||
|
|||
|
Can anyone help? I would really like this displayed in my templates and not at the top of my page.
Check out http://www.satelliteguys.us/index.php to see what I mean. Thanks! |
|
#4
|
|||
|
|||
|
Can anyone PLEASE help?
|
|
#5
|
|||
|
|||
|
Where did you put your additions? Try putting your code where you want the information to be displayed?
-Kevin |
|
#6
|
|||
|
|||
|
Right now the code is in my index.php file.
The problem with this is no matter where I put the PHP in the file it still displays above the top and above the <html> & <body> when it is displayed to the user. I want to be able to put this in my header template below my logo. |
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|