简体   繁体   English

为Wordpress OneAll社交登录插件自定义iframe

[英]Customize an iframe for Wordpress OneAll Social Login Plugin

I just installed the OneAll Social Login Plugin for my Wordpress blog ( https://wordpress.org/plugins/oa-social-login/ ). 我刚刚为我的Wordpress博客( https://wordpress.org/plugins/oa-social-login/ )安装了OneAll社交登录插件。

This plugin allows user to login into my website using their social media account. 该插件允许用户使用其社交媒体帐户登录我的网站。 I picked Facebook, Twitter and Google for my website. 我选择了Facebook,Twitter和Google作为我的网站。

<div class="frame" id="social_login_frame">     
        <div id="content">
            <div id="providers" class="providers_unpaginated"><div class="providers_group" id="providers_group_1"><div class="providers_block"><div class="providers_row"><div class="provider" id="provider_facebook"><a class="button" id="button_facebook" href="#" rel="nofollow" title="Login with Facebook" alt="Login with Facebook"><span class="tick"></span></a><div class="name" id="name_facebook">Facebook</div></div><div class="provider" id="provider_google"><a class="button" id="button_google" href="#" rel="nofollow" title="Login with Google" alt="Login with Google"><span class="tick"></span></a><div class="name" id="name_google">Google</div></div><div class="provider" id="provider_twitter"><a class="button" id="button_twitter" href="#" rel="nofollow" title="Login with Twitter" alt="Login with Twitter"><span class="tick"></span></a><div class="name" id="name_twitter">Twitter</div></div></div></div></div></div>         
        </div>  
        <div class="clear"></div>           
        <div class="footer">            

                <div id="branding">
                    <a href="http://www.oneall.com/services/social-login/?utm_source=mywebsite_login_frame&amp;utm_medium=banner&amp;utm_campaign=branding" target="_blank">Powered&nbsp;by <span class="plugin_title">OneAll&nbsp;Social&nbsp;Login</span></a>
                </div>

            <div id="message"></div>
        </div>  
    </div>


.plugin {
margin: 0;
padding: 0 0 20px 0;
background-color: transparent;
font-size: 12px;
color: #333;
font-family: Helvetica, Tahoma, Arial, sans-serif;
}

.plugin #content {
overflow: hidden;
}

.plugin #providers {
float: left;
position: relative;
}

.plugin #providers .providers_group {
float: left;
}

.plugin #providers.providers_unpaginated .providers_group .providers_block {
padding: 0 !important;
}
.plugin #providers .providers_group .providers_block {
overflow: hidden;
clear: both;
padding: 0 20px;
}

plugin #providers .providers_group .providers_block .providers_row {
clear: both;
}
.plugin #providers .providers_group .providers_block {
overflow: hidden;
clear: both;
padding: 0 20px;
}

.plugin #providers .provider {
width: 35px;
}

.plugin #providers .provider {
float: left;
width: 62px;
text-align: center;
padding: 2px 2px 4px;
outline: 0;
}


.plugin #providers .provider #button_facebook {
background-position: -76px -1px;
}


.plugin #providers .provider .button {
width: 35px;
height: 35px;
background-image: url("/img/api/socialize/providers/logo/sprite_35_35.png");
cursor: pointer;
display: block;
margin: 0 auto;
position: relative;
z-index: 9998;
outline: 0;
}

Which looks like this: 看起来像这样:

社交登录

If I uncheck 如果我取消选中

background-image: url("/img/api/socialize/providers/logo/sprite_35_35.png"); 背景图片:url(“ / img / api / socialize / providers / logo / sprite_35_35.png”);

in my Chrome Developer Tools, all of the 3 social media icons disappear. 在我的Chrome开发者工具中,所有3个社交媒体图标都消失了。

My goal would be to be able to change these icons for custom 160x32 icons stacked one over eachother, remove Powered by OneAll Social Login and be able to customize with CSS Login With . 我的目标是要能够将这些图标更改为一个堆叠在一起的自定义160x32图标,删除Powered by OneAll社交登录,并能够使用CSS Login With进行自定义。

Is there any way I can attribute my own CSS class to elements inside an iframe? 有什么办法可以将我自己的CSS类归因于iframe中的元素?

Login to https://app.oneall.com/signin 登录到https://app.oneall.com/signin

Go to implementation tab and then select social login wizard. 转到实施选项卡,然后选择社交登录向导。 在此处输入图片说明 Select "use custom theme" from the "Select your theme:" dropdown 从“选择主题:”下拉列表中选择“使用自定义主题” 在此处输入图片说明

Upload your css file on your own domain and give a path in the custom css field and then you can add your own social icons styles. 将您的CSS文件上传到您自己的域中,并在自定义CSS字段中提供路径,然后您可以添加自己的社交图标样式。 在此处输入图片说明

Hope the answer helps. 希望答案有所帮助。

PHP code If you are using shortcode into theme PHP代码(如果在主题中使用简码)

<div class="hide-pby">
     <?php echo do_shortcode("[oa_social_login]"); ?>
</div> 

Else If you using on any plugin or others 否则,如果您在任何插件或其他上使用

<div class="hide-pby">
    <?php echo do_action('oa_social_login'); ?>
</div>

CSS 的CSS

.hide-pby {
    position: relative;
}
.hide-pby::before {
    position: absolute;
    width: 200px;
    height: 25px;
    content: "";
    left: 0;
    bottom: 0;
    background-color: #f3f4f6;
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM