Pages:
Author

Topic: Tag a user to update their broken image links (Read 1140 times)

legendary
Activity: 1722
Merit: 4711
**In BTC since 2013**
Take the following recommendation with a pinch of salt (like I said, I've never run the script), but it looks to me like one way for the script (v1.6) to cope with the patch I mentioned earlier would be for line 156 to change from this:

Code: (Before)
const titleElement = postElement.querySelector('tr[class=titlebg2] td:nth-child(2) a:last-child')

To this:

Code: (After)
const titleElement = postElement.parentElement.parentElement.querySelector('tr[class=titlebg2] td:nth-child(2) a:last-child')

N.B. I'm talking about the update-everything version of the script, not the single-topic version.

Well, that's exactly what I was thinking.  I just didn't realize what had to change.

Thank you, @owerGlove for your help.
legendary
Activity: 2730
Merit: 7065
PowerGlove you never cease to amaze me. I will mention this post of yours in my OP to make other users aware of the fix until TryNinja updates his code and changes the problematic line. Hopefully he will post here to confirm he did.

Work like magic without any problem although the script couldn't go through locked topics but I'm very much happy with the results. got all my important images back.
I am glad you got most of your images back. You can always re-open the threads where you couldn't update the images, run the script again, and lock them afterwards. That is if it was you who closed those threads and not the mods.
staff
Activity: 1316
Merit: 1610
The Naija & BSFL Sherrif 📛
Take the following recommendation with a pinch of salt (like I said, I've never run the script), but it looks to me like one way for the script (v1.6) to cope with the patch I mentioned earlier would be for line 156 to change from this:

Code: (Before)
const titleElement = postElement.querySelector('tr[class=titlebg2] td:nth-child(2) a:last-child')

To this:

Code: (After)
const titleElement = postElement.parentElement.parentElement.querySelector('tr[class=titlebg2] td:nth-child(2) a:last-child')

N.B. I'm talking about the update-everything version of the script, not the single-topic version.

Work like magic without any problem although the script couldn't go through locked topics but I'm very much happy with the results. got all my important images back.

hero member
Activity: 510
Merit: 4005
I think there is problem in code line 157, 194 and 261.
Thanks for that, I think I see what the problem is.

I think this fix is what broke it. (I mean, it's an early 2023 topic, but I updated that code recently and theymos applied the fix in May 2024. Since that change, bodies and titles aren't laid out exactly as they were before on the post/topic history page.)

Actually, looking back, it's probably why ChiBitCTy also struggled to get it working before being advised to try the single-topic version instead...

I haven't tested TryNinja's script myself, because, honestly, it always struck me as a bad idea to allow a piece of code like this (that is, one that's relying on invariants that it really shouldn't be) to go and edit a bunch of my posts. That being said, TryNinja is a highly competent programmer and his script is just about the only sane way for most users to update their images, so, yeah, I get why people have been happily using it. Smiley

Take the following recommendation with a pinch of salt (like I said, I've never run the script), but it looks to me like one way for the script (v1.6) to cope with the patch I mentioned earlier would be for line 156 to change from this:

Code: (Before)
const titleElement = postElement.querySelector('tr[class=titlebg2] td:nth-child(2) a:last-child')

To this:

Code: (After)
const titleElement = postElement.parentElement.parentElement.querySelector('tr[class=titlebg2] td:nth-child(2) a:last-child')

N.B. I'm talking about the update-everything version of the script, not the single-topic version.
legendary
Activity: 1722
Merit: 4711
**In BTC since 2013**
@joker_josue you didn't notice any changes to your images after unsuccessfully running the code, right?

I don't have images to change, as I already ran the script some time ago.
Furthermore, it only does something, if it is to change the image link, if there is nothing to change it does nothing.

It seems to me that it is actually something in the script, from what I understand it is not recognizing the title of the post and ends up giving an error and not moving forward.

Perhaps recent changes in the way post titles appear have no longer been recognized by the script. We have to wait for @TryNinja to see what might be going on.
legendary
Activity: 2730
Merit: 7065
@Igebotz
I don't know it it's browser-related, but have you tried with a different browser? You should probably also be logged in to your Bitcointalk account on the browser where you are running the code. Since two users have now reported that the code isn't working, I am afraid to test it on my end so as not to mess up my images somehow.

@joker_josue you didn't notice any changes to your images after unsuccessfully running the code, right?
legendary
Activity: 1722
Merit: 4711
**In BTC since 2013**
I think there is problem in code line 157, 194 and 261. I did exactly as you instructed.



I did a test now and the same thing appeared to me...  Undecided

Take another test. Enter a topic that has images. Choose the "all" option for the entire topic to be loaded. Then run the script.
staff
Activity: 1316
Merit: 1610
The Naija & BSFL Sherrif 📛
Am I supposed to run my Ctrl + Shift + F12 on any of my topics that needed fix or any page on the forum ( I ran the last one on this thread)

This only works on your posts.
You can try running the script on the "Show the last posts of this person." and it will update the information on all topics that have images.

I think there is problem in code line 157, 194 and 261. I did exactly as you instructed.

legendary
Activity: 1722
Merit: 4711
**In BTC since 2013**
Am I supposed to run my Ctrl + Shift + F12 on any of my topics that needed fix or any page on the forum ( I ran the last one on this thread)

This only works on your posts.
You can try running the script on the "Show the last posts of this person." and it will update the information on all topics that have images.
hero member
Activity: 1036
Merit: 674
Forum itself needs to enable image uploading feature so that we will not depend on any third party before we can upload image and also that there will not be any issue like thus that we should fix anything.
I think this is a valid suggestion as, it would in one move eliminate all the hassle of having to go over to an image hosting site, uploading the image after adjusting it to a proper size although that could be done on the forum, copying the right link and placing it in the other for which we would want it.

A script could be put in place to perform this function just as it is with them avatar updates. Grant access to your device and select just the right image, the codes be there to allow for adjustment of size. It would be such improvement and we are sure it ain't getting scrapped with time.
staff
Activity: 1316
Merit: 1610
The Naija & BSFL Sherrif 📛
If you copied the whole code properly and you are still getting an error message, I think you should post in TryNinja's thread and ask for help from him. I thought that by tagging him, he would see it and come here and say something. He mentions in his thread to make a post if any error messages occur. 

There are two contradictive instructions on his OP - it could be where I'm getting it wrong.

1.
3. Go to bitcointalk.org (any page).

2.
Run it on any topic and all images posted by you will be updated

Am I supposed to run my Ctrl + Shift + F12 on any of my topics that needed fix or any page on the forum ( I ran the last one on this thread)
legendary
Activity: 2730
Merit: 7065
If you copied the whole code properly and you are still getting an error message, I think you should post in TryNinja's thread and ask for help from him. I thought that by tagging him, he would see it and come here and say something. He mentions in his thread to make a post if any error messages occur. 
staff
Activity: 1316
Merit: 1610
The Naija & BSFL Sherrif 📛
Not from the source code ( haven't seen where to input it yet) I'm seeing entirely different interface from my F12 page. After clicking on "inspect" I hit the wall ( saw something entirely different). I sent my baby steps screenshots to your PM.
After you click on the Console tab, you need to copy and paste the code that replaces the broken images. You can find it here. Make sure you copy everything, starting with the first line "(async () => {" and until the last one "})()"

If the image links are still available on Imgur's server, it will work. However, if Imgur deleted your links, there won't be anything to replace. Let me know if this works.

Got this error messages after i pasted the code and click 'Enter' i guess my Imgur images links are deleted from server or something...

legendary
Activity: 2730
Merit: 7065
Not from the source code ( haven't seen where to input it yet) I'm seeing entirely different interface from my F12 page. After clicking on "inspect" I hit the wall ( saw something entirely different). I sent my baby steps screenshots to your PM.
After you click on the Console tab, you need to copy and paste the code that replaces the broken images. You can find it here. Make sure you copy everything, starting with the first line "(async () => {" and until the last one "})()"

If the image links are still available on Imgur's server, it will work. However, if Imgur deleted your links, there won't be anything to replace. Let me know if this works.
staff
Activity: 1316
Merit: 1610
The Naija & BSFL Sherrif 📛
I'm tagging myself as nothing seems to be working at my end. All my images are still broken, my management service thread, my Local board charts are all still broken.
Read both threads, read both instructions yet nothing is working.  Wink
Weird, I wonder why. I don't think anything changed, the steps should still be the same. When did you last try it and was it giving you some errors? Let's try to tag @TryNinja and bring him here. Perhaps he knows what's going on and what else you could try. 

Not from the source code ( haven't seen where to input it yet) I'm seeing entirely different interface from my F12 page. After clicking on "inspect" I hit the wall ( saw something entirely different). I sent my baby steps screenshots to your PM.
legendary
Activity: 2730
Merit: 7065
I'm tagging myself as nothing seems to be working at my end. All my images are still broken, my management service thread, my Local board charts are all still broken.
Read both threads, read both instructions yet nothing is working.  Wink
Weird, I wonder why. I don't think anything changed, the steps should still be the same. When did you last try it and was it giving you some errors? Let's try to tag @TryNinja and bring him here. Perhaps he knows what's going on and what else you could try. 
staff
Activity: 1316
Merit: 1610
The Naija & BSFL Sherrif 📛
It's been a while since I last saw a user with many broken old Imgur image links, but I just came across such a post and remembered this thread I created. However, I am not going to mention the name because I already did it months ago. I don't want to bother the same people multiple times if they don't feel like doing it.

@Everyone, if you notice users with broken image links, mention their names please.

I'm tagging myself as nothing seems to be working at my end. All my images are still broken, my management service thread, my Local board charts are all still broken.

Read both threads, read both instructions yet nothing is working.  Wink
legendary
Activity: 2730
Merit: 7065
It's been a while since I last saw a user with many broken old Imgur image links, but I just came across such a post and remembered this thread I created. However, I am not going to mention the name because I already did it months ago. I don't want to bother the same people multiple times if they don't feel like doing it.

@Everyone, if you notice users with broken image links, mention their names please.
legendary
Activity: 2730
Merit: 7065
It's more like that these users didn't want to offer their service anymore or didn't care the thread anymore since they are very old and outdated or something else.
You seem to be talking about the designers whose names you mentioned in your previous post. I wasn't referring to them. My comment is more of a general observation about regular posters who are still very active on the forum, know that they can fix their images because they are also active in Meta and/or have been tagged to do so, but still nothing happens. Considering the paranoia surrounding some Bitcoin users, I think they don't trust the code. And since many can't verify it, they don't want to touch it. 
hero member
Activity: 1554
Merit: 880
pxzone.online
There are active users on the forum who know about the possibility of how to update old images easily but still refuse to do it. Maybe they have doubts about the code, thinking it can somehow lead to their accounts being compromised.
A javascript code that was made by reputed user who already made different open source projects is very least of the problem. It's more like that these users didn't want to offer their service anymore or didn't care the thread anymore since they are very old and outdated or something else.
Pages:
Jump to: