Stock Section Admin

The Stock function maintains the latest value of a chosen stock/index code from Yahoo Finance and displays it on your Home Page, along with the date or time of last update, the full name of the stock (linked to its full details in Yahoo Finance), the time or date of the latest value, and the actual and percentage change from the previous trading day.

Updating Stock Code

  1. As a logged-in admin user, click the Home Page Admin link from the Home Page, and choose the Stock section Admin option.

  2. Output this function to users' browsers can be turned on and off.

  3. Enter a valid stock code.  (The default is ^ftse - the Financial Times Share Index.)  These can be looked up from http://uk.biz.yahoo.com/quote_lookup.html.

Note: Stock data are parsed periodically from Yahoo Finance, based on a schedule (crontab list) set in your server's configuration files.  When the stock code is changed, you will see the new stock data on the home page the next time the parsing program runs.  Your server administrator may be able to run this program immediately for you.

Technical Details

These technical details are intended for web designers when setting up a stylesheet.

The sample HTML output below shows how the random text is output.  If customised output is required for your home page implementation, please contact the developers.

HTML Output
 

<!--Stocks part-->

<div class="stocks" id="stocks">

    <a target="_new" href="http://uk.finance.yahoo.com/q?s=Code&d=t">Stock/Index_Title</a><br>

        current_value&nbsp;&nbsp;date or time of last released data<br>

    <span class="stock_moves"><font color="red">± Value Change (% Change)</font></span>

</div>

<!--Stocks end-->

Sample Stylesheet Implementation

Random text articles may contain styles which are referenced in the style sheet(s).

.stocks {

    border: 1px solid #999;

    padding: 2px 5px;

    text-align: center;

    font-size: 11px;

    background-color: #ffc;

    height: 48px;

    }

 

#stocks {

    position: absolute;

    right: 135px;

    top: 15px;

    z-index: 1;

    }

 

.stock_moves {

    font-size: 10px;

    color: #f00;

    }

Related Topics