Forum URLs

Having problems with the forum software, or suggestions for improvements

Forum URLs

Postby ronk » Fri Jun 04, 2010 4:04 pm

gsf, I looked at some of my old posts with the intent of updating URLs. It seems that all internal links -- links to posts in this forum -- are already updated. :D I'm assuming this is because you captured HTML pages with your May '09 snapshot ... and means you must have an old-to-new URL lookup table.

Can you make this table available so that we can correctly update links in other forums :?:
ronk
2012 Supporter
 
Posts: 4764
Joined: 02 November 2005
Location: Southeastern USA

Re: Forum URLs

Postby gsf » Fri Jun 04, 2010 4:33 pm

ronk wrote:gsf, I looked at some of my old posts with the intent of updating URLs. It seems that all internal links -- links to posts in this forum -- are already updated. :D I'm assuming this is because you captured HTML pages with your May '09 snapshot ... and means you must have an old-to-new URL lookup table.

Can you make this table available so that we can correctly update links in other forums :?:

niggling details like that are why it took jason and me 1 month to prepare the new forum
here is a unix shell script (ripped from a larger conversion script) that does the url conversion
run it with the urls to convert as the script args
Code: Select all
# convert old player's forum urls to new

URL_DECODE_OLD_1='http://www\.sudoku\.com/\(boards\|forums\)/'
URL_DECODE_OLD_2='http://sudoku\.com/\(boards\|forums\)/'
URL_DECODE_NEW='http://forum.enjoysudoku.com/'

URL_ENCODE_OLD_1='http://www.sudoku.com/\(boards\|forums\)/'
URL_ENCODE_OLD_2='http://sudoku.com/\(boards\|forums\)/'
URL_ENCODE_NEW='http\://forum\.enjoysudoku\.com/'

for i
do      echo "$i" |
        tr A-Z a-z |
        sed \
                -e "s,$URL_DECODE_OLD_1,$URL_DECODE_NEW,g" \
                -e "s,$URL_DECODE_OLD_2,$URL_DECODE_NEW,g" \
                -e "s,$URL_ENCODE_OLD_1,$URL_ENCODE_NEW,g" \
                -e "s,$URL_ENCODE_OLD_2,$URL_ENCODE_NEW,g" \
                -e 's/?p=\([0-9][0-9]*\)#\1/?p=\1#p\1/g' \
                -e "s/\\([^\\\\]\\)'/\\1\\\\'/g"
done
gsf
2014 Supporter
 
Posts: 7306
Joined: 21 September 2005
Location: NJ USA

Re: Forum URLs

Postby JasonLion » Fri Jun 04, 2010 9:07 pm

To put that in a more readable format for people editing by hand:

Replace any of:
With:
Also, if there is a "#NNN" at the end of URL, where NNN can be any number, add a 'p' after the '#', so it becomes "#pNNN".

For example:
becomes:
    http://forum.enjoysudoku.com/viewtopic.php?t=2646
User avatar
JasonLion
2017 Supporter
 
Posts: 642
Joined: 25 October 2007
Location: Silver Spring, MD, USA

Re: Forum URLs

Postby ronk » Fri Jun 04, 2010 9:25 pm

JasonLion wrote:Also, if there is a "#NNN" at the end of URL, where NNN can be any number, add a 'p' after the '#', so it becomes "#pNNN".

For example:
becomes:
    http://forum.enjoysudoku.com/viewtopic.php?t=2646

I'm assuming you mean if there is a "p=NNN" at the end, "#NNN" should be appended to obtain "p=NNN#NNN" ... where the NNN is repeated.
ronk
2012 Supporter
 
Posts: 4764
Joined: 02 November 2005
Location: Southeastern USA

Re: Forum URLs

Postby JasonLion » Sat Jun 05, 2010 11:28 am

Not exactly.

What you will normally see with a "p=" will be:
    http://www.sudoku.com/boards/viewtopic.php?p=11444#11444
