Hello,
We are trying to set custom CSS to adjust the social login buttons.
In the oneall documentation, the line bolded below is what you say we are supposed to use to overwrite your CSS, but it doesn't seem to be working.
var _oneall = _oneall || [];
_oneall.push(['social_login', 'set_callback_uri', '<%= GetBaseUrl() %>/PubScripts/SocialLogin.aspx?callback=<%= Request.RawUrl %>']);
_oneall.push(['social_login', 'set_providers', ['facebook', 'twitter', 'google']]);
_oneall.push(['social_login', 'set_grid_sizes', [1, ]]);
_oneall.push(['social_login', 'do_render_ui', 'oa_social_login']);
_oneall.push(['social_login', 'set_custom_css_uri', 'http://web30.remax.it/common/css/tmp/styles.min.css']); $('#btnFacebook').click(function () {
$('#button_facebook').click();
});
Can you please provide feedback?
Answers
set_custom_css_uri must be called before do_render_ui.
Once it has been rendered, no changes are possible anymore
Regards,
But plugin don't load style from my server - I don't see it in iframe's header. When I use default URI(from the FAQ) I can see that URI in the header. Where should I put my css-file and where should I put the piece of code from instruction(I did it at the top of user-interface.php)?
you can directly add the link to your CSS stylesheet in the customisation settings of your site in your OneAll account.
There is also a hook that can be used so that you don't have to modify the plugin itself:
http://docs.oneall.com/plugins/guide/social-login-wordpress/#3h
Regards,
var _oneall = _oneall || [];
_oneall.push(['social_login', 'set_callback_uri', '/mycallbackuri']);
_oneall.push(['social_login', 'set_providers', ['facebook', 'twitter', 'google']]);
_oneall.push(['social_login', 'set_grid_sizes', [1, ]]);
_oneall.push(['social_login', 'set_custom_css_uri', 'http://mycustomurl.css']);
_oneall.push(['social_login', 'do_render_ui', 'oa_social_login']);
However if I try to add versioning to URL, it breaks the component where I have the code.
I would like to be able to add something like:
_oneall.push(['social_login', 'set_custom_css_uri', 'http://mycustomurl.css?ver=4.0.3']);
Any idea?
I have not been able to reproduce the error by adding
?ver=4.0.3
or other string to the custom css url. What exactly breaks if you add the parameter?