Elgg  Version 1.9
tools.php
Go to the documentation of this file.
1 <?php
11 // Description of what's going on
12 echo elgg_view('output/longtext', array(
13  'value' => elgg_echo("usersettings:plugins:description"),
14  'class' => 'user-settings mtn mbm',
15 ));
16 
17 // Get the installed plugins
18 $installed_plugins = $vars['installed_plugins'];
20 
21 
22 // Display all plugins' usersettings forms
23 foreach ($installed_plugins as $plugin) {
24  $plugin_id = $plugin->getID();
25  if ($plugin->isActive()) {
26  if (elgg_view_exists("usersettings/$plugin_id/edit")
27  || elgg_view_exists("plugins/$plugin_id/usersettings")) {
28 
29  $title = $plugin->getManifest()->getName();
30  $body = elgg_view_form('plugins/usersettings/save', array(), array('entity' => $plugin));
32  }
33  }
34 }
$plugin
elgg_view_module($type, $title, $body, array $vars=array())
Wrapper function for the module display pattern.
Definition: views.php:1197
elgg_view_exists($view, $viewtype= '', $recurse=true)
Returns whether the specified view exists.
Definition: views.php:318
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
$body
Definition: tools.php:27
if((!elgg_get_page_owner_entity())||(!elgg_get_page_owner_entity() ->canEdit())) $title
Definition: tools.php:18
$plugin_id
Definition: save.php:16
elgg echo
Translates a string.
Definition: languages.js:43
elgg_view($view, $vars=array(), $bypass=false, $ignored=false, $viewtype= '')
Return a parsed view.
Definition: views.php:354
$count
Definition: tools.php:19
$installed_plugins
Definition: tools.php:18
elgg_view_form($action, $form_vars=array(), $body_vars=array())
Definition: views.php:1280
if(file_exists($welcome)) $vars
Definition: upgrade.php:93