Autolinking Internal URL's

This is an archive of the phpBB 2.0.x support forum. Support for phpBB2 has now ended.
Forum rules
Following phpBB2's EoL, this forum is now archived for reference purposes only.
Please see the following announcement for more information: viewtopic.php?f=14&t=1385785
Locked
Kanuck
Former Team Member
Posts: 2791
Joined: Thu Jul 05, 2001 9:33 pm
Location: Toronto, Ontario

Autolinking Internal URL's

Post by Kanuck »

In regards to an idea Bart posted over in the Dev Lounge, I think it's a really good idea, he just hasn't explained himself to the fullest ;)

If somebody were to enter a link to a post on the board, like http://phpbb.sourceforge.net/phpBB2/viewtopic.php?t=743, it would get converted to something looking like, Autolinking Internal URL's.

It would be stored in the database as [post]743[/post], and users could also type out that BBcode themselves in their message, and have it link to the post.

It really helps a lot, because, like Bart said, if a forum changes servers, a topic gets pruned away, or something like that, you end up with a dead link - and nobody likes dead links. Doing things this way, you get a descriptive link to the post, and should the post be deleted, the link is replaced with text like [Topic Deleted], or something like that.

This way, no broken links; if the topic's title is changed, the link changes to reflect it; if servers are changed, the link changes to reflect it... I've seen it on another BB system, it might have been UBB, but it's been so long since I've been to a site with that slow, bloated piece of crap... CGI is so passé :)
Kanuck
Former phpBB.com team member

User avatar
bshockley
Registered User
Posts: 46
Joined: Mon Jul 09, 2001 3:23 am
Location: Lawrence, KS
Contact:

Post by bshockley »

I really like that idea. It is spifferific. Would make it much easier to understand what's up with certain links.

Kanuck
Former Team Member
Posts: 2791
Joined: Thu Jul 05, 2001 9:33 pm
Location: Toronto, Ontario

Post by Kanuck »

bshockley wrote:
spifferific.


I love that word, I think I'll have to work it into my daily vocabulary :lol:
Kanuck
Former phpBB.com team member

User avatar
bshockley
Registered User
Posts: 46
Joined: Mon Jul 09, 2001 3:23 am
Location: Lawrence, KS
Contact:

Post by bshockley »

wrote:
bshockley wrote:
spifferific.


I love that word, I think I'll have to work it into my daily vocabulary :lol:


I actually made that up on the spot, started out as a typing error, and worked it's way into the form you see.

Kanuck
Former Team Member
Posts: 2791
Joined: Thu Jul 05, 2001 9:33 pm
Location: Toronto, Ontario

Post by Kanuck »

Double-post, oops.
Last edited by Kanuck on Sat Sep 15, 2001 4:08 am, edited 1 time in total.
Kanuck
Former phpBB.com team member

Kanuck
Former Team Member
Posts: 2791
Joined: Thu Jul 05, 2001 9:33 pm
Location: Toronto, Ontario

Post by Kanuck »

I'm impressed :)

But anyways, back on topic... pso, whaddya think? I'd really like it, personally. Can't be too hard to implement - parse the URLs in a message, rewrite any links to viewtopic.php as [post]id[/post] in the database, and then re-convert back to a link when writing to the screen, reading the info from the DB.

You could make the links templatable, too: so if I wanted post links to look like Autolinking Internal URL's (BartVB), but somebody else wanted them to appear as Autolinking Internal URL's (23 Replies), it could be done.

Another sweet feature, this would make.
Kanuck
Former phpBB.com team member

nathan
Former Team Member
Posts: 126
Joined: Mon Aug 06, 2001 7:58 pm
Location: Victoria, BC, Canada

Post by nathan »

Actually, the sane way to do this would just be to make any link that seems to be pointing to a phpbb thread into a relative URL before we stick it in the database. Adding more bbcode would be significantly less sane, IMO.

edit:

The main reason we don't wanna be doing it on-the-fly is performance. Almost all the bbcode work is done at pageview time, so we'd rather not slow it down with stuff like looking up the title of the topic with topic id 6625 or something.

User avatar
psoTFX
Former Team Member
Posts: 7425
Joined: Tue Jul 03, 2001 8:50 pm

Post by psoTFX »

Indeed as per Nathan ... I'm quite willing to go along with the relative URL approach. You're suggestion of [post]713[/post] is no different from doing [url=viewtopic.php?p=713#713]test[/url] but without the need to do more parsing and more replacing.

Kanuck
Former Team Member
Posts: 2791
Joined: Thu Jul 05, 2001 9:33 pm
Location: Toronto, Ontario

Post by Kanuck »

Okie then, gotcha.

2.0 or 2.2?
Kanuck
Former phpBB.com team member

User avatar
SHS`
Former Team Member
Posts: 6615
Joined: Wed Jul 04, 2001 9:13 am
Location: Yellow Beach, Nine Dragons, Hong Kong
Name: Jonathan Stanley
Contact:

Post by SHS` »

wrote:
Okie then, gotcha.

2.0 or 2.2?


2.1 ;)
Jonathan “SHS`” Stanley • 史德信
Image

Maarten1965
Registered User
Posts: 4
Joined: Sun Dec 28, 2003 7:41 am
Location: Netherlands
Contact:

Post by Maarten1965 »

Sorry to re-open this old topic, but I'm stuck.

We had to move our site to a new server. Many direct links our broken now. I want to be able to search posts that contain a link to the old server, and manually replace the link.

Anybody please help me, I'm searching this board but can't find.

Any tips to helpful topics are welcome!

Maarten
Netherlands
www.kreidler.nl

Locked

Return to “2.0.x Support Forum”