Please login or register.

Login with username, password and session length
Advanced search  

News:

You need/want an older version of sNews ? Download an older/unsupported version here.

Author Topic: [How to] article's date before this year  (Read 4464 times)

Manuel Pancorbo

  • Jr. Member
  • **
  • Karma: 0
  • Posts: 72
[How to] article's date before this year
« on: December 10, 2006, 01:08:26 AM »

I'd like to copy blog's articles in blogger to a new one powered by sNews. I'd like to preserve the original date of publication.

But sNews allows only dates in current year. How do I change this behavior?

TIA
Logged

philmoz

  • High flyer
  • ULTIMATE member
  • ******
  • Karma: 161
  • Posts: 1988
    • fiddle 'n fly
[How to] article's date before this year
« Reply #1 on: December 10, 2006, 01:38:21 AM »

find in snews.php

// ARTICLES - POSTING TIME

locate

Code: [Select]
echo '</select>'.l('year').':<select name="fposting_year">';
$thisYear = !empty($time) ? substr($time, 0, 4) : intval(date('Y'));
for($i = $thisYear; $i < $thisYear + 3; $i++) {
echo '<option value="'.$i.'"';
if($i == $thisYear) {echo ' selected="selected"';}
echo '>'.$i.'</option>';
}
and change to
Quote
echo '</select>'.l('year').':<select name="fposting_year">';
   $thisYear = !empty($time) ? substr($time, 0, 4) : intval(date('Y'));
   for($i = $thisYear-5; $i < $thisYear + 3; $i++) {
      echo '<option value="'.$i.'"';
      if($i == $thisYear) {echo ' selected="selected"';}
      echo '>'.$i.'</option>';
   }
Of course, you can increse/decrease as much as needed...
« Last Edit: August 12, 2008, 08:15:20 PM by Keyrocks »
Logged
Of all the things I have lost, it is my mind that I miss the most.

Manuel Pancorbo

  • Jr. Member
  • **
  • Karma: 0
  • Posts: 72
[How to] article's date before this year
« Reply #2 on: December 10, 2006, 11:04:24 AM »

OK Philmoz! You're my hero!

Thanks.
Logged

philmoz

  • High flyer
  • ULTIMATE member
  • ******
  • Karma: 161
  • Posts: 1988
    • fiddle 'n fly
[How to] article's date before this year
« Reply #3 on: December 10, 2006, 11:10:31 AM »

no probs...
probably one of the 'easiest' tweaks I have taken an interest in :D
Logged
Of all the things I have lost, it is my mind that I miss the most.