本文整理汇总了PHP中Q_Html::script方法的典型用法代码示例。如果您正苦于以下问题:PHP Q_Html::script方法的具体用法?PHP Q_Html::script怎么用?PHP Q_Html::script使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Q_Html
的用法示例。
在下文中一共展示了Q_Html::script方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
?>
<div class='Q_login Q_big_prompt'>
<?php
echo Q_Html::form(Q_Request::baseUrl() . '/action.php/Streams/invited');
?>
<?php
echo Q_Html::formInfo($stream_uri);
?>
<?php
echo Q_Html::hidden(array('token' => $invite->token));
?>
<?php
echo Q::tool('Q/form', array('fields' => array('passphrase' => array('label' => 'Enter your passphrase:', 'extra' => Q_Html::img($thumbnail_url, 'icon', array('title' => "You can change this later")), 'type' => 'password'), 'submit' => array('type' => 'submit_buttons', 'options' => array('join' => 'Join the chat'), 'label' => ''))));
?>
<?php
echo Q_Html::script("\n\t\t\t\t\t\t\$('#Q_form_passphrase').focus();\n\t\t\t\t\t");
?>
</form>
</div>
<?php
} else {
?>
<h2 class='notice' style='text-align: center'>
Before you can log in, you must set a pass phrase by clicking the link in the message we sent to
<?php
echo Q_Html::text($address);
?>
</h2>
<div style='text-align: center' class='Q_big_prompt`'>
<?php
echo Q_Html::form(Q_Request::baseUrl() . '/action.php/Users/resend');
示例2: scriptsInline
/**
* Returns markup for referencing all the scripts added so far
* @method scriptsInline
* @static
* @param {string} [$slotName=null] If provided, returns only the scripts added while filling this slot.
* @return {string} the script tags and their contents inline
*/
static function scriptsInline($slotName = null)
{
$scripts = self::scriptsArray($slotName, false);
if (empty($scripts)) {
return '';
}
$scripts_for_slots = array();
foreach ($scripts as $script) {
$src = '';
extract($script, EXTR_IF_EXISTS);
$ob = new Q_OutputBuffer();
if (Q_Valid::url($src)) {
try {
include $src;
} catch (Exception $e) {
}
} else {
list($src, $filename) = Q_Html::themedUrlAndFilename($src);
try {
Q::includeFile($filename);
} catch (Exception $e) {
}
}
$scripts_for_slots[$script['slot']][] = "\n/* Included inline from {$src} */\n" . $ob->getClean();
}
$parts = array();
foreach ($scripts_for_slots as $slot => $texts) {
$parts[] = Q_Html::script(implode("\n\n", $texts), array('data-slot' => $slot));
}
return implode("", $parts);
}
示例3:
echo $dashboard;
?>
</div>
<?php
if ($notices) {
?>
<div id="notices_slot">
<?php
echo $notices;
?>
</div>
<?php
}
?>
<div id="content_slot">
<?php
echo $content;
?>
</div>
<br style="clear: both;">
</div>
<?php
echo Q_Html::script(Q_Response::scriptLines());
echo Q_html::script("Q.ready();");
?>
</fb:fbml>