Blogger 从 http 到 https(SSL 问题) [英] Blogger from http to https (SSL problems)

查看:28
本文介绍了Blogger 从 http 到 https(SSL 问题)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题是在收到SSL证书后,将我的站点从http切换到https,我的站点(在我自己的域中)在博客平台上的某些功能停止工作.

The problem is that after receiving the SSL certificate, and switch my site from http to https some functions of my site (on my own domain) on the blogger platform, stopped working.

如何修复代码以使其再次运行?

How can I fix the code to make them work again?

<script type="text/javascript">
function LoadTheArchive(TotalFeed) 
{
    var PostTitles = new Array();
    var PostURLs = new Array();
    var PostYears = new Array();
    var PostMonths = new Array();
    var PostDays = new Array();

    if("entry" in TotalFeed.feed) 
    {
        var PostEntries=TotalFeed.feed.entry.length;
        for(var PostNum=0; PostNum<PostEntries ; PostNum++) 
        {
            var ThisPost = TotalFeed.feed.entry[PostNum];
            PostTitles.push(ThisPost.title.$t);
            PostYears.push(ThisPost.published.$t.substring(0,4));
            PostMonths.push(ThisPost.published.$t.substring(5,7));
            PostDays.push(ThisPost.published.$t.substring(8,10));
            var ThisPostURL;
            for(var LinkNum=0; LinkNum < ThisPost.link.length; LinkNum++) 
            {
                if(ThisPost.link[LinkNum].rel == "alternate") 
                {
                    ThisPostURL = ThisPost.link[LinkNum].href;
                    break
                }
            }
            PostURLs.push(ThisPostURL);
        }
    }
    DisplaytheTOC(PostTitles,PostURLs,PostYears,PostMonths,PostDays);
}

function DisplaytheTOC(PostTitles,PostURLs,PostYears,PostMonths,PostDays)
{
    var MonthNames=["January","February","March","April","May","June","July","August","September","October","November","December"];
    var NumberOfEntries=PostTitles.length;
    var currentMonth = "";
    var currentYear = "";

    for(var EntryNum = 0; EntryNum < NumberOfEntries; EntryNum++)
    {
        NameOfMonth = MonthNames[parseInt(PostMonths[EntryNum],10)-1]

        if (currentMonth != NameOfMonth || currentYear != PostYears[EntryNum]) 
        {
            currentMonth = NameOfMonth;
            currentYear = PostYears[EntryNum];

            document.write("<div class='dateStyle'><br />" + currentMonth+" "+currentYear+" </div>");
        }

        document.write('<a href ="'+PostURLs[EntryNum]+'"><div class=dayStyle>'+parseInt(PostDays[EntryNum],10)+":&nbsp;&nbsp;</div> "+PostTitles[EntryNum]+"</a><br />");
    }
}
</script>

<script src="https://mywebsite.com/feeds/posts/default?max-results=500&amp;alt=json-in-script&amp;callback=LoadTheArchive" />
</script>
<script src="https://mywebsite.com/feeds/posts/default?max-results=150&start-index=151&alt=json-in-script&callback=LoadTheArchive"></script>
<script src="https://mywebsite.com/feeds/posts/default?max-results=150&start-index=301&alt=json-in-script&callback=LoadTheArchive"></script>
<script src="https://mywebsite.com/feeds/posts/default?max-results=150&start-index=451&alt=json-in-script&callback=LoadTheArchive"></script>
<script src="https://mywebsite.com/feeds/posts/default?max-results=150&start-index=601&alt=json-in-script&callback=LoadTheArchive"></script>
<script src="https://mywebsite.com/feeds/posts/default?max-results=150&start-index=851&alt=json-in-script&callback=LoadTheArchive"></script>
<script src="https://mywebsite.com/feeds/posts/default?max-results=150&start-index=1001&alt=json-in-script&callback=LoadTheArchive"></script>

<!--CUSTOMIZATION-->
<style type="text/css">
.dateStyle {
     color:#000;
     font-size: 30px;
     font-family: Fjalla One;
     margin: 0;
}

.dayStyle {
     color:#000;
     font-family: Droid Sans;
     display: inline-block;
}

</style>

现在表单说我的帖子好像主要是代码,我需要添加更多细节,但我不知道要添加什么,因为所有我需要的东西,我都在上面问过.

And now the form says that it looks like my post is mostly code, a I need to add some more details, but I don't know what to add more, because all what I needed, I was asked above.

推荐答案

把脚本标签改成以下怎么样

What about changing script tags to the following

<script src="/feeds/posts/default?max-results=500&amp;alt=json-in-script&amp;callback=LoadTheArchive"/>
<script src="/feeds/posts/default?max-results=150&start-index=151&alt=json-in-script&callback=LoadTheArchive"/>
<script src="/feeds/posts/default?max-results=150&start-index=301&alt=json-in-script&callback=LoadTheArchive"/>
<script src="/feeds/posts/default?max-results=150&start-index=451&alt=json-in-script&callback=LoadTheArchive"/>
<script src="/feeds/posts/default?max-results=150&start-index=601&alt=json-in-script&callback=LoadTheArchive"/>
<script src="/feeds/posts/default?max-results=150&start-index=851&alt=json-in-script&callback=LoadTheArchive"/>
<script src="/feeds/posts/default?max-results=150&start-index=1001&alt=json-in-script&callback=LoadTheArchive"/>

这篇关于Blogger 从 http 到 https(SSL 问题)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