GStwin.com GS500 Message Forum

Main Area => General GS500 Discussion => Topic started by: WREX on May 24, 2006, 08:29:00 AM

Title: broken gstwin links - suggestion/workaround **FIXED**!!!
Post by: WREX on May 24, 2006, 08:29:00 AM
I was reading through a couple of threads and noticed a few people mentioning broken links.  This can happen when servers or services are switched and naming conventions change.  It's not unique to our board and just a reality of the internet in general; While there are sometimes great info at the end of these broken links, it's unrealistic to expect anyone to go back and update all their past links (who keeps track of all previously posted links, nevermind the time to go back and actually do the update). 

It's not always possible depending on how the link was originally referenced, but sometimes it is possible to see these older threads, by just renaming the link to the current standard.  Looking at the address bar in your browswer window, basically just copy and paste a current, unrelated thread in a new window, then edit the number to point to the old thread, as shown in it's address.  Here are some examples:

old broken link
http://www.gstwins.com/forum/viewtopic.php?t=3521
new working link
http://gstwins.com/gsboard/index.php?topic=3521


old broken link
http://www.gstwins.com/forum/viewtopic.php?t=7084
new working link
http://gstwins.com/gsboard/index.php?topic=7084


old broken link
http://www.gstwins.com/forum/viewtopic.php?t=5048
new working link
http://gstwins.com/gsboard/index.php?topic=5048



While the whole process takes a couple of seconds at most (find a broken link, copy and paste an address, type a new number and hit enter), depending on your savvyness, if this seems too cumbersome, there's always the "search" button, as been suggested many times.

If anyone has any other suggestions, please feel free to post, otherwise good luck and happy browsing folks.


Title: Re: broken gstwin links - suggestion/workaround
Post by: RVertigo on May 24, 2006, 10:19:50 AM
 :thumb:

Now write a script that'll do that for all the topics...   :icon_mrgreen:
Title: Re: broken gstwin links - suggestion/workaround
Post by: Mandres on May 24, 2006, 12:09:33 PM
sweet I didn't know that worked!  I wish I had known this months ago...

-M
Title: Re: broken gstwin links - suggestion/workaround
Post by: NightRyder on May 24, 2006, 01:08:19 PM
Nice, I was wondering if the topic numbers were 1 to 1.
Title: Re: broken gstwin links - suggestion/workaround
Post by: WREX on May 24, 2006, 02:16:13 PM
glad it's helping.

I was thinking it'd be a shame for all the great threads (like the infamous Kerry pic threads - welcome back btw Kerry) to be not as accessible as they could be. 

like I mentioned, it doesn't work for all, but it works enough of the time to at least try before giving up.


Title: Re: broken gstwin links - suggestion/workaround
Post by: Kerry on May 24, 2006, 03:03:18 PM
Thanks for the welcome back.  On the other hand, no thanks for letting me know how I can find and fix all of my broken links.  ;)

I did a search for posts containing "viewtopic" by Kerry, and I got 22 pages of hits.  I guess I know what I'll be doing in my spare (ha!) time for the next few weeks.
Title: Re: broken gstwin links - suggestion/workaround
Post by: scratch on May 24, 2006, 03:36:16 PM
Welcome back, Kerry!

I've been fixing some of the links to, or in, my posts as I come across them; expecially since I remember most of what I said, or what I was linking to, so I know what keywords to search.
Title: Re: broken gstwin links - suggestion/workaround
Post by: Kerry on May 24, 2006, 03:44:29 PM
Looks like you've still got 4 pages worth of posts to go.  ;)

Say, I notice that your post count is getting right up there.  I came back just in time!  (Just kidding ... especially since I noticed that pandy has blown past Srinath!  :o )
Title: Re: broken gstwin links - suggestion/workaround
Post by: aaronstj on May 24, 2006, 03:49:35 PM
A server-side fix should be as easy as putting


