piotr_n (OP)
Legendary
Offline
Activity: 2055
Merit: 1359
aka tonikt
|
|
November 28, 2011, 08:54:36 PM |
|
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.
|
Check out gocoin - my original project of full bitcoin node & cold wallet written in Go.PGP fingerprint: AB9E A551 E262 A87A 13BB 9059 1BE7 B545 CDF3 FD0E
|
|
|
tysat
Legendary
Offline
Activity: 966
Merit: 1004
Keep it real
|
|
November 28, 2011, 09:48:04 PM |
|
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.
|
|
|
|
theymos
Administrator
Legendary
Offline
Activity: 5362
Merit: 13337
|
|
November 28, 2011, 09:56:00 PM |
|
It's not something that an average PHP developer wouldn't be able to handle within an hour.
Are you volunteering?
|
1NXYoJ5xU91Jp83XfVMHwwTUyZFK64BoAD
|
|
|
piotr_n (OP)
Legendary
Offline
Activity: 2055
Merit: 1359
aka tonikt
|
|
November 28, 2011, 10:08:41 PM Last edit: November 28, 2011, 10:23:36 PM by piotr_n |
|
@tysat, not to look far, go to this article: https://bitcointalk.org/index.php?topic=7269.0.. 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
|
Check out gocoin - my original project of full bitcoin node & cold wallet written in Go.PGP fingerprint: AB9E A551 E262 A87A 13BB 9059 1BE7 B545 CDF3 FD0E
|
|
|
tysat
Legendary
Offline
Activity: 966
Merit: 1004
Keep it real
|
|
November 28, 2011, 10:43:53 PM |
|
Well got that one updated, not sure how many other posts with broken links there are around (that are still relevant posts).
|
|
|
|
btc_artist
Full Member
Offline
Activity: 154
Merit: 102
Bitcoin!
|
|
November 28, 2011, 10:48:12 PM |
|
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.
|
BTC: 1CDCLDBHbAzHyYUkk1wYHPYmrtDZNhk8zf LTC: LMS7SqZJnqzxo76iDSEua33WCyYZdjaQoE
|
|
|
btc_artist
Full Member
Offline
Activity: 154
Merit: 102
Bitcoin!
|
|
November 28, 2011, 10:50:38 PM |
|
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. SELECT * FROM smf_messages WHERE body LIKE '%http://bitcointalk.org/index.php%'
|
BTC: 1CDCLDBHbAzHyYUkk1wYHPYmrtDZNhk8zf LTC: LMS7SqZJnqzxo76iDSEua33WCyYZdjaQoE
|
|
|
btc_artist
Full Member
Offline
Activity: 154
Merit: 102
Bitcoin!
|
|
November 28, 2011, 10:54:00 PM |
|
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. UPDATE smf_messages SET body = REPLACE(body, 'http://bitcointalk.org/index.php', 'http://bitcointalk.org/index.php');
|
BTC: 1CDCLDBHbAzHyYUkk1wYHPYmrtDZNhk8zf LTC: LMS7SqZJnqzxo76iDSEua33WCyYZdjaQoE
|
|
|
theymos
Administrator
Legendary
Offline
Activity: 5362
Merit: 13337
|
|
November 29, 2011, 12:19:50 AM |
|
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.
|
1NXYoJ5xU91Jp83XfVMHwwTUyZFK64BoAD
|
|
|
theymos
Administrator
Legendary
Offline
Activity: 5362
Merit: 13337
|
|
November 29, 2011, 12:23:04 AM |
|
Actually, the "censored words" functionality might be sufficient. I set up something (probably broken), and I'll do proper testing in a few hours.
|
1NXYoJ5xU91Jp83XfVMHwwTUyZFK64BoAD
|
|
|
tysat
Legendary
Offline
Activity: 966
Merit: 1004
Keep it real
|
|
November 29, 2011, 12:49:04 AM |
|
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.
|
|
|
|
theymos
Administrator
Legendary
Offline
Activity: 5362
Merit: 13337
|
|
November 29, 2011, 03:59:46 AM |
|
OK, it seems to be working pretty well.
|
1NXYoJ5xU91Jp83XfVMHwwTUyZFK64BoAD
|
|
|
btc_artist
Full Member
Offline
Activity: 154
Merit: 102
Bitcoin!
|
|
November 29, 2011, 05:14:05 AM |
|
Good deal!
|
BTC: 1CDCLDBHbAzHyYUkk1wYHPYmrtDZNhk8zf LTC: LMS7SqZJnqzxo76iDSEua33WCyYZdjaQoE
|
|
|
piotr_n (OP)
Legendary
Offline
Activity: 2055
Merit: 1359
aka tonikt
|
|
November 29, 2011, 10:12:21 AM |
|
thanks!
|
Check out gocoin - my original project of full bitcoin node & cold wallet written in Go.PGP fingerprint: AB9E A551 E262 A87A 13BB 9059 1BE7 B545 CDF3 FD0E
|
|
|
|
|