'; $javascript .= file_get_contents(PATH_JS.'bludit-tags.js', true); $javascript .= ''; // HTML $html = '
'; $html .= ' '; $html .= ' '; $html .= '
'; $html .= ' '; $html .= ' '; $html .= '
'; foreach ($args['allTags'] as $tag) { $html .= ' '.$tag.''; } $html .= '
'; $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 = '
'; echo $html; } public static function formClose() { $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 = '
'; if(!empty($args['label'])) { $html .= ''; } $html .= '
'; $html .= ''; if(!empty($args['tip'])) { $html .= '

'.$args['tip'].'

'; } $html .= '
'; $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 = '
'; $html .= '
'; $html .= ''; if(!empty($args['tip'])) { $html .= '

'.$args['tip'].'

'; } $html .= '
'; $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 = '
'; if(!empty($args['label'])) { $html .= ''; } $html .= '
'; $html .= ''; if(!empty($args['tip'])) { $html .= '

'.$args['tip'].'

'; } $html .= '
'; $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'].'"'; $disabled = empty($args['disabled']) ? '' : 'disabled'; $html = '
'; $html .= ''; $html .= '
'; $html .= ''; $html .= '

'.$args['tip'].'

'; $html .= '
'; $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 = ''.$args['value'].''; 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,'*','*',true); array_splice($thumbnailList, THUMBNAILS_AMOUNT); foreach($thumbnailList as $file) { $filename = basename($file); $html .= 'Thumbnail'; } $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 .= '
'.$L->g('Cover image').'
'.$L->g('Drag and drop or click here').'
0%
'; 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 .= '
'.$L->g('Upload image').'
'.$L->g('Drag and drop or click here').'
0%
'; $thumbnailList = Filesystem::listFiles(PATH_UPLOADS_THUMBNAILS,'*','*',true); foreach($thumbnailList as $file) { $filename = basename($file); $html .= 'Thumbnail'; } $html .= '
'; $html .= '
'.$L->g('There are no images').'
'; $html .= '
'; echo $html; } public static function profileUploader($username) { global $L; $html = ''; $html .= '
'; if(file_exists(PATH_UPLOADS_PROFILES.$username.'.png')) { $html .= 'Profile picture'; } else { $html .= '
'.$L->g('Profile picture').'
'; } $html .= '
0%
'.$L->g('Upload image').'
'.$L->g('Drag and drop or click here').'
'; $script = ' '; echo $html.$script; } }