Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
peter-mw committed Apr 7, 2015
1 parent 660048a commit 769860e
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
2 changes: 1 addition & 1 deletion userfiles/modules/admin/modules/list.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@


} else {
$modules = mw()->modules->get('ui=1');
$modules = mw()->modules->get('installed=1&ui=1');

$sortout_el = array();
$sortout_mod = array();
Expand Down
11 changes: 10 additions & 1 deletion userfiles/modules/social_links/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@
$googleplus_enabled = get_option('googleplus_enabled', $params['id']) == 'y';
$pinterest_enabled = get_option('pinterest_enabled', $params['id']) == 'y';
$youtube_enabled = get_option('youtube_enabled', $params['id']) == 'y';
$linkedin_enabled = get_option('linkedin_enabled', $params['id']) == 'y';

$facebook_url = get_option('facebook_url', $params['id']);
$twitter_url = get_option('twitter_url', $params['id']);
$googleplus_url = get_option('googleplus_url', $params['id']);
$pinterest_url = get_option('pinterest_url', $params['id']);
$youtube_url = get_option('youtube_url', $params['id']);
$linkedin_url = get_option('linkedin_url', $params['id']);


?>
Expand Down Expand Up @@ -72,7 +74,7 @@
<td><label class="mw-ui-check">
<input type="checkbox" class="mw_option_field" name="googleplus_enabled" value="y" <?php if($googleplus_enabled) print 'checked="checked"'; ?>><span></span>
</label></td>
<td><label class="mw-ui-inline-label">plus.google.com/+</label><input type="text" class="mw_option_field mw-ui-field mw-ui-field-medium" name="googleplus_url" value="<?php print $googleplus_url; ?>" /></td>
<td><label class="mw-ui-inline-label">plus.google.com/</label><input type="text" class="mw_option_field mw-ui-field mw-ui-field-medium" name="googleplus_url" value="<?php print $googleplus_url; ?>" /></td>
</tr>

<tr>
Expand All @@ -90,6 +92,13 @@
</label></td>
<td><label class="mw-ui-inline-label">youtube.com/</label><input type="text" class="mw_option_field mw-ui-field mw-ui-field-medium" name="youtube_url" value="<?php print $youtube_url; ?>" /></td>
</tr>
<tr>
<td><span class="mw-icon-social-linkedin"></span></td>
<td><label class="mw-ui-check">
<input type="checkbox" class="mw_option_field" name="linkedin_enabled" value="y" <?php if($linkedin_enabled) print 'checked="checked"'; ?>><span></span>
</label></td>
<td><label class="mw-ui-inline-label">linkedin.com/</label><input type="text" class="mw_option_field mw-ui-field mw-ui-field-medium" name="linkedin_url" value="<?php print $linkedin_url; ?>" /></td>
</tr>
</tbody>
</table>

Expand Down
10 changes: 9 additions & 1 deletion userfiles/modules/social_links/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,18 @@
$googleplus_enabled = get_option('googleplus_enabled', $params['id']) == 'y';
$pinterest_enabled = get_option('pinterest_enabled', $params['id']) == 'y';
$youtube_enabled = get_option('youtube_enabled', $params['id']) == 'y';
$linkedin_enabled = get_option('linkedin_enabled', $params['id']) == 'y';

$facebook_url = get_option('facebook_url', $params['id']);
$twitter_url = get_option('twitter_url', $params['id']);
$googleplus_url = get_option('googleplus_url', $params['id']);
$pinterest_url = get_option('pinterest_url', $params['id']);
$youtube_url = get_option('youtube_url', $params['id']);
$linkedin_url = get_option('linkedin_url', $params['id']);

$social_links_has_enabled = false;

if($facebook_enabled or $twitter_enabled or $googleplus_enabled or $pinterest_enabled or $youtube_enabled){
if($facebook_enabled or $twitter_enabled or $googleplus_enabled or $pinterest_enabled or $youtube_enabled or $linkedin_enabled){
$social_links_has_enabled = true;
}

Expand Down Expand Up @@ -60,6 +62,12 @@

<?php } ?>

<?php if($linkedin_enabled){ ?>

<a href="//youtube.com/<?php print $linkedin_url; ?>" target="_blank"><span class="mw-icon-social-linkedin"></span></a>

<?php } ?>




Expand Down

0 comments on commit 769860e

Please sign in to comment.