diff --git a/system/includes/functions.php b/system/includes/functions.php index faf7b47..73b8795 100644 --- a/system/includes/functions.php +++ b/system/includes/functions.php @@ -852,7 +852,7 @@ function base64_encode_image($filename = string, $filetype = string) { } // Social links -function social() { +function social($imgDir = null) { $twitter = config('social.twitter'); $facebook = config('social.facebook'); @@ -860,23 +860,27 @@ function social() { $tumblr = config('social.tumblr'); $rss = site_url() . 'feed/rss'; + if ($imgDir === null) { + $imgDir = "default/img/"; + } + if (!empty($twitter)) { - echo 'Twitter'; + echo 'Twitter'; } if (!empty($facebook)) { - echo 'Facebook'; + echo 'Facebook'; } if (!empty($google)) { - echo 'Google+'; + echo 'Google+'; } if (!empty($tumblr)) { - echo 'Tumblr'; + echo 'Tumblr'; } - echo 'RSS Feed'; + echo 'RSS Feed'; } // Copyright @@ -978,19 +982,26 @@ function publisher() { } // Google Analytics -function analytics() { +function analytics($analyticsDir = null) { $analytics = config('google.analytics.id'); + if($analyticsDir === null) + { + $analyticsDir = '//www.google-analytics.com/analytics.js'; + } + else + { + $analyticsDir = site_url() . 'themes/' . $analyticsDir . 'analytics.js'; + } $script = << - var _gaq = _gaq || []; - _gaq.push(['_setAccount', '{$analytics}']); - _gaq.push(['_trackPageview']); - (function() { - var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; - ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; - var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); - })(); - + EOF; if (!empty($analytics)) { return $script; @@ -1112,9 +1123,9 @@ function get_menu() {//aktive Link for Sub Pages ::TODO echo '
  • '; $subPages = get_static_sub_pages(str_replace('.md', '', $base)); - echo '' . ucwords($title) . '
    '; + echo '' . ucwords($title) . ''; if (!empty($subPages)) { - echo '