Welcome to Geeklog Sunday, August 09 2020 @ 11:26 pm EDT

Geeklog Forums

Adding stories for previous years


Status: offline

rv8

Forum User
Regular Poster
Registered: 10/10/02
Posts: 105
Location:Ottawa, Canada

I'm working on moving my site to GL. I need to create quite a few stories for years going back to 1997, but the story editor won't let me do anything earlier than this year.

This was discussed earlier, but I don't understand the suggested work around

What I would do is pick an arbitrary point in the future, say 01/01/2003 00:00:00. Assign all your story to that date/time. Then do this: "update stores set date = 'YYYY-DD-MM HH:MM:SS' where date = '2003-01-01 00:00:00'"

Where exactly do I go to run this update stories command?

Thanks,

Kevin


Kevin Horton
 Quote

Status: offline

dreamscape

Forum User
Junior
Registered: 22/01/02
Posts: 30
You need to run that command in some mysql client (mysql itself, phpMyAdmin, or something equivalent). You want to pick a point in the future (the same for all stories that are going to be updated at the same time) so that when you update you don't squash your current DB. Before you run update I suggest making an entrance to #geeklog, make sure you are getting the correct rows with select statements, and get a sanity check on your update statement. at least that's what I would do.......
 Quote

Status: offline

mvonahn

Forum User
Newbie
Registered: 09/09/02
Posts: 3
I had to do something similar for converting MacFixIt to geeklog. What I would up doing was creating a PERL script to parse the files out and insert them into the gl_stories database. MFI has archives of over 5000 articles back to 1996 and there was no way I wanted to add them all by hand. If you are going to do the entry by hand you might want to consider altering the function COM_getYearFormOptions in lib-common.php and setting the variable $start_year to 1997 until you get your archived data all entered. The for loop looks like it will still wirk correctly after doing this and the selected item should still be this year. mva
 Quote

Status: offline

rv8

Forum User
Regular Poster
Registered: 10/10/02
Posts: 105
Location:Ottawa, Canada
Thanks! I modified the function COM_getYearFormOptions in lib-common.php and setting the variable $start_year to 1997, and everything seems to be working correctly. There must be a fair number of people who want to populate a GL site with material from an old site, so I think it makes sense to allow this variable to be set from config.php. Who do I make that suggestion to? Kevin
Kevin Horton
 Quote

All times are EDT. The time is now 11:26 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