WebsiteBaker 2.13.8 is now available!
R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WBhttps://forum.websitebaker.org/index.php/topic,32355.0.html
-- <?php header($_SERVER['SERVER_PROTOCOL'].' 404 Not Found'); echo '404 Not Found'; flush(); exit;?>
function MediaDirectoryList($directory, $show_hidden = false){ $aMediaFolderList = []; if (\is_dir($directory)) { $dir = array_values(array_diff(\scandir($directory),['.','..'])); //Open directory foreach ($dir as $key => $entry) { if(($entry[0] === '.') && ($show_hidden == false)) { continue; } // Skip hidden files $sItem = str_replace('//', '/',$directory.'/'.$entry.(\is_dir($directory.'/'.$entry) ? '' : '')); if (\is_dir($sItem)) { // Add dir and contents to list $aMediaFolderList = \array_merge($aMediaFolderList, MediaDirectoryList($sItem)); $aMediaFolderList[] = str_replace(WB_PATH."/",'',$sItem); } } } if (\natcasesort($aMediaFolderList)) { // new indexing $aMediaFolderList = \array_merge($aMediaFolderList); } return $aMediaFolderList; // Now return the list}$aMediaFolderList = MediaDirectoryList(WB_PATH.MEDIA_DIREC TORY);
<select name="url" style="width: 100%;padding:4px;"> <option value="media">media</option> <?php foreach ($aMediaFolderList as $aFolder){ echo '<option value="'.$aFolder.'" '; if ($aFolder == $url){echo ' selected = "selected"';} echo ' > '.$aFolder.'</option>'; } ?> </select>
// crop_images / default='' if(isset($aRequestVars['crop_images']) && ($aRequestVars['crop_images'] == 'checked')) { $sCropImages = 'checked'; }else{ $sCropImages = ''; }
For more feedback maybe it is a good idea to attache the module here as installable module.Or give github now installable zips?
DROP TABLE IF EXISTS `{TABLE_PREFIX}mod_pixofcake`;CREATE TABLE IF NOT EXISTS `wb_mod_pixofcake` (
$sql = 'SELECT COUNT(*) FROM `'.TABLE_PREFIX.'mod_example` ' . 'WHERE `section_id`='.(int)$section_id;
if(isset($aRequestVars['cat_name']) && ($aRequestVars['cat_name'] != '')) { $sCatName = $admin->StripCodeFromText($aRequestVars['cat_name']); }
if (isset($aRequestVars['active']) && is_numeric($aRequestVars['active']) ) { $active = intval($aRequestVars['active']); }
The only disadvantage is the size of the module. Is it still installable for everyone?
I agree whit you MiniGal2 is one of the best and user friendly gallerie's for WebsiteBaker, but in my case I need a gallery that can work with subfolders. I have more than 1000 images, spread over 30 folders, thats to much to handle with MiniGal2.