boardom Forum Index boardom
b2 message board
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

[Function] Posts n Ago Today
Goto page Previous  1, 2
 
Post new topic   Reply to topic    boardom Forum Index -> Hacks
View previous topic :: View next topic  
Author Message
jackiefg



Joined: 15 Oct 2003
Posts: 29
Location: Toronto, Ontario, Canada

PostPosted: Tue Dec 30, 2003 10:15 pm    Post subject: Uhoh Reply with quote

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
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Cyberian75



Joined: 26 Sep 2002
Posts: 967
Location: Washington

PostPosted: Tue Dec 30, 2003 10:22 pm    Post subject: Reply with quote

Ahh, okay. Make sure you upload the file "agotoday.php" in ASCII format.

Smile
_________________
Michael P.
Back to top
View user's profile Send private message Visit poster's website AIM Address
jackiefg



Joined: 15 Oct 2003
Posts: 29
Location: Toronto, Ontario, Canada

PostPosted: Tue Dec 30, 2003 11:46 pm    Post subject: Nope Reply with quote

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
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
jackiefg



Joined: 15 Oct 2003
Posts: 29
Location: Toronto, Ontario, Canada

PostPosted: Tue Dec 30, 2003 11:51 pm    Post subject: Got it to work Reply with quote

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 Razz
_________________
jackiefg
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Cyberian75



Joined: 26 Sep 2002
Posts: 967
Location: Washington

PostPosted: Wed Dec 31, 2003 1:16 am    Post subject: New revision Reply with quote

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.


Smile
_________________
Michael P.
Back to top
View user's profile Send private message Visit poster's website AIM Address
jackiefg



Joined: 15 Oct 2003
Posts: 29
Location: Toronto, Ontario, Canada

PostPosted: Wed Dec 31, 2003 1:40 am    Post subject: Perfect Reply with quote

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 Smile
_________________
jackiefg
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Cyberian75



Joined: 26 Sep 2002
Posts: 967
Location: Washington

PostPosted: Wed Dec 31, 2003 1:46 am    Post subject: Reply with quote

Very Happy <-- a man of a few words... heh.
_________________
Michael P.
Back to top
View user's profile Send private message Visit poster's website AIM Address
jackiefg



Joined: 15 Oct 2003
Posts: 29
Location: Toronto, Ontario, Canada

PostPosted: Wed Dec 31, 2003 9:26 pm    Post subject: Same link Reply with quote

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
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Cyberian75



Joined: 26 Sep 2002
Posts: 967
Location: Washington

PostPosted: Wed Dec 31, 2003 9:45 pm    Post subject: Reply with quote

Uhh, what parameters are you passing/using?
_________________
Michael P.
Back to top
View user's profile Send private message Visit poster's website AIM Address
jackiefg



Joined: 15 Oct 2003
Posts: 29
Location: Toronto, Ontario, Canada

PostPosted: Wed Dec 31, 2003 9:47 pm    Post subject: I'm using the following Reply with quote

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
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Cyberian75



Joined: 26 Sep 2002
Posts: 967
Location: Washington

PostPosted: Wed Dec 31, 2003 9:53 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website AIM Address
jackiefg



Joined: 15 Oct 2003
Posts: 29
Location: Toronto, Ontario, Canada

PostPosted: Wed Dec 31, 2003 10:03 pm    Post subject: I'll Wait Reply with quote

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 Smile
_________________
jackiefg
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    boardom Forum Index -> Hacks All times are GMT + 1 Hour
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
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


Powered by phpBB 2 © 2001, 2002 phpBB Group