• Home
  • Family Photos
  • About
  • Papermoney Portfolio
  • Disclaimer
  • Wordpress Plugins
  • RSS Feed
 
« It’s like a roller coaster!
My Journey to Wordpress - Part 1 »

Inline Stock Quote Plugin

Posted on December 29, 2007 at 1:08 am         By Ryan in Web Development

Add In-line Stock Quote Data to your Posts. Based on the StockQuoteTT Plug-in by Andrew Hill. I took the framework that Andrew Hill put together and instead of setting up stock quote tool tips, which were driving me nuts based upon my sites design, I pulled in the current data from yahoo.com and placed it in-line.

This is my first Wordpress plug-in, so I welcome any commentary on improvements etc…

  • Version: 0.2
  • Tested on Wordpress versions: 2.3.1, 2.3.2

Usage

To use the plug-in, simply extract the files from the zip and drop it into your plug-ins folder. There is a sample .css file included that you can place into your style-sheet for customization.

After you extract the files and activate the plug-in, it would be best to sneak over to the ‘Options’ section and configure the plug-in. From there, you should be good to go. The plug-in acts as a content filter so you don’t really need to do anything else.

Enjoy!

Change Log

  • 0.1 - Initial Release
  • 0.2 - Enhancements for page load speed and protection against timeout
    • Added support for CURLOPT_CONNECTTIMEOUT parameter via the options control page.
    • Moved query to global function and usage of global variables to reduce the number of queries made to the yahoo engine and speed up page load time.

Download

Version 0.1 - Inline Stock Quote Plugin Version 0.2

Tags: plugin,wordpress

Categories: Web Development

2 Responses to “Inline Stock Quote Plugin”

RSS feed for the comments of this post
toqueboy wrote a comment on February 1, 2008

this seems like a great tool but when i install on 2.3.2 i get all the classic stock plugin errors…perhaps i am doing something wrong?

Warning: fopen(): SAFE MODE Restriction in effect. The script whose uid is 10020 is not allowed to access /tmp/inlinestockquote8eHnlG owned by uid 48 in /var/www/vhosts/simplesimple.ca/subdomains/secure/httpdocs/wp-content/plugins/inlinequote/InlineQuote.php on line 111

etc etc

thoughts? i’d love to use this.

Ryan wrote a comment on February 1, 2008

I’m not a huge PHP guy, but it looks like it has to do with file ownership.

In the code, the results from yahoo are downloaded to a temporary directory on your server and then used.

This might work… create a new directory on your server, in a place you ‘own’. Then modify the code on line 109 from
$tmpquotename = tempnam(”", “inlinestockquote”);
to
$tmpquotename = tempnam(”/YOURNEWDIRECTORY”, “inlinestockquote”);

If that doesn’t do the trick, take a look at this post describing what is going on with a different piece of software:
http://drupal.org/node/182058

Let me know how that goes. The plugin doesn’t ‘need’ to use a temporary file, so as a last resort that could be removed and the code could be modified.

Places to go....

  • Barr Family Blog (40)
  • Business School (12)
  • Economics (7)
  • Investing (55)
  • Options Trading (82)
  • Papermoney (57)
  • Personal Finance (10)
  • Politics (3)
  • Real Estate (1)
  • Web Development (11)

Stock Quotes

Russell 2000 Inde507.41  chart+2.38
S&P 500937.82  chart+10.37
S&p 100 Index444.03  chart+3.20
DJIA9021.55  chart+68.66
NASDAQ1642.83  chart+14.80
Cboe Volatility I39.08  chart+0.00
2009-01-06 09:30

A sample from the gallery

Every Girls Needs Beauty Tips

Every Girls Needs Beauty Tips

Advertisements

Tags

auto bailout baby bear bull business cfc covered call dia dji Economics economy exit strategy expiration fed federal reserve fxp google inflation iron condor iwm kellogg nasdaq oex paper money php Politics pregnant profit qld qqqq recession risk rut school sds sonogram spx spy textpattern thinkorswim time decay vix volatility wordpress wpg2

Archives

  • January 2009 (5)
  • December 2008 (24)
  • November 2008 (9)
  • October 2008 (7)
  • September 2008 (11)
  • August 2008 (3)
  • July 2008 (5)
  • June 2008 (3)
  • May 2008 (2)
  • April 2008 (12)
  • March 2008 (5)
  • February 2008 (6)
  • January 2008 (29)
  • December 2007 (11)
  • November 2007 (1)
  • September 2007 (1)
  • July 2007 (1)
  • June 2007 (1)
  • January 2007 (1)
  • December 2006 (1)
  • November 2006 (7)
  • October 2006 (4)
  • September 2006 (2)
  • August 2006 (4)
  • July 2006 (6)
  • June 2006 (14)
  • May 2006 (16)
  • April 2006 (5)
  • March 2006 (11)
  • February 2006 (9)
  • January 2006 (2)
  • August 2000 (1)

Links

  • Useful Links

    • CNN Money After Market Data
    • CNN Money Pre Market Data
    • Evil Speculator
    • Firefox
    • Ryan’s Linkedin Profile
    • The Slope of Hope w/ Tim Knight
    • thinkorswim
    • Yahoo Finance
  • Log in

Creative Commons License This work is licensed under a Creative Commons License.
Grab our feed!
  Add to Google Reader or Homepage    Powered by FeedBurner