本文整理汇总了PHP中JFolder::Files方法的典型用法代码示例。如果您正苦于以下问题:PHP JFolder::Files方法的具体用法?PHP JFolder::Files怎么用?PHP JFolder::Files使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JFolder
的用法示例。
在下文中一共展示了JFolder::Files方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getSmileyspaths
public function getSmileyspaths()
{
$template = KunenaFactory::getTemplate();
$selected = $this->getSmiley();
$smileypath = $template->getSmileyPath();
$files1 = (array) JFolder::Files(JPATH_SITE . '/' . $smileypath, false, false, false, array('index.php', 'index.html'));
$files1 = (array) array_flip($files1);
foreach ($files1 as $key => &$path) {
$path = $smileypath . $key;
}
$smileypath = 'media/kunena/emoticons/';
$files2 = (array) JFolder::Files(JPATH_SITE . '/' . $smileypath, false, false, false, array('index.php', 'index.html'));
$files2 = (array) array_flip($files2);
foreach ($files2 as $key => &$path) {
$path = $smileypath . $key;
}
$smiley_images = $files1 + $files2;
ksort($smiley_images);
$smiley_list = array();
foreach ($smiley_images as $file => $path) {
$smiley_list[] = JHtml::_('select.option', $path, $file);
}
$list = JHtml::_('select.genericlist', $smiley_list, 'smiley_url', 'class="inputbox" onchange="update_smiley(this.options[selectedIndex].value);" onmousemove="update_smiley(this.options[selectedIndex].value);"', 'value', 'text', !empty($selected->location) ? $smiley_images[$selected->location] : '');
return $list;
}
示例2: getRankspaths
public function getRankspaths()
{
$template = KunenaFactory::getTemplate();
$selected = $this->getRank();
$rankpath = $template->getRankPath();
$files1 = (array) JFolder::Files(JPATH_SITE . '/' . $rankpath, false, false, false, array('index.php', 'index.html'));
$files1 = (array) array_flip($files1);
foreach ($files1 as $key => &$path) {
$path = $rankpath . $key;
}
$rankpath = 'media/kunena/ranks/';
$files2 = (array) JFolder::Files(JPATH_SITE . '/' . $rankpath, false, false, false, array('index.php', 'index.html'));
$files2 = (array) array_flip($files2);
foreach ($files2 as $key => &$path) {
$path = $rankpath . $key;
}
$rank_images = $files1 + $files2;
ksort($rank_images);
$rank_list = array();
foreach ($rank_images as $file => $path) {
$rank_list[] = JHtml::_('select.option', $path, $file);
}
$list = JHtml::_('select.genericlist', $rank_list, 'rank_image', 'class="inputbox" onchange="update_rank(this.options[selectedIndex].value);" onmousemove="update_rank(this.options[selectedIndex].value);"', 'value', 'text', isset($selected->rank_image) ? $rank_images[$selected->rank_image] : '');
return $list;
}
示例3: getRankspaths
public function getRankspaths()
{
$template = KunenaFactory::getTemplate();
if ($this->getState('item.id')) {
$selected = $this->getRank();
}
$rankpath = $template->getRankPath();
$rank_images = (array) JFolder::Files(JPATH_SITE . '/' . $rankpath, false, false, false, array('index.php', 'index.html'));
$rank_list = array();
$i = 0;
foreach ($rank_images as $id => $row) {
$rank_list[] = JHTML::_('select.option', $rank_images[$id], $rank_images[$id]);
}
$list = JHTML::_('select.genericlist', $rank_list, 'rank_image', 'class="inputbox" onchange="update_rank(this.options[selectedIndex].value);" onmousemove="update_rank(this.options[selectedIndex].value);"', 'value', 'text', isset($selected) ? $selected->rank_image : '');
return $list;
}
示例4: getSmileyspaths
public function getSmileyspaths()
{
$template = KunenaFactory::getTemplate();
if ($this->getState('item.id')) {
$selected = $this->getSmiley();
}
$smileypath = $template->getSmileyPath();
$smiley_images = (array) JFolder::Files(JPATH_SITE . '/media/kunena/emoticons', false, false, false, array('index.php', 'index.html'));
// TODO: need to add lookup for template smileys, too
//$smiley_images = array_merge($smiley_images, (array)JFolder::Files(JPATH_SITE.'/'.$smileypath,false,false,false,array('index.php','index.html')));
$smiley_list = array();
$i = 0;
foreach ($smiley_images as $row) {
$smiley_list[$row] = JHTML::_('select.option', $row, $row);
}
sort($smiley_list);
$list = JHTML::_('select.genericlist', $smiley_list, 'smiley_url', 'class="inputbox" onchange="update_smiley(this.options[selectedIndex].value);" onmousemove="update_smiley(this.options[selectedIndex].value);"', 'value', 'text', !empty($selected) ? $selected->location : '');
return $list;
}
示例5: getSmileyspaths
public function getSmileyspaths() {
$template = KunenaFactory::getTemplate();
if ( $this->getState('item.id') ) {
$selected = $this->getSmiley();
}
$smileypath = $template->getSmileyPath();
$smiley_images = (array)JFolder::Files(KPATH_SITE.'/'.$smileypath,false,false,false,array('index.php','index.html'));
$smiley_list = array();
$i = 0;
foreach ( $smiley_images as $id => $row ) {
$smiley_list[] = JHTML::_ ( 'select.option', $smiley_images [$id], $smiley_images [$id] );
}
$list = JHTML::_('select.genericlist', $smiley_list, 'smiley_url', 'class="inputbox" onchange="update_smiley(this.options[selectedIndex].value);" onmousemove="update_smiley(this.options[selectedIndex].value);"', 'value', 'text', !empty($selected) ? $selected->location : '' );
return $list;
}
示例6: collect_smilies_ranks
function collect_smilies_ranks($path)
{
$smiley_rank_images = (array) JFolder::Files($path, false, false, false, array('index.php', 'index.html'));
return $smiley_rank_images;
}
示例7: Files
public function Files($path)
{
if ($this->mode == 'ftp') {
return $this->source_ftp->listDetails($this->ftp_root . $path, 'files');
} else {
return JFolder::Files($this->source_path . $path);
}
}