本文整理汇总了PHP中URL::get_from_filesystem方法的典型用法代码示例。如果您正苦于以下问题:PHP URL::get_from_filesystem方法的具体用法?PHP URL::get_from_filesystem怎么用?PHP URL::get_from_filesystem使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类URL
的用法示例。
在下文中一共展示了URL::get_from_filesystem方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: action_init_theme
public function action_init_theme()
{
Stack::add('template_stylesheet', array(URL::get_from_filesystem(__FILE__) . '/magicarchives.css', 'screen'), 'magicarchives');
Stack::add('template_header_javascript', Site::get_url('scripts') . '/jquery.js', 'jquery');
Stack::add('template_header_javascript', URL::get_from_filesystem(__FILE__) . '/magicarchives.js', 'magicarchives', array('jquery', 'ajax_manager'));
Stack::add('template_header_javascript', URL::get_from_filesystem(__FILE__) . '/ajax_manager.js', 'ajax_manager', 'jquery');
Stack::add('template_header_javascript', 'magicArchives.endpoint=\'' . URL::get('ajax', array('context' => 'archive_posts')) . '\'', 'magicurl', 'magicarchives');
}
示例2: remove_template
public function remove_template()
{
Post::deactivate_post_type('poll');
$this->remove_template('widget', dirname(__FILE__) . '/widget.php');
Stack::remove('template_header_javascript', Site::get_url('scripts') . '/jquery.js', 'jquery');
Stack::remove('template_stylesheet', array(URL::get_from_filesystem(__FILE__) . '/widget.css', 'screen'), 'pollwigitcss');
$this->remove_template('poll.single', dirname(__FILE__) . '/poll.single.php');
}
示例3: silo_info
/**
* Return basic information about this silo
* name- The name of the silo, used as the root directory for media in this silo
* icon- An icon to represent the silo
*/
public function silo_info()
{
if (User::identify()->info->lastfm__username != '') {
return array('name' => self::SILO_NAME, 'icon' => URL::get_from_filesystem(__FILE__) . '/icon.png');
} else {
return array();
}
}
示例4: action_plugin_act_register_success
/**
* Handle register_success action
*/
public function action_plugin_act_register_success($handler)
{
if (!User::identify()->loggedin) {
Utils::redirect(URL::get('register_page'), false);
}
$handler->theme->user = User::identify();
Stack::add('template_header_javascript', Site::get_url('scripts') . '/jquery.js', 'jquery', array('jquery'));
// Stack::add( 'template_header_javascript', Site::get_url('admin_theme') . "/js/admin.js", 'admin', array('jquery', 'registration') );
Stack::add('template_header_javascript', URL::get_from_filesystem(__FILE__) . '/registration.js', 'registration', array('jquery'));
Stack::add('template_stylesheet', array(URL::get_from_filesystem(__FILE__) . '/registration.css', 'screen'), 'registration', array());
$handler->theme->display('registration.success');
}
示例5: silo_info
/**
* Return basic information about this silo
* name- The name of the silo, used as the root directory for media in this silo
* icon- An icon to represent the silo
*/
public function silo_info()
{
if ( $this->is_auth() ) {
return array( 'name' => self::SILO_NAME, 'icon' => URL::get_from_filesystem(__FILE__) . '/icon.png' );
}
else {
return array();
}
}
示例6: action_init_theme
public function action_init_theme()
{
//Add the stylesheet for LaTeX images and such
Stack::add('template_stylesheet', array(URL::get_from_filesystem(__FILE__) . '/latex.css', 'screen', 'screen'), 'jLaTeX-css');
}
示例7: action_init_theme
public function action_init_theme()
{
Stack::add('template_header_javascript', Site::get_url('scripts') . '/jquery.js', 'jquery');
Stack::add('template_header_javascript', URL::get_from_filesystem(__FILE__) . '/commentated.js', 'commentated');
}
示例8: theme_footer
public function theme_footer()
{
if ($this->has_spoilers) {
// Load jQuery, if it's not already loaded
if (!Stack::has('template_header_javascript', 'jquery')) {
Stack::add('template_footer_javascript', Site::get_url('scripts') . '/jquery.js', 'jquery', array('jquery'));
}
Stack::add('template_footer_javascript', URL::get_from_filesystem(__FILE__) . '/spoilers.js', 'spoilers', array('jquery'));
Stack::add('template_stylesheet', array(URL::get_from_filesystem(__FILE__) . '/spoilers.css', 'screen'), 'spoilers', array());
}
}
示例9: action_admin_header
/**
* Add CSS & JS to admin stack
*
* @return void
**/
public function action_admin_header()
{
if (Options::get('spamview__spambutton')) {
Stack::add('admin_stylesheet', array(URL::get_from_filesystem(__FILE__) . '/spamview.css', 'screen'), 'spamview');
Stack::add('admin_header_javascript', URL::get_from_filesystem(__FILE__) . '/spamview.js', 'spamview', array('jquery', 'jquery.hotkeys'));
}
}
示例10: action_admin_header
public function action_admin_header()
{
Stack::add('admin_header_javascript', URL::get_from_filesystem(__FILE__) . '/suggestr.js', 'suggestr');
Stack::add('admin_stylesheet', array(URL::get_from_filesystem(__FILE__) . '/suggestr.css', 'screen'), 'suggestr');
}
示例11: silo_info
/**
* Return basic information about this silo
* name- The name of the silo, used as the root directory for media in this silo
*/
public function silo_info()
{
return array('name' => self::SILO_NAME, 'icon' => URL::get_from_filesystem(__FILE__) . '/icon.png');
}
示例12: get_url
/**
* Get a fully-qualified URL directory that contains this pluggable class
*
* @param bool whether to include a trailing slash. Default: No
* @return string URL
*/
public function get_url( $trail = false )
{
return URL::get_from_filesystem( $this->get_file(), $trail );
}
示例13: action_admin_header
/**
* Add media files
**/
public function action_admin_header()
{
Stack::add('admin_stylesheet', array(URL::get_from_filesystem(__FILE__) . '/helpify.css', 'screen'), 'helpify');
Stack::add('admin_header_javascript', URL::get_from_filesystem(__FILE__) . '/helpify.js', 'helpify', array('jquery', 'jquery.hotkeys'));
}
示例14: insertPlayerOut
/**
* Insert player into post content.
*
* @param array $matches from callback function
* @return string
*/
private static function insertPlayerOut($matches)
{
$options = Options::get(self::OPTNAME);
static $playerID = 0;
list($files, $data) = self::getfileData($matches);
$playerOptions = array();
$playerOptions['soundFile'] = $options['encode'] ? self::encodeSource(implode(",", $files)) : implode(",", $files);
for ($i = 1; $i < count($data); $i++) {
$pair = explode("=", $data[$i]);
$playerOptions[trim($pair[0])] = trim($pair[1]);
}
$playerElementID = "audioplayer_{$playerID}";
$output = '';
// Load the Javascript only on the pages/posts it's actually needed - some will argue about the problems with adding JS to the body of a doc like this, but we're using Flash already, so we can't be too pedantic :-)
if ($playerID == 0) {
$output .= '<script type="text/javascript" src="' . URL::get_from_filesystem(__FILE__) . '/lib/js/audio-player.js"></script>';
$output .= '<script type="text/javascript">AudioPlayer.setup("' . URL::get_from_filesystem(__FILE__) . '/lib/player.swf",' . self::php2js(self::getPlayerOptions()) . ');</script>';
}
$output .= '<p class="audioplayer_container"><span style="display:block" id="' . $playerElementID . '"><!-- [audio:' . $data[0] . '] --></span>';
$output .= '<script type="text/javascript">';
$output .= 'AudioPlayer.embed("' . $playerElementID . '", ' . self::php2js($playerOptions) . ' );';
$output .= '</script></p>';
$playerID++;
return $output;
}
示例15: action_theme_loginform_after
/**
* Plugin UI - Displays the 'authorize' config option
*
* @access public
* @return void
*/
public function action_theme_loginform_after()
{
if (Options::get('twitter__login') == 1) {
echo '<a href="' . URL::get('auth_twitter_go') . '"><img src="' . URL::get_from_filesystem(__FILE__) . '/lib/twitter_connect.png" alt="Sign in with Twitter" /></a>';
}
}