Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> KISSQ General Support
Author Message
fmanjo
New Member
New Member



Joined: Feb 09, 2004
Posts: 7

PostPosted: Mon Feb 09, 2004 11:04 pm Reply with quote

I'm having problems with the table in which the historical data is displayed. It is messed up. I know the problem is in this piece of code:
Code:
   for ($i=0;$i<$cnt;$i++) {

      $j++;
      if ($j%6==0) {
         $j++;
         $history .= "<td>".substr($read[$i],0,6)."</td></tr>";
         if (substr($read[$i],7,1)==0) $pos=8;else $pos=7;
         $history .= "<tr><td>".substr($read[$i],$pos)."</td>";
      }
      else $history .= "<td>".$read[$i]."</td>";


I have changed if ($j%6==0) for if ($j%7==0) but this is not sufficient. The adjusted close shows up messed with dates. Some other number on this piece has to be changed but I don't know too much php. Can anyone help me?
 
View user's profile Send private message Visit poster's website
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17087

PostPosted: Mon Feb 09, 2004 11:40 pm Reply with quote

I fixed it about 2 weeks ago and am testing it on my site. Try it on mine and let me know if it works. Yahoo changed their feed.
 
View user's profile Send private message
fmanjo







PostPosted: Tue Feb 10, 2004 7:09 am Reply with quote

It is working very well on your site. Can you provide me with the fix?
 
Raven







PostPosted: Tue Feb 10, 2004 7:10 am Reply with quote

I will be releasing it shortly.
 
fmanjo







PostPosted: Tue Feb 10, 2004 9:18 am Reply with quote

By the way, very good job you have done. Very good module. I have a few suggestions about calculations of portfolio but i will post another topic about that.

and hope you provide us soon with the modifications for the data like in your site, since this is an excellent feature of the script.
 
Raven







PostPosted: Tue Feb 10, 2004 9:58 am Reply with quote

It has been released!
 
fmanjo







PostPosted: Tue Feb 10, 2004 10:54 am Reply with quote

Now the table is displaying correctly like at your site. But there is still one thing that I think can be corrected. The data retrieved from yahoo generally is from one month later than the date you requested. I've looked at yahoo historical quotes and I noticed that when you put the month, for example, may, which corresponds to 5 in this case, if you look at the addrees bar on your browser it shows 4 on the month. The variable $month must be redefined to month-1 or something like this in order to retrieve the data correctly. If this can be corrected on the script, it will be perfect.
 
Raven







PostPosted: Tue Feb 10, 2004 11:18 am Reply with quote

WHOA! That used to work afaik. Something else has changed. I'll get right on that. Thanks!
 
Raven







PostPosted: Tue Feb 10, 2004 1:08 pm Reply with quote

Another change by Yahoo somewhere along the line Smile. I have updated the modules/Stock_Quote/index.php file in the downloads as of 13:05 today. On or about line 143 you should see this line of code
Code:
$showHistoryFromDate = empty($HTTP_POST_VARS[showHistoryFromDate])?explode('/',$defHistoryDate):explode('/',$HTTP_POST_VARS[showHistoryFromDate]);
Add this line after it so it looks like this
Code:
$showHistoryFromDate = empty($HTTP_POST_VARS[showHistoryFromDate])?explode('/',$defHistoryDate):explode('/',$HTTP_POST_VARS[showHistoryFromDate]);

$showHistoryFromDate[0] = $showHistoryFromDate[0]-1;
 
fmanjo







PostPosted: Tue Feb 10, 2004 1:38 pm Reply with quote

Now it is perfect. Great job and thanks for the help.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> KISSQ General Support

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©