1
tteezzaa
Year 2005 and beyond?
  • 2004/12/26 8:40

  • tteezzaa

  • Just popping in

  • Posts: 8

  • Since: 2003/11/2


I have upgraded to Ver 2.0.9 and figured that might deal with the pending year issue. But it did not.
Note: Creating news, drop down box for the year only goes to 2005.
Has this been fixed and I missed it or is it something in the works?

2
Mithrandir
Re: Year 2005 and beyond?

open up [xoops-root]/include/calendarjs.php in your favourite text editor

Go to line 37 and set the numbers in the setRange() call as you want them, e.g.
cal.setRange(20002015);

3
tteezzaa
Re: Year 2005 and beyond?
  • 2004/12/26 8:55

  • tteezzaa

  • Just popping in

  • Posts: 8

  • Since: 2003/11/2


It does say that but hasn't changed anything.

4
tteezzaa
Re: Year 2005 and beyond?
  • 2004/12/26 9:01

  • tteezzaa

  • Just popping in

  • Posts: 8

  • Since: 2003/11/2


All of the ranges in the file are 2005-2015

But the drop down menu for posting news - date and expiration date go 1997-2005

5
Mithrandir
Re: Year 2005 and beyond?

Which version of News, do you use?

6
tteezzaa
Re: Year 2005 and beyond?
  • 2004/12/26 9:04

  • tteezzaa

  • Just popping in

  • Posts: 8

  • Since: 2003/11/2


1.1?

I also have it duplicated five times for five different sections. news02, news03.. and so on.

7
Mithrandir
Re: Year 2005 and beyond?

OK, it may be a little tricky for you with the cloned modules, but still, I'd suggest you look at upgrading to News 1.2.1

8
tteezzaa
Re: Year 2005 and beyond?
  • 2004/12/26 9:20

  • tteezzaa

  • Just popping in

  • Posts: 8

  • Since: 2003/11/2


Oiyyyyy
I was hoping it was just something I could hack if anything. It's one thing to spend hours hunting down all the hacks to one clone but five clones :/

9
Mithrandir
Re: Year 2005 and beyond?

Well, you can, but as I read the code, it should take the current year and add 1 to it for the last selectable year, so I don't understand why you have this problem... however, in modules/news/admin/storyform.inc.php around line 170, the code is something like this:
$cyear    date('Y');
for (
$xyear=($autoyear-8); $xyear < ($cyear+2); $xyear++) {
    if (
$xyear == $autoyear) {
        
$sel 'selected="selected"';
    } else {
        
$sel '';
    }
    echo 
"$xyear$sel>$xyear";
}
echo 
"";

the important thing is ($cyear+2) that should take the current year and add 2 to it as the ending clause in the for loop. So either change $cyear to a hard-coded future year or change it to ($cyear+4) and see if that changes anything.

Do the same further down - around line 290 - where it looks like this:
$cyear date('Y');
for (
$xyear=($autoexpyear-8); $xyear < ($cyear+2); $xyear++) {
    if (
$xyear == $autoexpyear) {
        
$sel 'selected="selected"';
    } else {
        
$sel '';
    }
    echo 
"$xyear$sel>$xyear";
}
echo 
"";

10
tteezzaa
Re: Year 2005 and beyond?
  • 2004/12/26 9:36

  • tteezzaa

  • Just popping in

  • Posts: 8

  • Since: 2003/11/2


Now that worked perfectly!
Thank you sooo much!!! :)

Login

Who's Online

363 user(s) are online (242 user(s) are browsing Support Forums)


Members: 0


Guests: 363


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits