Adding 2 plugins that uses the addthis.com share tools see #1840
parent
ee29f4b650
commit
bc0d374834
@ -0,0 +1,19 @@ |
||||
<?php |
||||
/** |
||||
* Controller for example date plugin |
||||
* @package chamilo.plugin.sharethis |
||||
*/ |
||||
|
||||
|
||||
//Plugin settings |
||||
$_template = null; |
||||
//$_template['message'] = 'Follow us'; |
||||
$_template['facebook'] = 'chamilolms'; |
||||
$_template['twitter'] = 'chamilo_news'; |
||||
$_template['linkedin'] = ''; |
||||
$_template['googleplus'] = ''; |
||||
$_template['youtube'] = ''; |
||||
$_template['flickr'] = ''; |
||||
$_template['vimeo'] = ''; |
||||
$_template['rss'] = 'http://www.chamilo.org/'; |
||||
|
@ -0,0 +1,23 @@ |
||||
<?php |
||||
/** |
||||
* This script is a configuration file for the date plugin. You can use it as a master for other platform plugins (course plugins are slightly different). |
||||
* 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 details (must be present) |
||||
*/ |
||||
|
||||
/* Plugin config */ |
||||
|
||||
//the plugin title |
||||
$plugin_info['title'] = 'Follow icons'; |
||||
//the comments that go with the plugin |
||||
$plugin_info['comment'] = "Add social icons (implemented using addthis.com)"; |
||||
//the plugin version |
||||
$plugin_info['version'] = '1.0'; |
||||
//the plugin author |
||||
$plugin_info['author'] = 'Julio Montoya'; |
||||
|
||||
$plugin_info['templates'] = array('template.tpl'); |
@ -0,0 +1,3 @@ |
||||
README |
||||
|
||||
Edit the main/plugin/follow_buttons/index.php file in order to add your settings |
@ -0,0 +1,33 @@ |
||||
<!-- AddThis Button BEGIN --> |
||||
{if !empty($follow_buttons.message)} |
||||
<h3>{$follow_buttons.message}</h3> |
||||
{/if} |
||||
|
||||
<div class="addthis_toolbox addthis_32x32_style addthis_default_style"> |
||||
{if !empty($follow_buttons.facebook)} |
||||
<a class="addthis_button_facebook_follow" addthis:userid="{$follow_buttons.facebook}"></a> |
||||
{/if} |
||||
{if !empty($follow_buttons.twitter)} |
||||
<a class="addthis_button_twitter_follow" addthis:userid="{$follow_buttons.twitter}"></a> |
||||
{/if} |
||||
{if !empty($follow_buttons.linkedin)} |
||||
<a class="addthis_button_linkedin_follow" addthis:userid="{$follow_buttons.linkedin}"></a> |
||||
{/if} |
||||
{if !empty($follow_buttons.googleplus)} |
||||
<a class="addthis_button_google_follow" addthis:userid="{$follow_buttons.googleplus}"></a> |
||||
{/if} |
||||
{if !empty($follow_buttons.youtube)} |
||||
<a class="addthis_button_youtube_follow" addthis:userid="{$follow_buttons.youtube}"></a> |
||||
{/if} |
||||
{if !empty($follow_buttons.flickr)} |
||||
<a class="addthis_button_flickr_follow" addthis:userid="{$follow_buttons.flickr}"></a> |
||||
{/if} |
||||
{if !empty($follow_buttons.vimeo)} |
||||
<a class="addthis_button_vimeo_follow" addthis:userid="{$follow_buttons.vimeo}"></a> |
||||
{/if} |
||||
{if !empty($follow_buttons.rss)} |
||||
<a class="addthis_button_rss_follow" addthis:url="{$follow_buttons.rss}"></a> |
||||
{/if} |
||||
</div> |
||||
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=ra-4f69d7995360186c"></script> |
||||
<!-- AddThis Button END --> |
@ -0,0 +1,18 @@ |
||||
<?php |
||||
/** |
||||
* Controller for example date plugin |
||||
* @package chamilo.plugin.share_buttons |
||||
*/ |
||||
|
||||
echo ' |
||||
<!-- AddThis Button BEGIN --> |
||||
<div class="addthis_toolbox addthis_default_style addthis_32x32_style"> |
||||
<a class="addthis_button_preferred_1"></a> |
||||
<a class="addthis_button_preferred_2"></a> |
||||
<a class="addthis_button_preferred_3"></a> |
||||
<a class="addthis_button_preferred_4"></a> |
||||
<a class="addthis_button_compact"></a> |
||||
<a class="addthis_counter addthis_bubble_style"></a> |
||||
</div> |
||||
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=xa-4f69d6f847541385"></script> |
||||
<!-- AddThis Button END -->'; |
@ -0,0 +1,38 @@ |
||||
<?php |
||||
/** |
||||
* This script is a configuration file for the date plugin. You can use it as a master for other platform plugins (course plugins are slightly different). |
||||
* 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 details (must be present) |
||||
*/ |
||||
|
||||
/* Plugin config */ |
||||
|
||||
//the plugin title |
||||
$plugin_info['title'] = 'Share this page'; |
||||
//the comments that go with the plugin |
||||
$plugin_info['comment'] = "Show social icons to share a page using addthis.com"; |
||||
//the plugin version |
||||
$plugin_info['version'] = '1.0'; |
||||
//the plugin author |
||||
$plugin_info['author'] = 'Julio Montoya'; |
||||
|
||||
|
||||
/* Plugin optional settings */ |
||||
|
||||
/* |
||||
* This form will be showed in the plugin settings once the plugin was installed |
||||
* in the plugin/hello_world/index.php you can have access to the value: $plugin_info['settings']['hello_world_show_type'] |
||||
*/ |
||||
|
||||
$form = new FormValidator('hello_world_form'); |
||||
|
||||
//A simple select |
||||
$options = array('hello_world' => 'Hello World', 'hello' =>'Hello', 'hi' =>'Hi!'); |
||||
$form->addElement('select', 'show_type', 'Hello world types', $options); |
||||
$form->addElement('style_submit_button', 'submit_button', get_lang('Save')); |
||||
|
||||
$plugin_info['settings_form'] = $form; |
Loading…
Reference in new issue