本文整理汇总了PHP中NextendUri::pathToUri方法的典型用法代码示例。如果您正苦于以下问题:PHP NextendUri::pathToUri方法的具体用法?PHP NextendUri::pathToUri怎么用?PHP NextendUri::pathToUri使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NextendUri
的用法示例。
在下文中一共展示了NextendUri::pathToUri方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: generateOptions
function generateOptions(&$xml)
{
$template = (string) $this->_xml;
$cssfile = NextendFilesystem::translateToMediaPath(str_replace(DIRECTORY_SEPARATOR, '/', dirname($this->_form->_xmlfile)) . '/style.');
$css = NextendCss::getInstance();
if (NextendFilesystem::fileexists($cssfile . 'less')) {
$css->enableLess();
$cssfile .= 'less';
$css->addCssFile(array($cssfile, $cssfile, array('id' => 'body')));
} else {
$cssfile .= 'css';
$css->addCssFile($cssfile);
}
$prefix = NextendXmlGetAttribute($this->_xml, 'prefix');
$this->_values = array();
$html = '';
foreach ($xml->option as $option) {
$v = NextendXmlGetAttribute($option, 'value');
$this->_values[] = $v;
if ($v != -1) {
$info = pathinfo($v);
$class = $prefix . basename($v, '.' . $info['extension']);
$html .= '
<div class="nextend-radio-option nextend-imagelist-option' . $this->isSelected($v) . '">
' . str_Replace('{image}', NextendUri::pathToUri($v), str_Replace('{class}', $class, $template)) . '
</div>';
} else {
$html .= '<div class="nextend-radio-option' . $this->isSelected($v) . '">' . (string) $option . '</div>';
}
}
return $html;
}
示例2: generateDynamicThumbs
function generateDynamicThumbs($controller, $path, $group, $type, $title, $configured, $full, $available)
{
?>
<div class="smartslider-dynamic-thumb">
<div><?php
echo $title;
?>
</div>
<img src="<?php
echo NextendUri::pathToUri($path);
?>
" /><br />
<?php
if ($full && !smartsliderIsFull()) {
?>
<a class="button small g" href="http://www.nextendweb.com/smart-slider/" target="_blank">Get full</a>
<?php
} elseif (!$configured) {
?>
<a class="button small b" href="<?php
echo $controller->route('controller=settings&view=sliders_settings&action=' . $group);
?>
" target="_blank">Configure</a>
<?php
} elseif ($available !== true) {
?>
<a class="button small" href="<?php
echo $available;
?>
" target="_blank">Check extension</a>
<?php
} else {
?>
<a class="button small b" href="<?php
echo $controller->route('controller=sliders&view=sliders_slider&action=createdynamic&step=2&group=' . $group . '&type=' . $type);
?>
">Start</a>
<?php
}
?>
</div>
<?php
}
示例3: generateOptions
function generateOptions(&$xml)
{
$this->_values = array();
$html = '';
foreach ($xml->option as $option) {
$v = NextendXmlGetAttribute($option, 'value');
$this->_values[] = $v;
if ($v != -1) {
$html .= '<div class="nextend-radio-option nextend-imagelist-option' . $this->isSelected($v) . '"><img src="' . NextendUri::pathToUri($v) . '" alt="' . (string) $option . '" /></div>';
} else {
$html .= '<div class="nextend-radio-option' . $this->isSelected($v) . '">' . (string) $option . '</div>';
}
}
return $html;
}
示例4: getData
function getData($number)
{
$data = array();
$folder = $this->_data->get('sourcefolder', '');
$files = NextendFilesystem::files($folder);
$j = 0;
for ($i = 0; $i < count($files) && $j < $number; $i++) {
$ext = strtolower(pathinfo($files[$i], PATHINFO_EXTENSION));
if ($ext == 'jpg' || $ext == 'jpeg' || $ext == 'png') {
$data[$j] = array();
$data[$j]['thumbnail'] = $data[$j]['image'] = $data[$j]['image_url'] = NextendUri::pathToUri($folder . $files[$i]);
$data[$j]['title'] = $data[$j]['file_name'] = $files[$i];
$j++;
}
}
return $data;
}
示例5: generateJs
function generateJs()
{
$this->generateLibraryJs();
$document = JFactory::getDocument();
if ($this->_cacheenabled) {
if (count($this->_jsFiles)) {
foreach ($this->_jsFiles as $file) {
if (substr($file, 0, 4) == 'http') {
if ($this->_echo) {
parent::serveJsFile($file);
} else {
$document->addScript($file);
}
} else {
$this->_cache->addFile($file);
}
}
}
$this->_cache->addInline($this->_js);
$filename = $this->_cache->getCache();
if ($filename) {
if ($this->_echo) {
parent::serveJsFile($filename);
} else {
$document->addScript($filename);
}
}
} else {
if (count($this->_jsFiles)) {
foreach ($this->_jsFiles as $file) {
if ($this->_echo) {
parent::serveJsFile(NextendUri::pathToUri($file));
} else {
$document->addScript(NextendUri::pathToUri($file));
}
}
}
$this->serveJs();
}
$this->serveInlineJs();
}
示例6: render
static function render($slider, $id, $params)
{
$html = '';
$shadowcss = $params->get('shadowcss', false);
if ($shadowcss && $shadowcss != -1) {
$displayclass = self::getDisplayClass($params->get('widgetshadowdisplay', '0|*|always|*|0|*|0'), false);
list($style, $data) = self::getPosition($params->get('shadowposition', ''));
$width = NextendParse::parse($params->get('shadowwidth', 'width'));
if (is_numeric($width) || $width == 'auto' || substr($width, -1) == '%') {
$style .= 'width:' . $width . ';';
} else {
$data .= 'data-sswidth="' . $width . '" ';
}
$css = NextendCss::getInstance();
$css->addCssFile(NextendFilesystem::translateToMediaPath(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'shadow' . DIRECTORY_SEPARATOR . 'style.css'));
$info = pathinfo($shadowcss);
$class = 'nextend-shadow nextend-shadow-' . basename($shadowcss, '.' . $info['extension']);
$html .= '<div class="' . $displayclass . $class . '" style="line-height:0;' . $style . '" ' . $data . '><img src="' . (nextendIsWordpress() ? plugins_url('shadow/shadow/' . $info['basename'], __FILE__) : NextendUri::pathToUri(NextendFilesystem::getBasePath() . $shadowcss)) . '"/></div>';
}
return $html;
}
示例7: generateDynamicSliderThumbs
function generateDynamicSliderThumbs($controller, $image, $sliderid, $id, $data)
{
global $layout, $sliderpreset;
?>
<div class="smartslider-dynamic-thumb <?php
echo $sliderpreset == $id ? 'selected' : 'notselected';
?>
" onclick="location.href='<?php
echo $controller->route('controller=sliders&view=sliders_slider&action=changedynamiclayout&fontset=' . NextendRequest::getInt('fontset', 0) . '&type=' . NextendRequest::getVar('type', '') . '&sliderid=' . $sliderid . '&sliderpreset=' . ($sliderpreset == $id ? '' : $id) . '&layout=' . $layout);
?>
'">
<div><?php
echo $data['title'];
?>
</div>
<img src="<?php
echo NextendUri::pathToUri(NextendFilesystem::translateToMediaPath($image));
?>
" />
</div>
<?php
}
示例8: pathToAbsoluteURL
static function pathToAbsoluteURL($path)
{
return NextendUri::pathToUri($path);
}
示例9:
</tr>
<tr class="smartslider-slider-publish-note">
<td>Copy and paste this shortcode into your posts:</td>
<td>Insert it into an existing post with the icon:</td>
<td>Paste the PHP code into your template file:</td>
</tr>
<tr>
<td>
<code class="code-box">[smartslider2 slider="<?php
echo $this->sliderid;
?>
"]</code>
</td>
<td style="line-height:0px;">
<img src="<?php
echo NextendUri::pathToUri(NEXTEND_SMART_SLIDER2_ASSETS . 'admin/images/wordpress-publish.png');
?>
" />
</td>
<td>
<code class="code-box">
<?php <br />
echo do_shortcode('[smartslider2 slider="<?php
echo $this->sliderid;
?>
"]');<br />
?></code>
</td>
</tr>
</table>
</div>
示例10: fetchElement
//.........这里部分代码省略.........
<div class="nextend-mixed-label">
<label for="description'.$i.'" id="description'.$i.'-lbl">Description</label>
</div>
<div class="nextend-mixed-element">
<div class="nextend-textarea ">
<textarea autocomplete="off" style="width:400px; height: 40px;" name="" id="description'.$i.'"></textarea>
</div>
</div>
</div>
</div>
<div style="clear:both;"></div>
</script>
<script>
njQuery(window).ready(function(){
var $ = njQuery,
images = $('#selected-images'),
deleteimage = $('#delete-image'),
form = $('#smartslider-form'),
skeleton = njQuery('#image-form-skeleton').html(),
iii = 10000;
function addImageToList(img){
var el = $('<li><img src="'+img+'" />'+skeleton.replace(/'\.\$i\.'/g, iii)+'</li>').appendTo(images);
iii++;
images.sortable( "refresh" );
$(window).trigger('resize');
return el;
}
<?php
if (nextendIsJoomla()) {
?>
var folder = "<?php
echo NextendUri::pathToUri(JPATH_ROOT . '/' . JComponentHelper::getParams('com_media')->get('image_path', 'images') . '/');
?>
",
iframe = $('#image-chooser'),
frame = $('#image-chooser');
frame.on('load', function(){
frame = $(this.contentWindow.document);
frame.find('#imageframe').next('.well').remove();
frame.find('#imageframe').next('fieldset').remove();
frame.find('#imageframe').prev('fieldset').find('.fltrt').remove();
frame.find('#imageForm').find('.pull-right').remove();
frame.find('#upbutton').css('verticalAlign', 'top');
this.contentWindow.ImageManager.populateFields = function(file){
addImageToList(folder+file);
}
frame.find('#system-message-container').css('paddingTop', '15px');
frame.find('body').css('overflow', 'hidden').css('padding', '0 15px');
iframe.css('height', frame.find('html').prop('scrollHeight'));
$(window).trigger('resize');
});
<?php
} elseif (nextendIsWordpress()) {
?>
var file_frame;
jQuery('#smartslider-admin .add-image').on('click', function(event){
event.preventDefault();
// If the media frame already exists, reopen it.
if ( file_frame ) {
file_frame.open();
return;
示例11: generateImportThumbs
function generateImportThumbs($controller, $path, $filename, $imagesToUrl, $full = false)
{
?>
<div class="smartslider-import-thumb">
<img src="<?php
echo NextendUri::pathToUri($path);
?>
" /><br />
<?php
if (!$full || smartsliderIsFull()) {
?>
<a class="button small b" href="<?php
echo $controller->route('controller=sliders&view=sliders_slider&action=importlocal&full=' . ($full ? 1 : 0) . '&slider=' . substr($filename, 0, -4));
?>
">Import</a>
<?php
} else {
?>
<a class="button small g" href="http://www.nextendweb.com/smart-slider/" target="_blank">Get full</a>
<?php
}
?>
<?php
if (isset($imagesToUrl[$filename])) {
?>
<a class="button small" href="<?php
echo $imagesToUrl[$filename];
?>
" target="_blank">Preview</a>
<?php
}
?>
</div>
<?php
}