HowTo: Magic SEO URLs for phpBB 3.0/3.1/3.2 and phpBB 3.2 feed

Discussions about MODs and Tips published on our web site.
inveo
Inveo Support
Posts: 1285
Joined: Sat Feb 02, 2008 12:07 pm
Contact:

HowTo: Magic SEO URLs for phpBB 3.0/3.1/3.2 and phpBB 3.2 feed

Postby inveo » Tue Jan 24, 2017 12:41 pm

To transform the URLs to SEO formats, Magic SEO URLs for phpBB 3.0/3.1/3.2 do not require editing of any of the phpBB files.

However, if you are using phpBB 3.2 (does not apply to phpBB 3.0 or 3.1) and you want to use SEO formats in the phpBB feed, you will need to edit a few files.

/phpBB/phpbb/feed/controller/feed.php

Find:

Code: Select all

class feed


Replace with:

Code: Select all

define('MSU_LOAD_LIB_ONLY_BB', true);
include('includes/magic_seo_url.php');

class feed


Find:

Code: Select all

'category'      => ($this->config['feed_item_statistics'] && !empty($row['forum_id'])) ? $board_url . '/viewforum.' . $this->php_ext . '?f=' . $row['forum_id'] : '',


Replace with:

Code: Select all

'category'      => ($this->config['feed_item_statistics'] && !empty($row['forum_id'])) ? msuTransformUrlBb($board_url . '/viewforum.' . $this->php_ext . '?f=' . $row['forum_id']) : '',


/phpBB/phpbb/feed/base.php

Find:

Code: Select all

return '<a href="' . $this->helper->append_sid('memberlist.' . $this->phpEx, 'mode=viewprofile&amp;u=' . $author_id) . '">' . $row[$this->get('creator')] . '</a>';


Replace with:

Code: Select all

return '<a href="' . msuTransformUrlBb($this->helper->append_sid('memberlist.' . $this->phpEx, 'mode=viewprofile&amp;u=' . $author_id)) . '">' . $row[$this->get('creator')] . '</a>';



/phpBB/phpbb/feed/forums.php

Find:

Code: Select all

$item_row['link'] = $this->helper->append_sid('viewforum.' . $this->phpEx, 'f=' . $row['forum_id']);


Replace with:

Code: Select all

$item_row['link'] = msuTransformUrlBb($this->helper->append_sid('viewforum.' . $this->phpEx, 'f=' . $row['forum_id']));


/phpBB/phpbb/feed/post_base.php

Find:

Code: Select all

$item_row['link'] = $this->helper->append_sid('viewtopic.' . $this->phpEx, "t={$row['topic_id']}&amp;p={$row['post_id']}#p{$row['post_id']}");


Replace with:

Code: Select all

$item_row['link'] = msuTransformUrlBb($this->helper->append_sid('viewtopic.' . $this->phpEx, "t={$row['topic_id']}&amp;p={$row['post_id']}#p{$row['post_id']}"));


/phpBB/phpbb/feed/topics_base.php

Find:

Code: Select all

$item_row['link'] = $this->helper->append_sid('viewtopic.' . $this->phpEx, 't=' . $row['topic_id'] . '&amp;p=' . $row['post_id'] . '#p' . $row['post_id']);


Replace with:

Code: Select all

$item_row['link'] = msuTransformUrlBb($this->helper->append_sid('viewtopic.' . $this->phpEx, 't=' . $row['topic_id'] . '&amp;p=' . $row['post_id'] . '#p' . $row['post_id']));

olalavui
Posts: 5
Joined: Sat Jun 17, 2017 7:14 pm
Contact:

Re: HowTo: Magic SEO URLs for phpBB 3.0/3.1/3.2 and phpBB 3.2 feed

Postby olalavui » Mon Jun 26, 2017 8:11 am

Thanks you so much!