当前位置: 首页>>代码示例>>PHP>>正文


PHP Plugin::addJs方法代码示例

本文整理汇总了PHP中Plugin::addJs方法的典型用法代码示例。如果您正苦于以下问题:PHP Plugin::addJs方法的具体用法?PHP Plugin::addJs怎么用?PHP Plugin::addJs使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Plugin的用法示例。


在下文中一共展示了Plugin::addJs方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: vocalinfo_plugin_preference_page

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 
        }
    }
}
开发者ID:HARRYJC,项目名称:yana-server,代码行数:73,代码来源:vocalinfo.plugin.php

示例2: camera_action_camera

		  	</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");
开发者ID:kofeve,项目名称:yana-server,代码行数:31,代码来源:camera.plugin.disabled.php

示例3: foreach

                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");
开发者ID:maditnerd,项目名称:yana-server,代码行数:31,代码来源:story.plugin.php

示例4:

			</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");
开发者ID:kofeve,项目名称:yana-server,代码行数:31,代码来源:radioRelay.plugin.php

示例5:

.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");
开发者ID:parrain27,项目名称:yana-server,代码行数:31,代码来源:dashboard-monitoring.plugin.php

示例6:

<?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");
开发者ID:kraoc,项目名称:Leed-market,代码行数:11,代码来源:scrollRead.plugin.disabled.php

示例7: leedHomeLink_plugin_update

		</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');
开发者ID:kraoc,项目名称:Leed-market,代码行数:31,代码来源:leedHomeLink.plugin.disabled.php

示例8: _t

                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");
开发者ID:kraoc,项目名称:Leed-market,代码行数:31,代码来源:search.plugin.disabled.php


注:本文中的Plugin::addJs方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。