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


PHP media_url函数代码示例

本文整理汇总了PHP中media_url函数的典型用法代码示例。如果您正苦于以下问题:PHP media_url函数的具体用法?PHP media_url怎么用?PHP media_url使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: imagebox_headers

 function imagebox_headers()
 {
     $ci =& get_instance();
     if ($ci->config->item('imagebox_headers') !== TRUE) {
         $url = 'application/modules/imagebox/templates/js/lightbox/';
         $result = '<link rel="stylesheet" href="' . media_url($url . 'css/lightbox.css') . '" type="text/css" media="screen" />
         <script type="text/javascript" src="' . media_url($url . 'js/prototype.lite.js') . '"></script>
         <script type="text/javascript" src="' . media_url($url . 'js/moo.fx.js') . '"></script>
         <script type="text/javascript" src="' . media_url($url . 'js/litebox-1.0.js') . '"></script>
         <script type="text/javascript">
            window.onload = initLightbox; 
         </script>
         ';
         $ci->config->set_item('imagebox_headers', TRUE);
         return $result;
     }
 }
开发者ID:NaszvadiG,项目名称:ImageCMS,代码行数:17,代码来源:imagebox_helper.php

示例2: latest_fotos

 public function latest_fotos($widget = array())
 {
     $this->load->helper('gallery');
     $this->load->model('gallery_m');
     if ($widget['settings']['order'] == 'latest') {
         $images = gallery_latest_images($widget['settings']['limit']);
     } else {
         $images = gallery_latest_images($widget['settings']['limit'], 'random');
     }
     if (!empty($images)) {
         for ($i = 0; $i < count($images); $i++) {
             $images[$i]['thumb_path'] = media_url('uploads/gallery/' . $images[$i]['album_id'] . '/_thumbs/' . $images[$i]['file_name'] . $images[$i]['file_ext']);
         }
     }
     $this->template->add_array(array('images' => $images));
     return $this->template->fetch('widgets/' . $widget['name'], $data);
 }
开发者ID:NaszvadiG,项目名称:ImageCMS,代码行数:17,代码来源:gallery_widgets.php

示例3: media_url

                </div>

                <div id="custom_notifications" class="custom-notifications dsp_none">
                    <ul class="list-unstyled notifications clearfix" data-tabbed_notifications="notif-group">
                    </ul>
                    <div class="clearfix"></div>
                    <div id="notif-group" class="tabbed_notifications"></div>
                </div>

                <script src="<?php 
echo media_url();
?>
/js/bootstrap.min.js"></script>
                <script src="<?php 
echo media_url();
?>
/js/jquery-ui.min.js"></script>

                <script src="<?php 
echo media_url();
?>
/js/custom.js"></script>
                <script src="<?php 
echo media_url();
?>
/js/jquery.nicescroll.min.js"></script>


            </body>

            </html>
开发者ID:achyar10,项目名称:hras,代码行数:31,代码来源:layout.php

示例4: getThumbnailHTML

 /**
  * Returns an XML valid attachment HTML string that handles missing thumbnail URLs.
  *
  * @param  \App\Board  $board  The board this thumbnail will belong to.
  * @param  int  $maxWidth  Optional. Maximum width constraint. Defaults null.
  * @return string  as HTML
  */
 public function getThumbnailHTML(Board $board, $maxDimension = null)
 {
     $ext = $this->guessExtension();
     $mime = $this->mime;
     $url = media_url("static/img/filetypes/{$ext}.svg", false);
     $spoil = $this->isSpoiler();
     $deleted = $this->isDeleted();
     $md5 = $deleted ? null : $this->hash;
     if ($deleted) {
         $url = $board->getAssetUrl('file_deleted');
     } else {
         if ($spoil) {
             $url = $board->getAssetUrl('file_spoiler');
         } else {
             if ($this->isImageVector()) {
                 $url = $this->getDownloadURL($board);
             } else {
                 if ($this->isAudio() || $this->isImage() || $this->isVideo() || $this->isDocument()) {
                     if ($this->hasThumb()) {
                         $url = $this->getThumbnailURL($board);
                     } else {
                         if ($this->isAudio()) {
                             $url = media_url("static/img/assets/audio.gif", false);
                         }
                     }
                 }
             }
         }
     }
     $classHTML = $this->getThumbnailClasses();
     // Measure dimensions.
     $height = "auto";
     $width = "auto";
     $maxWidth = "none";
     $maxHeight = "none";
     $minWidth = "none";
     $minHeight = "none";
     $oHeight = $this->thumbnail_height;
     $oWidth = $this->thumbnail_width;
     if ($this->has_thumbnail && !$this->isSpoiler() && !$this->isDeleted()) {
         $height = $oHeight . "px";
         $width = $this->thumbnail_width . "px";
         if (is_integer($maxDimension) && ($oWidth > $maxDimension || $oHeight > $maxDimension)) {
             if ($oWidth > $oHeight) {
                 $height = "auto";
                 $width = $maxDimension . "px";
             } else {
                 if ($oWidth < $oHeight) {
                     $height = $maxDimension . "px";
                     $width = "auto";
                 } else {
                     $height = $maxDimension;
                     $width = $maxDimension;
                 }
             }
         }
         $minWidth = $width;
         $minHeight = $height;
     } else {
         $maxWidth = Settings::get('attachmentThumbnailSize') . "px";
         $maxHeight = $maxWidth;
         $width = $maxWidth;
         $height = "auto";
         if (is_integer($maxDimension)) {
             $maxWidth = "{$maxDimension}px";
             $maxHeight = "{$maxDimension}px";
         }
         if ($this->isSpoiler() || $this->isDeleted()) {
             $minHeight = "none";
             $minWidth = "none";
             $width = $maxWidth;
         }
     }
     return "<div class=\"attachment-wrapper\" style=\"height: {$height}; width: {$width};\">" . "<img class=\"attachment-img {$classHTML}\" src=\"{$url}\" data-mime=\"{$mime}\" data-md5=\"{$md5}\" style=\"height: {$height}; width: {$width};\"/>" . "</div>";
 }
