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

查看:90
本文介绍了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>

现在表单显示好像我的帖子主要是代码,a我需要添加更多详细信息,但是我不知道要添加什么,因为上面已经询问了我所需要的全部内容./p>

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天全站免登陆