View previous topic :: View next topic |
Author |
Message |
jackiefg
Joined: 15 Oct 2003 Posts: 29 Location: Toronto, Ontario, Canada
|
Posted: Tue Dec 30, 2003 10:15 pm Post subject: Uhoh |
|
|
Seems I'm totally screwed up again with the new code.
I've got the following on the blog page itself at the top:
include("agotoday.php");
Then down farther I've got:
<?php agotoday(3, 'month', 'months ago today...'); ?>
Then I changed the agotoday.php page to replace the old code with the new stuff you put there, Cyberian, and I get the following error message:
Fatal error: Call to undefined function: agotoday() in /hsphere/local/home/jackiefg/jackiefg.com/blog/indextest.php on line 259
Not only that, but it shows all the code at the top of the page (see it at http://www.jackiefg.com/blog/indextest.php.
I don't know why it's not "including" the file now when it did before. What have I screwed up this time? _________________ jackiefg |
|
Back to top |
|
 |
Cyberian75
Joined: 26 Sep 2002 Posts: 967 Location: Washington
|
Posted: Tue Dec 30, 2003 10:22 pm Post subject: |
|
|
Ahh, okay. Make sure you upload the file "agotoday.php" in ASCII format.
 _________________ Michael P. |
|
Back to top |
|
 |
jackiefg
Joined: 15 Oct 2003 Posts: 29 Location: Toronto, Ontario, Canada
|
Posted: Tue Dec 30, 2003 11:46 pm Post subject: Nope |
|
|
Nope that didn't do it. I reuploaded the file in ascii but nothing changed. Perhaps I'm missing a code somewhere? _________________ jackiefg |
|
Back to top |
|
 |
jackiefg
Joined: 15 Oct 2003 Posts: 29 Location: Toronto, Ontario, Canada
|
Posted: Tue Dec 30, 2003 11:51 pm Post subject: Got it to work |
|
|
Ok, I added the <?php at the front of the file and the ?> at the end of the agotoday.php file and everything seemed to work ok - and the title of the post shows up too!
I be laughing. Thanks so much  _________________ jackiefg |
|
Back to top |
|
 |
Cyberian75
Joined: 26 Sep 2002 Posts: 967 Location: Washington
|
Posted: Wed Dec 31, 2003 1:16 am Post subject: New revision |
|
|
This will produce linked titles to individual post(s) you made n ago instead of a single link to that day.
Code: |
See the very first post for the revised edition of this function.
|
 _________________ Michael P. |
|
Back to top |
|
 |
jackiefg
Joined: 15 Oct 2003 Posts: 29 Location: Toronto, Ontario, Canada
|
Posted: Wed Dec 31, 2003 1:40 am Post subject: Perfect |
|
|
Cyberian, that latest revision is exactly what I was trying to do when I saw your last revision.
I was playing around with the code (dangerous thing for me) and trying to get 's and "s in the right spots. I finally got it with no error message but could not get the link to the title.
Thanks so much for coming up with that. I'm in bidness  _________________ jackiefg |
|
Back to top |
|
 |
Cyberian75
Joined: 26 Sep 2002 Posts: 967 Location: Washington
|
Posted: Wed Dec 31, 2003 1:46 am Post subject: |
|
|
<-- a man of a few words... heh. _________________ Michael P. |
|
Back to top |
|
 |
jackiefg
Joined: 15 Oct 2003 Posts: 29 Location: Toronto, Ontario, Canada
|
Posted: Wed Dec 31, 2003 9:26 pm Post subject: Same link |
|
|
A quick question (for a change). The link to one month ago shows the same today as it showed yesterday.
Have I screwed something up? Is it because there are only 30 days in November and I have it set for one month ago today? _________________ jackiefg |
|
Back to top |
|
 |
Cyberian75
Joined: 26 Sep 2002 Posts: 967 Location: Washington
|
Posted: Wed Dec 31, 2003 9:45 pm Post subject: |
|
|
Uhh, what parameters are you passing/using? _________________ Michael P. |
|
Back to top |
|
 |
jackiefg
Joined: 15 Oct 2003 Posts: 29 Location: Toronto, Ontario, Canada
|
Posted: Wed Dec 31, 2003 9:47 pm Post subject: I'm using the following |
|
|
This code on the page to show the link [?php agotoday(1, 'month', 'month[s] ago today...'); ?] with your revised code as a separate page called agotoday.php, with an include agotoday.php at the top of my blog. _________________ jackiefg |
|
Back to top |
|
 |
Cyberian75
Joined: 26 Sep 2002 Posts: 967 Location: Washington
|
Posted: Wed Dec 31, 2003 9:53 pm Post subject: |
|
|
I see what you mean, and I believe you're correct. November only has 30 days, so technically, 1 month ago today is November 30.
You'd try...
Code: |
<?php agotoday(30, 'day', 'days ago today...'); ?>
|
_________________ Michael P. |
|
Back to top |
|
 |
jackiefg
Joined: 15 Oct 2003 Posts: 29 Location: Toronto, Ontario, Canada
|
Posted: Wed Dec 31, 2003 10:03 pm Post subject: I'll Wait |
|
|
Ok then I'll wait and see what it links to tomorrow (if there's a link, I should check that).
I just wondered if I had screwed something up or if that was the reason. You may see me back next year  _________________ jackiefg |
|
Back to top |
|
 |
|