Chatroom
 

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Bad Astronomy and Universe Today Forum > General > About BAUT
Register FAQ Members List Calendar Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-September-2005, 06:32 PM
Fraser's Avatar
Fraser Fraser is offline
Administrator
 
Join Date: Jul 2003
Location: Courtenay, BC, Canada
Posts: 10,937
Default Thread pointers

Thanks to some fantastic programming assistance by Robert Andersson, there's a redirection system that should make pointers to old threads on Bad Astronomy and Universe Today boards redirect you to the correct location on the new forum.

Can people test this out? Find some old links to old threads and see if clicking on them takes you to the correct location.

Post any errors so we can squish bugs.

Thanks!

And thanks again to Robert. :-)
__________________
Fraser Cain
Publisher
Universe Today - Free space news delivered by email every weekday.
Reply With Quote
  #2 (permalink)  
Old 07-September-2005, 06:44 PM
ToSeek's Avatar
ToSeek ToSeek is offline
Vulcan Moderator
 
Join Date: Oct 2001
Location: Greenbelt, MD
Posts: 24,137
Default

Most of the ones I've tried seem to work, but I get errors with the links in these two:

He's not dead yet - The Ivory Billed Woodpecker

New add using Mars
__________________
Everything I need to know I learned through Googling.
Reply With Quote
  #3 (permalink)  
Old 07-September-2005, 06:57 PM
Robert Andersson's Avatar
Robert Andersson Robert Andersson is offline
Senior Member
 
Join Date: Jul 2004
Location: Gothenburg, Sweden
Posts: 462
Send a message via ICQ to Robert Andersson
Default

ToSeek. those are "post links". I don't think many have linked to those, but seeing that the majority of Google's results are like that, I did just now implement a quick-and-dirty lookup so they will "work" too. You won't be pointed to the exact post, but at least to the right thread (in most cases).

EDIT: There is no easy way to map individual posts. The topics/threads are matched by title and time. It could probably be done with the posts too, with some effort. If many are having trouble with them, I might do that.

Last edited by Robert Andersson : 07-September-2005 at 07:03 PM. Reason: speling
Reply With Quote
  #4 (permalink)  
Old 07-September-2005, 06:59 PM
ToSeek's Avatar
ToSeek ToSeek is offline
Vulcan Moderator
 
Join Date: Oct 2001
Location: Greenbelt, MD
Posts: 24,137
Default

Good work!
__________________
Everything I need to know I learned through Googling.
Reply With Quote
  #5 (permalink)  
Old 07-September-2005, 07:43 PM
Sleepy's Avatar
Sleepy Sleepy is offline
Senior Member
 
Join Date: Dec 2002
Location: England
Posts: 202
Default

Quote:
Originally Posted by Robert Andersson
EDIT: There is no easy way to map individual posts. The topics/threads are matched by title and time. It could probably be done with the posts too, with some effort. If many are having trouble with them, I might do that.
If you do have code to do this I'd be interested in a look, as I've tried to map to a specific post in a thread and failed.
__________________
the ego has crashed landed
Reply With Quote
  #6 (permalink)  
Old 07-September-2005, 07:44 PM
Robert Andersson's Avatar
Robert Andersson Robert Andersson is offline
Senior Member
 
Join Date: Jul 2004
Location: Gothenburg, Sweden
Posts: 462
Send a message via ICQ to Robert Andersson
Arrow

UPDATE: Old links to posts will now work as well. Eg links of this kind:
http://www.badastronomy.com/phpBB/vi...c.php?p=506045

This is done by looking up the old babb topic id for the post, which is translated to the new thread id. If there is exactly one match (~90%, there can be none or more), it will search for all posts in that thread with the same post time, and direct you to one at random (unless two posts have the same to the second, there should only be one).

EDIT: To clarify, this is an extension to what I said a post before. Old "post links" will take you directly to the post in question.

Last edited by Robert Andersson : 07-September-2005 at 07:52 PM. Reason: clarification
Reply With Quote
  #7 (permalink)  
Old 07-September-2005, 08:26 PM
Robert Andersson's Avatar
Robert Andersson Robert Andersson is offline
Senior Member
 
Join Date: Jul 2004
Location: Gothenburg, Sweden
Posts: 462
Send a message via ICQ to Robert Andersson
Arrow

UPDATE: Minor feature, "highlight links" also works. Eg:
www.badastronomy.com/phpBB/viewtopic.php?p=204746&highlight=astronomy+guide
Reply With Quote
  #8 (permalink)  
Old 07-September-2005, 08:27 PM
The Supreme Canuck's Avatar
The Supreme Canuck The Supreme Canuck is offline
Senior Member
 
Join Date: May 2003
Location: Ottawa, Canada
Posts: 6,795
Default

Well done! Links to profiles don't work though. Sounds like it would be a whole different problem in any case.
__________________
Quaeso quousque humi defixa tua mens erit? Nonne aspicis, quae in templa veneris?
Reply With Quote
  #9 (permalink)  
Old 07-September-2005, 08:28 PM
Fraser's Avatar
Fraser Fraser is offline
Administrator
 
Join Date: Jul 2003
Location: Courtenay, BC, Canada
Posts: 10,937
Default

