array( 'type' => 'photo', 'name' => 'Photo', 'photo_options' => array( array( 'prefix' => 'thumb-', 'width' => 100, 'height' => 100, 'square' => false ), array( 'prefix' => 'large-', 'width' => 600, 'height' => 600, 'square' => false ), ), 'keep_original' => false, 'note' => 'Image will be automatically resized to 500x500 pixels.', ), 'createdOn' => array( 'type' => 'datetime' ), 'caption' => array( 'type' => 'text' ), ':config' => array( 'orderBy' => 'sortOrder', 'orderByBool' => true, 'title' => 'Photo Gallery', 'autoCategory' => true, 'autoCategoryVar' => 'tr_pagedata->path', 'autoCategoryColumn' => 'galleryName' ), ); array( 'type' => 'text', ), 'shortDescription' => array( 'type' => 'textarea', 'name' => 'Short Description', ), 'longDescription' => array( 'type' => 'wysiwyg', 'name' => 'Long Description', ), 'createdOn' => array( 'type' => 'datetime', ), ':config' => array( 'orderBy' => 'createdOn', 'orderByBool' => false, 'title' => 'News Management', ), ); array( 'type' => 'text' ), 'fileName' => array( 'type' => 'file', 'name' => 'Video', ), 'createdOn' => array( 'type' => 'datetime' ), ':config' => array( 'orderBy' => 'sortOrder', 'orderByBool' => true, 'title' => 'Video Gallery', 'autoCategory' => true, 'autoCategoryVar' => 'category', 'autoCategoryColumn' => 'category' ), 'size' => array( 'type' => 'dropdown', 'dropdown_options' => array( 'values' => array( 'small' => '440x260', 'large' => '440x342', ), ), ), );GetList($params, $configuration['fieldArray'][$itemName][':config']['orderBy'], $configuration['fieldArray'][$itemName][':config']['orderByBool'], $limit); return $itemList; } function imageUrl($imageName, $prefix) { return "http://" . $_SERVER['HTTP_HOST'] . ASSETS_PATH . 'photos/' . $prefix . $imageName; } function fileUrl($fileName) { return "http://" . $_SERVER['HTTP_HOST'] . ASSETS_PATH . 'files/' . $fileName; } function adminUrl($itemName, $autoCategory = null, $params = array()) { global $configuration; if ($autoCategory) { $params[$configuration['fieldArray'][$itemName][':config']['autoCategoryVar']] = $autoCategory; } foreach ($params as $key => $value) { $queryString[] = "{$key}={$value}"; } if (is_array($queryString)) { $queryString = join('&', $queryString); } return "http://" . $_SERVER['HTTP_HOST'] . IM_PUBLIC_PATH . "admin/index.php?itemName=" . $itemName . "&" . $queryString; } ?>