11
skenow
Re: News 1.53 archived/expired story problem?
  • 2007/10/8 19:25

  • skenow

  • Home away from home

  • Posts: 993

  • Since: 2004/11/17


Sorry - a bit of syntax punctuation error on the above change to the search.inc.php - one of the quotes should have been a double quote.

this has been corrected here -
$sql "SELECT storyid, topicid, uid, title, created FROM ".$xoopsDB->prefix("stories")." WHERE (published>0 AND published<=".time().") AND (expired = 0 OR expired > ".time().[color=ff0000]"[/color]) ';

12
Peekay
Re: News 1.53 archived/expired story problem?
  • 2007/10/8 20:31

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


@DobePhat
Many thx for reporting this issue here.

I too upgraded News (excellent module) but hadn't noticed the expired article problem.

News has always considered 'Archive' as a collection of all articles. My definition of archive is a collection of old (expired) articles. This version of News considers archive as a collection of anything BUT expired articles. It's about as logical as a Citroen!

@Skenow
Many thx for the fixes.

I am particularly pleased because, if like me you only want the archive to contain expired articles, you can slightly modify your suggestion for news/class/class.newsstory.php to:
$sql 'SELECT s.*, t.* FROM '.$db->prefix('stories').' s, ' .$db->prefix('topics').' t WHERE (s.topicid=t.topic_id) AND (s.published > ' $publish_start ' AND s.published <= ' $publish_end ') AND expired > 0 ';


Search doesn't work for me though. I'm not sure if News ever searched the archive?
A thread is for life. Not just for Christmas.

13
skenow
Re: News 1.53 archived/expired story problem?
  • 2007/10/8 23:43

  • skenow

  • Home away from home

  • Posts: 993

  • Since: 2004/11/17


Man, I have been playing with too many files - I forgot the site I was looking at didn't want expired articles to be included in the search results, but did want them in the archive.

So, to include expired articles in the search results, use this statement -

$sql "SELECT storyid, topicid, uid, title, created FROM ".$xoopsDB->prefix("stories")." WHERE (published>0 AND published<=".time().")";


I have verified this works!

14
Peekay
Re: News 1.53 archived/expired story problem?
  • 2007/10/9 8:18

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


Quote:

skenow wrote:
I have verified this works

Indeed it does!

Quote:

skenow wrote:
3. Create another status to take an article offline, which removes it from public viewing, even in the archive
4. It would be nice to have the search function return active articles separate from the archive, or even require different access to view/search the archives, much like at newspaper web sites

I agree. Thx to this thread at least you can search for 'old' news, but it would be good if the search results indicated an article is from the archive.
A thread is for life. Not just for Christmas.

15
DobePhat
Re: News 1.53 archived/expired story problem?
  • 2007/10/11 16:35

  • DobePhat

  • Friend of XOOPS

  • Posts: 656

  • Since: 2003/4/15


Thanks!
Didnt realize it was just such a simple adjustment.

Good to know, I gather this is still kind of a hack for the news modules now, since the default behvior is to not have them show up in a search right?

Thanksagain though, now the older/expired articles are not just viewable but showing up in our site search.

Login

Who's Online

351 user(s) are online (275 user(s) are browsing Support Forums)


Members: 0


Guests: 351


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