예제 #1
0
function vocalinfo_plugin_preference_page()
{
    global $myUser, $_, $conf;
    if (isset($_['section']) && $_['section'] == 'preference' && @$_['block'] == 'vocalinfo') {
        if ($myUser != false) {
            Plugin::addjs("/js/woeid.js", true);
            Plugin::addJs('/js/main.js', true);
            $commands = json_decode(file_get_contents(Plugin::path() . '/' . VOCALINFO_COMMAND_FILE), true);
            ?>

		<div class="span9 userBloc">
		<legend>Commandes</legend>
	<table class="table table-striped table-bordered">
		<tr>
			<th></th>
			<th>Commande</th>
			<th>Confidence</th>
		</tr>
	<?php 
            foreach ($commands as $key => $command) {
                ?>
			<tr class="command" data-id="<?php 
                echo $key;
                ?>
"><td><input type="checkbox" <?php 
                echo $command['disabled'] == 'true' ? '' : 'checked="checked"';
                ?>
 class="enabled"></td><td><?php 
                echo $conf->get('VOCAL_ENTITY_NAME') . ' ' . $command['command'];
                ?>
</td><td><input type="text" class="confidence" value="<?php 
                echo $command['confidence'];
                ?>
"/></td></tr>
	<?php 
            }
            ?>
		<tr>
			<td colspan="3"><div class="btn" onclick="plugin_vocalinfo_save();">Enregistrer</div></td>
		</tr>
	</table>
		
		
			<form class="form-inline" action="action.php?action=vocalinfo_plugin_setting" method="POST">
			<legend>Météo</legend>
			    <label>Tapez le nom de votre ville et votre pays</label>
			    <input type="text" class="input-xlarge" name="weather_place" value="<?php 
            echo $conf->get('plugin_vocalinfo_place');
            ?>
" placeholder="Votre ville">	
			    <span id="weather_query" class="btn">Chercher</span>
			    <br/><br/><label>Votre Identifiant WOEID</label>
			    <input type="text" class="input-large" name="woeid" value="<?php 
            echo $conf->get('plugin_vocalinfo_woeid');
            ?>
" placeholder="Votre WOEID">					
			    <button type="submit" class="btn">Sauvegarder</button>
	    </form>
		</div>

<?php 
        } else {
            ?>

		<div id="main" class="wrapper clearfix">
			<article>
					<h3>Vous devez être connecté</h3>
			</article>
		</div>
<?php 
        }
    }
}
예제 #2
0
		  	</code><br/>
		  	Et enfin<br/>
		  	<code>
		  		sudo chown -R www-data:www-data /var/www/yana-server/plugins
		  	</code><br/>
		  		Redémarrez et c'est ok :)
		  	
		  	
		  </p>
		</div>
	
	</div>
</div>
<?php 
    }
}
function camera_action_camera()
{
    global $_, $conf;
    switch ($_['action']) {
        case 'camera_refresh':
            $absolute_path = getcwd() . "/plugins/camera/";
            system('raspistill -hf -w 400 -h 400  -o ' . $absolute_path . 'view.jpg');
            header('location:index.php?module=camera');
            break;
    }
}
Plugin::addJs('/js/main.js');
Plugin::addHook("action_post_case", "camera_action_camera");
Plugin::addHook("menubar_pre_home", "camera_plugin_menu");
Plugin::addHook("home", "camera_plugin_page");
예제 #3
0
                foreach ($_['story']['effects'] as $effect) {
                    $current = new Effect();
                    $current->type = $effect['type'];
                    $current->setValues($effect);
                    $current->sort = $i;
                    $current->union = $cause['union'];
                    $current->story = $story->id;
                    $current->save();
                    $i++;
                }
            }, array());
            break;
    }
}
function story_vocal_command(&$response, $actionUrl)
{
    global $conf;
    require_once dirname(__FILE__) . '/Cause.class.php';
    $causeManager = new Cause();
    $vocals = $causeManager->loadAll(array('type' => 'listen'));
    foreach ($vocals as $vocal) {
        $response['commands'][] = array('command' => $conf->get('VOCAL_ENTITY_NAME') . ' ' . $vocal->value, 'url' => $actionUrl . '?action=plugin_story_check&type=talk&event=' . $vocal->id, 'confidence' => '0.90' + $conf->get('VOCAL_SENSITIVITY'));
    }
}
Plugin::addCss("/css/main.css");
Plugin::addJs("/js/main.js");
Plugin::addHook("menubar_pre_home", "story_plugin_menu");
Plugin::addHook("home", "story_plugin_page");
Plugin::addHook("action_post_case", "story_plugin_action");
Plugin::addHook("vocal_command", "story_vocal_command");
Plugin::addHook("cron", "plugin_story_check");
예제 #4
0
			</div>

			<?php 
        } else {
            ?>

			<div id="main" class="wrapper clearfix">
				<article>
					<h3>Vous devez être connecté</h3>
				</article>
			</div>
			<?php 
        }
    }
}
Plugin::addCss("/css/main.css");
Plugin::addJs("/js/main.js", true);
//Lie radioRelay_plugin_preference_menu au menu de réglages
Plugin::addHook("preference_menu", "radioRelay_plugin_preference_menu");
//Lie radioRelay_plugin_preference_page a la page  de réglages
Plugin::addHook("preference_content", "radioRelay_plugin_preference_page");
//Lie radioRelay_plugin_setting_page a la zone réglages
Plugin::addHook("setting_bloc", "radioRelay_plugin_setting_page");
//Lie radioRelay_plugin_setting_menu au menu de réglages
Plugin::addHook("setting_menu", "radioRelay_plugin_setting_menu");
//Lie radiorelay_plugin_action a la page d'action qui perme d'effecuer des actionx ajax ou ne demdnant pas de retour visuels
Plugin::addHook("action_post_case", "radiorelay_plugin_action");
//Lie radiorelay_plugin_vocal_command a la gestion de commandes vocales proposées par yana
Plugin::addHook("vocal_command", "radiorelay_plugin_vocal_command");
//Lie radioRelay_plugin_widget aux widgets de la dashboard
Plugin::addHook("widgets", "radioRelay_plugin_widget");
.driver_content .driver_properties li .driver_property_label{
	width: 35%;
}
.driver_content .driver_properties li .driver_property_value{
	min-width: 60%;
}
</style>

