Page 1 of 1

Displaying atom feed titles properly

Posted: Thu Jun 07, 2012 2:56 am
by haggisv
I have made some modification to show the (meta) page title as just the thread title, which is working perfectly.

However when I'm displaying the (inbuilt) atom feed of the forum on another site, I have noticed that title of the links in that list are still showing the format of "<forum name> • <thread title>", instead of just the thread title.

Can someone please advice what modification I need to do to make the atom feed generate just the <Thread Title>?

Thanks a lot!

Re: Displaying atom feed titles properly

Posted: Fri Jun 08, 2012 6:57 am
by AmigoJack
Open /feed.php and find:

Code: Select all

    function adjust_item(&$item_row, &$row)
    {
        parent::adjust_item($item_row, $row);

        $item_row['title'] = (isset($row['forum_name']) && $row['forum_name'] !== '') ? $row['forum_name'] . ' ' . $this->separator . ' ' . $item_row['title'] : $item_row['title'];
    }
Replace with:

Code: Select all

    function adjust_item(&$item_row, &$row)
    {
        parent::adjust_item($item_row, $row);

        //$item_row['title'] = (isset($row['forum_name']) && $row['forum_name'] !== '') ? $row['forum_name'] . ' ' . $this->separator . ' ' . $item_row['title'] : $item_row['title'];
    }
There are 4 occurances in total. Untested.

Re: Displaying atom feed titles properly

Posted: Sat Jun 09, 2012 1:30 pm
by haggisv
Thank you AmigaJack! I'm not sure why 'commenting out' that line would work, but I will give it a go!

Re: Displaying atom feed titles properly

Posted: Sat Jun 09, 2012 1:48 pm
by AmigoJack
haggisv wrote:AmigaJack
Beware!

Also: I've never asked someone where it happened that many times before, you're now the first one: why replying with a forecast instead of waiting until you actually have news? To me it makes no sense, but it seems to make sense to you...

As for your half-way question: you're commenting out the appendage of a potential forum name to the overall title and $this->separator would be the glueing bullet: .

Re: Displaying atom feed titles properly

Posted: Wed Jun 27, 2012 1:18 am
by haggisv
Thank you AmigoJack, it worked perfectly!