';
$javascript .= file_get_contents(PATH_JS.'bludit-tags.js', true);
$javascript .= '';
// HTML
$html = '
';
echo $html.$javascript;
}
public static function title($args)
{
$id = empty($args['id']) ? '' : 'id="'.$args['id'].'"';
$html = ' '.$args['title'].'
';
echo $html;
}
public static function formOpen($args)
{
$class = empty($args['class']) ? '' : ' '.$args['class'];
$id = empty($args['id']) ? '' : 'id="'.$args['id'].'"';
$html = '';
$script = '';
echo $html.$script;
}
// label, name, value, tip
public static function formInputText($args)
{
$id = 'js'.$args['name'];
$type = isset($args['type']) ? $args['type'] : 'text';
$class = empty($args['class']) ? '' : 'class="'.$args['class'].'"';
$placeholder = empty($args['placeholder']) ? '' : 'placeholder="'.$args['placeholder'].'"';
$disabled = empty($args['disabled']) ? '' : 'disabled';
$html = '';
echo $html;
}
// label, name, value, tip
public static function formInputRadio($args)
{
$id = 'js'.$args['name'];
$type = isset($args['type']) ? $args['type'] : 'text';
$class = empty($args['class']) ? '' : 'class="'.$args['class'].'"';
$placeholder = empty($args['placeholder']) ? '' : 'placeholder="'.$args['placeholder'].'"';
$disabled = empty($args['disabled']) ? '' : 'disabled';
$html = '';
echo $html;
}
public static function formInputPassword($args)
{
$args['type'] = 'password';
self::formInputText($args);
}
public static function formTextarea($args)
{
$id = 'js'.$args['name'];
$type = isset($args['type']) ? $args['type'] : 'text';
$class = empty($args['class']) ? '' : 'class="'.$args['class'].'"';
$placeholder = empty($args['placeholder']) ? '' : 'placeholder="'.$args['placeholder'].'"';
$rows = empty($args['rows']) ? '' : 'rows="'.$args['rows'].'"';
$html = '';
echo $html;
}
public static function formSelect($args)
{
$id = 'js'.$args['name'];
$type = isset($args['type']) ? $args['type'] : 'text';
$class = empty($args['class']) ? '' : 'class="'.$args['class'].'"';
$html = '';
echo $html;
}
public static function formInputHidden($args)
{
$id = 'js'.$args['name'];
$html = '';
echo $html;
}
public static function legend($args)
{
$class = empty($args['class']) ? '' : 'class="'.$args['class'].'"';
$html = '';
echo $html;
}
public static function bluditQuickImages()
{
// Javascript code
include(PATH_JS.'bludit-quick-images.js');
global $L;
$html = '';
$html .= '
';
$thumbnailList = Filesystem::listFiles(PATH_UPLOADS_THUMBNAILS,'*','{'.ALLOWED_EXTENSIONS_IMAGES.'}',true);
array_splice($thumbnailList, THUMBNAILS_AMOUNT);
foreach($thumbnailList as $file) {
$filename = basename($file);
$html .= '

';
}
$html .= '
';
$html .= '
'.$L->g('There are no images').'
';
$html .= '
'.$L->g('Upload and More Images').'
';
echo $html;
}
public static function bluditCoverImage($coverImage="")
{
global $L;
// Javascript code
include(PATH_JS.'bludit-cover-image.js');
$style = '';
if(!empty($coverImage)) {
$style = 'background-image: url('.HTML_PATH_UPLOADS_THUMBNAILS.$coverImage.')';
}
$html = '';
$html .= '
';
echo $html;
}
public static function bluditMenuV8()
{
// Javascript code
include(PATH_JS.'bludit-menu-v8.js');
global $L;
$html = '';
$html .= '
';
echo $html;
}
public static function bluditImagesV8()
{
global $L;
// Javascript code
include(PATH_JS.'bludit-images-v8.js');
$html = '';
$html .= '
';
$thumbnailList = Filesystem::listFiles(PATH_UPLOADS_THUMBNAILS,'*','{'.ALLOWED_EXTENSIONS_IMAGES.'}',true);
foreach($thumbnailList as $file) {
$filename = basename($file);
$html .= '

';
}
$html .= '
';
$html .= '
'.$L->g('There are no images').'
';
$html .= '
';
echo $html;
}
public static function bluditQuickFiles()
{
// Javascript code
include(PATH_JS.'bludit-quick-files.js');
global $L;
$html = '';
$html .= '
';
$thumbnailList = Filesystem::listFiles(PATH_UPLOADS,'*','{'.ALLOWED_EXTENSIONS_FILES.'}',true);
array_splice($thumbnailList, THUMBNAILS_AMOUNT);
foreach($thumbnailList as $file) {
$filename = basename($file);
$html .= '
'.$filename.'
';
}
$html .= '
';
$html .= '
'.$L->g('There are no files').'
';
$html .= '
'.$L->g('Upload and more files').'
';
echo $html;
}
public static function bluditFileMenuV8()
{
// Javascript code
include(PATH_JS.'bludit-filemenu-v8.js');
global $L;
$html = '';
$html .= '
';
echo $html;
}
public static function bluditFilesV8()
{
global $L;
// Javascript code
include(PATH_JS.'bludit-files-v8.js');
$html = '';
$html .= '
';
$thumbnailList = Filesystem::listFiles(PATH_UPLOADS,'*','{'.ALLOWED_EXTENSIONS_FILES.'}',true);
foreach($thumbnailList as $file) {
$filename = basename($file);
$html .= '
'.$filename.'
';
}
$html .= '
';
$html .= '
'.$L->g('There are no files').'
';
$html .= '
';
echo $html;
}
public static function profileUploader($username)
{
global $L;
$html = '';
$html .= '
';
if(file_exists(PATH_UPLOADS_PROFILES.$username.'.png')) {
$html .= '

';
}
else {
$html .= '
'.$L->g('Profile picture').'
';
}
$html .= '
';
$script = '
';
echo $html.$script;
}
}