$v) {
if (!Folder::exists( $v[1])) {
if (Folder::create( $v[1], 0755 )) {
$data = "\n
\n\n";
File::write($v[1].'/'."index.html", $data);
$msg .= 'Folder ' . $v[0]
.' created!
';
} else {
$msg .= 'Folder ' . $v[0]
.' creation failed! Please create it manually.
';
}
} else {
// Folder exists
$msg .= 'Folder ' . $v[0]
.' exists!
';
}
}
return $msg;
}
function install($parent) {
$this->loadLanguage($parent);
$msg = $this->createFolders();
Factory::getApplication()->enqueueMessage($msg, 'message');
return true;
}
function uninstall($parent) {
//$this->loadLanguage($parent);
return true;
}
function update($parent) {
//$this->loadLanguage($parent);
$msg = $this->createFolders();
Factory::getApplication()->enqueueMessage($msg, 'message');
return true;
}
public function loadLanguage($parent) {
$extension = $this->extension;
$lang = Factory::getLanguage();
$path = $parent->getParent()->getPath('source');
$lang->load($this->extension, $path, 'en-GB', true);
$lang->load($this->extension, $path, $lang->getDefault(), true);
$lang->load($this->extension, $path, null, true);
$lang->load($this->extension . '.sys', $path, 'en-GB', true);
$lang->load($this->extension . '.sys', $path, $lang->getDefault(), true);
$lang->load($this->extension . '.sys', $path, null, true);
return true;
}
function preflight($type, $parent) {
$this->loadLanguage($parent);
return true;
}
function postflight($type, $parent) {
$this->loadLanguage($parent);
if ($type == 'update' || $type == 'install') {
if ($type == 'update') {
$status = Text::_($this->updatetext);
} else {
$status = Text::_($this->installtext);
}
$version = Text::_($this->versiontext). ': ' . $parent->getManifest()->version;
$link = 'index.php?option='.$this->extension;
$component = Text::_($this->extensiontext);
$configure = Text::_($this->configuretext);
$o = '';
$o .= $this->getStyle();
$o .= '';
$o .= '
';
$o .= ' '.$status.'';
$o .= ' '.$version.'';
$o .= '
';
$o .= ' ';
$o .= '
';
$o .= '
';
$o .= '
Phoca';
$o .= '
';
///$o .= '
';
$upEL = 'https://extensions.joomla.org/extension/phoca-download/';
$upE = 'Phoca Download';
$o .= '';
$o .= '
';
$o .= '
If you find this project useful, please support it with a donation
';
$o .= '
';
$o .= '
';
$o .= '
';
$o .= '
If you find this project useful, please post a rating and review on the Joomla! Extension Directory website
';
$o .= '
'. $upE.' (JED website)';
$o .= '';
$o .= '
';
$o .= '
';
$o .= '
';
$o .= '
There are over a hundred more useful Phoca extensions, discover them on
';
$o .= '
Phoca website';
$o .= '
';
$o .= '
';
$o .= '';//g5i
echo $o;
}
return true;
}
function getStyle() {
return "";
}
}