Quote:
Originally Posted by Robert Andersson
UPDATE: Minor feature, "highlight links" also works. Eg:
www.badastronomy.com/phpBB/viewtopic.php?p=204746&highlight=astronomy+guide
Okay, now you're just showing off. ;-)
__________________
Fraser Cain
Publisher
Universe Today - Free space news delivered by email every weekday.
Reply With Quote
  #10 (permalink)  
Old 07-September-2005, 08:38 PM
Robert Andersson's Avatar
Robert Andersson Robert Andersson is offline
Senior Member
 
Join Date: Jul 2004
Location: Gothenburg, Sweden
Posts: 462
Send a message via ICQ to Robert Andersson
Default

Quote:
Originally Posted by The Supreme Canuck
Well done! Links to profiles don't work though. Sounds like it would be a whole different problem in any case.
Yes, I've been thinking about it. I can probably fix that as well.
Quote:
Originally Posted by Fraser
Okay, now you're just showing off. ;-)
Yeess...?

It was just passing on an extra parameter, so it wasn't that hard.

Btw, since I wasn't very familiar with the UT forum nor Invision, I haven't been very active in fixing things on that end. I welcome if anyone points out flaws there.
Reply With Quote
  #11 (permalink)  
Old 08-September-2005, 08:48 AM
Robert Andersson's Avatar
Robert Andersson Robert Andersson is offline
Senior Member
 
Join Date: Jul 2004
Location: Gothenburg, Sweden
Posts: 462
Send a message via ICQ to Robert Andersson
Default

Quote:
Originally Posted by Sleepy
If you do have code to do this I'd be interested in a look, as I've tried to map to a specific post in a thread and failed.
There is plenty of code. Do describe what you're after in a little more detail and I'm happy to share.
Reply With Quote
  #12 (permalink)  
Old 08-September-2005, 10:21 AM
Sleepy's Avatar
Sleepy Sleepy is offline
Senior Member
 
Join Date: Dec 2002
Location: England
Posts: 202
Default

Quote:
Originally Posted by Robert Andersson
There is plenty of code. Do describe what you're after in a little more detail and I'm happy to share.
See this post and this post
__________________
the ego has crashed landed
Reply With Quote
  #13 (permalink)  
Old 08-September-2005, 10:23 AM
Robert Andersson's Avatar
Robert Andersson Robert Andersson is offline
Senior Member
 
Join Date: Jul 2004
Location: Gothenburg, Sweden
Posts: 462
Send a message via ICQ to Robert Andersson
Default

I found a typo in the code that build the mapping tables, causing multiple matches to not be inserted at all. Most of these were topics posted across several fora. When accessing these old URIs, you will presented with a list. Anyway, they were rebuilt, and I made some statistics for whoever is interested.

Universe Today topic mapping stats (matches):
T: 8530 (100%)
1: 8127 (95.3%)
2: 358 (4.2%)
3: 34 (0.4%)
4: 9 (<0.1%)
0: 7 (<0.1%)

BABB topic mapping stats (matches):
T: 20580 (100%)
1: 20498 (99.6%)
2: 72 (0.3%)
7-8: 2 (<0.1%)
0: 8 (<0.1%)

On another note, if Phil sees this, he might want to add these lines to the .htaccess file in the old BABB. It will redirect one type of request that is frequent in Google results (list a user's posts), but it doesn't solve the "user profile" links (must make some id mapping there).
Code:
RewriteEngine On
# Rewrite "search author" requests
RewriteCond %{QUERY_STRING} search_author=([^&]+)
RewriteRule ^search.php$ http://www.bautforum.com/search.php?do=process&searchuser=%1 [R=301]
Reply With Quote
  #14 (permalink)  
Old 08-September-2005, 10:35 AM
Robert Andersson's Avatar
Robert Andersson Robert Andersson is offline
Senior Member
 
Join Date: Jul 2004
Location: Gothenburg, Sweden
Posts: 462
Send a message via ICQ to Robert Andersson
Default

Quote:
Originally Posted by Sleepy
See this post and this post
Ok, I see what you mean. However, that is not really related to this. What we want here is easy access to the thread/post link, which the board doesn't seem to give away. I have not made any modifications to the board software, which would be a bad idea (considering upgrades etc).

You do, obviously, know the syntax of a "thread/post link", so I'm not sure how I can help.
Reply With Quote
  #15 (permalink)  
Old 08-September-2005, 10:45 AM
Sleepy's Avatar
Sleepy Sleepy is offline
Senior Member
 
Join Date: Dec 2002
Location: England
Posts: 202
Default

Quote:
Originally Posted by Robert Andersson
You do, obviously, know the syntax of a "thread/post link", so I'm not sure how I can help.
I was hoping you knew a way, nevermind.
__________________
the ego has crashed landed
Reply With Quote
  #16 (permalink)  
Old 08-September-2005, 08:20 PM
Nereid Nereid is offline
Senior Member
 
Join Date: Mar 2004
Posts: 9,643
Default

Awesome! A big round of applause for Robert! (now where did that 'applause' smilie we had in BA disappear to?)
Reply With Quote
Reply

« Time ? | what the »

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 05:26 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.0.0
©  2006 Bad Astronomy and Universe Today