Skip to main content
Home
The Baheyeldin Dynasty
The journey for wisdom starts with knowledge
  • Home
  • About
  • Site Map
  • Contact

Drupal Stock module

  1. Home

By Khalid on 2005/02/01 - 10:15, last updated 2005/02/01 - 10:18

I wrote and contributed the stock module,which provides stock quotes from a web form, as well as a portfolio feature for registered site users, where they can save their favorite stock symbols. It uses Yahoo! Finance for getting the quotes.

Contents: 
Drupal
  • Add comment

Comments

blacksnow (not verified)

Stock module

Sun, 2008/02/24 - 01:12

hello, thank you for creating such good stuff,
I have just installed it in my site - http://stock.hkbloggers.net/?q=stock
however, all of it shows 0 0 0 0, no data could be retrieved, do you know why???

Thank you,
Blacksnow

  • reply

salman (not verified)

Re: Thank you for sharing Stock Module on Drupal.

Fri, 2008/03/21 - 14:39

Asalamolaykum,

Dear Brother,

Million thanks for sharing stock module on drupal. I am going to set my webiste shortly with this module.

may god bless you.

Salman from UK

  • reply

Khalid

allow_url_fopen

Sun, 2008/02/24 - 10:38

Check if your host is not allowing allow_url_fopen().

There can be other restrictions. See #218125 for more details.
--
Khalid Baheyeldin

  • reply

Anonymous (not verified)

Modified function

Thu, 2008/03/06 - 00:25

I was having the same problems about the values showing up as all zeros. I found that the problem was with the following function that is found in the current release of the stock module for Drupal. You can see the modifications that I made to it as a temporary fix for people having similar problems.

function test_process_data($data, $headers) {
  $columns = array();
  $i = 0;
  foreach ($headers as $key => $value) {
    $field = $data[$i++];     // <- This is where the problem was occuring

    // Special handling for some fields
    switch ($key) {
      case 'symbol':
        $columns[] = _add_full_quote($field);
        break;
      case 'name':
        $columns[] = $field;
        break;
      case 'change_amt':
        $columns[] = _right_align(_up_down_tick(_decimals($field)));
        break;
      case 'current_price':
      case 'opening':
      case 'high':
      case 'low':
        $columns[] = _right_align(_decimals($field));
        break;
      case 'volume':
        $columns[] = _right_align($field);
        break;
      default:
        $columns[] = $field;
        break;
    }
  }

  return $columns;
}
  • reply

Current

Pandemic

  • COVID-19
  • Coronavirus

Search

Site map

Contents

  • Family
    • Khalid
    • Ancestry
    • Extended
  • Friends
  • Nokat نكت
  • Writings
    • Cooking
    • Culture
    • Science
    • History
    • Linguistics
    • Media
    • Literature
    • Politics
    • Humor
    • Terrorism
    • Business
    • Philosophy
    • Religion
    • Children
  • Technology
    • Linux
    • Arabization
    • Drupal
      • Association
    • Software
    • Internet
    • Technology in Society
    • Digital Archeology
    • NCR History
    • MidEast Internet
    • Programming
    • Saudi ISPs
    • Miscellaneous
  • Places
    • Canada
      • Weather
    • Egypt
      • Cuisine
      • Alexandria
      • E.G.C.
    • USA
    • Saudi Arabia
  • Interests
    • Astronomy
    • Fishing
    • Photography
    • Snorkeling
    • Nature
    • Photomicroscopy
  • Miscellany

In Depth

  • al-Hakim bi Amr Allah: Fatimid Caliph of Egypt الحاكم بأمر الله
  • Alexandria, Egypt
  • Arabic on the Internet
  • Articles on the history of Muslims and Arabs in the Iberian Peninsula تاريخ المسلمين و العرب في الأند
  • DIY GOTO Telescope Controller With Autoguiding and Periodic Error Correction
  • E.G.C. English Girls College in Alexandria, Egypt
  • Egyptian Cuisine, Food and Recipes مأكولات مصرية
  • George Saliba: Seeking the Origins of Modern Science?
  • Internet Scams and Fraud
  • Mistaken for an Arab or Muslim: Absurdities of being a victim in the War on Terror
  • Mistaken Identity: How some people confuse my site for others
  • One People's Terrorist Is Another People's Freedom Fighter
  • Overview of Google's Technologies
  • Photomicroscopy
  • Pseudoscience: Lots of it around ...
  • Resources for using Google Adsense with Drupal
  • Rockwood Conservation Area, Southern Ontario
  • Selected Symbolic Novels And Movies
  • Snorkeling the Red Sea near Jeddah
  • Updates and Thoughts on the Egyptian Revolution of 2011

Recent Content

Most recent articles on the site.

  • Origin Of COVID-19: Natural Spillover, Lab Leak Or Biological Weapon?
  • Kamal Salibi and the "Israel from Yemen" theory
  • How To Upgrade HomeAssistant Core In A Python Venv Using uv
  • Ancestry - Paternal Side
  • Review of Wait Water Saver For Whole House Humidifiers
more

Most Comments

Most commented on articles ...

  • Another scam via Craigslist: offering more than asking price
  • Warning to female tourists thinking of marrying Egyptians
  • Craigslist classified for used car: Cheque fraud scam
  • Winning the lottery scam email: World Cup South African lottery
  • Email Scam: BMW 5 Series car and lottery winning
more

About Khalid

Various little bits of information ...

  • Khalid Baheyeldin: brief biography
  • Presentations and Talks
  • Youtube Videos
  • GitHub Projects
  • Drupal.org Profile
  • Astrophotography @ Flickr

Sponsored Links

Your Link Ad Here

Tags

Android Mobile Ubuntu Sony OnStep OpenWRT Router Ericsson COVID-19 Rogers Coronavirus Arabic Kubuntu Home Assistant GSM Telescope tablet Spectrum Scam Python 419 Laptop Firefox DIY CPU Conspiracy Comet Balkanization backup App
More

© Copyright 1999-2025 The Baheyeldin Dynasty. All rights reserved.
You can use our content under the Terms of Use.
Please read our privacy policy before you post any information on this site.
All posted articles and comments are copyright by their owner, and reflect their own views and opinions, which may not necessarily be consistent with the views and opinions of the owners of The Baheyeldin Dynasty.

Web site developed by 2bits.com Inc.