parent
e84ef79420
commit
17599f1009
@ -1,20 +1,20 @@ |
||||
<?php |
||||
/** |
||||
* This script is a configuration file for the add_this plugin. |
||||
* These settings will be used in the administration interface for plugins |
||||
* These settings will be used in the administration interface for plugins |
||||
* (Chamilo configuration settings->Plugins) |
||||
* @package chamilo.plugin |
||||
* @author Julio Montoya <gugli100@gmail.com> |
||||
*/ |
||||
/* Plugin config */ |
||||
|
||||
//the plugin title |
||||
// The plugin title. |
||||
$plugin_info['title'] = 'Share this page'; |
||||
//the comments that go with the plugin |
||||
// The comments that go with the plugin. |
||||
$plugin_info['comment'] = "Show social icons to share a page using addthis.com"; |
||||
//the plugin version |
||||
// The plugin version. |
||||
$plugin_info['version'] = '1.0'; |
||||
//the plugin author |
||||
// The plugin author. |
||||
$plugin_info['author'] = 'Julio Montoya'; |
||||
//For bigger icons change this value to addthis_32x32_style |
||||
$plugin_info['icon_class'] = ''; |
||||
// For bigger icons change this value to addthis_32x32_style |
||||
$plugin_info['icon_class'] = ''; |
||||
|
||||
@ -1,9 +1,9 @@ |
||||
<?php |
||||
|
||||
//only show the region information if the admin is logged in |
||||
// Only show the region information if the admin is logged in. |
||||
if (api_is_platform_admin()) { |
||||
echo '<div style="color:black;height:50px;width:200px;background-color:#FFE378">'; |
||||
//We can have access to the current block and the block information with the variable $plugin_info (see your plugin.php) |
||||
echo $plugin_info['current_region']; |
||||
echo '</div>'; |
||||
echo '</div>'; |
||||
} |
||||
@ -1,18 +1,18 @@ |
||||
<?php |
||||
|
||||
//A user must be logged in |
||||
// A user must be logged in. |
||||
$_template['show_message'] = false; |
||||
|
||||
if (!api_is_anonymous()) { |
||||
$_template['show_message'] = true; |
||||
|
||||
//Getting the current user id |
||||
$user_id = api_get_user_id(); |
||||
|
||||
//Getting the current user info |
||||
|
||||
// Getting the current user id. |
||||
$user_id = api_get_user_id(); |
||||
|
||||
//Getting the current user info. |
||||
$user_info = api_get_user_info($user_id); |
||||
|
||||
//You can also use template setting variables in the special variable called template |
||||
$_template['user_info'] = $user_info; |
||||
$_template['username'] = $user_info['username']; |
||||
|
||||
// You can also use template setting variables in the special variable called template. |
||||
$_template['user_info'] = $user_info; |
||||
$_template['username'] = $user_info['username']; |
||||
} |
||||
Loading…
Reference in new issue