<div class="driver_content">
	<div class="driver_image">
		<i class="fa fa-sun">image</i>
	</div>
	<div class="driver_view">
		19°
	</div>
	<label class="driver_properties_title">Propriétés</label>
	<ul class="driver_properties">
		<li>
			<div class="driver_property_label">Label</div><div class="driver_property_value">Valeur html</div>
		</li>
	</ul>
</div>


</body>
</html>
*/
Plugin::addCss('/css/style.css', true);
Plugin::addJs('/js/main.js', true);
Plugin::addHook("widgets", "dash_monitoring_plugin_menu");
Plugin::addHook("action_post_case", "dash_monitoring_plugin_actions");
<?php

/*
@name scrollRead
@author Cobalt74 <http://www.cobestran.com>
@link http://www.cobestran.com
@licence CC by nc sa http://creativecommons.org/licenses/by-nc-sa/2.0/fr/
@version 1.4.0
@description Le plugin permet lors de la lecture d'un article de le mettre automatiquement à lu lors du scoll vers l'article suivant
*/
Plugin::addJs("/js/scrollRead.js");
		</form>
	</section>
	';
}
function leedHomeLink_plugin_update($_)
{
    $configurationManager = new Configuration();
    $configurationManager->getAll();
    if ($_['action'] == 'leedHomeLink_update') {
        $configurationManager->put('plugin_leedHomeLink_1_name', $_['plugin_leedHomeLink_1_name']);
        $configurationManager->put('plugin_leedHomeLink_1_link', $_['plugin_leedHomeLink_1_link']);
        $configurationManager->put('plugin_leedHomeLink_2_name', $_['plugin_leedHomeLink_2_name']);
        $configurationManager->put('plugin_leedHomeLink_2_link', $_['plugin_leedHomeLink_2_link']);
        $configurationManager->put('plugin_leedHomeLink_3_name', $_['plugin_leedHomeLink_3_name']);
        $configurationManager->put('plugin_leedHomeLink_3_link', $_['plugin_leedHomeLink_3_link']);
        $configurationManager->put('plugin_leedHomeLink_4_name', $_['plugin_leedHomeLink_4_name']);
        $configurationManager->put('plugin_leedHomeLink_4_link', $_['plugin_leedHomeLink_4_link']);
        $configurationManager->put('plugin_leedHomeLink_5_name', $_['plugin_leedHomeLink_5_name']);
        $configurationManager->put('plugin_leedHomeLink_5_link', $_['plugin_leedHomeLink_5_link']);
        $_SESSION['configuration'] = null;
        header('location: settings.php#leedHomeLink');
    }
}
Plugin::addJs('/js/leedHomeLink.js');
$myUser = isset($_SESSION['currentUser']) ? unserialize($_SESSION['currentUser']) : false;
if ($myUser != false) {
    Plugin::addHook('setting_post_link', 'leedHomeLink_plugin_setting_link');
    Plugin::addHook('setting_post_section', 'leedHomeLink_plugin_setting_bloc');
    Plugin::addHook('action_post_case', 'leedHomeLink_plugin_update');
}
Plugin::addHook('footer_post_copyright', 'leedHomeLink_plugin_homelink');
예제 #8
0
                echo 'class="pointer right readUnreadButton eventRead"';
            } else {
                echo 'class="pointer right readUnreadButton"';
            }
            echo ' onclick="search_readUnread(this,' . $data['id'] . ');">' . (!$data['unread'] ? _t('P_SEARCH_BTN_NONLU') : _t('P_SEARCH_BTN_LU')) . '</span>
				      	<span ';
            if ($data['favorite']) {
                echo 'class="pointer right readUnreadButton eventFavorite"';
            } else {
                echo 'class="pointer right readUnreadButton"';
            }
            echo ' onclick="search_favorize(this,' . $data['id'] . ');">' . (!$data['favorite'] ? _t('P_SEARCH_BTN_FAVORIZE') : _t('P_SEARCH_BTN_UNFAVORIZE')) . '</span>';
            echo '	</div>' . date('d/m/Y à H:i', $data['pubdate']) . ' - <a title="' . $data['guid'] . '" href="' . $data['link'] . '" target="_blank">
					     ' . $data['title'] . '</a>
					</div>';
            if (isset($_GET['search_show']) && $_GET['search_show'] == "1") {
                echo '<div class="search_article_content">
					     ' . $data['content'] . '
				     </div>';
            }
            echo '</div>';
        }
        echo '</div>';
    }
}
Plugin::addJs("/js/search.js");
// Ajout de la fonction au Hook situé avant l'affichage des évenements
Plugin::addHook("setting_post_link", "search_plugin_AddLink_and_Search");
Plugin::addHook("setting_post_section", "search_plugin_AddForm");
//Ajout de la fonction au Hook situé après le menu des fluxs
Plugin::addHook("menu_post_folder_menu", "search_plugin_menuForm");