当前位置: 首页>>代码示例>>PHP>>正文


PHP Album::setShow方法代码示例

本文整理汇总了PHP中Album::setShow方法的典型用法代码示例。如果您正苦于以下问题:PHP Album::setShow方法的具体用法?PHP Album::setShow怎么用?PHP Album::setShow使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Album的用法示例。


在下文中一共展示了Album::setShow方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: unpublishSubalbums

function unpublishSubalbums($album)
{
    global $gallery;
    $albums = $album->getAlbums();
    foreach ($albums as $albumname) {
        $subalbum = new Album($gallery, $albumname);
        $subalbum->setShow(false);
        $subalbum->save();
        unpublishSubalbums($subalbum);
    }
}
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:11,代码来源:scheduled_content.php

示例2: Album

 if (!empty($folder)) {
     if ($new) {
         $rightsalbum = new Album($gallery, dirname($folder));
     } else {
         $rightsalbum = new Album($gallery, $folder);
     }
     if (!$rightsalbum->isMyItem(UPLOAD_RIGHTS)) {
         if (!zp_apply_filter('admin_managed_albums_access', false, $return)) {
             header('Location: ' . FULLWEBPATH . '/' . ZENFOLDER . '/admin.php');
             exit;
         }
     }
     if ($new) {
         mkdir_recursive($targetPath, CHMOD_VALUE);
         $album = new Album($gallery, $folder);
         $album->setShow($_POST['http_publishalbum']);
         $album->setTitle(sanitize($_POST['http_albumtitle']));
         $album->setOwner($_zp_current_admin_obj->getUser());
         $album->save();
     }
     @chmod($targetPath, CHMOD_VALUE);
     $error = zp_apply_filter('check_upload_quota', UPLOAD_ERR_OK, $tempFile);
     if (!$error) {
         if (is_valid_image($name) || is_valid_other_type($name)) {
             $seoname = seoFriendly($name);
             if (strrpos($seoname, '.') === 0) {
                 $seoname = sha1($name) . $seoname;
             }
             // soe stripped out all the name.
             $targetFile = $targetPath . '/' . internalToFilesystem($seoname);
             if (file_exists($targetFile)) {
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:31,代码来源:uploader.php

示例3: isset

         }
     }
 }
 $newAlbum = $_POST['existingfolder'] == 'false' || isset($_POST['newalbum']);
 // Make sure the folder exists. If not, create it.
 if (isset($_POST['processed']) && !empty($_POST['folder']) && ($newAlbum || !$files_empty)) {
     $folder = sanitize_path($_POST['folder']);
     $uploaddir = $gallery->albumdir . UTF8ToFilesystem($folder);
     if (!is_dir($uploaddir)) {
         mkdir($uploaddir, CHMOD_VALUE);
     }
     @chmod($uploaddir, CHMOD_VALUE);
     $album = new Album($gallery, $folder);
     if ($album->exists) {
         if (!isset($_POST['publishalbum'])) {
             $album->setShow(false);
         }
         $title = sanitize($_POST['albumtitle'], 2);
         if (!empty($title) && $newAlbum) {
             $album->setTitle($title);
         }
         $album->save();
     } else {
         $AlbumDirName = str_replace(SERVERPATH, '', $gallery->albumdir);
         zp_error(gettext("The album couldn't be created in the 'albums' folder. This is usually a permissions problem. Try setting the permissions on the albums and cache folders to be world-writable using a shell:") . " <code>chmod 777 " . $AlbumDirName . CACHEFOLDER . "</code>, " . gettext("or use your FTP program to give everyone write permissions to those folders."));
     }
     $error = false;
     foreach ($_FILES['files']['error'] as $key => $error) {
         if ($_FILES['files']['name'][$key] == "") {
             continue;
         }
开发者ID:ItsHaden,项目名称:epicLanBootstrap,代码行数:31,代码来源:admin-upload.php

示例4: header

             $return = '';
         } else {
             $return = '&album=' . $return . '&tab=subalbuminfo';
         }
     }
     header('Location: ' . FULLWEBPATH . '/' . ZENFOLDER . '/admin-edit.php?page=edit' . $return);
     exit;
     break;
     /** Publish album  ************************************************************/
     /******************************************************************************/
 /** Publish album  ************************************************************/
 /******************************************************************************/
 case "publish":
     XSRFdefender('albumedit');
     $album = new Album($gallery, $folder);
     $album->setShow($_GET['value']);
     $album->save();
     $return = pathurlencode(dirname($folder));
     if (!empty($return)) {
         if ($return == '.' || $return == '/') {
             $return = '';
         } else {
             $return = '&album=' . $return . '&tab=subalbuminfo';
         }
     }
     header('Location: ' . FULLWEBPATH . '/' . ZENFOLDER . '/admin-edit.php?page=edit' . $return);
     exit;
     break;
     /** Reset hitcounters ***********************************************************/
     /********************************************************************************/
 /** Reset hitcounters ***********************************************************/
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:31,代码来源:admin-edit.php

示例5: processAlbumBulkActions

/**
 * Processes the check box bulk actions for albums
 *
 */
function processAlbumBulkActions()
{
    global $gallery;
    $action = sanitize($_POST['checkallaction']);
    $ids = $_POST['ids'];
    $total = count($ids);
    $message = NULL;
    if ($action != 'noaction') {
        if ($total > 0) {
            if ($action == 'addtags' || $action == 'alltags') {
                foreach ($_POST as $key => $value) {
                    $key = postIndexDecode($key);
                    if (substr($key, 0, 10) == 'mass_tags_') {
                        if ($value) {
                            $tags[] = substr($key, 10);
                        }
                    }
                }
                $tags = sanitize($tags, 3);
            }
            $n = 0;
            foreach ($ids as $albumname) {
                $n++;
                $albumobj = new Album($gallery, $albumname);
                switch ($action) {
                    case 'deleteall':
                        $albumobj->remove();
                        break;
                    case 'showall':
                        $albumobj->setShow(1);
                        break;
                    case 'hideall':
                        $albumobj->setShow(0);
                        break;
                    case 'commentson':
                        $albumobj->setCommentsAllowed(1);
                        break;
                    case 'commentsoff':
                        $albumobj->setCommentsAllowed(0);
                        break;
                    case 'resethitcounter':
                        $albumobj->set('hitcounter', 0);
                        break;
                    case 'addtags':
                        $mytags = array_unique(array_merge($tags, $albumobj->getTags()));
                        $albumobj->setTags($mytags);
                        break;
                    case 'cleartags':
                        $albumobj->setTags(array());
                        break;
                    case 'alltags':
                        $images = $albumobj->getImages();
                        foreach ($images as $imagename) {
                            $imageobj = newImage($albumobj, $imagename);
                            $mytags = array_unique(array_merge($tags, $imageobj->getTags()));
                            $imageobj->setTags($mytags);
                            $imageobj->save();
                        }
                        break;
                    case 'clearalltags':
                        $images = $albumobj->getImages();
                        foreach ($images as $imagename) {
                            $imageobj = newImage($albumobj, $imagename);
                            $imageobj->setTags(array());
                            $imageobj->save();
                        }
                        break;
                }
                $albumobj->save();
            }
        }
        return $action;
    }
}
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:78,代码来源:admin-functions.php


注:本文中的Album::setShow方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。