which goes to:
    http://forum.enjoysudoku.com/viewtopic.php?p=11444#p11444

However, if you have:
    http://www.sudoku.com/boards/viewtopic.php?p=11444
To have it go exactly where it went before you would put:
    http://forum.enjoysudoku.com/viewtopic.php?p=11444
Now, where it went before may or may not be where the original author meant it to go. With the "#p11444" it positions to the specific post, and without it you see the entire topic from the top. That is the same on the old and the new forum. So if all you are doing is adjusting links to point to the new forum, you don't add the "#pNNN".

Seeing a "p=NNN" without a "#NNN" is suggestive that the original author of the link made a mistake, but that is impossible to know without more information. They might have left the "#NNN" off on purpose, or by accident.

On a related note, if you see "&sid=HHH", where HHH is a fairly long hexadecimal number, you can remove it (or leave it alone). The "sid" portion is ignored on both the old and new forums.

One more complication, just to be through, if you see something for the form:
    http://www.sudoku.com/boards/viewforum.php?f=4
with viewforum instead of viewtopic and an "f=NN" portion, you need to fix those up completely by hand. The NN numbers following "f=" have changed. You need to figure out which forum/topic area they were trying to link to and find out the correct URL. Fortunately, links of this form are extremely rare.
User avatar
JasonLion
2017 Supporter
 
Posts: 642
Joined: 25 October 2007
Location: Silver Spring, MD, USA

Re: Forum URLs

Postby ronk » Sat Jun 05, 2010 12:44 pm

JasonLion wrote:Not exactly.

What you will normally see with a "p=" will be:
    http://www.sudoku.com/boards/viewtopic.php?p=11444#11444
which goes to:
    http://forum.enjoysudoku.com/viewtopic.php?p=11444#p11444

Aha, I get it now. Your earlier example was a "t=" rather than a "p=", and I didn't read the previous sentence carefully enough. Thanks.
ronk
2012 Supporter
 
Posts: 4764
Joined: 02 November 2005
Location: Southeastern USA

Re: Forum URLs

Postby dobrichev » Tue Jun 15, 2010 12:34 am

Could somebody update the links to former sudoku.com in en.wikipedia.org ?
I tried to fix the first 2 links at http://en.wikipedia.org/wiki/Mathematics_of_Sudoku, namely
http://www.sudoku.com/boards/viewtopic.php?p=2 -> http://forum.enjoysudoku.com/viewtopic.php?p=2, and
http://www.sudoku.com/boards/viewtopic.php?t=44&start=138 -> http://forum.enjoysudoku.com/viewtopic.php?t=44&start=138
and saw the results are not acceptable. Seems some extra work must be done.
dobrichev
2016 Supporter
 
Posts: 1863
Joined: 24 May 2010

Re: Forum URLs

Postby JasonLion » Tue Jun 15, 2010 11:27 am

http ://www.sudoku.com/boards/viewtopic.php?p=2 refers to post #2, which was deleted years ago, well before the backup we restored from.
User avatar
JasonLion
2017 Supporter
 
Posts: 642
Joined: 25 October 2007
Location: Silver Spring, MD, USA

Postby Pat » Wed Jun 16, 2010 1:38 pm

dobrichev wrote:Could somebody update the links to former sudoku-dot-com in en.wikipedia.org ?
I tried to fix the first 2 links at http://en.wikipedia.org/wiki/Mathematics_of_Sudoku,
namely---and viewtopic.php?t=44&start=138
and saw the results are not acceptable. Seems some extra work must be done.
User avatar
Pat
 
Posts: 4056
Joined: 18 July 2005

Postby Pat » Wed Jun 16, 2010 2:15 pm

JasonLion wrote:p=2 refers to post #2,
which was deleted years ago,
well before the backup we restored from.

p=2 was Pappocom's original post on Basic terms

it was lost when the forum was hacked in early-2006

later re-posted (2006.May.16),
this is the new URL --
User avatar
Pat
 
Posts: 4056
Joined: 18 July 2005

