Here I have spent couple days to flush out more details of my site migration and come up some ideas how to present or melt it with Drupal's own philosophy. IMHO, Drupal shouldn't exist on this planet and none of the commercial software can compare to such a flexible system, at least I am in the software industry for over 15 years and working as a software architect. I could say this is the ideal platform to build most sophisticated websites WITHOUT hacking. But long story short after praising the wonderful creator and the dev team.

My old site is quite simple, I used BlogEngine.Net to write up some blogs and tweak their search function to let user to enter a ticker and show a chart which generated by another page by passing in a token and return a PNG image stream. The stream is generated by opening http connection to chart.google.com and just simply redirect the output to the response. I chose this way because I can hide the data from the user if they ever view the page source and that's a secret I would like to keep.

After going through some Drupal tutoriasl and reading some source code of Drupal modules, I think my design would be:

1. Create a new content type called "stocktrendchart"
2. Add fields to this content type such as ticker, image url...etc.
3. Write a php to use Drupal API to create 7000+ content based on this content type and populate the ticker field and url correspondingly. Here I think the system will create same number of nodes in the database for each stocks.
4. How to present it...here I stuck, I am not sure how to modify the page to put in <a href="/mychartmodule/chartgen?token=[tokenfield]" alt="[ticker] - [company name]" />. I am not sure if I need to create a form or not or use view and I think view is for presenting multiple results which is not the case here.
5. How to make the search box to limit to this content type and present ONLY one result based on the ticker. The user input have to match with the ticker field reside in this custom content type. I know there is a search module which you can constraint to one content type, but how to present a single result? I would like the page to be presented on the center block to display the corresponding chart using the image url.
6. If the user entered a ticker which is not found, I would like to present a view and shows some possible matches.

Enhancement:
1. Use taxonomy to make all the stock tickers created as a term in the system able to refer to the corresponding chart page. Therefore user click on the term (refer the term in blog, forum...etc) will direct the user to the chart.
2. For SEO reason, is it better to use taxonomy and term as well?
3. On the chart page, I also want to add <prev> and <next> to show different periods of the chart, not sure how to achieve this.
4. Enhance SEO so that the search engine will find my chart page by searching "stock trend ", "stock trend chart ". How to achieve this? I think I might need the pathauto module or some url rewriting module to map my URL from www.mydomain.com/node/n to www.mydomain.com/trends/<ticker>.html. Is this the way to go for SEO reason?

Hopefully any of you can direct me or evaluate what I am doing is on the right track.

Many Thanks and Merry Christmas!

Ray

Comments

ludo1960’s picture

..to http://drupal.org/node/664700

Use the Nat module to create terms (optimised for SEO) for your 7000 nodes,

Use Finder module for required search capability

Use views to create your displays using term as argument

Use quicktabs to organise your displays

Merry Christmas!

rtsang’s picture

Thanks ludo1960 again for valuable information. I will take a look and try them out.

rtsang’s picture

Yet another question on how to populate nodes (7000+) or content of a custom content type using API or custom PHP? Should I exam how CCK manipulate the table structure and mimic it myself or there are APIs to do it in an official way? The new content type I created has 2 more text fields from the base one. Any ideas?

rtsang’s picture

Thanks, the migrate module works perfectly!