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; }
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; }
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; }
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; }
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; }
function collect_smilies_ranks($path) { $smiley_rank_images = (array) JFolder::Files($path, false, false, false, array('index.php', 'index.html')); return $smiley_rank_images; }
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); } }