Welcome to Geeklog, Anonymous Wednesday, October 09 2024 @ 09:57 am 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
17
8
Quote
Status: offline
dreamscape
Forum User
Junior
Registered: 01/22/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.......
13
13
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
16
14
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
Kevin Horton
15
11
Quote
All times are EDT. The time is now 09:57 am.
- 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