PHP Web Host - Quality Web Hosting For All PHP Applications $35/month $250/year (Unlimited) - $25/month - 200,000 impressions - Your Ad Could be Here - Click For Details
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
fmanjo
New Member
New Member


Joined: Feb 09, 2004
Posts: 7

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

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: 14946
Location: Kansas

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

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 Visit poster's website AIM Address Yahoo Messenger
fmanjo
New Member
New Member


Joined: Feb 09, 2004
Posts: 7

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

It is working very well on your site. Can you provide me with the fix?
View user's profile Send private message Visit poster's website
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 14946
Location: Kansas

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

I will be releasing it shortly.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
fmanjo
New Member
New Member


Joined: Feb 09, 2004
Posts: 7

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

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.
View user's profile Send private message Visit poster's website
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 14946
Location: Kansas

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

It has been released!
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
fmanjo
New Member
New Member


Joined: Feb 09, 2004
Posts: 7

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

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.
View user's profile Send private message Visit poster's website
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 14946
Location: Kansas

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

WHOA! That used to work afaik. Something else has changed. I'll get right on that. Thanks!
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 14946
Location: Kansas

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

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;
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
fmanjo
New Member
New Member


Joined: Feb 09, 2004
Posts: 7

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

Now it is perfect. Great job and thanks for the help.
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic

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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2008 by Raven
Proud to be listed at Lobo Links Web Directory

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::

:: fisubice Theme Recoded To 100% W3C CSS & HTML 4.01 Transitional Compliance by Raven and 64bitguy ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum