Author

Topic: Broken links everywhere - is anyone working on this? (Read 1667 times)

legendary
Activity: 1512
Merit: 1036
Well, now the original post has been "censored" so I can't see what was being talked about. Let's try some stuff:

forum.bitcoin.org

http://forum.bitcoin.org

http://forum.bitcoin.org/index.php?topic=53161.0

Well, I guess those links aren't what was being discussed, as forum.bitcoin.org still redirects here...
legendary
Activity: 2053
Merit: 1356
aka tonikt
thanks! Smiley
full member
Activity: 154
Merit: 102
Bitcoin!
Good deal!
administrator
Activity: 5222
Merit: 13032
OK, it seems to be working pretty well.
legendary
Activity: 966
Merit: 1004
Keep it real
Actually, the "censored words" functionality might be sufficient. I set up something (probably broken), and I'll do proper testing in a few hours.

It looks like it is working now... just looked at the links provided above in this post.
administrator
Activity: 5222
Merit: 13032
Actually, the "censored words" functionality might be sufficient. I set up something (probably broken), and I'll do proper testing in a few hours.
administrator
Activity: 5222
Merit: 13032
I don't want to modify the text of any old posts. I'd rather the links be converted during display. Probably best to do it in the same place where linkification happens.

Maybe I'll take a look later if no one else provides the code.
full member
Activity: 154
Merit: 102
Bitcoin!
You could fix the broken links with something like this, but you'd want to test it first before running it on the live database.  It might also change text that wasn't linked.

Code:
UPDATE smf_messages SET body = REPLACE(body, 'http://bitcointalk.org/index.php', 'http://bitcointalk.org/index.php');
full member
Activity: 154
Merit: 102
Bitcoin!
Well got that one updated, not sure how many other posts with broken links there are around (that are still relevant posts).
If you have access to the database, just run the following to see how many posts have broken links in them.

Code:
SELECT * FROM smf_messages WHERE body LIKE '%http://bitcointalk.org/index.php%'
full member
Activity: 154
Merit: 102
Bitcoin!
I'll volunteer to help.  It can actually be done with an SQL query, but a simple < 50 line PHP script could easily handle it.

@piotr_n  The problem is not when users submit new posts, it's old links in old posts.  

theymos, I can throw together a quick run-once PHP script to convert the old links to new ones.  Just let me know if you want it.
legendary
Activity: 966
Merit: 1004
Keep it real
Well got that one updated, not sure how many other posts with broken links there are around (that are still relevant posts).
legendary
Activity: 2053
Merit: 1356
aka tonikt
@tysat, not to look far, go to this article:
https://bitcointalksearch.org/topic/new-to-bitcoin-start-here-7269
.. and click the first link.

@theymos, no problem, but I'd have to change the source code so it's a matter of trust.
just find the function that writes a post into html and add some str_replace there.
anyone can do it Smiley
administrator
Activity: 5222
Merit: 13032
It's not something that an average PHP developer wouldn't be able to handle within an hour.

Are you volunteering?
legendary
Activity: 966
Merit: 1004
Keep it real
Just out of curiosity, you mind pointing to some of the broken links you're running into? (link to the posts they're in)

I don't think I've seen any for while.
legendary
Activity: 2053
Merit: 1356
aka tonikt
Never mind why, but the entire forum is full of broken links which point to http://bitcointalk.org/index.php?topic=... instead of http://bitcointalk.org/index.php?topic=...

It's not something that an average PHP developer wouldn't be able to handle within an hour.
So please, fix all the old links so they'd still work.
Jump to: