/** * Push the blog post to the configured site */ function blog2groups_push_post($event, $object_type, $object) { // work around Elgg bug with subtype $id = get_subtype_id('object', 'blog'); if ($object->subtype !== 'blog' && $object->subtype !== $id) { return; } if ($object->access_id == ACCESS_PRIVATE) { return; } $url = get_plugin_setting('url', 'blog2groups'); if (!$url) { return; } // work around a Elgg bug with encoding parameters $url = str_replace('&', '&', $url); $body = $object->summary . "\n\n" . $object->description; $params = array('username' => $object->getOwnerEntity()->username, 'title' => $object->title, 'body' => $body); $post_data = http_build_query($params); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $json = curl_exec($ch); curl_close($ch); $result = json_decode($json); if ($result->status != 0) { error_log("Failed to send blog post: {$result->message}"); } }
/** * This function loads a set of default fields into the profile, then triggers a hook letting other plugins to edit * add and delete fields. * * Note: This is a secondary system:init call and is run at a super low priority to guarantee that it is called after all * other plugins have initialised. */ function profile_fields_setup() { global $CONFIG; $profile_defaults = array('description' => 'longtext', 'briefdescription' => 'text', 'location' => 'tags', 'interests' => 'tags', 'skills' => 'tags', 'contactemail' => 'email', 'phone' => 'text', 'mobile' => 'text', 'website' => 'url'); // TODO: Have an admin interface for this $n = 0; $loaded_defaults = array(); while ($translation = get_plugin_setting("admin_defined_profile_{$n}", 'profile')) { // Add a translation add_translation(get_current_language(), array("profile:admin_defined_profile_{$n}" => $translation)); // Detect type $type = get_plugin_setting("admin_defined_profile_type_{$n}", 'profile'); if (!$type) { $type = 'text'; } // Set array $loaded_defaults["admin_defined_profile_{$n}"] = $type; $n++; } if (count($loaded_defaults)) { $CONFIG->profile_using_custom = true; $profile_defaults = $loaded_defaults; } $CONFIG->profile = trigger_plugin_hook('profile:fields', 'profile', NULL, $profile_defaults); }
function get_gateway_variables() { /* $user = get_loggedin_user()->name ; $domain = $vars['entity']->cclite_payment_domain ; $protocol = $vars['entity']->cclite_transfer_protocol ; $apikey = $vars['entity']->cclite_api_key; $hashing = $vars['entity']->cclite_hashing_algorithm; $registry = $vars['entity']->cclite_registry; $limit = $vars['entity']->cclite_api_transaction_display_limit ; */ $user = get_loggedin_user()->name; $domain = get_plugin_setting('cclite_payment_domain', 'cclite'); $protocol = get_plugin_setting('cclite_protocol', 'cclite'); $apikey = get_plugin_setting('cclite_api_key', 'cclite'); $hashing = get_plugin_setting('cclite_hashing_algorithm', 'cclite'); $registry = get_plugin_setting('cclite_registry', 'cclite'); $limit = get_plugin_setting('cclite_api_transaction_display_limit', 'cclite'); $values = array('user' => $user, 'limit' => $limit, 'domain' => $domain, 'protocol' => $protocol, 'apikey' => $apikey, 'hashing' => $hashing, 'registry' => $registry, 'verbose' => 0); /* $str = "getting variables " . $_SERVER['SERVER_ADDR'] . "<br/>" . "user is " . $user . "<br/>" . "registry is " . $registry ; echo $str ; */ return $values; }
/** * Validates the user through uncaptcha. * * @param $event * @param $object_type * @param $object * @return unknown_type */ function uncaptcha_validate_user($event, $object_type, $object) { global $CONFIG; if (get_plugin_setting('instant_validate', 'uncaptcha')) { $validated = set_user_validation_status($object->guid, true, 'uncaptcha'); } }
/** * Start the site pages plugin. */ function sitepages_init() { require_once dirname(__FILE__) . '/sitepages_functions.php'; global $CONFIG; // register our subtype run_function_once('sitepages_runonce'); // Register a page handler, so we can have nice URLs register_page_handler('sitepages', 'sitepages_page_handler'); // Register a URL handler for external pages register_entity_url_handler('sitepages_url', 'object', 'sitepages'); elgg_extend_view('footer/links', 'sitepages/footer_menu'); elgg_extend_view('metatags', 'sitepages/metatags'); // Replace the default index page if user has requested if (get_plugin_setting('ownfrontpage', 'sitepages') == 'yes') { register_plugin_hook('index', 'system', 'sitepages_custom_index'); } // parse views for keywords register_plugin_hook('display', 'view', 'sitepages_parse_view'); // register the views we want to parse for the keyword replacement // right now this is just the custom front page, but we can // expand it to the other pages later. $CONFIG->sitepages_parse_views = array('sitepages/custom_frontpage'); // an example of how to register and respond to the get_keywords trigger register_plugin_hook('get_keywords', 'sitepages', 'sitepages_keyword_hook'); // grab the list of keywords and their views from plugins if ($keywords = trigger_plugin_hook('get_keywords', 'sitepages', NULL, array())) { $CONFIG->sitepages_keywords = $keywords; } register_action("sitepages/add", FALSE, $CONFIG->pluginspath . "sitepages/actions/add.php"); register_action("sitepages/addfront", FALSE, $CONFIG->pluginspath . "sitepages/actions/addfront.php"); register_action("sitepages/addmeta", FALSE, $CONFIG->pluginspath . "sitepages/actions/addmeta.php"); register_action("sitepages/edit", FALSE, $CONFIG->pluginspath . "sitepages/actions/edit.php"); register_action("sitepages/delete", FALSE, $CONFIG->pluginspath . "sitepages/actions/delete.php"); }
/** * Cron job * */ function garbagecollector_cron($hook, $entity_type, $returnvalue, $params) { global $CONFIG; echo elgg_echo('garbagecollector'); // Garbage collect metastrings echo elgg_echo('garbagecollector:gc:metastrings'); if (delete_orphaned_metastrings() !== false) { echo elgg_echo('garbagecollector:ok'); } else { echo elgg_echo('garbagecollector:error'); } echo "\n"; // Now, because we are nice, trigger a plugin hook to let other plugins do some GC $rv = true; $period = get_plugin_setting('period', 'garbagecollector'); trigger_plugin_hook('gc', 'system', array('period' => $period)); // Now we optimize all tables $tables = get_db_tables(); foreach ($tables as $table) { echo sprintf(elgg_echo('garbagecollector:optimize'), $table); if (optimize_table($table) !== false) { echo elgg_echo('garbagecollector:ok'); } else { echo elgg_echo('garbagecollector:error'); } echo "\n"; } echo elgg_echo('garbagecollector:done'); }
/** * Check if the can comment setting is active * * @return bool */ function questions_can_comment() { if (get_plugin_setting('cancomment', 'questions') == "no") { return false; } return true; }
function westorElggMan_get_plugin_setting($name, $plugin_id = "") { if (function_exists("elgg_get_plugin_setting")) { return elgg_get_plugin_setting($name, $plugin_id); } else { return get_plugin_setting($name, $plugin_id); } }
function set_user_redirect() { global $CONFIG; $username = get_loggedin_user()->username; $custom = get_plugin_setting("custom_redirect", "first_login_redirector"); if (!empty($custom)) { $custom = str_replace("[wwwroot]", $CONFIG->wwwroot, $custom); $custom = str_replace("[username]", $username, $custom); $_SESSION['last_forward_from'] = $custom; } }
function groups_from_members_init() { global $CONFIG; add_group_tool_option('members_invite', elgg_echo('groupsfrommembers:members-invite'), false); if (get_plugin_setting('maxusers') == 0) { set_plugin_setting('maxusers', 20); } register_plugin_hook('permissions_check', 'group', 'groups_from_members_member_can_invite'); register_elgg_event_handler('pagesetup', 'system', 'groups_from_members_submenus'); register_plugin_hook('action', 'groups/invite', 'groups_from_members_member_invited_action'); register_action('groupsfrommembers/search', false, $CONFIG->pluginspath . 'groupsfrommembers/actions/search.php'); }
function friends_of_friends_init() { global $CONFIG; // Register a page handler, so we can have nice URLs register_page_handler('friendsoffriends', 'friends_of_friends_page_handler'); // Extend CSS extend_view('css', 'friends_of_friends/css'); //Read Settings $CONFIG->mod->friends_of_friends->config->hidefriendsof = get_plugin_setting('hidefriendsof', 'friends_of_friends'); register_action("friends_of_friends/get_text", false, $CONFIG->pluginspath . "friends_of_friends/actions/get_text.php", true); register_action("friends_of_friends/translate", false, $CONFIG->pluginspath . "friends_of_friends/actions/translate.php", true); }
function cclite_get_access_token($oauth_verifier = NULL) { global $SESSION; $consumer_key = get_plugin_setting('consumer_key', 'cclite'); $consumer_secret = get_plugin_setting('consumer_secret', 'cclite'); // retrieve stored tokens $oauth_token = $SESSION['cclite']['oauth_token']; $oauth_token_secret = $SESSION['cclite']['oauth_token_secret']; $SESSION->offsetUnset('cclite'); // fetch an access token $api = new ccliteOAuth($consumer_key, $consumer_secret, $oauth_token, $oauth_token_secret); return $api->getAccessToken($oauth_verifier); }
function perform_redirect() { global $CONFIG; $username = get_loggedin_user()->username; $custom = get_plugin_setting("custom_redirect", "new_profile_redirector"); if (!get_loggedin_user()->profile_updated && !empty($custom)) { $custom = str_replace("[wwwroot]", $CONFIG->wwwroot, $custom); $custom = str_replace("[username]", $username, $custom); get_loggedin_user()->profile_updated = 1; trigger_elgg_event('firstprofileupdate', 'user', $user); forward($custom); } }
/** * Elgg river dashboard plugin */ function riverdashboard_init() { global $CONFIG; // Register and optionally replace the dashboard if (get_plugin_setting('useasdashboard', 'riverdashboard') == 'yes') { register_page_handler('dashboard', 'riverdashboard_page_handler'); } else { // Activity main menu add_menu(elgg_echo('activity'), $CONFIG->wwwroot . "mod/riverdashboard/"); } // Page handler register_page_handler('riverdashboard', 'riverdashboard_page_handler'); elgg_extend_view('css', 'riverdashboard/css'); }
function get_gateway_variables() { $user = get_loggedin_user()->name; // hack for the moment $domain = get_plugin_setting('cclite_payment_domain', 'cclite'); $protocol = get_plugin_setting('cclite_protocol', 'cclite'); $apikey = get_plugin_setting('cclite_api_key', 'cclite'); $hashing = get_plugin_setting('cclite_hashing_algorithm', 'cclite'); $registry = get_plugin_setting('cclite_registry', 'cclite'); $values = array('user' => $user, 'domain' => $domain, 'protocol' => $protocol, 'apikey' => $apikey, 'hashing' => $hashing, 'registry' => $registry); /* $str = "getting variables " . $_SERVER['SERVER_ADDR'] . "<br/>" . "user is " . $user . "<br/>" . "registry is " . $registry ; echo $str ; */ return $values; }
/** * Elgg river dashboard plugin * * @package ElggRiverDash * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 * @author Curverider Ltd <*****@*****.**> * @copyright Curverider Ltd 2008-2010 * @link http://elgg.org/ */ function riverdashboard_init() { global $CONFIG; // Register and optionally replace the dashboard if (get_plugin_setting('useasdashboard', 'riverdashboard') == 'yes') { register_page_handler('dashboard', 'riverdashboard_page_handler'); } else { // Activity main menu if (isloggedin()) { add_menu(elgg_echo('activity'), $CONFIG->wwwroot . "mod/riverdashboard/"); } } // Page handler register_page_handler('riverdashboard', 'riverdashboard_page_handler'); elgg_extend_view('css', 'riverdashboard/css'); add_widget_type('river_widget', elgg_echo('river:widget:title'), elgg_echo('river:widget:description')); }
/** * Launcher executes functionality on plugin init * * Launcher is responsible for querying the settings and running anything * that is demanded to run initially. */ public static function launcher() { $displayerrors = get_plugin_setting('displayerrors', 'elgg_developer_tools'); if ($displayerrors) { ini_set('display_errors', 1); } $errorlog = get_plugin_setting('errorlog', 'elgg_developer_tools'); if ($errorlog) { ini_set('error_log', datalist_get('dataroot') . "debug.log"); } $exceptionhandler = get_plugin_setting('exceptionhandler', 'elgg_developer_tools'); if ($exceptionhandler) { restore_exception_handler(); } $errorhandler = get_plugin_setting('errorhandler', 'elgg_developer_tools'); if ($errorhandler) { restore_error_handler(); } /** include firePHP if need be **/ $firephp = get_plugin_setting('enablefirephp', 'elgg_developer_tools'); if ($firephp) { require_once dirname(__FILE__) . '/firephp/FirePHP.class.php'; require_once dirname(__FILE__) . '/firephp/fb.php'; } else { require_once dirname(__FILE__) . '/FirePHPDisabled.php'; } $timing = get_plugin_setting('timing', 'elgg_developer_tools'); if ($timing) { register_elgg_event_handler('shutdown', 'system', 'elgg_dev_tools_shutdown_hook'); } $showviews = get_plugin_setting('showviews', 'elgg_developer_tools'); if ($showviews) { register_plugin_hook('display', 'view', 'elgg_dev_tools_outline_views'); } $showstrings = get_plugin_setting('showstrings', 'elgg_developer_tools'); if ($showstrings) { // first and last in case a plugin registers a translation in an init method register_elgg_event_handler('init', 'system', 'elgg_dev_clear_strings', 1000); register_elgg_event_handler('init', 'system', 'elgg_dev_clear_strings', 1); } $logevents = get_plugin_setting('logevents', 'elgg_developer_tools'); if ($logevents) { register_plugin_hook('all', 'all', 'elgg_dev_log_events'); register_elgg_event_handler('all', 'all', 'elgg_dev_log_events'); } }
/** * mediawiki_pagesetup * * @return void */ function mediawiki_pagesetup() { // add to group profile page $page_owner = page_owner_entity(); if ($page_owner instanceof ElggGroup && get_context() == 'groups') { $group_watchlist = get_plugin_setting('group_watchlist', 'mediawiki'); if (!$group_watchlist || $group_watchlist != 'no') { $group_profile_display = get_plugin_setting('group_profile_display', 'mediawiki'); if (!$group_profile_display || $group_profile_display == 'left') { extend_view('groups/left_column', 'mediawiki/watchlist'); } else { if ($group_profile_display == 'right') { extend_view('groups/right_column', 'mediawiki/watchlist'); } } } } }
/** * Initialisation. Register page handler and extend some views. */ function chat_init() { global $CONFIG; // Add topbar icon extend_view('elgg_topbar/extend', 'chat/topbar'); // Add link for users not logged in to access the chat if (!get_plugin_setting('strict_access', 'chat') && !isloggedin()) { if (get_plugin_setting('use_popup', 'chat')) { add_menu(elgg_echo('Chat'), "javascript:chat_open('" . $CONFIG->wwwroot . "pg/chat')"); } else { add_menu(elgg_echo('Chat'), $CONFIG->wwwroot . 'pg/chat'); } } // Add styles extend_view('css', 'chat/css'); // Add javascript stuff extend_view('metatags', 'chat/metatags'); // Register page handler and translations register_page_handler('chat', 'chat_page_handler'); register_translations($CONFIG->pluginspath . "chat/languages/"); }
function beechat_init() { global $CONFIG; register_translations($CONFIG->pluginspath . "beechat/languages/"); register_elgg_event_handler('pagesetup', 'system', 'beechat_pagesetup'); register_action('beechat/get_statuses', false, $CONFIG->pluginspath . 'beechat/actions/get_statuses.php'); register_action('beechat/get_icons', false, $CONFIG->pluginspath . 'beechat/actions/get_icons.php'); register_action('beechat/get_details', false, $CONFIG->pluginspath . 'beechat/actions/get_details.php'); register_action('beechat/get_connection', false, $CONFIG->pluginspath . 'beechat/actions/get_connection.php'); register_action('beechat/get_state', false, $CONFIG->pluginspath . 'beechat/actions/get_state.php'); register_action('beechat/save_state', false, $CONFIG->pluginspath . 'beechat/actions/save_state.php'); register_plugin_hook('action', 'friends/add', 'beechat_xmpp_add_friend'); register_plugin_hook('action', 'friends/remove', 'beechat_xmpp_remove_friend'); extend_view('js/initialise_elgg', 'js/json2.js'); extend_view('js/initialise_elgg', 'js/jquery.cookie.min.js'); extend_view('js/initialise_elgg', 'js/jquery.scrollTo-min.js'); extend_view('js/initialise_elgg', 'js/jquery.serialScroll-min.js'); extend_view('js/initialise_elgg', 'js/b64.js'); extend_view('js/initialise_elgg', 'js/sha1.js'); extend_view('js/initialise_elgg', 'js/md5.js'); extend_view('js/initialise_elgg', 'js/strophe.min.js'); extend_view('js/initialise_elgg', 'js/jquery.tools.min.js'); extend_view('css', 'beechat/screen.css'); extend_view('js/initialise_elgg', 'beechat/beechat.js'); extend_view('metatags', 'beechat/beechat.userjs'); extend_view('footer/analytics', 'beechat/beechat'); $domain = get_plugin_setting("domain", "beechat"); $dbname = get_plugin_setting("dbname", "beechat"); $dbhost = get_plugin_setting("dbhost", "beechat"); $dbuser = get_plugin_setting("dbuser", "beechat"); $dbpassword = get_plugin_setting("dbpassword", "beechat"); $CONFIG->chatsettings['domain'] = $domain; $CONFIG->chatsettings['dbname'] = $dbname; $CONFIG->chatsettings['dbhost'] = $dbhost; $CONFIG->chatsettings['dbuser'] = $dbuser; $CONFIG->chatsettings['dbpassword'] = $dbpassword; }
/** * Trigger the log rotation. * */ function logrotate_cron($hook, $entity_type, $returnvalue, $params) { $resulttext = elgg_echo("logrotate:logrotated"); $day = 86400; $offset = 0; $period = get_plugin_setting('period', 'logrotate'); switch ($period) { case 'weekly': $offset = $day * 7; break; case 'yearly': $offset = $day * 365; break; case 'monthly': // assume 28 days even if a month is longer. Won't cause data loss. // assume 28 days even if a month is longer. Won't cause data loss. default: $offset = $day * 28; } if (!archive_log($offset)) { $resulttext = elgg_echo("logrotate:lognotrotated"); } return $returnvalue . $resulttext; }
<?php /** * Elgg Mediawiki integration plugin * * @package Mediawiki * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 * @author Kevin Jardine <*****@*****.**> * @copyright Surevine Limited 2009 * @link http://www.surevine.com/ */ // Load Elgg engine require_once dirname(dirname(dirname(__FILE__))) . "/engine/start.php"; // logout landing page with an invisible iframe logging the user out of Mediawiki $mediawiki_url = get_plugin_setting('url', 'mediawiki'); $mediawiki_logout_url = $mediawiki_url . 'index.php?title=Special:UserLogout&returnto=Main_Page'; $iframe = '<IFRAME id="logout_iframe" SRC="' . $mediawiki_logout_url . '" WIDTH="0" HIEGHT="0" FRAMEBORDER="0"></IFRAME>'; $title = elgg_echo('mediawiki:logout:title'); $body = '<div class="contentWrapper">' . elgg_echo('mediawiki:logout:description') . '</div>' . $iframe; page_draw($title, elgg_view_layout("two_column_left_sidebar", '', elgg_view_title($title) . $body, elgg_view("account/forms/login")));
<?php if (is_plugin_enabled('tidypics')) { $limit = get_plugin_setting('tidypics_num_items', 'vazco_mainpage'); if (!isset($limit) || !$limit) { $limit = 10; } $images = get_entities('object', 'image', 0, 0, $limit, false, false); ?> <div class="index_box"> <h2><?php echo elgg_echo("custom:tidypics"); ?> </h2> <div class="search_listing"> <?php if (isset($images)) { $counter = -1; echo '<div class="frontpage_tidypics_box_narrow">'; foreach ($images as $image) { $counter += 1; if ($counter == 2) { $counter = 0; echo "</div>"; echo '<div class="frontpage_tidypics_box_narrow">'; } echo "<div class=\"tidypics_index\">"; echo elgg_view("vazco_mainpage/tidypics/icon", array('mimetype' => $image->mimetype, 'thumbnail' => $image->thumbnail, 'file_guid' => $image->guid, 'link' => $image->getUrl(), 'size' => 'small')); echo "</div>"; //tidypics_index
$content .= "<input type='hidden' name='publication' value='{$publication_guid}' />"; $content .= "<input type='submit' value='invite'/> <input type='button' value='cancel' onclick=\"hide_dialog('{$formatauthor}')\"/>"; $form = elgg_view('input/form', array('action' => "{$CONFIG->wwwroot}/action/publication/invite", 'body' => $content)); $dialog = "<div style='display:none' id='invite_dialog_{$formatauthor}' class='publication_dialog'>{$form}</div>"; $userinfo = <<<EOT \t<div class='search_listing'> \t\t<div class='search_listing_icon'> \t\t<div class='usericon'> \t\t<img border='0' src="{$CONFIG->wwwroot}/mod/profile/graphics/defaultsmall.gif"/> \t\t</div> \t\t</div> \t\t<div class='search_listing_info'> \t\t<p><b>{$exauthor}</b> EOT; if ($canedit) { if (get_plugin_setting('toggleinvites', 'publications') != 'Off') { $userinfo .= " <input type=button class='submit_button' value='invite' onclick=\"show_dialog('{$exauthor}');\"/>"; } } $userinfo .= "</p></div></div>"; echo $userinfo; echo $dialog; ?> <script type='text/javascript'> function show_dialog(author){ $("input:hidden[name='author']").val(author); var formatauthor = author.replace(/ /,'_'); $('#invite_dialog_'+formatauthor).show(); } function hide_dialog(author){ var formatauthor = author.replace(/ /,'_');
echo $assets_base_url; ?> graphics/alert.png" /></td> </tr> <tr> <td align="center"><br /><h3>Something bad happen!</h3><br /></td> </tr> <tr> <td align="center"> <?php echo $message; ?> </td> </tr> <?php if (get_plugin_setting('ha_settings_test_mode', 'elgg_social_login')) { ?> <tr> <td align="center"> <div style="padding: 5px;margin: 5px;background: none repeat scroll 0 0 #F5F5F5;border-radius:3px;"> <br /> <b>This code is still in alpha</b><br /><br /><b style="color:#cc0000;">But you can make it better by sending the generated error report to the developer!</b> <br /> <br /> <div id="bug_report"> <form method="post" action="http://hybridauth.sourceforge.net/reports/index.php?product=elgg-plugin-1.8&v=1.0.2"> <table width="90%" border="0"> <tr> <td align="left" valign="top"> Your email (recommended)
<?php $text = get_plugin_setting('searchboxtext', 'vazco_mainpage'); ?> <div class="index_box"> <h2><?php echo elgg_echo('custom:search'); ?> </h2> <div class="search_listing"> <?php if ($text) { ?> <p class="search_box"><?php echo $text; ?> </p> <?php } ?> <form id="searchform" action="<?php echo $vars['url']; ?> search/" method="get"> <input type="text" size="21" name="tag" value="Search" onclick="if (this.value=='Search') { this.value='' }" class="search_box_input" /> <input type="submit" value="Go" class="search_box_button" /> </form> </div> </div>
<?php /** * Elgg profile plugin edit default profile action * * @package ElggProfile * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 * @author Curverider Ltd <*****@*****.**> * @copyright Curverider Ltd 2008-2009 * @link http://elgg.com/ */ // Load configuration global $CONFIG; action_gatekeeper(); admin_gatekeeper(); $n = 0; while (get_plugin_setting("admin_defined_profile_{$n}", 'profile')) { set_plugin_setting("admin_defined_profile_{$n}", '', 'profile'); set_plugin_setting("admin_defined_profile_type_{$n}", '', 'profile'); $n++; } system_message(elgg_echo('profile:defaultprofile:reset')); forward($_SERVER['HTTP_REFERER']);
<?php /** * Barter Plugin * @package Barters **/ $domain = get_plugin_setting("domain", "beechat"); $dbname = get_plugin_setting("dbname", "beechat"); $dbhost = get_plugin_setting("dbhost", "beechat"); $dbuser = get_plugin_setting("dbuser", "beechat"); $dbpassword = get_plugin_setting("dbpassword", "beechat"); ?> <p> <?php echo elgg_echo('beechat:domain'); ?> <?php echo elgg_view('input/text', array('internalname' => 'params[domain]', 'value' => $domain)); ?> <?php echo elgg_echo('beechat:dbname'); ?> <?php echo elgg_view('input/text', array('internalname' => 'params[dbname]', 'value' => $dbname)); ?> <?php echo elgg_echo('beechat:dbhost'); ?> <?php echo elgg_view('input/text', array('internalname' => 'params[dbhost]', 'value' => $dbhost)); ?>
echo elgg_echo("profile:{$shortname}"); ?> : </b> <?php if (is_array($valtype)) { echo elgg_view("output/{$valtype[0]}", array('value' => elgg_echo($vars['entity']->{$shortname}))); } else { echo elgg_view("output/{$valtype}", array('value' => $vars['entity']->{$shortname})); } ?> </p> <?php } } } } if (!get_plugin_setting('user_defined_fields', 'profile')) { if ($vars['entity']->isBanned()) { echo "<div class='banned_user'>"; echo elgg_echo('profile:banned'); echo "</div>"; } else { if ($vars['entity']->description) { echo "<p class='aboutme_title'><b>" . elgg_echo("profile:aboutme") . "</b></p>"; echo "<div class='aboutme_contents'>" . elgg_view('output/longtext', array('value' => $vars['entity']->description)) . "</div>"; } } ?> <?php } echo "</div>";
* @package Elgg Developer Tools * @author Aaron Saray (102degrees.com) * @author Cash Costello */ $simplecache_flag = $vars['config']->simplecache_enabled; $viewscache_flag = $vars['config']->viewpath_cache_enabled; $firephp_flag = (int) get_plugin_setting('enablefirephp', 'elgg_developer_tools'); //$htmllog_flag = (int) get_plugin_setting('htmllog', 'elgg_developer_tools'); $displayerrors_flag = (int) get_plugin_setting('displayerrors', 'elgg_developer_tools'); $errorlog_flag = (int) get_plugin_setting('errorlog', 'elgg_developer_tools'); $errorhandler_flag = (int) get_plugin_setting('errorhandler', 'elgg_developer_tools'); $exceptionhandler_flag = (int) get_plugin_setting('exceptionhandler', 'elgg_developer_tools'); $timing_flag = (int) get_plugin_setting('timing', 'elgg_developer_tools'); $showviews_flag = (int) get_plugin_setting('showviews', 'elgg_developer_tools'); $showstrings_flag = (int) get_plugin_setting('showstrings', 'elgg_developer_tools'); $logevents_flag = (int) get_plugin_setting('logevents', 'elgg_developer_tools'); $debug_level = $vars['config']->debug; if (!$debug_level) { $debug_level = 'OFF'; } /******************** build form *******************************/ $form_body = '<p>' . elgg_echo('elgg_dev_tools:settings:explanation') . '</p>'; /** simple cache **/ $form_body .= "<p><h4>" . elgg_echo('elgg_dev_tools:simplecache:question') . "</h4>"; $form_body .= elgg_view('input/radio', array('value' => $simplecache_flag, 'internalname' => 'usesimplecache', 'options' => array(elgg_echo('elgg_dev_tools:yes') => 1, elgg_echo('elgg_dev_tools:no') => 0))); $form_body .= '<em>' . elgg_echo('elgg_dev_tools:simplecache:explanation') . '</em></p>'; /** end simple cache **/ /** views cache **/ $form_body .= "<p><h4>" . elgg_echo('elgg_dev_tools:viewscache:question') . "</h4>"; $form_body .= elgg_view('input/radio', array('value' => $viewscache_flag, 'internalname' => 'useviewscache', 'options' => array(elgg_echo('elgg_dev_tools:yes') => 1, elgg_echo('elgg_dev_tools:no') => 0))); $form_body .= '<em>' . elgg_echo('elgg_dev_tools:viewscache:explanation') . '</em></p>';