Code Monkey home page Code Monkey logo

language-bar-flags's People

Contributors

andrzejpiotrowski avatar meloniq avatar

Stargazers

 avatar

Watchers

 avatar

language-bar-flags's Issues

Add action hooks to the bar

Add action hooks to the bar, before and after outputing flags

Hello,
Is there a way for me to add more options like login for sample to that bar?
since I took away the main wp bar and replaced it for this one it will nice if I can > add more options there as well.

Options for me to add there next to the flags

  1. Social Network pages
    a. Facebook
    b. Twitters
    c. Google+
  2. LOG IN

Please take a look at the image I did for reference of what I will like to accomplish using your awesome plugin.
http://i1145.photobucket.com/albums/o520/ASolis11/TOP-BAR_zps5c791729.png

Add option to auto-hide bar on page scroll

Suggested by Halil Yildirim:

Is it possible to let the bar disappear when I scroll down? and when I scroll up it should come back.

Potential solution:

$(window).scroll( function() {
	if ( $(document).scrollTop() > 200 ) {
		$('#langbf_bar').hide();
	} else {
		$('#langbf_bar').show();
	}
} );

Add option to display bar in the bottom of page

Add option to display bar in the bottom of page

Reply to customer request:

In CSS You need to change parameter for "#langbf_bar" from "top:0" to "bottom:0"
in "langbf_load_css()" function control "margin-bottom" instead of "margin-top"
in "langbf_load_js()" function change parameter from 'bottom center" to "top center"
and rotate "black_arrow_bottom.png" image
Code attached below

/**
 * Print css in footer
 */
function langbf_load_css() {
  if(get_option('langbf_active') == 'yes') {
        if( is_admin_bar_showing() ) {
            $margin_top = 26;
            $margin_bottom = 26;
            $top = 0;
            $bottom = 0;
        } else {
            $margin_top = 0;
            $margin_bottom = 26;
            $top = 0;
            $bottom = 0;
        }
?>
<style type="text/css">
html {
    margin-top: <?php echo $margin_top ?>px !important;
    margin-bottom: <?php echo $margin_bottom ?>px !important;
}
* html body { 
    margin-top: <?php echo $margin_top ?>px !important;
    margin-bottom: <?php echo $margin_bottom ?>px !important;
}
#langbf_bar {
    bottom: <?php echo $bottom ?>px !important;
}
</style>
<?php
    }
}
add_action('wp_footer', 'langbf_load_css');         

/**
 * Print css in footer
 */
function langbf_load_js() {
  if(get_option('langbf_active') == 'yes') {
?>
<script type="text/javascript">
// <![CDATA[
  jQuery(document).ready(function() {
    jQuery("#langbf_bar a[title]").tooltip({
      offset: [10, 0],
      position: 'top center',
      effect: 'slide'
});
  });
// ]]>
</script>
<?php
    }
}
add_action('wp_footer', 'langbf_load_js');          

Add flags into admin bar

Dario I.

Is it possible to add all Flags in the Admin Bar? Because i have Buddypress on the Site.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.