WordPress开启ajax评论

崩天的勾玉 2021年7月15日10:50:37375 5797字

我用的是知更鸟主题,虽然自带ajax评论功能但是不好用,加载比较慢。于是我找到了这个插件Comments – wpDiscuz,后台搜索即可。

插件自动将本身的评论表单替换掉,不仅可以自定义多种样式,功能,还有很多好玩是玩法,当然我最喜欢的还是他的ajax评论功能,在设置里勾选替换掉WordPress原生ajax函数,就会启动插件自身的ajax功能,只要不和别的插件冲突,速度几乎是瞬间加载,比知更鸟自带的块很多了。

插件的设置项很繁杂,这里我将设置导出了,大家要用的话直接下载下来再在插件设置——工具——导入中将txt文件导入即可:将以下内容保存为wpdiscuz-options.txt,这是我的配置参数,配置好了大部分内容。你导入后再自己进一步修改也可以的

{"form":{"commentFormView":"expanded","enableDropAnimation":1,"richEditor":"desktop","boldButton":1,"italicButton":1,"underlineButton":1,"strikeButton":1,"olButton":1,"ulButton":1,"blockquoteButton":1,"codeblockButton":1,"linkButton":1,"sourcecodeButton":1,"spoilerButton":1,"enableQuickTags":0,"commenterNameMinLength":3,"commenterNameMaxLength":50,"storeCommenterData":-1},"recaptcha":{"siteKey":"","secretKey":"","theme":"light","lang":"","requestMethod":"auto","showForGuests":0,"showForUsers":0,"isShowOnSubscribeForm":0},"login":{"showLoggedInUsername":0,"showLoginLinkForGuests":0,"showActivityTab":0,"showSubscriptionsTab":0,"showFollowsTab":0,"enableProfileURLs":1,"websiteAsProfileUrl":1,"isUserByEmail":0,"loginUrl":""},"social":{"socialLoginAgreementCheckbox":0,"socialLoginInSecondaryForm":0,"displayIconOnAvatar":0,"enableFbLogin":0,"enableFbShare":0,"fbAppID":"","fbAppSecret":"","fbUseOAuth2":0,"enableTwitterLogin":0,"enableTwitterShare":0,"twitterAppID":"","twitterAppSecret":"","enableGoogleLogin":0,"googleClientID":"","googleClientSecret":"","enableDisqusLogin":0,"disqusPublicKey":"","disqusSecretKey":"","enableWordpressLogin":0,"wordpressClientID":"","wordpressClientSecret":"","enableInstagramLogin":0,"instagramAppID":"","instagramAppSecret":"","enableLinkedinLogin":0,"linkedinClientID":"","linkedinClientSecret":"","enableWhatsappShare":0,"enableYandexLogin":0,"yandexID":"","yandexPassword":"","enableMailruLogin":0,"mailruClientID":"","mailruClientSecret":"","enableWeiboLogin":0,"weiboKey":"","weiboSecret":"","enableWechatLogin":0,"wechatAppID":"","wechatSecret":"","enableQQLogin":0,"qqAppID":"","qqSecret":"","enableBaiduLogin":0,"baiduAppID":"","baiduSecret":"","enableVkLogin":0,"enableVkShare":1,"vkAppID":"","vkAppSecret":"","enableOkLogin":0,"enableOkShare":1,"okAppID":"","okAppKey":"","okAppSecret":""},"rating":{"enablePostRatingSchema":0,"displayRatingOnPost":["after"],"ratingCssOnNoneSingular":0,"ratingHoverColor":"#FFED85","ratingInactiveColor":"#DDDDDD","ratingActiveColor":"#FFD700"},"thread_display":{"firstLoadWithAjax":1,"commentListLoadType":3,"isLoadOnlyParentComments":0,"showReactedFilterButton":0,"showHottestFilterButton":0,"showSortingButtons":0,"mostVotedByDefault":0,"reverseChildren":0,"highlightUnreadComments":0,"scrollToComment":1,"orderCommentsBy":"comment_ID"},"thread_layouts":{"showCommentLink":0,"showCommentDate":1,"showVotingButtons":1,"votingButtonsIcon":"fa-thumbs-up|fa-thumbs-down","votingButtonsStyle":0,"enableDislikeButton":1,"isGuestCanVote":1,"highlightVotingButtons":1,"showAvatars":1,"defaultAvatarUrlForUser":"","defaultAvatarUrlForGuest":"","changeAvatarsEverywhere":1},"thread_styles":{"theme":"wpd-default","primaryColor":"#00B38F","newLoadedCommentBGColor":"#FFFAD6","primaryButtonColor":"#FFFFFF","primaryButtonBG":"#07B290","bubbleColors":"#1DB99A","inlineFeedbackColors":"#1DB99A","defaultCommentAreaBG":"","defaultCommentTextColor":"#777777","defaultCommentFieldsBG":"","defaultCommentFieldsBorderColor":"#DDDDDD","defaultCommentFieldsTextColor":"#777777","defaultCommentFieldsPlaceholderColor":"","darkCommentAreaBG":"#111111","darkCommentTextColor":"#CCCCCC","darkCommentFieldsBG":"#999999","darkCommentFieldsBorderColor":"#D1D1D1","darkCommentFieldsTextColor":"#000000","darkCommentFieldsPlaceholderColor":"#DDDDDD","commentTextSize":"14px","enableFontAwesome":1,"customCss":".comments-area{width:auto;}"},"subscription":{"enableUserMentioning":0,"sendMailToMentionedUsers":1,"isNotifyOnCommentApprove":1,"enableMemberConfirm":1,"enableGuestsConfirm":1,"subscriptionType":3,"showReplyCheckbox":1,"isReplyDefaultChecked":0,"usePostmaticForCommentNotification":0,"isFollowActive":1,"disableFollowConfirmForUsers":1},"labels":{"blogRoleLabels":{"administrator":"1","editor":"1","author":"1","contributor":"1","subscriber":"1","post_author":"1","guest":"1"},"blogRoles":{"administrator":"#1e73be","editor":"#1e73be","author":"#1e73be","contributor":"#00B38F","subscriber":"#00B38F","post_author":"#dd3333","guest":"#00B38F"}},"moderation":{"commentEditableTime":"0","enableEditingWhenHaveReplies":0,"displayEditingInfo":1,"enableStickButton":1,"enableCloseButton":1,"restrictCommentingPerUser":"blog","commentRestrictionType":"both","userCommentsLimit":99},"content":{"commentTextMinLength":1,"replyTextMinLength":1,"commentTextMaxLength":99,"replyTextMaxLength":99,"enableImageConversion":0,"enableShortcodes":0,"commentReadMoreLimit":0,"wmuIsEnabled":0,"wmuIsGuestAllowed":0,"wmuIsLightbox":0,"wmuMimeTypes":{"jpg":"image\/jpeg","jpeg":"image\/jpeg","jpe":"image\/jpeg","gif":"image\/gif","png":"image\/png","bmp":"image\/bmp","tiff":"image\/tiff","tif":"image\/tiff","ico":"image\/x-icon"},"wmuMaxFileSize":"2","wmuIsShowFilesDashboard":0,"wmuSingleImageWidth":"auto","wmuSingleImageHeight":200,"wmuImageSizes":["medium_large"]},"live":{"enableBubble":1,"bubbleLiveUpdate":0,"bubbleLocation":"content_left","bubbleShowNewCommentMessage":1,"bubbleHintTimeout":10,"bubbleHintHideTimeout":10,"commentListUpdateType":0,"liveUpdateGuests":0,"commentListUpdateTimer":30},"inline":{"showInlineFilterButton":1,"inlineFeedbackAttractionType":"blink"},"general":{"isEnableOnHome":0,"isNativeAjaxEnabled":0,"loadComboVersion":1,"loadMinVersion":1,"commentLinkFilter":1,"redirectPage":0,"simpleCommentDate":0,"dateDiffFormat":"[number] [time_unit] [adjective]","isUsePoMo":0,"showPluginPoweredByLink":0,"isGravatarCacheEnabled":0,"gravatarCacheMethod":"cronjob","gravatarCacheTimeout":10}}

您可能感兴趣的文章

继续阅读
版权:文章来自凡蜕博客,转载请带上地址。微信公众号: 『崩天的勾玉』
匿名

发表评论

匿名网友

    • demo
      demo

      测试