Welcome to Geeklog, Anonymous Thursday, November 28 2024 @ 04:36 pm EST

Geeklog Forums

Dating a story in the past


Anonymous

Anonymous
I'm trying to hack GL so I can post stories that have occured in the past. Right now it seems the date pulls the current (today) date and in the admin seems to only pull the current year forward. I'd like to set it to go say 2-3 years back as well as forward so that I can post stories which have occured say last year.
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
You will need to modify function COM_getYearFormOptions() in lib-common.php such that it does not start with the current year but with an earlier year. Something like $start_year = $cur_year - 3; should do. bye, Dirk
 Quote

Status: offline

neild

Forum User
Newbie
Registered: 02/14/04
Posts: 4
Is there any way to do something similar to the calendar. I made the changes suggested here and I can add topics/stories back to 1999, and I can view the calendar back to 1999, but I can't add any "new" events to a 1999 calendar.
 Quote

Status: offline

Turias

Forum User
Full Member
Registered: 10/20/03
Posts: 807
Hmmm, it seems to require a little more hacking. In /public_html/admin/story.php, change

Text Formatted Code
 for ($i = $cur_year; $i <= $cur_year + 5; $i++) {
 


to


Text Formatted Code
 for ($i = $cur_year - X; $i <= $cur_year + 5; $i++) {
 


where X is the number of years in the past you would like to have available.
 Quote

Status: offline

neild

Forum User
Newbie
Registered: 02/14/04
Posts: 4
You mean in /public_html/admin/event.php

Yup. That did it for admin accounts.

Thanks very much.
Neil
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by neild: That did it for admin accounts.

submit.php doesn't use the COM_getYearFormOptions() etc. functions for events submitted by users but instead uses its own local copies of those functions. This has now been fixed in 1.3.9, which also lets you select at least the previous year without any modifications.

bye, Dirk
 Quote

All times are EST. The time is now 04:36 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content