<?php
header
("Location: http://gstwins.com/gsboard/index.php?topic=$_GET[t]");
?>



at /forum/viewtopic.php.  Admins?
Title: Re: broken gstwin links - suggestion/workaround
Post by: Egaeus on May 24, 2006, 07:47:34 PM
It's really as simple as a python (or perl) script that could go though the archive and do it.  It could be done with a regex pretty easily.  However, does anyone really want to trust my python skills to fix the server?
Title: Re: broken gstwin links - suggestion/workaround
Post by: john on May 25, 2006, 01:14:54 PM
This has been fixed thanks to aaronstj!  His little script worked like a charm!  Links to topics in  the old forum will redirected to the new forum.

I am pretty sure this could be accomplished by editing the ,htaccess file but his way worked before I could look into is.

Thhanks!!!  :cheers: :thumb:
Title: Re: broken gstwin links - suggestion/workaround
Post by: pandy on May 25, 2006, 01:21:31 PM
Quote from: Kerry on May 24, 2006, 03:44:29 PM
I came back just in time!  (Just kidding ... especially since I noticed that pandy has blown past Srinath!  :o )

Any time you come back is perfect timing!  :kiss3: As for the post count. It's rigged. I'm innocent. I didn't do it. I'm as quiet as a mouse. I just sit here in my little corner of the world...quietly...sitting....not saying a word.... oh so quiet....  john did it. He's a big meanie! (Did I mention how quiet I am!?)  :icon_razz: :laugh:

Title: Re: broken gstwin links - suggestion/workaround **FIXED**!!!
Post by: aaronstj on May 25, 2006, 01:24:30 PM
Woohoo, it worked!  ;)

Kerry, you can go ahead and put your old posts back.  :icon_mrgreen:
Title: Re: broken gstwin links - suggestion/workaround **FIXED**!!!
Post by: RVertigo on May 25, 2006, 01:50:07 PM
 :thumb:  Geeks of the board UNITE!  Good job guys. :icon_mrgreen:
Title: Re: broken gstwin links - suggestion/workaround **FIXED**!!!
Post by: Alphamazing on May 25, 2006, 03:40:45 PM
Aaron, you are my hero.  :bowdown: :bowdown: :bowdown:
Title: Re: broken gstwin links - suggestion/workaround **FIXED**!!!
Post by: WREX on May 25, 2006, 04:27:05 PM
excellent stuff folks.  glad to see the old info is that much more accessible again.   :thumb:

the technology solution is so much eloquent and effective, then my manual keyboard typing hack.

Title: Re: broken gstwin links - suggestion/workaround **FIXED**!!!
Post by: natedawg120 on May 25, 2006, 04:41:29 PM
great job guys.  I just edited the links in the url to make them work, thought never crossed my mind to actually try and fix it,  But then again i am at work 90% of the time i am on the forum  :laugh: :laugh: :laugh:
Title: Re: broken gstwin links - suggestion/workaround **FIXED**!!!
Post by: Kerry on May 25, 2006, 05:01:10 PM
Good going!  That seems to work ... for 14 of my 22 pages worth of "viewtopic by Kerry" search results.

But ... :icon_rolleyes: wouldn't you know it, I had to get "fancy" at some point in the past and link directly to individual posts?   :mad:

I don't suppose there's any help for old links like
http://www.gstwins.com/forum/viewtopic.php?p=75355#75355[/list]
when they resolve to a new-style link like
http://gstwins.com/gsboard/index.php?topic=9151.msg75355#msg75355[/list]
?

Since the topic number is not included in the old link, it looks like I still have some work to do....  :cry:
Title: Re: broken gstwin links - suggestion/workaround **FIXED**!!!
Post by: john on May 25, 2006, 10:11:11 PM
Quote from: Kerry on May 25, 2006, 05:01:10 PM
Good going!  That seems to work ... for 14 of my 22 pages worth of "viewtopic by Kerry" search results.

