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
+2
Jucarese
cromar
6 posters

    Help needed for a script to add https to some links

    cromar
    cromar
    New Member


    Posts : 18
    Reputation : 1
    Language : english

    Solved Help needed for a script to add https to some links

    Post by cromar Sun 22 Dec - 18:26

    Forum address: federer.forumotion.com

    I am planning to migrate our forum to the secure https protocol. But before I do that, I need to update certain links that would not be compatible with the new protocol. I have one in particular that is in large number across the forum. Is it possible to have a script that would replace all instances of:
    ["//drive.google.com] with [="https://drive.google.com] (excluding the bracket).

    My knowledge in coding is limited and would very much appreciate if someone could write me a script, if it can be done. Thank you v.m. Smile


    Last edited by cromar on Mon 20 Jan - 22:51; edited 1 time in total
    Jucarese
    Jucarese
    Hyperactive


    Male Posts : 2553
    Reputation : 120
    Language : spanish
    Location : SSF Admin

    Solved Re: Help needed for a script to add https to some links

    Post by Jucarese Sun 22 Dec - 19:56

    all urls of any google application are already in https a long time ago from google drive too
    cromar
    cromar
    New Member


    Posts : 18
    Reputation : 1
    Language : english

    Solved Re: Help needed for a script to add https to some links

    Post by cromar Sun 22 Dec - 22:58

    Yes, I know that, but unfortunately I coded the link to my image as shown in my original post, without any protocol, having read that it would adapt to any protocol. But when I run a test by switching our forum to https, all those links no longer worked.

    I already posted about this problem earlier and got all kind of info, none of them solving my issue. I basically have to add the missing protocol, changing: ["//drive.google.com] to [="https://drive.google.com]. That's why I am asking for a script, unless you have another solution?
    SLGray
    SLGray
    Administrator
    Administrator


    Male Posts : 51555
    Reputation : 3524
    Language : English
    Location : United States

    Solved Re: Help needed for a script to add https to some links

    Post by SLGray Sun 22 Dec - 23:37

    Are these images on your forum or just posted links?



    Help needed for a script to add https to some links Slgray10

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


    Solved Re: Help needed for a script to add https to some links

    Post by Guest Mon 23 Dec - 15:03

    Post a link to a page with such a link.
    cromar
    cromar
    New Member


    Posts : 18
    Reputation : 1
    Language : english

    Solved Re: Help needed for a script to add https to some links

    Post by cromar Mon 6 Jan - 0:33

    I just switched my forum to https (second try!), using the default option 2 to force https compatibility (which I didn't do the first time). I did a lot of manual editing before switching, but I know that I haven't got them all yet, so I am using HTTPS Checker to finish the clean up.

    What is strange is that the images, with the problem links I have been referring to, are now being displayed correctly (and the external links work fine too), but HTTPS Checker still reports an issue with mixed content for those images:

    Here is an example - This is my code on the page (with no protocol):
    Code:

    [url=//drive.google.com/uc?export=view&id=16fk65PrGPc2JlBaB0KztxvObkEj_Vybw] <img style="width:100%; max-width: 501px;" src="//drive.google.com/uc?export=view&id=16fk65PrGPc2JlBaB0KztxvObkEj_Vybw" title="Click image to view full size" > [/url]

    But when I look at the source code for the page, these show up as HTTP links:
    Code:
     <a href="http://drive.google.com/uc?export=view&id=16fk65PrGPc2JlBaB0KztxvObkEj_Vybw" target="_blank" rel="nofollow">
    <img style="width:100%; max-width: 501px;" src="http://drive.google.com/uc?export=view&id=16fk65PrGPc2JlBaB0KztxvObkEj_Vybw" title="Click image to view full size" >


    However, I tested the page with Chrome and Firefox and both browsers still shows the site as being secured. So, it's not a major problem, but I am curious as to why this is happening and it makes difficult to check the site for real issues.

    Here is the link to the page on my forum with those images: https://federer.forumotion.com/t635-ubr-latest-news
    The 'piano' pictures in the middle of the page are the problem ones. The page can be viewed as a guest. If you need more, let me know.
    SLGray
    SLGray
    Administrator
    Administrator


    Male Posts : 51555
    Reputation : 3524
    Language : English
    Location : United States

    Solved Re: Help needed for a script to add https to some links

    Post by SLGray Mon 6 Jan - 0:45

    So what exactly is the issue with the piano picture?  I can see 2 images and a Tweet in that post.



    Help needed for a script to add https to some links Slgray10

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


    Male Posts : 19436
    Reputation : 2010
    Language : fluent in dork / mumbojumbo & English haha

    Solved Re: Help needed for a script to add https to some links

    Post by Ape Mon 6 Jan - 1:50

    There is NO script to change the HTTP to HTTPS you have to work out away to do this your self.
    We do not have any tools to help on this matter.

    Sorry. Sad



    Help needed for a script to add https to some links Left1212Help needed for a script to add https to some links Center11Help needed for a script to add https to some links Right112
    Help needed for a script to add https to some links Ape_b110
    Help needed for a script to add https to some links Ape1010
    avatar
    Guest
    Guest


    Solved Re: Help needed for a script to add https to some links

    Post by Guest Mon 6 Jan - 10:32

    If you go to the http image url yourself, you will notice that it automatically gets redirected to the https version. This is why browsers still view your website as secure.

    Redirecting to https will mean an extra request, which adds a couple of milliseconds to your page's load time. If you only have a few images, that shouldn't be an issue. The best course of action would be adding the https protocol yourself to the bbcode/html.
    Jucarese
    Jucarese
    Hyperactive


    Male Posts : 2553
    Reputation : 120
    Language : spanish
    Location : SSF Admin

    Solved Re: Help needed for a script to add https to some links

    Post by Jucarese Mon 6 Jan - 21:41

    you have a security certificate you don't need any code to convert from http to https, that's what the certificate is doing, only urls that are not possible to convert to https will not be loaded, as long as you have an active certificate, in the case of google drive yourself you can add the "s" manually but you don't need to do it.
    skouliki
    skouliki
    Manager
    Manager


    Female Posts : 15391
    Reputation : 1709
    Language : English,Greek
    Location : Greece

    Solved Re: Help needed for a script to add https to some links

    Post by skouliki Sun 12 Jan - 16:06

    is this solved?

    Fleurpink
    Fleurpink
    New Member


    Posts : 2
    Reputation : 1
    Language : Français

    Solved Re: Help needed for a script to add https to some links

    Post by Fleurpink Thu 16 Jan - 22:24

    I don't think so because i have the same probleme and the answer in the top didn't help me.
    audacity temp mail origin


    Last edited by Fleurpink on Tue 21 Jan - 21:52; edited 2 times in total
    skouliki
    skouliki
    Manager
    Manager


    Female Posts : 15391
    Reputation : 1709
    Language : English,Greek
    Location : Greece

    Solved Re: Help needed for a script to add https to some links

    Post by skouliki Fri 17 Jan - 7:27

    Fleurpink wrote:I don't think so because i have the same probleme and the answer in the top didn't help me.

    Are you the same person with the topic starter? If not please do not hijack other member’s post if you have a problem open you own thread

    cromar
    cromar
    New Member


    Posts : 18
    Reputation : 1
    Language : english

    Solved Re: Help needed for a script to add https to some links

    Post by cromar Mon 20 Jan - 22:45

    Thank you all who participated in this discussion. Some good information and pointers. Now I have a better understanding of the whole process and in short, things are working fine on my migrated forum, meaning links are being redirected to https and pictures are being displayed, but if I want a 'clean' forum, I will have to modify those links myself by adding the missing https protocol manually. Live and learn!

    Case closed.
    SLGray
    SLGray
    Administrator
    Administrator


    Male Posts : 51555
    Reputation : 3524
    Language : English
    Location : United States

    Solved Re: Help needed for a script to add https to some links

    Post by SLGray Mon 20 Jan - 23:43

    Problem solved & topic archived.
    Please read our forum rules:  ESF General Rules



    Help needed for a script to add https to some links Slgray10

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

      Current date/time is Thu 14 Nov - 12:35