-
Notifications
You must be signed in to change notification settings - Fork 20
/
footer.php
121 lines (103 loc) · 4.48 KB
/
footer.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
</div> <!-- /container -->
<?php do_action( 'bp_after_container' ) ?>
<?php do_action( 'bp_before_footer' ) ?>
<?php do_action( 'bp_after_footer' ) ?>
<div class="topbar">
<div class="padder">
<?php wp_footer(); ?>
</div>
</div>
<?php do_action('cookie_bar'); ?>
<?php global $options;
foreach ($options as $value) {
if(array_key_exists('id', $value)) {
if (get_option( $value['id'] ) === FALSE) {
if (array_key_exists('std', $value)) {
$$value['id'] = $value['std'] or NULL;
}
} else {
$$value['id'] = get_option( $value['id'] );
}
}
}
if ( $okfn_mailinglist_bar_location == "footer" ) {
include('mailing-bar.php');
} ?>
<footer>
<div class="inner">
<div class="container">
<?php
$active_footers = 0;
if ( is_active_sidebar( 'first-footer-widget-area' ) ) $active_footers++;
if ( is_active_sidebar( 'second-footer-widget-area' ) ) $active_footers++;
if ( is_active_sidebar( 'third-footer-widget-area' ) ) $active_footers++;
//if ( is_active_sidebar( 'fourth-footer-widget-area' ) ) $active_footers++;
if ( $active_footers > 0) :
$footer_width = (940 - 20 * ($active_footers - 1)) / $active_footers;
?>
<style scoped>
#footer-widget-area > div {
width: <?php echo $footer_width; ?>px !important;
}
</style>
<div class="row">
<div id="footer-widgets">
<?php get_sidebar( 'footer' ) ?>
<div class="footer-buttons">
<?php if ( !empty( $okfn_twitter_username ) && $okfn_twitter_link == "true" && $okfn_twitter_location != "default" ) : ?>
<a class="twitter" href="https://twitter.com/<?php echo $okfn_twitter_username ?>">twitter</a>
<?php endif; ?>
<?php if ( !empty( $okfn_facebook_username ) && $okfn_facebook_link == "true" && $okfn_facebook_location != "default" ) : ?>
<a class="facebook" href="http://www.facebook.com/<?php echo $okfn_facebook_username ?>">facebook</a>
<?php endif; ?>
<?php if ( $okfn_flattr_okfn == "true" ) : ?>
<a href="http://flattr.com/thing/605365/Open-Knowledge-Foundation" target="_blank">
<img src="http://api.flattr.com/button/flattr-badge-large.png" alt="Flattr this" title="Flattr this" border="0" />
</a>
<?php endif; ?>
<?php if ($okfn_sharethis == "true" && $okfn_sharethis_location == "footer") : ?>
<span class='st_facebook' displayText='Facebook'></span>
<span class='st_twitter' displayText='Twitter'></span>
<?php endif; ?>
</div>
</div><!-- /footer-widgets -->
</div><!-- /row -->
<?php endif; ?>
<div id="row">
<?php do_action( 'bp_footer' ) ?>
</div>
</div><!-- /container -->
</div><!-- /inner -->
<?php do_action('okf_footer'); ?>
</footer>
<script src="//netdna.bootstrapcdn.com/twitter-bootstrap/2.1.1/js/bootstrap.min.js"></script>
<script type="text/javascript" src="<?php echo bloginfo('stylesheet_directory'); ?>/include/jquery.dotdotdot-1.5.6-packed.js"></script>
<script>
// Tweeter
$("div.tweeter.carousel > ul").addClass("carousel-inner");
$("div.tweeter.carousel > ul li").addClass("item");
$("div.tweeter.carousel > ul li:nth-child(1)").addClass("active");
// cycling for carousel
$(".carousel.ticker").carousel({ interval: 6000 });
$(".carousel.cycle").carousel({ interval: 8000 });
// allow button to hide elements
$(".hide-it").click(function () {
$(".hide-me").hide("slow");
});
// button for mailchimp form
$("div.nm_mc_form input.nm_mc_button").addClass("btn btn-primary");
</script>
<?php if (($okfn_header_search == "true") && ($okfn_subheader_search == "false")) : ?>
<script>
$("div.header-search a").click(function(){
$("div.header-search").toggleClass("active");
});
</script>
<?php endif; ?>
<!-- sharethis -->
<?php if ($okfn_sharethis == "true") : ?>
<script type="text/javascript" src="//w.sharethis.com/button/buttons.js"></script>
<script type="text/javascript">stLight.options({publisher: "<?php if ($okfn_sharethis_id) : echo $okfn_sharethis_id; else: ?>ur-c524706a-c88f-82a8-ea44-7140256786d3<?php endif; ?>"}); </script>
<?php endif; ?>
</body>
</html>