function social_bookmarking_toolbar($url, $title, $description = '') { $html = ''; $html .= '<!-- AddThis Button BEGIN -->'; $html .= '<div class="addthis_toolbox addthis_default_style addthis_32x32_style"'; $html .= ' addthis:url="' . html_escape($url) . '" addthis:title="' . html_escape($title) . '" addthis:description="' . html_escape($description) . '">'; $html .= '<h2>Social</h2>'; $services = social_bookmarking_get_services(); if ($services) { $serviceSettings = social_bookmarking_get_service_settings(); $booleanFilter = new Omeka_Filter_Boolean(); foreach ($serviceSettings as $serviceCode => $value) { if ($booleanFilter->filter($value) && array_key_exists($serviceCode, $services)) { $html .= '<a class="addthis_button_' . html_escape($serviceCode) . '"></a>'; } } } else { $html .= __('Sociale functies tijdelijk offline.'); } $html .= '<a class="addthis_button_compact"></a>'; //$html .= '<a class="addthis_counter addthis_bubble_style"></a>'; $html .= '</div>'; $html .= '<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js"></script>'; $html .= '<!-- AddThis Button END -->'; return $html; }
</p> </div> </div> <div class="field"> <div class="two columns alpha"> <p><?php echo __('Choose which social bookmarking services you would like to use on your site.'); ?> </p> </div> <div class="inputs five columns omega"> <ul class="details"> <?php $services = social_bookmarking_get_services(); $serviceSettings = social_bookmarking_get_service_settings(); foreach ($services as $serviceCode => $serviceInfo) { if (array_key_exists($serviceCode, $serviceSettings)) { $value = $serviceSettings[$serviceCode]; } else { $value = false; } ?> <li class="details"> <?php echo get_view()->formCheckbox($serviceCode, true, array('checked' => (bool) $value)); ?> <img src="<?php echo html_escape($serviceInfo['icon']); ?>