1
Peekay
WF-Sections 2.07b3 related news hack
  • 2006/12/7 20:46

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


If you use WF-Sections 2.07b3 and wondered why the 'related news' feature displays the news category rather than the article title - here's a fix.

In news/class/class.newsstory.php
around line 207 (before the closing brace)
add a new function:

// pk function for wf-section related news link

function pk_newslink() {
$ret "<a href='".XOOPS_URL."/modules/news/article.php?storyid=".$this->storyid()."'>".$this->title()."</a>";
return 
$ret;
}
Then in wfsection/article.php
around line 679
Change:

$related_newsstory['title'] = $ret_news->textLink();
to:

$related_newsstory['title'] = $ret_news->pk_newslink();

Adding a related news item will now display a direct link to the article.
A thread is for life. Not just for Christmas.