But ... :icon_rolleyes: wouldn't you know it, I had to get "fancy" at some point in the past and link directly to individual posts?   :mad:

I don't suppose there's any help for old links like
    http://www.gstwins.com/forum/viewtopic.php?p=75355#75355[/list]
    when they resolve to a new-style link like
      http://gstwins.com/gsboard/index.php?topic=9151.msg75355#msg75355[/list]
      ?

      Since the topic number is not included in the old link, it looks like I still have some work to do....  :cry:

      I swear I didn't know there was such an easy solution.  It never even crossed my mind that links to other threads would point to the old forum.  These things happen -and you don't even want to know the trouble we had with our last host.

      Maybe the guru's can think of something  :dunno_white:  From what I see that thread has no pointer to a topic which could be sticky.

      Don't kill yourself updating stuff, just take a deep breath, remember the Lord loves you, and pray one of these haker kids can figure it out  :laugh:
      Title: Re: broken gstwin links - suggestion/workaround **FIXED**!!!
      Post by: Kerry on May 25, 2006, 11:35:46 PM
      Quote from: john on May 25, 2006, 10:11:11 PMDon't kill yourself updating stuff, just take a deep breath, remember the Lord loves you, and pray one of these ha[c]ker kids can figure it out  :laugh:

      Good advice!  I actually haven't started down the "manual updates" path yet.

      Anybody up for a "hacker kid" contest?  ;)
      Title: Re: broken gstwin links - suggestion/workaround **FIXED**!!!
      Post by: Cannon Fodder on May 26, 2006, 02:48:04 AM
      The easiest way I can think of is to run an update query on the database table that contains the message text.

      Something like below would get you the number of records needing to be up dated, I'm assuming it is running on some version of SQL either MySQL or MSSQL.

      select * from [sometable] where [somefield] like 'http://www.gstwins.com/forum/viewtopic.php?%'
      Title: Re: broken gstwin links - suggestion/workaround **FIXED**!!!
      Post by: skoebl on May 26, 2006, 10:01:12 AM
      Quote from: Kerry on May 25, 2006, 05:01:10 PM
      Good going!  That seems to work ... for 14 of my 22 pages worth of "viewtopic by Kerry" search results.

      But ... :icon_rolleyes: wouldn't you know it, I had to get "fancy" at some point in the past and link directly to individual posts?   :mad:

      I don't suppose there's any help for old links like
        http://www.gstwins.com/forum/viewtopic.php?p=75355#75355[/list]
        when they resolve to a new-style link like
          http://gstwins.com/gsboard/index.php?topic=9151.msg75355#msg75355[/list]
          ?

          Since the topic number is not included in the old link, it looks like I still have some work to do....  :cry:



          http://gstwins.com/gsboard/index.php?topic=9151.0

          Is that what you were looking for with that link Kerry?
          Title: Re: broken gstwin links - suggestion/workaround **FIXED**!!!
          Post by: Kerry on May 26, 2006, 11:45:16 AM
          Not quite.  It's the right topic, but the old link used to go right to my post within the topic.  (The new-style link that I supplied does the same thing.)

          As far as I can tell, there's no way in the new system to link directly to a specific post without including the  topic number in the URL.

          Can anyone confirm this?
          Title: Re: broken gstwin links - suggestion/workaround **FIXED**!!!
          Post by: skoebl on May 26, 2006, 12:39:48 PM
          Quote from: Kerry on May 26, 2006, 11:45:16 AM
          Not quite.  It's the right topic, but the old link used to go right to my post within the topic.  (The new-style link that I supplied does the same thing.)

          As far as I can tell, there's no way in the new system to link directly to a specific post without including the  topic number in the URL.

          Can anyone confirm this?

          Ah, I understand now.
          Title: Re: broken gstwin links - suggestion/workaround **FIXED**!!!
          Post by: john on May 26, 2006, 10:23:52 PM
          Yea.  It isn't looking good.  But that one fix certainly helps!

          Pray harder!