Skip to content

Commit

Permalink
1.2 - add option for 'follow us' links
Browse files Browse the repository at this point in the history
  • Loading branch information
ura soul committed May 6, 2014
1 parent 3173fc8 commit ead269c
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions languages/en.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@
'interconnected:admin:max-meta-keywords' => "the maximum amount of keywords to display on any page (enter an integer that is greater than or equal to 0)",
'interconnected:admin:max-meta-description' => "the maximum amount of characters to be used in the metatag description for each page (enter an integer that is greater than or equal to 0 - 160 is recommended)",
'interconnected:admin:button_size' => "the size of the sharing buttons to be displayed.",
'interconnected:admin:footer_follow' => "display a set of 'follow us' links above the footer of every page?",
'interconnected:admin:option:small' => "small - icons only",
'interconnected:admin:option:large' => "large - icons + text",

Expand Down
2 changes: 2 additions & 0 deletions start.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ function interconnected_init() {
elgg_extend_view('profile/details','interconnected/profile',500);
elgg_extend_view('widgets/set_description/content', 'interconnected/simple', 500);
}
if (elgg_get_plugin_setting('footer_follow', 'interconnected') == TRUE)
elgg_extend_view('page/elements/footer', 'interconnected/followus', 0);

if (elgg_is_active_plugin('profile_manager'))
elgg_extend_view('profile/owner_block', 'interconnected/social-shortcuts',500);
Expand Down
16 changes: 16 additions & 0 deletions views/default/plugins/interconnected/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@
elgg_set_plugin_setting('button_size',$button_size);
}

$footer_follow = elgg_get_plugin_setting('footer_follow', 'interconnected');
if (!$footer_follow) {
$button_size = false;
elgg_set_plugin_setting('footer_follow',$footer_follow);
}

echo "<h4>";
echo elgg_echo('interconnected:admin:title:social');
echo "</h4><br/>";
Expand Down Expand Up @@ -138,6 +144,16 @@
echo "<br />";
echo elgg_view('input/text', array('name'=>'params[max_meta_description]', 'value'=>$max_meta_description));
echo "<br /><br />";

echo '<label>' . elgg_echo('interconnected:admin:footer_follow') . ':' . '</label>';
echo "<br />";
echo elgg_view('input/dropdown', array(
'name' => 'params[footer_follow]',
'value' => $footer_follow,
'options_values' => array(
false => elgg_echo('option:no'),
true => elgg_echo('option:yes'))));
echo "<br /><br/>";

echo '<label>' . elgg_echo('interconnected:admin:button_size') . ':' . '</label>';
echo "<br />";
Expand Down

0 comments on commit ead269c

Please sign in to comment.