Displaying atom feed titles properly

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Ideas Centre
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
Locked
User avatar
haggisv
Registered User
Posts: 261
Joined: Wed Dec 20, 2006 3:31 am
Location: Adelaide, Australia
Contact:

Displaying atom feed titles properly

Post 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!
User avatar
AmigoJack
Registered User
Posts: 5841
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン
Contact:

Re: Displaying atom feed titles properly

Post 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.
  • "The problem is probably not my English but you do not want to understand correctly. ... We will not come anybody anyway, nevertheless, it's best to shit this." Affin, 2018-11-20
  • "But this shit is not here for you. You can follow with your. Maybe the question, instead, was for you, who know, so you shoved us how you are." axe70, 2020-10-10
  • "My reaction is not to everyone, especially to you." Raptiye, 2021-02-28
User avatar
haggisv
Registered User
Posts: 261
Joined: Wed Dec 20, 2006 3:31 am
Location: Adelaide, Australia
Contact:

Re: Displaying atom feed titles properly

Post by haggisv »

Thank you AmigaJack! I'm not sure why 'commenting out' that line would work, but I will give it a go!
User avatar
AmigoJack
Registered User
Posts: 5841
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン
Contact:

Re: Displaying atom feed titles properly

Post 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: .
  • "The problem is probably not my English but you do not want to understand correctly. ... We will not come anybody anyway, nevertheless, it's best to shit this." Affin, 2018-11-20
  • "But this shit is not here for you. You can follow with your. Maybe the question, instead, was for you, who know, so you shoved us how you are." axe70, 2020-10-10
  • "My reaction is not to everyone, especially to you." Raptiye, 2021-02-28
User avatar
haggisv
Registered User
Posts: 261
Joined: Wed Dec 20, 2006 3:31 am
Location: Adelaide, Australia
Contact:

Re: Displaying atom feed titles properly

Post by haggisv »

Thank you AmigoJack, it worked perfectly!
Locked

Return to “[3.0.x] Support Forum”