Browse Source

Add more social networks

pull/255/head
Bob Mottram 9 years ago
parent
commit
48011988d1
6 changed files with 22 additions and 1 deletions
  1. +3
    -0
      config/config.ini.example
  2. +15
    -0
      system/includes/functions.php
  3. +4
    -1
      themes/blog/layout.html.php
  4. BIN
      themes/default/img/diaspora.png
  5. BIN
      themes/default/img/gnusocial.png
  6. BIN
      themes/default/img/hubzilla.png

+ 3
- 0
config/config.ini.example View File

@ -24,6 +24,9 @@ social.twitter = "https://twitter.com"
social.facebook = "https://www.facebook.com"
social.google = "https://plus.google.com"
social.tumblr = "http://www.tumblr.com"
social.hubzilla = ""
social.gnusocial = ""
social.diaspora = ""
; Custom menu link.
; See example below:


+ 15
- 0
system/includes/functions.php View File

@ -1814,6 +1814,9 @@ function social($imgDir = null)
$google = config('social.google');
$tumblr = config('social.tumblr');
$rss = site_url() . 'feed/rss';
$hubzilla = config('social.hubzilla');
$gnusocial = config('social.gnusocial');
$diaspora = config('social.diaspora');
if ($imgDir === null) {
$imgDir = "default/img/";
@ -1835,6 +1838,18 @@ function social($imgDir = null)
echo '<a href="' . $tumblr . '" target="_blank"><img src="' . site_url() . 'themes/' . $imgDir . 'tumblr.png" width="32" height="32" alt="Tumblr"/></a>';
}
if (!empty($hubzilla)) {
echo '<a href="' . $hubzilla . '" target="_blank"><img src="' . site_url() . 'themes/' . $imgDir . 'hubzilla.png" width="32" height="32" alt="Hubzilla"/></a>';
}
if (!empty($gnusocial)) {
echo '<a href="' . $gnusocial . '" target="_blank"><img src="' . site_url() . 'themes/' . $imgDir . 'gnusocial.png" width="32" height="32" alt="GNU Social"/></a>';
}
if (!empty($diaspora)) {
echo '<a href="' . $diaspora . '" target="_blank"><img src="' . site_url() . 'themes/' . $imgDir . 'diaspora.png" width="32" height="32" alt="Diaspora"/></a>';
}
echo '<a href="' . $rss . '" target="_blank"><img src="' . site_url() . 'themes/' . $imgDir . 'rss.png" width="32" height="32" alt="RSS Feed"/></a>';
}


+ 4
- 1
themes/blog/layout.html.php View File

@ -54,6 +54,9 @@
<li><a href="<?php echo config('social.google');?>"><i class="fa fa-google-plus"></i></a></li>
<li><a href="<?php echo config('social.facebook');?>"><i class="fa fa-facebook"></i></a></li>
<li><a href="<?php echo config('social.tumblr');?>"><i class="fa fa-tumblr"></i></a></li>
<li><a href="<?php echo config('social.hubzilla');?>"><i class="fa fa-hubzilla"></i></a></li>
<li><a href="<?php echo config('social.gnusocial');?>"><i class="fa fa-gnusocial"></i></a></li>
<li><a href="<?php echo config('social.diaspora');?>"><i class="fa fa-diaspora"></i></a></li>
<li><a href="<?php echo site_url();?>feed/rss"><i class="fa fa-rss"></i></a></li>
</ul>
</div><!--//branding-->
@ -197,4 +200,4 @@
<script type="text/javascript" src="<?php echo site_url();?>themes/blog/js/bootstrap.min.js"></script>
<?php if (analytics()): ?><?php echo analytics() ?><?php endif; ?>
</body>
</html>
</html>

BIN
themes/default/img/diaspora.png View File

Before After
Width: 72  |  Height: 72  |  Size: 830 B

BIN
themes/default/img/gnusocial.png View File

Before After
Width: 72  |  Height: 72  |  Size: 6.2 KiB

BIN
themes/default/img/hubzilla.png View File

Before After
Width: 72  |  Height: 72  |  Size: 2.1 KiB

Loading…
Cancel
Save