[Solved] New URLs and absolute/relative links

The place for discussions and decisions about the forum
Post Reply
User avatar
RGB
Posts: 1456
Joined: Mon Oct 08, 2007 1:34 am

[Solved] New URLs and absolute/relative links

Post by RGB »

There is an unexpected draw back with the new URLs: if you log on the new URL and click on a link to another post that was written using the old address you'll go to that old address... and will be logged out.

While this redirection problem is solved (I reported it on the dev mailing lists yesterday) there is one thing we can do to alleviate it: use relative URLs to cross reference posts.

The problem is that phpBB do not offer relative links by default, but this feature is easy to implement as a custom tag. I followed this post and added the relative URL tags on the ES forums: they work perfectly.

Of course this will not solve the problem of existing links, this can only be solved by a proper redirect, but I think it is a good idea to always use relative links on the forum from now on. What do you think?

Regards
Last edited by RGB on Wed Aug 15, 2012 7:03 pm, edited 1 time in total.
There are two types of people: those who believe that there are two types of people and those who do not.

openSUSE Leap with KDE Plasma / LibreOffice
User avatar
Hagar Delest
Moderator
Posts: 32594
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: New URLs and absolute/relative links

Post by Hagar Delest »

Sounds good, it would spare some work in the future I guess.

I've added the tag (appear on the right of the BBCodes top of the message area.
Is it the correct string?

Code: Select all

[rel=viewtopic.php?f=102&t=55691]link to the post above[/rel]
link to the post above seems to work fine.
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
User avatar
RGB
Posts: 1456
Joined: Mon Oct 08, 2007 1:34 am

Re: New URLs and absolute/relative links

Post by RGB »

Hagar Delest wrote:Is it the correct string?
At least it is the same string I used on the ES forum ;)
There are two types of people: those who believe that there are two types of people and those who do not.

openSUSE Leap with KDE Plasma / LibreOffice
TerryE
Volunteer
Posts: 1402
Joined: Sat Oct 06, 2007 10:13 pm
Location: UK

Re: [Solved] New URLs and absolute/relative links

Post by TerryE »

RGB wrote:Of course this will not solve the problem of existing links
This substitution is pretty straight forward for someone who has command line access to the MySQL database. Perhaps Imacat can do this for you.
Ubuntu 11.04-x64 + LibreOffice 3 and MS free except the boss's Notebook which runs XP + OOo 3.3.
User avatar
RGB
Posts: 1456
Joined: Mon Oct 08, 2007 1:34 am

Re: [Solved] New URLs and absolute/relative links

Post by RGB »

Hy, Terry! Nice to read you again.

I think there are two situations, one straightforward, the other not so.

The straightforward situation is a properly formatted url tag used to cross reference another thread: in this situation, changing url=http://....../viewtopic..... with rel=viewtopic...... and the corresponding /url with a /rel is enough. But the problem is that most people do not format the urls, they just copy paste them. To change a simple

Code: Select all

http://forum.openoffice.org/en/forum/viewforum.php?f=76
to a relative address several changes needs to be done. Maybe if a "lone url" is found, then use the "viewtopic...." as link text:

Code: Select all

[rel=viewforum.php?f=76]viewforum.php?f=76[/url]
Some regexp magic is needed.

Also, AFAIK the rel tag is only used here and on the ES forum.
There are two types of people: those who believe that there are two types of people and those who do not.

openSUSE Leap with KDE Plasma / LibreOffice
TerryE
Volunteer
Posts: 1402
Joined: Sat Oct 06, 2007 10:13 pm
Location: UK

Re: [Solved] New URLs and absolute/relative links

Post by TerryE »

Yup, but unfortunately the regexp support in MySQL is limited to matching only rather than substitution, so you can't do this with a simple MySQL statement. You need to write a small batch script which does a select, mangle, update on the post table for all posts containing 'http://forum.openoffice.org/../forum/'. One for Imacat, sorry.
Ubuntu 11.04-x64 + LibreOffice 3 and MS free except the boss's Notebook which runs XP + OOo 3.3.
User avatar
kingfisher
Volunteer
Posts: 2123
Joined: Tue Nov 20, 2007 10:53 am

Re: [Solved] New URLs and absolute/relative links

Post by kingfisher »

I don't know why this has been marked as solved. I have reverted to the old url because the new one requires me to log in every time I use it.
Apache OpenOffice 4.1.9 on Linux
User avatar
floris v
Volunteer
Posts: 4408
Joined: Wed Nov 28, 2007 1:21 pm
Location: Netherlands

Re: [Solved] New URLs and absolute/relative links

Post by floris v »

Same for me.
OpenOffice 4.1.11 on Ubuntu; LibreOffice 6.4 on Linux Mint, LibreOffice 7.6.2.1 on Ubuntu
If your problem has been solved or your question has been answered, please edit the first post in this thread and add [Solved] to the title bar.
Nederlandstalig forum
User avatar
RGB
Posts: 1456
Joined: Mon Oct 08, 2007 1:34 am

Re: [Solved] New URLs and absolute/relative links

Post by RGB »

kingfisher wrote:I don't know why this has been marked as solved. I have reverted to the old url because the new one requires me to log in every time I use it.
The thread was about introducing the "relative link tag", which is now working.
There are two types of people: those who believe that there are two types of people and those who do not.

openSUSE Leap with KDE Plasma / LibreOffice
User avatar
kingfisher
Volunteer
Posts: 2123
Joined: Tue Nov 20, 2007 10:53 am

Re: [Solved] New URLs and absolute/relative links

Post by kingfisher »

OK. Thanks. I'll continue using the old urls. It's a real pest when I get an email containing a link using the new path.
Apache OpenOffice 4.1.9 on Linux
Post Reply