mtillson
12-20-2005, 10:53 PM
or two days?
searched the forum and couldn't find an answer....any help is appreciated.
thanks in advance.
searched the forum and couldn't find an answer....any help is appreciated.
thanks in advance.
|
Click to See Complete Forum and Search --> : how to make a link expire after two weeks... mtillson 12-20-2005, 10:53 PM or two days? searched the forum and couldn't find an answer....any help is appreciated. thanks in advance. bathurst_guy 12-20-2005, 11:02 PM what do you mean? for search engines? or do you want the link to not display on the page after a certain time? mtillson 12-20-2005, 11:10 PM yeah, I teach a highschool class and would like an assignment (link) to be available for a specified amount of time. I found some JavaScript but it didn't make too much sense. bathurst_guy 12-20-2005, 11:15 PM ok. First off, if you were to use JavaScript then the students would be able to (if they knew) view the source and read through your script and be able to visit the link anyway, and of course if the students were to visit the link they could bookmark it and return later. If I may make a suggestion, that is if you have PHP installed on your server, you can make this in 2 parts. One, would only produce the link on the page during a certain time, and two, you could also place a script on the page itself to check the date and if it is not within the days to display a "Sorry this page is only available during these dates" type error. So my question is, do you have PHP available? mtillson 12-20-2005, 11:23 PM Yes, PHP is available, I'll study this during winter break. So the other issue is how to set it up to display, and deactivate links? thanks bathurst_guy 12-21-2005, 12:10 AM Ok<? /* Date format: Day of the month, 2 digits with leading zeros 01 to 31 then Numeric representation of a month, with leading zeros 01 through 12 then A full numeric representation of a year, 4 digits Examples: 1999 or 2003 example: 01022005 First of Feb 2005 */ // These dates will display the link for a month, between 1 Jan 06 and 1 Feb 06 $startdate = 01012006; $enddate = 01022006; $today = date(d,m,Y); if(($startdate < $today) && ($enddate > $today)){ echo '<a href="link.htm">link<a>'; //The links to be displayed } ?> OH this must be saved as a .php file ray326 12-21-2005, 12:23 AM I have to wonder if this is worth automating. How many links will you be managing at any given time? mtillson 12-21-2005, 12:26 AM Thank you so much! and to clarify a few items if I may.... <?...?> goes in the <body> ? and do I need to specify the $ date (d,m,y) ? thanks again, mtillson 12-21-2005, 12:38 AM I have to wonder if this is worth automating. How many links will you be managing at any given time? I'll have aboput five or six at a time, I have my daily lesson and project on a website and rather than having to keep reminding students when lessons are due I can just say when the link is inactive you can no longer turn in the work. This saves me time but also, will (I hope) make students a little more motivated. I'm open to other thoughts on this and/or a suggestion on a good teaching forum, I haven't looked into those yet. thanks bathurst_guy 12-21-2005, 12:41 AM <?...?> goes in the <body> ?Yes if you wish. You can place that whole code in the place of the link(s) if you like. and do I need to specify the $ date (d,m,y) ? No, this is setting the date for today bathurst_guy 12-21-2005, 12:42 AM About teaching forums, my uncle is a teacher and he went to a meeting about LAMS (http://www.lamsinternational.com/) and has been giving me a few raves about it. mtillson 12-21-2005, 12:49 AM Thanks, So this is what I have.... test page (http://www.seq.org/~mtillson/testing/linkexpire.php) and then if I check tomorrow, next day it should be gone? or just inactive? Also, I really do appreciate your help. I'm still learning alot and have an unreal amount to learn and improve upon. thanks again. bathurst_guy 12-21-2005, 12:54 AM it should be completely gone mtillson 12-21-2005, 01:01 AM thanks for all your help, it's late for me, I'll be back tomorrow, and thanks for the LAMS info, i plan to look at the site in more depth. cheers webdeveloper.com
Copyright Internet.com Inc., All Rights Reserved. |