Re:

Postby dobrichev » Wed Jun 16, 2010 3:17 pm

Thank you Pat. Thank you JasonLion.
I updated these 2 links. Hope the authors of the article will do the rest.
dobrichev
2016 Supporter
 
Posts: 1863
Joined: 24 May 2010

Re: Forum URLs

Postby Pat » Wed Jun 23, 2010 9:32 am

dobrichev wrote:Could somebody update the links to former sudoku.com in en.wikipedia.org ?
I tried to fix---at http://en.wikipedia.org/wiki/Mathematics_of_Sudoku---and saw the results are not acceptable.
Seems some extra work must be done.


start=15 produces the standard page 2 --
skips 15 posts, showing the 16th post at the top of the page

start=16 produced ( in the past ) a non-standard page 2 --
still calling itself "page 2"
but skipped 16 posts, showing the 17th post at the top of the page
-- this non-standard page was very confusing,
but it did have the advantage of showing the desired post at the top !

well this behaviour has been lost in the new forum --
start=16 now produces the standard page 2,
leaving it for us to count down to the desired post

hence, as you said, some extra work must be done

    manually counting down like this is painful,
    and can lead to mistakes

    i cannot imagine anyone repairing dozens of links this way
User avatar
Pat
 
Posts: 4056
Joined: 18 July 2005

Re: Forum URLs

Postby ronk » Wed Jun 23, 2010 1:26 pm

JasonLion, I checked two phpBB2 sites (dailysudoku.com with 20 posts per page, and the Programmers' Forums with 15) and both operate as Pat claims. Although I never knowingly posted links that depended upon "start=N", I agree that this phpBB2 "feature" should be retained. Hopefully it's a configurable feature in phpBB3.

However, I suppose that moderator movement of posts, e.g., from one topic to another, could change the top post intended by an author.
ronk
2012 Supporter
 
Posts: 4764
Joined: 02 November 2005
Location: Southeastern USA

re: Forum URLs

Postby Pat » Tue Jun 29, 2010 2:13 pm

in the WikiPedia article

links which still need fixing

include 3 easy fixes ( links to specific post-id ) --
    10 p=2992#p2992
    44 p=3366#p3366
    62 p=11444#p11444
and 4 easy fixes ( links to specific topic-id without start= ) --
    22 t=2840
    50 t=4281
    65 t=5384
    66 t=4209
this still leaves 37 problematic links which use start= ( including a small number of duplicates ) --
    9 t=44&start=527
    11 t=44&start=412
    12 t=44&start=422
    13 t=44&start=430
    15 t=2511&start=17
    16 t=44&start=568
    17 t=44&start=525
    18 t=44&start=567
    19 t=2840&start=2
    20 t=44&start=41
    21 t=44&start=527
    23 t=2840&start=11
    24 t=44&start=412
    25 t=44&start=548
    26 t=2840&start=1
    27 t=44&start=525
    28 t=44&start=543
    29 t=44&start=543
    30 t=44&start=543
    31 t=2840&start=14
    32 t=44&start=567
    33 t=44&start=567
    34 t=2840&start=2
    35 t=2840&start=2
    36 t=2840&start=5
    37 t=2840&start=11
    38 t=2840&start=11
    39 t=2840&start=11
    40 t=44&start=393
    41 t=44&start=187
    42 t=44&start=403
    46 t=44&start=454
    51 t=4281&start=6
    54 t=3284&start=7
    56 t=2082&start=16
    64 t=44&start=138
    68 t=1180&start=15
User avatar
Pat
 
Posts: 4056
Joined: 18 July 2005

Re: Forum URLs

Postby tarek » Tue Jun 29, 2010 9:06 pm

using "start=threadpostIndex" was extensively usedin the previous forum ....

Thisis currently not supported ...

Attempts at making an alternative "-threadpostIndex" works only in multiples of 15

tarek
User avatar
tarek
 
Posts: 3762
Joined: 05 January 2006

Next

Return to Forum questions and feedback