The forum of the forums

Would you like to react to this message? Create an account in a few clicks or log in to continue.
The forum of the forums
+5
Neptune-
PoodleyPie
BlackScorpion
SLGray
timberella
9 posters

    Image URL Change for Postimg

    timberella
    timberella
    Forumember


    Female Posts : 111
    Reputation : 5
    Language : English

    Solved Image URL Change for Postimg

    Post by timberella Fri 13 Apr - 2:47

    Many of the images that we use in our forum are hosted by Postimg and they have a URL address of ".org".

    Recently there has been some trouble with Postimg, that is too technical for me to understand, but the end result is that all the images that had been hosted there are no longer visible. They suggested to replace ".org" with ".cc", and when I do that the image reappears.

    We have one forum that has WAY too many images in it that would need to be edited by hand, so I wonder if there is some kind of code that I can put into the CSS or as a Javascript module that will change the ".org" to ".cc".

    Is this possible?


    Last edited by timberella on Mon 23 Apr - 1:58; edited 1 time in total
    SLGray
    SLGray
    Administrator
    Administrator


    Male Posts : 51498
    Reputation : 3523
    Language : English
    Location : United States

    Solved Re: Image URL Change for Postimg

    Post by SLGray Fri 13 Apr - 3:23

    I really do not know if there is a code for this.  If there is, it would also change any link that ends with .org.



    Image URL Change for Postimg Slgray10

    When your topic has been solved, ensure you mark the topic solved.
    Never post your email in public.
    BlackScorpion
    BlackScorpion
    Graphic Designer
    Graphic Designer


    Male Posts : 7038
    Reputation : 920
    Language : English
    Location : USA

    Solved Re: Image URL Change for Postimg

    Post by BlackScorpion Fri 13 Apr - 4:08

    Unfortunately, like SLGray stated above there isn't a quick fix script for that. I had a similar situation on my forum which had images hosted on Photobucket and Imageshack, both wanted you to upgrade to allow image hosting, in the end me a a few moderators, uploaded the images that were missing to the Forumotion image hosting (Servimg) to avoid all that mess took a few days but we got it done.


    Last edited by BlackScorpion on Fri 13 Apr - 6:47; edited 1 time in total

    timberella
    timberella
    Forumember


    Female Posts : 111
    Reputation : 5
    Language : English

    Solved Re: Image URL Change for Postimg

    Post by timberella Fri 13 Apr - 5:11

    Thank you for the replies!

    Would it work if I wanted to change "postimg.org" to postimg.cc"??

    I would consider Servimg as a solution except the images that I'm referring to are PNG images and they get converted to JPEG when using Servimg, so they lose the transparency that is needed.
    BlackScorpion
    BlackScorpion
    Graphic Designer
    Graphic Designer


    Male Posts : 7038
    Reputation : 920
    Language : English
    Location : USA

    Solved Re: Image URL Change for Postimg

    Post by BlackScorpion Fri 13 Apr - 6:54

    timberella wrote:Thank you for the replies!

    Would it work if I wanted to change "postimg.org" to postimg.cc"??

    I would consider Servimg as a solution except the images that I'm referring to are PNG images and they get converted to JPEG when using Servimg, so they lose the transparency that is needed.

    Changing the extension on it won't work. If you want try it on 1 image, then you'll know for sure. You can also try TinyPic for your PNG files.

    PoodleyPie
    PoodleyPie
    Forumember


    Posts : 161
    Reputation : 6
    Language : English

    Solved Re: Image URL Change for Postimg

    Post by PoodleyPie Fri 13 Apr - 23:39

    timberella wrote:Many of the images that we use in our forum are hosted by Postimg and they have a URL address of ".org".

    Recently there has been some trouble with Postimg, that is too technical for me to understand, but the end result is that all the images that had been hosted there are no longer visible. They suggested to replace ".org" with ".cc", and when I do that the image reappears.

    We have one forum that has WAY too many images in it that would need to be edited by hand, so I wonder if there is some kind of code that I can put into the CSS or as a Javascript module that will change the ".org" to ".cc".

    Is this possible?


    I discovered the same problem within an hour of them changing their domain. This photo should make it easy to understand what they did and why the problem is: : https://postimg.cc/image/yy0595kib/

    I emailed them and this is what they said:

    postimg.ORG domain is locked by Registry, no prior notice. While we hope to resolve the issue, we chose postimg.CC as our new home. Please update codes embedded in your websites.

    Sorry to disappoint you. We did what we thought was best. You can fix all images by contacting the forum administrator and ask to run the SQL query, example for phpBB

    "UPDATE `phpbb_posts` SET `post_text` = replace(post_text, 'postimg.org', 'postimg.cc');"


    As for why, this might explain it: https://malwaretips.com/threads/postimage-org-dead-end.64901/

    Their financial problems date back to Oct 2017, and my best guess is they can no longer afford to host 1.8 petabytes each month. I had never even heard of a petabyte until I read this.

    I think they used a software program to keep direct links to photos, but not hotlinks to sites or forums. I'm not an Admin at the forum where my photos and those of some other members were affected, and I contacted the Admin but he hasn't responded, so maybe he doesn't know how to 'run the SQL query", or is treating it like a Photobucket problem when they deleted pics on free users, which was to let them re-upload their photos.

    Please let me know if the fix they sent works on your forum so I can tell my Admin at that site.







    timberella
    timberella
    Forumember


    Female Posts : 111
    Reputation : 5
    Language : English

    Solved Re: Image URL Change for Postimg

    Post by timberella Sat 14 Apr - 4:48

    BlackScorpion wrote:
    timberella wrote:Thank you for the replies!

    Would it work if I wanted to change "postimg.org" to postimg.cc"??

    I would consider Servimg as a solution except the images that I'm referring to are PNG images and they get converted to JPEG when using Servimg, so they lose the transparency that is needed.

    Changing the extension on it won't work. If you want try it on 1 image, then you'll know for sure. You can also try TinyPic for your PNG files.

    @BlackScorpion, thank you for the reply. I have tried your suggestion on a few of the images, and the solution given by Postimg is to edit the URL and change the .org to .cc. When I edit the URL, the image appears.

    So it would be great if we can sweep through the whole forum and change "postimg.org" to "postimg.cc".

    @PoodleyPie, thank you for the suggestion. I don't know what an SQL query is or how to apply it. That's why I come here LOL.

    Our problem is not finding an image hosting site for our PNG images; Postimg will work fine. The problem is that the old replies with the .org URL will need to be edited to .cc and we'd have to do that by hand unless someone can provide some solution using code. It would be a tremendous time saver for our forum.
    SLGray
    SLGray
    Administrator
    Administrator


    Male Posts : 51498
    Reputation : 3523
    Language : English
    Location : United States

    Solved Re: Image URL Change for Postimg

    Post by SLGray Sat 14 Apr - 5:46

    You could try using the censor option in the AP.



    Image URL Change for Postimg Slgray10

    When your topic has been solved, ensure you mark the topic solved.
    Never post your email in public.
    timberella
    timberella
    Forumember


    Female Posts : 111
    Reputation : 5
    Language : English

    Solved Re: Image URL Change for Postimg

    Post by timberella Sat 14 Apr - 9:47

    SLGray wrote:You could try using the censor option in the AP.

    Thank you, @SLGray, I was really hoping it would be that easy.

    I added a word censor to change "postimg.org" to "postimg.cc" and it worked on the "postimg.org" text inside the message body, but it didn't convert to "postimg.cc" in the image URL.

    Do you know how to run this SQL Query thing?
    Neptune-
    Neptune-
    Forumember


    Female Posts : 496
    Reputation : 104
    Language : French (10), English (8), CSS (5), HTML (4), Javascript (4)
    Location : Scotland, UK

    Solved Re: Image URL Change for Postimg

    Post by Neptune- Sat 14 Apr - 11:57

    Hi there


    - Censorship feature isn't retroactive

    - SQL queries work only on SQL databases, only on self-hosted websites.
    Since here we do not have any access to database, we cannot run SQL queries. But maybe Forumotion dev could cat
    timberella
    timberella
    Forumember


    Female Posts : 111
    Reputation : 5
    Language : English

    Solved Re: Image URL Change for Postimg

    Post by timberella Sun 15 Apr - 8:30

    Neptune- wrote:Hi there


    - Censorship feature isn't retroactive

    - SQL queries work only on SQL databases, only on self-hosted websites.
    Since here we do not have any access to database, we cannot run SQL queries. But maybe Forumotion dev could cat

    Thank you, @Neptune!

    Retroactive is what we would need, so I guess that solution is out.
    What is Forumotion dev?
    Neptune-
    Neptune-
    Forumember


    Female Posts : 496
    Reputation : 104
    Language : French (10), English (8), CSS (5), HTML (4), Javascript (4)
    Location : Scotland, UK

    Solved Re: Image URL Change for Postimg

    Post by Neptune- Sun 15 Apr - 9:06

    dev = developers (technicians). They won't just run the query on your forum, but if postimg.** is a very popular service maybe they will do something to fix that.




    Can you try that javascript (placed on topics) and tell me if it works !

    Code:
    var censorship =
    [
        ["href", /postimg\.org/g, "postimg.cc"],
        ["src", /postimg\.org/g, "postimg.cc"],
    ];

    function censorNode(a) {
      if(a.nodeType == 3) {
        for(var b in censorship) {
          if(censorship[b][0] === "text") {
            a.nodeValue = a.nodeValue.replace(censorship[b][1], censorship[b][2])
          }
        }
      }else {
        if(a.nodeType == 1) {
          for(b in censorship) {
            a.hasAttribute(censorship[b][0]) && a.setAttribute(censorship[b][0], a.getAttribute(censorship[b][0]).replace(censorship[b][1], censorship[b][2]))
          }
        }
        if(a.hasChildNodes()) {
          a = a.childNodes;
          for(b = 0;b < a.length;b++) {
            censorNode(a[b])
          }
        }
      }
    }
    $(function() {
      $(window).bind("load", function() {
        setTimeout(function() {
          var phpbb3 = "body#phpbb", invision = "#ipbwrapper", punbb = "#pun-foot";
          $( $(phpbb3).length ? "div.postbody > div.content" : $(invision).length ? "div.postbody > div.post-entry" : $(punbb).length ? "div.post div.post-entry" : "div.postbody" ).each(function() {
            censorNode(this);
            for(var a in censorship) {
              censorship[a][0] === "html" && censorship[a][1].test($(this).html()) && $(this).html($(this).html().replace(censorship[a][1], censorship[a][2]))
            }
          })
        }, 600)
      })
    });
    peter59
    peter59
    Forumember


    Male Posts : 145
    Reputation : 0
    Language : English
    Location : Kent

    Solved Re: Image URL Change for Postimg

    Post by peter59 Mon 16 Apr - 1:46

    timberella wrote:Many of the images that we use in our forum are hosted by Postimg and they have a URL address of ".org".

    Recently there has been some trouble with Postimg, that is too technical for me to understand, but the end result is that all the images that had been hosted there are no longer visible. They suggested to replace ".org" with ".cc", and when I do that the image reappears.

    We have one forum that has WAY too many images in it that would need to be edited by hand, so I wonder if there is some kind of code that I can put into the CSS or as a Javascript module that will change the ".org" to ".cc".

    Is this possible?

    I looked at that, it seems they want you to add a plug-in. I'm not sure I want to do that? Where I have a lot of images, I copy the codes to word. Then search for the word org, then replace we cc, then copy and paste back to forum. I have done about 500 images so far.
    SLGray
    SLGray
    Administrator
    Administrator


    Male Posts : 51498
    Reputation : 3523
    Language : English
    Location : United States

    Solved Re: Image URL Change for Postimg

    Post by SLGray Mon 16 Apr - 1:49

    peter59 wrote:
    timberella wrote:Many of the images that we use in our forum are hosted by Postimg and they have a URL address of ".org".

    Recently there has been some trouble with Postimg, that is too technical for me to understand, but the end result is that all the images that had been hosted there are no longer visible.  They suggested to replace ".org" with ".cc", and when I do that the image reappears.

    We have one forum that has WAY too many images in it that would need to be edited by hand, so I wonder if there is some kind of code that I can put into the CSS or as a Javascript module that will change the ".org" to ".cc".

    Is this possible?

    I looked at that, it seems they want you to add a plug-in. I'm not sure I want to do that? Where I have a lot of images, I copy the codes to word. Then search for the word org, then replace we cc, then copy and paste back to forum. I have done about 500 images so far.
    I believe you posted in the wrong topic.



    Image URL Change for Postimg Slgray10

    When your topic has been solved, ensure you mark the topic solved.
    Never post your email in public.
    timberella
    timberella
    Forumember


    Female Posts : 111
    Reputation : 5
    Language : English

    Solved Re: Image URL Change for Postimg

    Post by timberella Mon 16 Apr - 4:53

    Neptune- wrote:dev = developers (technicians). They won't just run the query on your forum, but if postimg.** is a very popular service maybe they will do something to fix that.




    Can you try that javascript (placed on topics) and tell me if it works !

    Code:
    var censorship =
    [
     Â   ["href", /postimg\.org/g, "postimg.cc"],
     Â   ["src", /postimg\.org/g, "postimg.cc"],
    ];

    function censorNode(a) {
     Â if(a.nodeType == 3) {
     Â   for(var b in censorship) {
     Â     if(censorship[b][0] === "text") {
     Â       a.nodeValue = a.nodeValue.replace(censorship[b][1], censorship[b][2])
     Â     }
     Â   }
     Â }else {
     Â   if(a.nodeType == 1) {
     Â     for(b in censorship) {
     Â       a.hasAttribute(censorship[b][0]) && a.setAttribute(censorship[b][0], a.getAttribute(censorship[b][0]).replace(censorship[b][1], censorship[b][2]))
     Â     }
     Â   }
     Â   if(a.hasChildNodes()) {
     Â     a = a.childNodes;
     Â     for(b = 0;b < a.length;b++) {
     Â       censorNode(a[b])
     Â     }
     Â   }
     Â }
    }
    $(function() {
     Â $(window).bind("load", function() {
     Â   setTimeout(function() {
     Â     var phpbb3 = "body#phpbb", invision = "#ipbwrapper", punbb = "#pun-foot";
     Â     $( $(phpbb3).length ? "div.postbody > div.content" : $(invision).length ? "div.postbody > div.post-entry" : $(punbb).length ? "div.post div.post-entry" : "div.postbody" ).each(function() {
     Â       censorNode(this);
     Â       for(var a in censorship) {
     Â         censorship[a][0] === "html" && censorship[a][1].test($(this).html()) && $(this).html($(this).html().replace(censorship[a][1], censorship[a][2]))
     Â       }
     Â     })
     Â   }, 600)
     Â })
    });

    @Neptune, that's awesome!  Smile

    I added the Javascript Module (in topics) and checked to see if the Postimg images were restored.  None of the images are loaded at the outset, but after the script finished running, the images became visible.

    I'm sure my forum is not the only forum that will be having trouble with this Postimg issue, so if anyone knows how to suggest this to the Forumotion Developers to modify the image source URL, that would be ideal.  I noticed that when I edit one of these messages, the image that I can see on the topic page is no longer visible in edit mode, so changing the image source URL would be great.

    Thanks so much for your assistance!  It's greatly appreciated.

    EDIT: Is it possible to add something to this code so that the javascript will target a specific forum rather than applying it in all forums in all topics?
    Neptune-
    Neptune-
    Forumember


    Female Posts : 496
    Reputation : 104
    Language : French (10), English (8), CSS (5), HTML (4), Javascript (4)
    Location : Scotland, UK

    Solved Re: Image URL Change for Postimg

    Post by Neptune- Mon 16 Apr - 6:56

    timberella wrote:that's awesome! Smile

    Ea, staff member on french official support is awesome too

    Full tutorial there -> Censure des messages en javascript

    I noticed that when I edit one of these messages, the image that I can see on the topic page is no longer visible in edit mode, so changing the image source URL would be great.
    I told you to use that script on topics ! But if you place it on All pages it will work also on preview for sure. I just have a doubt about the editor's textarea in reply/edit/quote mode.
    timberella
    timberella
    Forumember


    Female Posts : 111
    Reputation : 5
    Language : English

    Solved Re: Image URL Change for Postimg

    Post by timberella Mon 16 Apr - 7:53

    Neptune- wrote:
    timberella wrote:that's awesome! Smile

    Ea, staff member on french official support is awesome too

    Full tutorial there -> Censure des messages en javascript

    I noticed that when I edit one of these messages, the image that I can see on the topic page is no longer visible in edit mode, so changing the image source URL would be great.
    I told you to use that script on topics ! But if you place it on All pages it will work also on preview for sure. I just have a doubt about the editor's textarea in reply/edit/quote mode.

    Thank you for the link, @Neptune; I'll check it out!

    I installed the code "on topics" as you suggested. Since I don't know how to read javascript, I clicked the Edit button for one of the replies with one of these images to see if the javascript had changed the img URL inside the message body and that is when I noticed that it didn't. So the image URL remains ".org" and the javascript makes it possible to see the images in the topics pages.

    For now this is a workable solution to our image problems, but at a later time I would probably want this javascript to run in only one of our forums. This is the forum that I didn't want to edit every reply to change the image URL.

    Is this doable?
    peter59
    peter59
    Forumember


    Male Posts : 145
    Reputation : 0
    Language : English
    Location : Kent

    Solved Re: Image URL Change for Postimg

    Post by peter59 Mon 16 Apr - 9:28

    SLGray wrote:
    peter59 wrote:
    timberella wrote:Many of the images that we use in our forum are hosted by Postimg and they have a URL address of ".org".

    Recently there has been some trouble with Postimg, that is too technical for me to understand, but the end result is that all the images that had been hosted there are no longer visible.  They suggested to replace ".org" with ".cc", and when I do that the image reappears.

    We have one forum that has WAY too many images in it that would need to be edited by hand, so I wonder if there is some kind of code that I can put into the CSS or as a Javascript module that will change the ".org" to ".cc".

    Is this possible?

    I looked at that, it seems they want you to add a plug-in. I'm not sure I want to do that? Where I have a lot of images, I copy the codes to word. Then search for the word org, then replace we cc, then copy and paste back to forum. I have done about 500 images so far.
    I believe you posted in the wrong topic.

    Sorry Oh my god
    TheCrow
    TheCrow
    Manager
    Manager


    Male Posts : 6916
    Reputation : 795
    Language : Greek, English

    Solved Re: Image URL Change for Postimg

    Post by TheCrow Mon 16 Apr - 10:36

    The topic was posted in the wrong section, so I have moved it to the correct section.
    Please read our forum rules: ESF General Rules



    Image URL Change for Postimg Thecro10
     Forum of the Forums

    Forumotion Rules | Tips & Tricks |
    FAQ | Did you forget your password?



    *** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
    No support via PM!
    Walt
    Walt
    Forumember


    Male Posts : 111
    Reputation : 35
    Language : French, English

    Solved Re: Image URL Change for Postimg

    Post by Walt Sat 21 Apr - 19:27

    Hello,

    For your information, in order to ease the transition for Forumotion users, and to avoid any loss of images hosted on Postimages.org in case of service closure, all images that have been hosted on this service and posted on the forums are automatically re-hosted on our own servers, without you having to make any changes. Wink

    This change concerns both the domain postimg.org and the domain postimg.cc. For example :
    https://s18.postimg.cc/4vr9xdvjd/notif_PM.png
    https://s18.postimg.org/4vr9xdvjd/notif_PM.png
    automatically become:

    Regards,
    Walt
    timberella
    timberella
    Forumember


    Female Posts : 111
    Reputation : 5
    Language : English

    Solved Re: Image URL Change for Postimg

    Post by timberella Mon 23 Apr - 0:17

    Thank you, @Walt, for the information and fix!

    I have removed the Javascript module that I had in place and checked the images hosted by Postimg and they are all there, so this is fantastic.

    I noticed today that this fix was also applied to images hosted at Photobucket, i.e. "photobucket.com", and now those Photobucket images are no longer visible.  So if you can report this to whomever needs to know so they can remove "2img.net/h/" from the photobucket.com images, that would be great.

    This Photobucket issue is being discussed here:
    https://help.forumotion.com/t155598-only-topic-cannot-see-photos-posted-from-photobucket
    brandon_g
    brandon_g
    Manager
    Manager


    Male Posts : 10113
    Reputation : 923
    Language : English
    Location : USA

    Solved Re: Image URL Change for Postimg

    Post by brandon_g Mon 23 Apr - 0:49

    @timberella I have already made a ticket on the photobucket problem and will report when there is an update in the only topic for that issue.

    Just to confirm, the postimg issue is fixed for you right?

    If so, may we consider this solved?

    -Brandon



    Image URL Change for Postimg Brando10
    Remember to mark your topic Image URL Change for Postimg Solved15 when a solution is found.
    General Rules | Tips & Tricks | FAQ | Forgot Founder Password?

    Image URL Change for Postimg Scre1476
    Team Leader
    Review Section Rules | Request A Review | Sticker Points
    timberella
    timberella
    Forumember


    Female Posts : 111
    Reputation : 5
    Language : English

    Solved Re: Image URL Change for Postimg

    Post by timberella Mon 23 Apr - 1:58

    brandon_g wrote:@timberella I have already made a ticket on the photobucket problem and will report when there is an update in the only topic for that issue.

    Just to confirm, the postimg issue is fixed for you right?

    If so, may we consider this solved?

    -Brandon

    Thank you, @brandon_g, yes, this topic is solved.
    brandon_g
    brandon_g
    Manager
    Manager


    Male Posts : 10113
    Reputation : 923
    Language : English
    Location : USA

    Solved Re: Image URL Change for Postimg

    Post by brandon_g Mon 23 Apr - 2:20

    Topic solved & archived
    Please read our forum rules: ESF General Rules



    Image URL Change for Postimg Brando10
    Remember to mark your topic Image URL Change for Postimg Solved15 when a solution is found.
    General Rules | Tips & Tricks | FAQ | Forgot Founder Password?

    Image URL Change for Postimg Scre1476
    Team Leader
    Review Section Rules | Request A Review | Sticker Points

      Current date/time is Sun 22 Sep - 23:28