本文整理汇总了PHP中img_path函数的典型用法代码示例。如果您正苦于以下问题:PHP img_path函数的具体用法?PHP img_path怎么用?PHP img_path使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了img_path函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: copyselectedurl
function copyselectedurl($config = array())
{
need_login('ajax_page');
global $base_root;
$ids = $this->getPost('sel_id');
if (!$ids || count($ids) == 0) {
ajax_box(lang('copyimg:pls_sel_photo_want_to_copy'));
} else {
$site_url = $this->setting->get_conf('site.url');
$mdl_photo =& loader::model('photo');
$ids = array_keys($ids);
$html = '';
$urls = '';
$ubb = '';
foreach ($ids as $id) {
$pic = $mdl_photo->get_info($id);
$img_path = img_path($pic['path']);
$html_code = $config['tpl'];
$html_code = str_replace('{thumbpath}', img_path($pic['thumb']), $html_code);
$html_code = str_replace('{imgpath}', $img_path, $html_code);
$html_code = str_replace('{imgname}', $pic['name'], $html_code);
$html_code = str_replace('{detailurl}', $base_root . site_link('photos', 'view', array('id' => $pic['id'])), $html_code);
$html .= $html_code . $config['split'];
$urls .= $img_path . "\r\n";
$ubb .= '[IMG]' . $img_path . "[/IMG]\r\n";
}
$this->output->set('img_url', $urls);
$this->output->set('img_html', $html);
$this->output->set('img_ubb', $ubb);
loader::view('copyimg:copyurlall');
}
}
示例2: frontend_render
/**
* Returns an array for Form_builder to use in rendering
*
* @access public
* @param array Parameters for rendering
* @return array
*/
function frontend_render($field_model, $create = FALSE)
{
$field = $field_model->values();
$field['type'] = 'date';
$field['class'] = 'date';
// may remove if we ever decide to add it as a configuration parameter
$field['js'] = '<script>imgPath = "' . img_path('', FUEL_FOLDER) . '";</script>';
$field['show_on'] = 'focus';
return $field;
}
示例3: map
/**
* Define the routes for the application.
*
* @param \Illuminate\Routing\Router $router
* @return void
*/
public function map(Router $router)
{
#if (!$this->app->routesAreCached()) {
// Handle legacy routes
$router->get('blog/wp-content/uploads/{img_ref_path}', function ($img_ref_path) {
return file_get_contents(img_path($img_ref_path));
});
$router->group(['namespace' => $this->namespace], function ($router) {
if (in_array(Input::server('HTTP_HOST'), ['www.joejiko.com', 'local.joejiko.com'])) {
require_once __DIR__ . '/../Http/routes.php';
}
});
#}
}
示例4: fuel_var
<meta name="keywords" content="<?php
echo fuel_var('meta_keywords');
?>
">
<meta name="description" content="<?php
echo fuel_var('meta_description');
?>
">
<link href='http://fonts.googleapis.com/css?family=Raleway:400,700' rel='stylesheet' type='text/css'>
<?php
echo css('main') . css($css);
if (!empty($is_blog)) {
echo $CI->fuel_blog->header();
}
?>
</head>
<body>
<div class="page">
<div class="wrapper">
<header class="page_header">
<div class="logo"><object type="image/svg+xml" width="160" height="145" data="<?php
echo img_path('_template_icons.svg#fuel');
?>
"></object></div>
<h1><?php
echo fuel_var('heading');
?>
</h1>
</header>
示例5: fuel_url
?>
" alt="Layouts" /> <a href="<?php
echo fuel_url('users');
?>
">Users & Permissions</a></h2>
<p>FUEL CMS users are created in the users module in the admin. A single user can subscribe to as many permissions as necessary however, the permissions to manage users and permisisons
gives a user admin level control so use wisely. Furthermore, certain permissions may not be applicable to your setup.</p>
<h2 id="cache" class="ico ico_manage_cache"><img src="<?php
echo img_path('icons/ico_page_lightning.png', 'fuel');
?>
" alt="Layouts" /> <a href="<?php
echo fuel_url('manage/cache');
?>
">Page Cache</a></h2>
<p>FUEL CMS uses a cache to speed up the delivery of pages. Sometimes changes are made to static layouts or blocks and your changes may not be immediately reflected. This is most likely
related to the cache which can be <a href="<?php
echo fuel_url('manage/cache');
?>
">cleared here</a>.</p>
<h2 id="settings" class="ico ico_settings"><img src="<?php
echo img_path('icons/ico_table_gear.png', 'fuel');
?>
" alt="Layouts" /> <a href="<?php
echo fuel_url('settings');
?>
">Settings</a></h2>
<p>Although it's unlikely you'll need to worry too much about this, some modules have extra configuration settings you can manage in the CMS. For example, you may have a blog settings area if the blog is installed.</p>
示例6: url
</p>
<p>For inline editing to work, you must be logged into FUEL and have the proper permissions to edit the page or module information.
A <span style="background: transparent url(<?php
echo img_path('ico_pencil.png', FUEL_FOLDER);
?>
) no-repeat; display: inline-block; height: 16px; width: 16px;"></span> pencil icon
will appear over editable areas when the editing for the page is toggled on. Clicking on the icon will overlay a form over your page to edit the values in context.</p>
<h2>Page Inline Editing</h2>
<p>Page inline editing allows you to edit the values of variables used in the page.
A FUEL logo will be displayed in the upper right area of the page that can slide out and provide you
the ability to toggle inline editing, publish status and caching. Clicking the inline editing pencil will toggle inline editing on.</p>
<img src="<?php
echo img_path('examples/page_inline_editing.jpg', 'user_guide');
?>
" class="screen" />
<h2>Module Inline Editing</h2>
<p>For those pages that may not be editible, you can still allow for module data to be edited (e.g. news items).
The top right area <strong>will not</strong> have the controls for page publish status, caching or layouts and will look like the following:</p>
<img src="<?php
echo img_path('examples/inline_editing.jpg', 'user_guide');
?>
" class="screen" />
<p>Clicking the pencil will reveal the form to edit the module information.</p>
<img src="<?php
echo img_path('examples/inline_editing_form.jpg', 'user_guide');
?>
" class="screen" />
示例7: form_fields
/**
* Add FUEL specific changes to the form_fields method
*
* @access public
* @param string
* @param int
* @return boolean
*/
function form_fields($values = array(), $related = array())
{
$fields = parent::form_fields($values, $related);
$order = 1;
// create default images
$upload_path = assets_server_path('', 'images');
$order = 1;
foreach ($fields as $key => $field) {
$fields[$key]['order'] = $order;
// get field names that end with _image
if ($fields[$key]['type'] == 'string' and substr($key, -5) == 'image' or substr($key, -3) == 'img') {
$img = '';
if (!empty($values['id'])) {
if (!empty($values[$key])) {
$img = '<div class="img_display"><img src="' . img_path($values[$key]) . '" style="float: right;"/></div>';
}
}
$fields[$key]['class'] = 'asset_select';
$order++;
$fields[$key . '_upload'] = array('order' => $order, 'before_html' => $img, 'label' => '... OR upload an image', 'upload_path' => $upload_path, 'type' => 'file', 'overwrite' => TRUE);
}
$order++;
}
$yes = lang('form_enum_option_yes');
$no = lang('form_enum_option_no');
if (isset($fields['published'])) {
$fields['published']['order'] = 9999;
$fields['published']['options'] = array('yes' => $yes, 'no' => $no);
}
if (isset($fields['active'])) {
$fields['active']['order'] = 9999;
$fields['active']['options'] = array('yes' => $yes, 'no' => $no);
}
return $fields;
}
示例8: img_path
<h1 class="module">Experimentalvortrag</h1>
<div class="article">
<p>
Am Montag, den 28.02.2011 erklärten sich die ausgebildeten Pyrotechniker der Feuerwehr Bad Soden Andreas Henning und Manuel Napp bereit, einen Experimentalvortrag für die Jugendfeuerwehr zu halten.
Los ging es mit der theoretischen und praktischen Vorstellung der fünf Brandklassen: feste Stoffe, flüssig oder flüssig werdende Stoffe, gasförmige Stoffe, Brände von Metallen und Brände von
Speiseölen / fetten. Hierbei wurden zunächst die Eigenschaften einzelner Stoffe jeder Brandklasse beschrieben und anschließend in einem praktischen Versuch dargestellt, wie der Stoff entzündet wird,
wie man ihn wieder löschen kann, aber vor allem, mit welchem Löschmittel man keinen Erfolg haben würde. Das ist im besonders Bereich der Gefahrstoffe ein wichtiger Punkt, aber hierzu später mehr.
</p>
<p class="smallimages">
<img src="<?php
echo img_path('nachwuchs/content_jugend_A_small.jpg');
?>
" style="float: left;" />
<img src="<?php
echo img_path('nachwuchs/content_jugend_B_small.jpg');
?>
" style="float: left;" />
<hr class="clear" />
</p>
<p>
Nach dem Thema Brandklassen wurde noch kurz auf die Eigenschaften von Dämpfen eingegangen. Anhand zweier Versuche, bei der eine Kerze tiefer als ein flüssiger Stoff gestellt wurde,
konnte man gut erkennen, dass Dämpfe schwerer als Luft sind. Das Benzin was im Vergleich zur Kerze erhöht gelagert war, fing nach einer kurze Zeit durch die abwärts fließenden Dämpfe Feuer.
Zum Schluss durften die Jugendlich noch eine Mülltonne löschen, die nach geglaubtem Löscherfolg wieder anfing zu brennen. Anschließend wurde dargestellt, wie ein Stoff, der nicht mit Wasser
in Berührung kommen darf, reagiert, wenn es doch einmal dazu kommen sollte.
</p>
<p>
Die Jugendfeuerwehr bedankt sich bei den beiden Kameraden für einen spannenden und informativen Abend und freut sich schon auf den nächsten Vortrag dieser Art.
</p>
</div>
<hr class="clear" />
示例9: form_label
echo form_label('Image' . lang('bf_form_label_required'), 'banner_image', array('class' => 'control-label'));
?>
<div class='controls'>
<input id='banner_image' type='text' name='banner_image' maxlength="255" value="<?php
echo set_value('banner_image', isset($banner['image']) ? $banner['image'] : '');
?>
" />
<span class='help-inline'><?php
echo form_error('image');
?>
</span>
<a class="btn btn-primary" id="image_btn_chooser" data-target="banner_image" href="#">Add Image</a>
<div class="box_popup" id="banner_image_box" style="display:none">
<h2>Media List <a class="closeme" href="#">x</a></h2>
<header style="display:none;"><img src="<?php
echo img_path();
?>
ajax-loader.gif" /></header>
<article>
</article>
<!--<h2><input type="button" id="done_file" class="btn btn-primary" value="Done" ></h2>-->
</div>
</div>
<div class='controls' id="file_box">
</div>
</div>
<div class="control-group <?php
示例10: get_image_path
function get_image_path()
{
return img_path($this->image);
}
示例11: img_path
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="utf-8">
<title>Inscription sur le site NINFO</title>
</head>
<body>
<table border="0" align="center" cellpadding="0" cellspacing="0" style="width:640px;font-family:Century Gothic,Verdana, Geneva, sans-serif;">
<tr>
<td align="center" style="text-align: center;">
<a href=""><img width="445" height="57" src="<?php
echo img_path('logo-agencora.png');
?>
"/></a>
</td>
</tr>
<tr>
<td>
<br/><br/>
<h2>Bonjour <?php
echo $firstname . ' ' . $lastname;
?>
</h2>
<p>Un compte vous a été créé par NINFO pour pouvoir accéder à son site.</p>
<hr>
<p><?php
echo $message_mail;
?>
</p>
<p>Vos identifiants:</p>
<ul>
示例12: img_path
<img src="<?php
echo img_path('screens/screen_pages_list.jpg', FUEL_FOLDER);
?>
" class="screen" />
</div>
<a name="edit_view"></a>
<h2>Module Edit View</h2>
<p>Below is an edit view for a page item.</p>
<div class="screenshot">
<div class="overlay" style="top: 12px; left: 540px;">Actions Bar</div>
<div class="overlay" style="top: 45px; left: 951px;">Select Other Module Items</div>
<div class="overlay" style="top: 112px; left: 756px;">Restore From Previous</div>
<div class="overlay" style="top: 245px; left: 650px;">Editing Form</div>
<div class="overlay" style="top: 7px; left: 360px;">Breadcrumb</div>
<img src="<?php
echo img_path('screens/screen_page_edit.jpg', FUEL_FOLDER);
?>
" class="screen" />
</div>
<h2>Edit User Permissions</h2>
<p>Below is the edit user view.</p>
<div class="screenshot">
<div class="overlay" style="top: 255px; left: 560px;">User Information</div>
<div class="overlay" style="top: 505px; left: 560px;">Permissions</div>
<img src="<?php
echo img_path('screens/screen_users.jpg', FUEL_FOLDER);
?>
" class="screen" />
</div>
示例13: img_path
<h1>Assets</h1>
<p>The Assets module allows you to manage the images, css, and javascript for your sites. You must set the asset folders you want managed
to have writable permissions. </p>
<img src="<?php
echo img_path('examples/screen_assets.jpg', 'user_guide');
?>
" class="screen" />
示例14: fuelify
/**
* Renders the inline editing markers before final output
*
* @access public
* @param string The output to be rendered
* @return string
*/
public function fuelify($output)
{
// if not logged in then we remove the markers
if (!$this->fuel->config('admin_enabled') or $this->variables('fuelified') === FALSE or !$this->_fuelified or empty($output) or defined('FUELIFY') and FUELIFY === FALSE) {
return $this->remove_markers($output);
}
$this->CI->load->helper('convert');
// add top edit bar for fuel
$this->CI->config->module_load('fuel', 'fuel', TRUE);
// render the markers to the proper html
$output = $this->render_all_markers($output);
// set main image and assets path before switching to fuel assets path
$vars['init_params'] = array('assetsImgPath' => img_path(''), 'assetsPath' => assets_path(''));
$orig_asset_path = $this->CI->asset->assets_path;
$this->CI->asset->assets_path = $this->fuel->config('fuel_assets_path');
$this->CI->load->helper('ajax');
$this->CI->load->library('form');
$last_page = uri_path();
if (empty($last_page)) {
$last_page = $this->fuel->config('default_home_view');
}
$vars['last_page'] = uri_safe_encode($last_page);
if (!$this->_fuelified_processed) {
// create the inline edit toolbar
$inline_edit_bar = $this->fuel->admin->toolbar();
$fuel_js_obj = "<script>if (typeof fuel == 'undefined') fuel = {}</script>\n";
$inline_css = css('fuel_inline', 'fuel', array('output' => $this->fuel->config('fuel_assets_output')));
$output = preg_replace('#(</head>)#i', $fuel_js_obj . $inline_css . "\n\$1", $output);
$output = preg_replace('#(</body>)#i', $inline_edit_bar . "\n\$1", $output);
$this->CI->config->set_item('assets_path', $this->CI->config->item('assets_path'));
}
$this->_fuelified_processed = TRUE;
$this->CI->asset->assets_path = $orig_asset_path;
return $output;
}
示例15: fuelify
function fuelify($output)
{
// if not logged in then we remove the markers
if (!$this->_CI->config->item('admin_enabled', 'fuel') or $this->variables('fuelified') === FALSE or !$this->_fuelified or empty($output) or defined('FUELIFY') and FUELIFY === FALSE) {
return $this->remove_markers($output);
}
$this->_CI->load->library('session');
// add top edit bar for fuel
$this->_CI->config->module_load('fuel', 'fuel', TRUE);
// render the markers to the proper html
$output = $this->render_all_markers($output);
// set main image and assets path before switching to fuel assets path
$vars['init_params'] = array('assetsImgPath' => img_path(''), 'assetsPath' => assets_path(''));
$this->_CI->asset->assets_path = $this->_CI->config->item('fuel_assets_path', 'fuel');
$this->_CI->load->helper('ajax');
$this->_CI->load->library('form');
$vars['page'] = $this->properties();
$vars['layouts'] = $this->_CI->fuel_layouts->layouts_list(TRUE);
$editable_asset_types = $this->_CI->config->item('editable_asset_filetypes', 'fuel');
// add javascript
$vars['init_params']['pageId'] = !empty($vars['page']['id']) ? $vars['page']['id'] : 0;
$vars['init_params']['basePath'] = WEB_PATH;
$vars['init_params']['imgPath'] = img_path('', 'fuel');
$vars['init_params']['cssPath'] = css_path('', 'fuel');
$vars['init_params']['jsPath'] = js_path('', 'fuel');
$vars['assetsAccept']['assetsAccept'] = !empty($editable_asset_types['media']) ? $editable_asset_types['media'] : 'jpg|gif|png';
// database specific... so we must check the fuel mode to see if we actually need to make a call to the database.
// otherwise we get an error when the mode is set to views
if ($this->_CI->config->item('fuel_mode', 'fuel') == 'views') {
$vars['others'] = array();
} else {
$this->_CI->load->module_model(FUEL_FOLDER, 'pages_model');
$vars['others'] = $this->_CI->pages_model->get_others('location', $this->location, 'location');
}
if (!$this->_fuelified_processed) {
$inline_edit_bar = $this->_CI->load->module_view(FUEL_FOLDER, '_blocks/inline_edit_bar', $vars, TRUE);
$output = str_replace('</head>', css('fuel_inline', 'fuel') . "\n</head>", $output);
$output = str_replace('</body>', $inline_edit_bar . "\n</body>", $output);
$this->_CI->config->set_item('assets_path', $this->_CI->config->item('assets_path'));
}
$this->_fuelified_processed = TRUE;
return $output;
}