Posts merging

Removing an Obsolete URL Parameter - Posts merging

Removing an Obsolete URL Parameter

by halil16 » Tue Jan 31, 2023 1:22 am

You know that the forum parameter of topic URLs is no longer used. But the extension still uses it. How can I fix this? Tried to fix it like I did with other extensions but I couldn't find where to fix it.

Thanks.

*/viewtopic.php?f=33&t=2215&p=6843#p6843
Introducing Mobile Upgrade! *Make your phpBB board like an app! 📱
Hire me for your phpBB board. 🚩
Buy me a coffee ☕

"The day we'll need ideas more than possessions, we'll find the secret to true wealth." - Peyami Safa /peˈjɑːmi saˈfɑː/
User avatar
halil16
Registered User
Posts: 1497
Joined: Fri Jul 24, 2020 11:30 pm
Location: Turkiye
Name: Halil

Re: Removing an Obsolete URL Parameter

by pierredu » Tue Jan 31, 2023 9:10 am

Look at lines 279 and ss. in listener.php
User avatar
pierredu
Registered User
Posts: 1274
Joined: Thu Nov 01, 2012 8:04 am
Location: Paris (France)

Re: Removing an Obsolete URL Parameter

by halil16 » Tue Jan 31, 2023 10:34 pm

I edited it like this to be compatible with core.

Code: Select all

//Generate redirection URL and redirecting
$params = $add_anchor = '';
$add_anchor = '#p' . $data['post_id'];
$url = "{$this->phpbb_root_path}viewtopic.$this->php_ext";
$url = append_sid($url, 'p=' . (int) $data['post_id'] . $params) . $add_anchor;
Everything looks fine. Thank you.
Introducing Mobile Upgrade! *Make your phpBB board like an app! 📱
Hire me for your phpBB board. 🚩
Buy me a coffee ☕

"The day we'll need ideas more than possessions, we'll find the secret to true wealth." - Peyami Safa /peˈjɑːmi saˈfɑː/
User avatar
halil16
Registered User
Posts: 1497
Joined: Fri Jul 24, 2020 11:30 pm
Location: Turkiye
Name: Halil

Re: Removing an Obsolete URL Parameter

by pierredu » Wed Feb 01, 2023 6:46 am

You dropped the line $params .= '&t=' . $data['topic_id'];
User avatar
pierredu
Registered User
Posts: 1274
Joined: Thu Nov 01, 2012 8:04 am
Location: Paris (France)

Re: Removing an Obsolete URL Parameter

by halil16 » Wed Feb 01, 2023 8:09 am

I did not understand.
Introducing Mobile Upgrade! *Make your phpBB board like an app! 📱
Hire me for your phpBB board. 🚩
Buy me a coffee ☕

"The day we'll need ideas more than possessions, we'll find the secret to true wealth." - Peyami Safa /peˈjɑːmi saˈfɑː/
User avatar
halil16
Registered User
Posts: 1497
Joined: Fri Jul 24, 2020 11:30 pm
Location: Turkiye
Name: Halil

Re: Removing an Obsolete URL Parameter

by pierredu » Wed Feb 01, 2023 8:54 am

In the original file, you can have a parameter t=12345. You silently dropped it.
User avatar
pierredu
Registered User
Posts: 1274
Joined: Thu Nov 01, 2012 8:04 am
Location: Paris (France)

Re: Removing an Obsolete URL Parameter

by halil16 » Wed Feb 01, 2023 10:37 am

Since the url when post is go in phpBB is:
/viewtopic.php?p=683#p683

I wanted it to be like this when the messages were combined.
Introducing Mobile Upgrade! *Make your phpBB board like an app! 📱
Hire me for your phpBB board. 🚩
Buy me a coffee ☕

"The day we'll need ideas more than possessions, we'll find the secret to true wealth." - Peyami Safa /peˈjɑːmi saˈfɑː/
User avatar
halil16
Registered User
Posts: 1497
Joined: Fri Jul 24, 2020 11:30 pm
Location: Turkiye
Name: Halil