开发者ID:tmrwbo,项目名称:infinity-next,代码行数:82,代码来源:FileStorage.php

示例5: site_url

                                                        <br/>
                                                    </div>
                                                <?php 
            }
            ?>
                                            </div>
                                        <?php 
        } else {
            ?>
                                            <div class="img-album">
                                                <a href="<?php 
            echo site_url('/admin/media_manager/album/' . $image['id']);
            ?>
">
                                                    <img src="<?php 
            echo media_url('image/icon-album.png') . '?' . uniqid();
            ?>
" width="128px" >
                                                    <div class="info_album">
                                                        <div class="info_name"><?php 
            echo $image['label'];
            ?>
</div>
                                                        <div><?php 
            echo $image['count'];
            ?>
 images</div>
                                                    </div>
                                                </a>
                                            </div>
                                        <?php 
开发者ID:achyar10,项目名称:hras,代码行数:31,代码来源:list.php

示例6: registerJsFile

 public function registerJsFile($url, $position = 'before')
 {
     $position = $this->_check_postion($position);
     $this->_js_files[media_url($url)] = $position;
 }
开发者ID:NaszvadiG,项目名称:ImageCMS,代码行数:5,代码来源:template.php

示例7: getAssetURL

 /**
  * Returns either the URL for an asset or their default item.
  *
  * @param  string  asset name
  * @return string  url
  */
 public function getAssetURL($asset)
 {
     $assetObj = $this->assets->where('asset_type', $asset)->first();
     if ($assetObj) {
         return $assetObj->getURL();
     }
     switch ($asset) {
         case "board_icon":
             return media_url("static/img/assets/Favicon_" . ($this->isWorksafe() ? "Burichan" : "Yotsuba") . ".ico", false);
         case "file_spoiler":
             return media_url("static/img/assets/spoiler.png", false);
         case "file_deleted":
             return media_url("static/img/assets/deleted.png", false);
     }
     return media_url("static/img/errors/404.jpg", false);
 }
开发者ID:tmrwbo,项目名称:infinity-next,代码行数:22,代码来源:Board.php

示例8: create_albums_covers

 function create_albums_covers($albums = array())
 {
     $cnt = count($albums);
     for ($i = 0; $i < $cnt; $i++) {
         $thumb_url = $this->conf['upload_url'] . $albums[$i]['id'] . '/' . $this->conf['thumbs_folder'] . '/';
         $albums[$i]['cover_url'] = media_url($thumb_url . $albums[$i]['cover_name'] . $albums[$i]['cover_ext']);
         if ($albums[$i]['cover_name'] == NULL) {
             $image = $this->gallery_m->get_last_image($albums[$i]['id']);
             $albums[$i]['cover_url'] = media_url($thumb_url . $image['file_name'] . $image['file_ext']);
         } else {
             $albums[$i]['cover_url'] = media_url($thumb_url . $albums[$i]['cover_name'] . $albums[$i]['cover_ext']);
         }
     }
     return $albums;
 }
开发者ID:NaszvadiG,项目名称:ImageCMS,代码行数:15,代码来源:gallery.php

示例9: captcha

 function captcha()
 {
     $this->ci->load->helper('dx_captcha');
     // Load library SESSION
     $vals = array('img_path' => $this->ci->config->item('DX_captcha_path'), 'img_url' => media_url() . 'captcha/', 'font_path' => $this->ci->config->item('DX_captcha_fonts_path'), 'font_size' => $this->ci->config->item('DX_captcha_font_size'), 'img_width' => $this->ci->config->item('DX_captcha_width'), 'img_height' => $this->ci->config->item('DX_captcha_height'), 'show_grid' => $this->ci->config->item('DX_captcha_grid'), 'expiration' => $this->ci->config->item('DX_captcha_expire'));
     $cap = create_captcha($vals);
     $store = array('captcha_word' => $cap['word'], 'captcha_time' => $cap['time']);
     // Plain, simple but effective
     $this->ci->session->set_flashdata($store);
     // Set our captcha
     $this->_captcha_image = $cap['image'];
 }
开发者ID:RandomUsernameHere,项目名称:megainfo-corporate-cms,代码行数:12,代码来源:DX_Auth.php

示例10: category

 /**
  * Display category albums
  */
 public function category($id)
 {
     $albums = $this->gallery_m->get_albums('position', 'asc', $id);
     if ($albums != FALSE) {
         $cnt = count($albums);
         for ($i = 0; $i < $cnt; $i++) {
             // Create url to album cover
             $albums[$i]['cover_url'] = media_url($upload_url . $albums[$i]['id'] . '/' . $albums[$i]['cover_name'] . $albums[$i]['cover_ext']);
             $upload_url = $this->conf['upload_url'];
             if ($albums[$i]['cover_name'] == NULL) {
                 $image = $this->gallery_m->get_last_image($albums[$i]['id']);
                 if ($image != FALSE) {
                     $albums[$i]['cover_url'] = media_url($upload_url . $albums[$i]['id'] . '/' . $image['file_name'] . $image['file_ext']);
                 } else {
                     $albums[$i]['cover_url'] = 'empty';
                 }
             } else {
                 $albums[$i]['cover_url'] = media_url($upload_url . $albums[$i]['id'] . '/' . $albums[$i]['cover_name'] . $albums[$i]['cover_ext']);
             }
         }
         $this->template->add_array(array('albums' => $albums));
     }
     $this->template->add_array(array('category' => $this->gallery_m->get_category($id)));
     $this->display_tpl('album_list');
 }
开发者ID:NaszvadiG,项目名称:ImageCMS,代码行数:28,代码来源:admin.php

示例11: captcha

 function captcha()
 {
     $this->ci->load->helper('dx_captcha');
     // Load library SESSION
     //        var_dumps_exit($this->ci->input->is_ajax_request());
     if ($this->ci->uri->segment(1) == 'feedback') {
         $this->ci->load->library('session');
     }
     $vals = array('img_path' => $this->ci->config->item('DX_captcha_path'), 'img_url' => media_url() . 'captcha/', 'font_path' => $this->ci->config->item('DX_captcha_fonts_path'), 'font_size' => $this->ci->config->item('DX_captcha_font_size'), 'img_width' => $this->ci->config->item('DX_captcha_width'), 'img_height' => $this->ci->config->item('DX_captcha_height'), 'show_grid' => $this->ci->config->item('DX_captcha_grid'), 'expiration' => $this->ci->config->item('DX_captcha_expire'));
     $cap = create_captcha($vals);
     $store = array('captcha_word' => $cap['word'], 'captcha_time' => $cap['time']);
     // Plain, simple but effective
     $this->ci->session->set_flashdata($store);
     // Set our captcha
     $this->_captcha_image = $cap['image'];
 }
开发者ID:NaszvadiG,项目名称:ImageCMS,代码行数:16,代码来源:DX_Auth.php

示例12: form_label

                    </div>
                    <div id="collapseTwo" class="panel-collapse collapse in">
                        <div class="panel-body">
                            <div class="field-row row-fluid">
                                <div class="col-md-4">
                                    <?php 
echo form_label(__('Avatar', true), 'avator');
?>
                                </div>
                                <div class="col-md-8">

                                    <?php 
$avatar = isset($user->avatar) ? $user->avatar : 'media/users/avatar.png';
?>
                                    <img src="<?php 
echo media_url($avatar);
?>
" width="32" height="32" alt=".." class="pull-left img-circle"/> 
                                    <?php 
echo form_upload(array('name' => 'avatar', 'id' => 'profileAvatar'));
?>
                                    <span class="clearfix"></span>

                                </div>
                                <div class="clearfix"></div>
                            </div>
                            <br />
                            <div class="field-row row-fluid">
                                <div class="col-md-4">
                                    <?php 
echo form_label(__('Address', true), 'address');
开发者ID:NaszvadiG,项目名称:bootigniter,代码行数:31,代码来源:profile-form.php

示例13: media_url

<!DOCTYPE html>
<html>
<head>
  <title><?php 
echo $par['par_employe_name'];
?>
</title> 
  <link rel="icon" href="<?php 
echo media_url('ico/a.png');
?>
" type="image/x-icon">
  <style type="text/css">
   .upper { text-transform: uppercase; }
   .lower { text-transform: lowercase; }
   .cap   { text-transform: capitalize; }
   .small { font-variant:   small-caps; }
 </style>
 <style type="text/css">
  @page {
    margin-top: 0.4cm;
    margin-bottom: 0.1em;
    margin-left: 0.5cm;
    margin-right: 0.3cm;
  }
  body {
    font-family: sans-serif;
  }
  table {
    border-collapse: collapse;
  }
开发者ID:achyar10,项目名称:hras,代码行数:30,代码来源:par_pdf.php


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