Overview

Packages

  • admin
  • classes
    • media
  • CodeIgniter
    • Libraries
  • core
  • functions
  • JSMin
  • None
  • OpenID
  • PHP
  • PHPMailer
  • plugins
    • admin
    • development
    • feed
    • mail
    • media
    • misc
    • seo
    • spam
    • uploader
    • users
    • zenpage
    • zenphoto
      • news
  • Services
    • JSON

Classes

  • _zp_captcha
  • _zp_HTML_cache
  • admin_approval
  • Album
  • AlbumBase
  • AlbumZip
  • AMFReader
  • AMFStream
  • AnyFile
  • AnyFile_Options
  • Auth_OpenID
  • Auth_OpenID_AlreadySigned
  • Auth_OpenID_AssociateRequest
  • Auth_OpenID_Association
  • Auth_OpenID_AuthRequest
  • Auth_OpenID_AX
  • Auth_OpenID_AX_AttrInfo
  • Auth_OpenID_AX_Error
  • Auth_OpenID_AX_FetchRequest
  • Auth_OpenID_AX_FetchResponse
  • Auth_OpenID_AX_KeyValueMessage
  • Auth_OpenID_AX_Message
  • Auth_OpenID_AX_StoreRequest
  • Auth_OpenID_AX_StoreResponse
  • Auth_OpenID_BcMathWrapper
  • Auth_OpenID_CancelResponse
  • Auth_OpenID_CheckAuthRequest
  • Auth_OpenID_CheckIDRequest
  • Auth_OpenID_Consumer
  • Auth_OpenID_ConsumerResponse
  • Auth_OpenID_CryptUtil
  • Auth_OpenID_DatabaseConnection
  • Auth_OpenID_Decoder
  • Auth_OpenID_DiffieHellman
  • Auth_OpenID_DiffieHellmanSHA1ConsumerSession
  • Auth_OpenID_DiffieHellmanSHA1ServerSession
  • Auth_OpenID_DiffieHellmanSHA256ConsumerSession
  • Auth_OpenID_DiffieHellmanSHA256ServerSession
  • Auth_OpenID_DumbStore
  • Auth_OpenID_Encoder
  • Auth_OpenID_EncodingError
  • Auth_OpenID_Extension
  • Auth_OpenID_FailureResponse
  • Auth_OpenID_FileStore
  • Auth_OpenID_GenericConsumer
  • Auth_OpenID_GmpMathWrapper
  • Auth_OpenID_KVForm
  • Auth_OpenID_MalformedReturnURL
  • Auth_OpenID_MalformedTrustRoot
  • Auth_OpenID_Mapping
  • Auth_OpenID_MathLibrary
  • Auth_OpenID_MDB2Store
  • Auth_OpenID_MemcachedStore
  • Auth_OpenID_Message
  • Auth_OpenID_MySQLStore
  • Auth_OpenID_NamespaceMap
  • Auth_OpenID_NoReturnToError
  • Auth_OpenID_OpenIDStore
  • Auth_OpenID_PAPE_Request
  • Auth_OpenID_PAPE_Response
  • Auth_OpenID_Parse
  • Auth_OpenID_PlainTextConsumerSession
  • Auth_OpenID_PlainTextServerSession
  • Auth_OpenID_PostgreSQLStore
  • Auth_OpenID_Request
  • Auth_OpenID_Server
  • Auth_OpenID_ServerError
  • Auth_OpenID_ServerErrorContainer
  • Auth_OpenID_ServerRequest
  • Auth_OpenID_ServerResponse
  • Auth_OpenID_ServiceEndpoint
  • Auth_OpenID_ServiceEndpointLoader
  • Auth_OpenID_SessionNegotiator
  • Auth_OpenID_SetupNeededResponse
  • Auth_OpenID_Signatory
  • Auth_OpenID_SigningEncoder
  • Auth_OpenID_SQLiteStore
  • Auth_OpenID_SQLStore
  • Auth_OpenID_SRegBase
  • Auth_OpenID_SRegRequest
  • Auth_OpenID_SRegResponse
  • Auth_OpenID_SuccessResponse
  • Auth_OpenID_TrustRoot
  • Auth_OpenID_TypeURIMismatch
  • Auth_OpenID_UntrustedReturnURL
  • Auth_OpenID_WebResponse
  • Auth_Yadis_Discovery
  • Auth_Yadis_DiscoveryResult
  • Auth_Yadis_dom
  • Auth_Yadis_domxml
  • Auth_Yadis_HTTPFetcher
  • Auth_Yadis_HTTPResponse
  • Auth_Yadis_Manager
  • Auth_Yadis_ManagerLoader
  • Auth_Yadis_ParanoidHTTPFetcher
  • Auth_Yadis_ParseHTML
  • Auth_Yadis_PHPSession
  • Auth_Yadis_PlainHTTPFetcher
  • Auth_Yadis_ProxyResolver
  • Auth_Yadis_Service
  • Auth_Yadis_SessionLoader
  • Auth_Yadis_XMLParser
  • Auth_Yadis_XRDS
  • Auth_Yadis_Yadis
  • auto_backup
  • AVCSequenceParameterSetReader
  • bxslider
  • cacheManager
  • cacheManagerFeed
  • CI_jsmin
  • CI_load
  • cloneZenphoto
  • codeIgniter_kludge
  • colorbox
  • Comment
  • comment_form
  • contactformOptions
  • crop_image
  • cycle
  • defaultCodeblocks
  • deprecated_functions
  • DownloadList
  • dynamic_locale
  • dynamicAlbum
  • elFinder_options
  • email_new_user
  • exampleMacros
  • external_auth
  • ExternalFeed
  • externalFeed_options
  • favorites
  • favoritesOptions
  • federated_logon
  • feed
  • fieldExtender
  • flag_thumbnail
  • Gallery
  • galleryArticles
  • getID3
  • getid3_aac
  • getid3_apetag
  • getid3_flv
  • getid3_handler
  • getid3_id3v1
  • getid3_id3v2
  • getid3_lib
  • getid3_lyrics3
  • getid3_mp3
  • getid3_mpeg
  • getid3_quicktime
  • getid3_swf
  • GoogleMap
  • Googlemaps
  • googleVerifyOptions
  • hitcounter
  • HTML
  • htmlmetatags
  • http_auth
  • Image
  • image_effects
  • internal_deprecations
  • ipBlocker
  • jcarousel
  • jPlayer
  • jplayer_options
  • jquery_rating
  • JSMin
  • lib_GD_Options
  • lib_Imagick_Options
  • lib_NoGraphics
  • MediaObject
  • menu_manager
  • MergedRSS
  • MergedRSSOptions
  • mobile
  • Mobile_Detect
  • mobileTheme
  • multipleLayoutOptions
  • null_seo
  • OAuthConsumer
  • OAuthDataStore
  • OAuthRequest
  • OAuthServer
  • OAuthSignatureMethod
  • OAuthSignatureMethod_HMAC_SHA1
  • OAuthSignatureMethod_PLAINTEXT
  • OAuthSignatureMethod_RSA_SHA1
  • OAuthToken
  • OAuthUtil
  • pagedThumbsNav
  • pagedthumbsOptions
  • PclZip
  • PersistentObject
  • PHPMailer
  • PlainText
  • POP3
  • print_album_menu
  • pseudoPlayer
  • publishContent
  • quota_manager
  • reCaptcha
  • ReCaptchaResponse
  • register_user
  • rewriteRules
  • rewriteTokens
  • RSS
  • RSS_internal_deprecations
  • rss_options
  • search_statistics
  • SearchEngine
  • security_logger
  • seo_locale
  • Services_JSON
  • Services_JSON_Error
  • setupexternalFeed
  • setupRSS
  • show_not_loggedin
  • sitemap
  • slideshow
  • SMTP
  • static_html_cache
  • tagsuggest
  • TextObject
  • TextObject_internal_deprecations
  • TextObject_Options
  • ThemeObject
  • themeSwitcher
  • tinymce4Options
  • tinyURL
  • Transientimage
  • tweet
  • TwitterOAuth
  • UploadHandler
  • user_expiry
  • user_groups
  • user_logout_options
  • userAddressFields
  • utf8
  • Video
  • Video_internal_deprecations
  • VideoObject_Options
  • viewer_size_image_options
  • WEBdocs
  • WEBdocs_Options
  • xmpMetadata
  • Zenpage
  • Zenpage_internal_deprecations
  • ZenpageCategory
  • zenpagecms
  • ZenpageItems
  • ZenpageNews
  • ZenpagePage
  • ZenpageRoot
  • Zenphoto_Administrator
  • Zenphoto_Authority
  • zenphoto_org_news
  • zenphoto_seo
  • zenphotoDonate
  • ZipStream
  • zp_PHPMailer
  • zpCaptcha
  • zpFunctions
  • zpLegacySpam
  • zpMutex
  • zpSimpleSpam
  • zpTrivialSpam

Exceptions

  • BadFunctionCallException
  • BadMethodCallException
  • Exception
  • getid3_exception
  • JSMin_UnterminatedCommentException
  • JSMin_UnterminatedRegExpException
  • JSMin_UnterminatedStringException
  • LogicException
  • OAuthExcept
  • phpmailerException

Functions

  • __autoload
  • _escape_xref
  • _recaptcha_aes_encrypt
  • _recaptcha_aes_pad
  • _recaptcha_http_post
  • _recaptcha_mailhide_email_parts
  • _recaptcha_mailhide_urlbase64
  • _recaptcha_qsencode
  • accessAllAlbums
  • add_context
  • addalbumsToDatabase
  • addCategoriesToDatabase
  • addGeoCoord
  • addItem
  • addPagesToDatabase
  • addPluginScript
  • addPluginType
  • addSubalbumMenus
  • admin_album_list
  • admin_securityChecks
  • admin_showupdate
  • adminPageNav
  • adminToolbox
  • albumNumber
  • applyMacros
  • Auth_OpenID_arrangeByType
  • Auth_OpenID_AX_checkAlias
  • Auth_OpenID_AX_toTypeURIs
  • Auth_OpenID_bestMatchingService
  • Auth_OpenID_checkFieldName
  • Auth_OpenID_checkSessionType
  • Auth_OpenID_checkTimestamp
  • Auth_OpenID_detectMathLibrary
  • Auth_OpenID_discover
  • Auth_OpenID_discoverURI
  • Auth_OpenID_discoverWithoutYadis
  • Auth_OpenID_discoverWithYadis
  • Auth_OpenID_discoverXRI
  • Auth_OpenID_extractReturnURL
  • Auth_OpenID_findOPLocalIdentifier
  • Auth_OpenID_getAllAssociationTypes
  • Auth_OpenID_getAllowedReturnURLs
  • Auth_OpenID_getAuthorityPattern
  • Auth_OpenID_getAvailableSessionTypes
  • Auth_OpenID_getDefaultAssociationOrder
  • Auth_OpenID_getDefaultGen
  • Auth_OpenID_getDefaultMod
  • Auth_OpenID_getDefaultNegotiator
  • Auth_OpenID_getEncodedPattern
  • Auth_OpenID_getEncryptedNegotiator
  • Auth_OpenID_getEscapeRE
  • Auth_OpenID_getMathLib
  • Auth_OpenID_getOnlyEncryptedOrder
  • Auth_OpenID_getOpenIDConsumerTypeURIs
  • Auth_OpenID_getOpenIDTypeName
  • Auth_OpenID_getOpenIDTypeURIs
  • Auth_OpenID_getOPOrUserServices
  • Auth_OpenID_getSecretSize
  • Auth_OpenID_getSessionTypes
  • Auth_OpenID_getSupportedAssociationTypes
  • Auth_OpenID_getUnreserved
  • Auth_OpenID_getURIPattern
  • Auth_OpenID_getURLIllegalCharRE
  • Auth_OpenID_HMACSHA1
  • Auth_OpenID_HMACSHA256
  • Auth_OpenID_include_init
  • Auth_OpenID_isError
  • Auth_OpenID_isOpenID1
  • Auth_OpenID_legacy_discover
  • Auth_OpenID_makeOpenIDEndpoints
  • Auth_OpenID_math_extensions
  • Auth_OpenID_mkNonce
  • Auth_OpenID_noMathSupport
  • Auth_OpenID_pct_encoded_replace
  • Auth_OpenID_pct_encoded_replace_unreserved
  • Auth_OpenID_registerNamespaceAlias
  • Auth_OpenID_remove_dot_segments
  • Auth_OpenID_removeNamespaceAlias
  • Auth_OpenID_returnToMatches
  • Auth_OpenID_setNoMathSupport
  • Auth_OpenID_SHA1
  • Auth_OpenID_SHA256
  • Auth_OpenID_splitNonce
  • Auth_OpenID_supportsSReg
  • Auth_OpenID_urinorm
  • Auth_OpenID_verifyReturnTo
  • Auth_Yadis_array_scramble
  • Auth_Yadis_escapeForIRI
  • Auth_Yadis_getCanonicalID
  • Auth_Yadis_getDefaultProxy
  • Auth_Yadis_getEscapeRE
  • Auth_Yadis_getIPrivateChars
  • Auth_Yadis_getNSMap
  • Auth_Yadis_getServiceEndpoints
  • Auth_Yadis_getSupportedExtensions
  • Auth_Yadis_getUCSChars
  • Auth_Yadis_getXMLParser
  • Auth_Yadis_getXRDExpiration
  • Auth_Yadis_getXrefRE
  • Auth_Yadis_getXRIAuthorities
  • Auth_Yadis_identifierScheme
  • Auth_Yadis_iriToURI
  • Auth_Yadis_pct_escape_unicode
  • Auth_Yadis_providerIsAuthoritative
  • Auth_Yadis_rootAuthority
  • Auth_Yadis_setDefaultParser
  • Auth_Yadis_startswith
  • Auth_Yadis_toIRINormal
  • Auth_Yadis_toURINormal
  • Auth_Yadis_XRI
  • Auth_Yadis_XRIAppendArgs
  • authorSelector
  • build_query
  • build_url
  • bulkActionRedirect
  • bulkTags
  • byteConvert
  • cacheImage
  • checkAccess
  • checkAlbumimagesort
  • checkAlbumParentid
  • checkAlbumPassword
  • checkChosenItemStatus
  • checkChosenMenuset
  • checked
  • checkFolder
  • checkForEmptyTitle
  • checkForGuest
  • checkForPage
  • checkForPassword
  • checkForUpdate
  • checkHitcounterDisplay
  • checkIfChecked
  • checkIfLockedNews
  • checkIfLockedPage
  • checkIfNew
  • checkInstall
  • checkLayoutUseForImages
  • checkNewsAccess
  • checkNewsCategoryPassword
  • checkObjectsThumb
  • checkPagePassword
  • checkPageValidity
  • checkParentLayouts
  • checkPublishDates
  • checkRequiredField
  • checkSelectedAlbum
  • checkSignature
  • cleanAlbum
  • cleanHTML
  • clearSitemapCache
  • clonedFrom
  • codeblocktabsJS
  • comment_form_addComment
  • comment_form_handle_comment
  • comment_form_PaginationJS
  • comment_form_postcomment
  • comment_form_print10Most
  • comment_form_visualEditor
  • commentFormUseCaptcha
  • commentReply
  • commentsAllowed
  • consolidatedEditMessages
  • copyLayoutSelection
  • copyThemeDirectory
  • countArticles
  • countCombiNews
  • createMenuIfNotExists
  • createRelatedItemsResultArray
  • cron_starter
  • currentRelativeURL
  • customOptions
  • dateDiff
  • datepickerJS
  • dateTimeConvert
  • db_affected_rows
  • db_close
  • db_collation
  • db_connect
  • db_count
  • db_create
  • db_create_table
  • db_error
  • db_fetch_assoc
  • db_fetch_row
  • db_free_result
  • db_getSQLmode
  • db_insert_id
  • db_LIKE_escape
  • db_list_fields
  • db_name
  • db_num_rows
  • db_permissions
  • db_quote
  • db_setSQLmode
  • db_show
  • db_software
  • db_table_update
  • db_truncate_table
  • debug404
  • debugLog
  • debugLogBacktrace
  • debugLogVar
  • defaultCodeblocks_codebox
  • deleteArticle
  • deleteCategory
  • deleteItem
  • deleteLayoutSelection
  • deletePage
  • deleteThemeDirectory
  • detect_fetcher
  • detect_math
  • detect_query_corruption
  • detect_random
  • detect_stores
  • detect_xml
  • dircopy
  • displayError
  • doIncludes
  • elFinder_admin_tabs
  • elFinder_tinymce
  • enableExtension
  • escape
  • executeRSS
  • exitZP
  • exposeZenPhotoInformations
  • extensionEnabled
  • fetchComments
  • filesystemToInternal
  • filter_extractReturnURL
  • filter_MatchesAnyOpenIDConsumerType
  • filter_MatchesAnyOpenIDType
  • filterImageQuery
  • fix_path_redirect
  • formatList
  • fullText
  • galleryAlbumsPerPage
  • genAlbumList
  • generateCaptcha
  • generateLanguageList
  • generateListFromArray
  • generateListFromFiles
  • generateRadiobuttonsFromArray
  • generateSitemapCacheFile
  • generateSitemapIndexCacheFile
  • generateUnorderedListFromArray
  • get_AnyFile_suffixes
  • get_context
  • get_filterScript
  • get_instance
  • get_language_string
  • getAdminThumb
  • getAlbumArray
  • getAlbumBreadcrumb
  • getAlbumBreadcrumbAdmin
  • getAlbumCustomData
  • getAlbumData
  • getAlbumDate
  • getAlbumDesc
  • getAlbumFolder
  • getAlbumGeodata
  • getAlbumId
  • getAlbumInherited
  • getAlbumLinkURL
  • getAlbumLocation
  • getAlbumPage
  • getAlbumPlace
  • getAlbumStatistic
  • getAlbumThumb
  • getAlbumTitle
  • getAlbumURL
  • getAllAccessibleAlbums
  • getAllAlbums
  • getAllArticleDates
  • getAllCategories
  • getAllDates
  • getAllowedTags
  • getAllSubAlbumIDs
  • getAllSubalbums
  • getAllTagsCount
  • getAllTagsFromAlbum
  • getAllTagsFromAlbum_multi_unique
  • getAllTagsFromZenpage
  • getAllTagsUnique
  • getAllTranslations
  • getAnnotatedAlbumTitle
  • getAnnotatedImageTitle
  • getArticles
  • getAuthor
  • getBare
  • getBareAlbumDesc
  • getBareAlbumTitle
  • getBareGalleryDesc
  • getBareGalleryTitle
  • getBareImageDesc
  • getBareImageTitle
  • getBareNewsAlbumTitle
  • getBareNewsTitle
  • getBarePageTitle
  • getCategory
  • getCategoryID
  • getCategoryLink
  • getCategoryParentID
  • getCategorySortOrder
  • getCategoryTitle
  • getCheckboxState
  • getCodeblock
  • getCombiNews
  • getCommentAddress
  • getCommentAuthorEmail
  • getCommentAuthorLink
  • getCommentAuthorName
  • getCommentAuthorSite
  • getCommentBody
  • getCommentCount
  • getCommentDate
  • getCommentDateTime
  • getCommentErrors
  • getCommentsAllowed
  • getCommentStored
  • getCommentTime
  • getConsumer
  • getContentShorten
  • getCurrentMenuItem
  • getCurrentNewsArchive
  • getCurrentNewsCategory
  • getCurrentNewsCategoryID
  • getCurrentNewsCategoryParentID
  • getCurrentNewsPage
  • getCurrentPage
  • getCurrentTheme
  • getCustomAlbumThumb
  • getCustomAlbumThumbMaxSpace
  • getCustomImageURL
  • getCustomPageURL
  • getCustomSizedImageMaxSpace
  • getCustomSizedImageThumbMaxSpace
  • getDefaultHeight
  • getDefaultSizedImage
  • getDefaultWidth
  • getDownloadLink
  • getdownloadList
  • getDownloadURL
  • getE
  • getEnabledPlugins
  • getExpiryDatePost
  • getFavoritesURL
  • getField
  • getFirstImageURL
  • getFullHeight
  • getFullImageURL
  • getFullNewsImage
  • getFullWidth
  • getGalleryDesc
  • getGalleryIndexURL
  • getGalleryTitle
  • getGeoCoord
  • getHeadTitle
  • getHitcounter
  • getImageArgs
  • getImageCacheFilename
  • getImageCachePostfix
  • getImageCity
  • getImageCountry
  • getImageCustomData
  • getImageData
  • getImageDate
  • getImageDesc
  • getImageEXIFData
  • getImageGeodata
  • getImageID
  • getImageLinkURL
  • getImageLocation
  • getImageMetaData
  • getImageParameters
  • getImageProcessorURI
  • getImageProcessorURIFromCacheName
  • getImageRotation
  • getImageSortOrder
  • getImageState
  • getImageStatistic
  • getImageThumb
  • getImageTitle
  • getImageURI
  • getImageURL
  • getItem
  • getItemByID
  • getItemTitleAndURL
  • getjPlayerSkinCSS
  • getjPlayerSkins
  • getLanguageArray
  • getLanguageFlag
  • getLastImageURL
  • getLatestComments
  • getLatestNews
  • getLatestZenpageComments
  • getLayout
  • getLayoutSelector
  • getLink
  • getLinkHTML
  • getLogTabs
  • getMacros
  • getMainSiteName
  • getMainSiteURL
  • getManagedAlbumList
  • getMaxSpaceContainer
  • getMenuFromLink
  • getMenuItemChilds
  • getMenuItems
  • getMenumanagerPredicessor
  • getMenumanagerSuccessor
  • getMenuSetSelector
  • getMenuVisibility
  • getMimeString
  • getNestedAlbumList
  • getNewsAdminOption
  • getNewsAdminOptionPath
  • getNewsAlbumName
  • getNewsAlbumTitle
  • getNewsAlbumURL
  • getNewsArchivePath
  • getNewsArchiveURL
  • getNewsAuthor
  • getNewsCategories
  • getNewsCategoryCustomData
  • getNewsCategoryDesc
  • getNewsCategoryPath
  • getNewsCategoryURL
  • getNewsContent
  • getNewsContentShorten
  • getNewsCustomData
  • getNewsDate
  • getNewsExtraContent
  • getNewsID
  • getNewsImageTags
  • getNewsIndexURL
  • getNewsLink
  • getNewsPagesStatistic
  • getNewsPathNav
  • getNewsReadMore
  • getNewsTitle
  • getNewsTitleLink
  • getNewsTitlePath
  • getNewsType
  • getNewsURL
  • getNewsVideoContent
  • getNextAlbum
  • getNextAlbumURL
  • getNextImageThumb
  • getNextImageURL
  • getNextNewsPageURL
  • getNextNewsURL
  • getNextPageURL
  • getNextPrevNews
  • getNotViewableAlbums
  • getNotViewableImages
  • getNumAlbums
  • getNumAllSubalbums
  • getNumImages
  • getNumNews
  • getNumPages
  • getNumSubalbums
  • getOpenIDURL
  • getOption
  • getOptionFromDB
  • getOptionList
  • getPageAuthor
  • getPageContent
  • getPageCustomData
  • getPageDate
  • getPageExtraContent
  • getPageID
  • getPageLastChangeDate
  • getPageLinkPath
  • getPageLinkURL
  • getPageNavList
  • getPageNumURL
  • getPageParentID
  • getPageRedirect
  • getPages
  • getPageSelector
  • getPageSortorder
  • getPageTitle
  • getPageTitleLink
  • getPageURL
  • getParentAlbums
  • getParentAlbumsAdmin
  • getParentBreadcrumb
  • getParentItems
  • getParentMenuItems
  • getParentNewsCategories
  • getParentPages
  • getPasswordProtectImage
  • getPHPFiles
  • getPlugin
  • getPluginFiles
  • getPluginTabs
  • getPrevAlbum
  • getPrevAlbumURL
  • getPrevImageThumb
  • getPrevImageURL
  • getPrevNewsPageURL
  • getPrevNewsURL
  • getPrevPageURL
  • getProtectedImageURL
  • getRandomImages
  • getRandomImagesAlbum
  • getRating
  • getRelatedItems
  • getRequestURI
  • getReturnTo
  • getRSSHeaderLink
  • getRSSLink
  • getScheme
  • getSearchDate
  • getSearchURL
  • getSearchWords
  • getSelectedLayout
  • getSerializedArray
  • getSetClause
  • getSiteHomeURL
  • getSitemapAlbumList
  • getSitemapAlbums
  • getSitemapGoogleImageVideoExtras
  • getSitemapGoogleLoopIndex
  • getSitemapImages
  • getSitemapIndexLinks
  • getSitemapZenpageNewsArticles
  • getSitemapZenpageNewsCategories
  • getSitemapZenpageNewsIndex
  • getSitemapZenpagePages
  • getSizeCustomImage
  • getSizeDefaultImage
  • getSizeDefaultThumb
  • getSizedImageURL
  • getSizeFullImage
  • getStore
  • getSubCategories
  • getSubtabs
  • getSuffix
  • getTagCountByAccess
  • getTagOrder
  • getTags
  • gettext_pl
  • gettext_th
  • getTheme
  • getThemeFiles
  • getThemeOption
  • getTimezones
  • getTinyMCE4ConfigFiles
  • getTitle
  • getTotalArticles
  • getTotalImagesIn
  • getTotalNewsPages
  • getTotalPages
  • getTrustRoot
  • getUnprotectedImageURL
  • getUrAlbum
  • getURL
  • getUserIP
  • getUserLocale
  • getVersion
  • getViewerImageSize
  • getWatermarkParam
  • getWatermarkPath
  • getWatermarks
  • getWhereClause
  • getXSRFToken
  • getZenpageHitcounter
  • getZenpageRSSHeaderLink
  • getZenpageRSSLink
  • getZenpageStatistic
  • googleVerifyHead
  • handleSearchParms
  • hasDynamicAlbumSuffix
  • hasNextImage
  • hasNextPage
  • hasPrevImage
  • hasPrevPage
  • hitcounter
  • html_decode
  • html_encode
  • html_encodeTagged
  • httpsRedirect
  • httpUploadHandler
  • httpUploadHandler_admin_tabs
  • i18nSetLocale
  • imageBlurGD
  • imageDebug
  • imageError
  • imageNumber
  • imgSrcURI
  • in_context
  • inNewsCategory
  • inProtectedNewsCategory
  • installSignature
  • instrument
  • inSubNewsCategoryOf
  • internalToFilesystem
  • inventMenuItem
  • iptc_make_tag
  • is_AdminEditPage
  • is_connected
  • is_GalleryNewsType
  • is_News
  • is_NewsArchive
  • is_NewsArticle
  • is_NewsCategory
  • is_NewsPage
  • is_NewsType
  • is_Pages
  • is_valid_email_zp
  • is_valid_image
  • is_valid_other_type
  • is_zip
  • isAlbumClass
  • isAlbumPage
  • isArchive
  • isHandledAlbum
  • isImageClass
  • isImagePage
  • isImagePhoto
  • isImageVideo
  • isLandscape
  • isMyAlbum
  • isMyNews
  • isMyPage
  • isolate
  • isProtectedAlbum
  • isProtectedNewsCategory
  • isProtectedPage
  • isSubNewsCategoryOf
  • isValidURL
  • jQueryUpload_head
  • jQueryUpload_headers
  • jQueryUploadHandler
  • jQueryUploadHandler_admin_tabs
  • js_encode
  • json_decode
  • json_encode
  • kses
  • kses_array_lc
  • kses_attr
  • kses_bad_protocol
  • kses_bad_protocol_once
  • kses_bad_protocol_once2
  • kses_check_attr_val
  • kses_decode_entities
  • kses_hair
  • kses_hook
  • kses_html_error
  • kses_js_entities
  • kses_no_null
  • kses_normalize_entities
  • kses_normalize_entities2
  • kses_split
  • kses_split2
  • kses_stripslashes
  • kses_version
  • ksesProcess
  • layoutSelector
  • layoutSelector_album
  • listDBUses
  • listDirectoryFiles
  • listUses
  • load_zenpage_news
  • load_zenpage_pages
  • loadLocalOptions
  • log_message
  • lookupSortKey
  • macro_admin_tabs
  • macroList_show
  • makeAlbumCurrent
  • makeImageCurrent
  • makeSpecialImageName
  • markRelease_button
  • mb_strlen
  • mb_strpos
  • mb_strrpos
  • mb_strtolower
  • mb_strtoupper
  • mb_substr
  • mb_substr_count
  • menu_admin_toolbox_global
  • menu_tabs
  • minDiff
  • mkdir_recursive
  • my_truncate_string
  • myts_date
  • newAlbum
  • newImage
  • next_album
  • next_comment
  • next_image
  • next_news
  • next_page
  • ngettext_pl
  • ngettext_th
  • normalizeColumns
  • omsAdditions
  • openedForComments
  • parse_query
  • parse_size
  • parseAllowedTags
  • parseHttpAcceptLanguage
  • passAlbums
  • passImages
  • pathurlencode
  • PclZipUtilCopyBlock
  • PclZipUtilOptionText
  • PclZipUtilPathInclusion
  • PclZipUtilPathReduction
  • PclZipUtilRename
  • PclZipUtilTranslateWinPath
  • PHPMailerAutoload
  • populateManagedObjectsList
  • postAlbumSort
  • postIndexDecode
  • postIndexEncode
  • prefix
  • prepareAlbumPage
  • prepareCustomPage
  • prepareImagePage
  • prepareIndexPage
  • print404status
  • print_language_string_list
  • printAddToFavorites
  • printAdminFooter
  • printAdminHeader
  • printAdminRightsTable
  • printAdminToolbox
  • printAlbumBreadcrumb
  • printAlbumButtons
  • printAlbumCustomData
  • printAlbumData
  • printAlbumDate
  • printAlbumDesc
  • printAlbumEditForm
  • printAlbumEditRow
  • printAlbumLegend
  • printAlbumLink
  • printAlbumLocation
  • printAlbumMap
  • printAlbumMenu
  • printAlbumMenuJump
  • printAlbumMenuList
  • printAlbumMenuListAlbum
  • printAlbumPlace
  • printAlbumRating
  • printAlbumsSelector
  • printAlbumStatistic
  • printAlbumStatisticItem
  • printAlbumThumbImage
  • printAlbumTitle
  • printAlbumURL
  • printAlbumZip
  • printAllDates
  • printAllNewsCategories
  • printAllTags
  • printAllTagsAs
  • printAllTagsFromAlbum
  • printAllTagsFromZenpage
  • printAnnotatedAlbumTitle
  • printAnnotatedImageTitle
  • printArticleCategories
  • printArticleDatesDropdown
  • printArticlesPerPageDropdown
  • printBareAlbumDesc
  • printBareAlbumTitle
  • printBareGalleryDesc
  • printBareGalleryTitle
  • printBareImageDesc
  • printBareImageTitle
  • printBareNewsTitle
  • printBarePageTitle
  • printBulkActions
  • printCaptcha
  • printCategoriesStatistic
  • printCategoryCheckboxListEntry
  • printCategoryDropdown
  • printCategoryListSortableTable
  • printCategorySelection
  • printCodeblock
  • printCodeblockEdit
  • printCommentAuthorLink
  • printCommentErrors
  • printCommentForm
  • printContactForm
  • printCurrentNewsArchive
  • printCurrentNewsCategory
  • printCustomAlbumThumbImage
  • printCustomAlbumThumbMaxSpace
  • printCustomMenu
  • printCustomPageSelector
  • printCustomPageURL
  • printCustomSizedImage
  • printCustomSizedImageMaxHeight
  • printCustomSizedImageMaxSpace
  • printCustomSizedImageThumbMaxSpace
  • printDefaultSizedImage
  • printDownloadAlbumZipURL
  • printDownloadLink
  • printDownloadLinkAlbumZip
  • printdownloadList
  • printDownloadURL
  • printEditable
  • printEditCommentLink
  • printEditDropdown
  • printExpired
  • printFavoritesLink
  • printFavoritesURL
  • printField
  • printGalleryDesc
  • printGalleryIndexURL
  • printGalleryTitle
  • printGoogleMap
  • printHeadTitle
  • printHomeLink
  • printImageCustomData
  • printImageData
  • printImageDate
  • printImageDesc
  • printImageDiv
  • printImageEXIFData
  • printImageID
  • printImageLink
  • printImageMap
  • printImageMetadata
  • printImageRating
  • printImageSortOrder
  • printImageStatistic
  • printImageThumb
  • printImageTitle
  • printImageURL
  • printItemEditLink
  • printItemsList
  • printItemsListTable
  • printItemStatusDropdown
  • printjCarouselThumbNav
  • printjPlayerPlaylist
  • printLanguageSelector
  • printLatestAlbums
  • printLatestComments
  • printLatestImages
  • printLatestImagesByDate
  • printLatestImagesByMtime
  • printLatestNews
  • printLatestUpdatedAlbums
  • printLatestZenpageComments
  • printLink
  • printLinkHTML
  • printLogoAndLinks
  • printManagedObjects
  • printMenuemanagerPageList
  • printMenuemanagerPageListWithNav
  • printMenumanagerBreadcrumb
  • printMenumanagerNextLink
  • printMenumanagerPrevLink
  • printMostPopularItems
  • printMostRatedAlbums
  • printMostRatedImages
  • printMostRatedItems
  • printNestedAlbumsList
  • printNestedItemsList
  • printNestedMenu
  • printNews
  • printNewsArchive
  • printNewsAuthor
  • printNewsCategories
  • printNewsCategoryCustomData
  • printNewsCategoryDesc
  • printNewsCategoryURL
  • printNewsContent
  • printNewsCustomData
  • printNewsDate
  • printNewsExtraContent
  • printNewsImageTags
  • printNewsIndexURL
  • printNewsLink
  • printNewsPageList
  • printNewsPageListWithNav
  • printNewsReadMoreLink
  • printNewsStatistic
  • printNewsTitle
  • printNewsTitleLink
  • printNewsURL
  • printNextNewsLink
  • printNextNewsPageLink
  • printNextPageLink
  • printNextPageURL
  • printPageArticleTags
  • printPageAuthor
  • printPageContent
  • printPageCustomData
  • printPageDate
  • printPagedThumbsNav
  • printPageExtraContent
  • printPageID
  • printPageLastChangeDate
  • printPageLinkURL
  • printPageList
  • printPageListWithNav
  • printPageMenu
  • printPageNav
  • printPageSelector
  • printPagesListTable
  • printPagesStatistic
  • printPageTitle
  • printPageTitleLink
  • printPageURL
  • printParentBreadcrumb
  • printParentPagesBreadcrumb
  • printPasswordForm
  • printPopularAlbums
  • printPopularImages
  • printPreloadScript
  • printPrevNewsLink
  • printPrevNewsPageLink
  • printPrevPageLink
  • printPrevPageURL
  • printPublished
  • printPublishIconLink
  • printRandomImages
  • printRating
  • printRegisterURL
  • printRegistrationForm
  • printRelatedItems
  • printRSSHeaderLink
  • printRSSLink
  • printSearchBreadcrumb
  • printSearchForm
  • printSiteHomeURL
  • printSizedImageLink
  • printSizedImageURL
  • printSlideShow
  • printSlideShowJS
  • printSlideShowLink
  • printSortableHead
  • printSortOrderDropdown
  • printSubPagesExcerpts
  • printSubtabs
  • printTabs
  • printTags
  • printThumbNav
  • printTopRatedAlbums
  • printTopRatedImages
  • printTopRatedItems
  • printUnpublishedDropdown
  • printUserLogin_out
  • printUserSizeImage
  • printUserSizeSelector
  • printVersion
  • printZenJavascripts
  • printZenpageIconLegend
  • printZenpageItemsBreadcrumb
  • printZenpageNewsCategorySelector
  • printZenpagePagesSelector
  • printZenpageRSSHeaderLink
  • printZenpageRSSLink
  • printZenpageStatistic
  • printZenphotoLink
  • process_language_string_save
  • processAlbumBulkActions
  • processAlbumEdit
  • processCodeblockSave
  • processCommentBulkActions
  • processCredentials
  • processCustomOptionSave
  • processEditSelection
  • processExpired
  • processImageBulkActions
  • processImageEdit
  • processManagedObjects
  • processMenuBulkActions
  • processOrder
  • processRights
  • processTags
  • processZenpageBulkActions
  • propSizes
  • publishItem
  • purgeOption
  • query
  • query_full_array
  • query_single_row
  • rc4
  • read_exif_data_protected
  • readTags
  • recaptcha_check_answer
  • recaptcha_get_html
  • recaptcha_get_signup_url
  • recaptcha_mailhide_html
  • recaptcha_mailhide_url
  • reconfigureAction
  • reconfigureCS
  • reconfigurePage
  • recordMissing
  • rem_context
  • removeParentAlbumNames
  • resetCurrentAlbum
  • restore_context
  • reveal
  • rewrite_get_album_image
  • rewrite_path
  • rewrite_path_zenpage
  • RSS_Channel
  • RSS_Retrieve
  • RSS_Tags
  • rulesList
  • run
  • safe_fnmatch
  • safe_glob
  • sanitize
  • sanitize_numeric
  • sanitize_path
  • sanitize_script
  • sanitize_string
  • sanitizeRedirect
  • save_context
  • saveLayoutSelection
  • saveZenphotoLayoutSelection
  • search_quote
  • secureServer
  • seo_cleanup_button
  • seoFriendly
  • seoFriendlyJS
  • set_context
  • setAlbumCustomData
  • setAlbumSubtabs
  • setImageCustomData
  • setMainDomain
  • setOption
  • setOptionDefault
  • setPluginDomain
  • setThemeColumns
  • setThemeDomain
  • setThemeOption
  • setThemeOptionDefault
  • setupAllowedMaps
  • setupCurrentLocale
  • setupDomain
  • setupTheme
  • shortenContent
  • showOrNotShowField
  • shuffle_assoc
  • signatureChange
  • site_upgrade_button
  • site_upgrade_status
  • sitemap_echonl
  • sitemap_getChangefreq
  • sitemap_getDateformat
  • sitemap_getDBLimit
  • sitemap_getISO8601Date
  • skipScheduledPublishing
  • sortByKey
  • sortByMultilingual
  • sortMultiArray
  • standardScripts
  • standardThemeOptions
  • stickyNews
  • storeConfig
  • storeTags
  • stripSuffix
  • submenuOf
  • switchLog
  • tagSelector
  • tagSuggestJS
  • tagSuggestJS_admin
  • tagSuggestJS_frontend
  • themeIsEditable
  • themeSetup
  • timezoneDiff
  • tinymce4ConfigJS
  • truncate_string
  • unpublishedZenphotoItemCheck
  • unpublishSubalbums
  • unQuote
  • unzip
  • updateArticle
  • updateCacheName
  • updateCategory
  • updateConfigItem
  • updateItemSortorder
  • updateItemsSortorder
  • updateMenuItem
  • updatePage
  • upload_extra
  • upload_form
  • upload_head
  • user_mailing_list_button
  • validateLocale
  • wordpress_import_button
  • wp_prefix
  • wp_query_full_array
  • wpimport_TryAgainError
  • XSRFdefender
  • XSRFToken
  • zenJavascript
  • zenpageAlbumImage
  • zenpageBulkActionMessage
  • zenpageHitcounter
  • zenpageJSCSS
  • zenpageOpenedForComments
  • zenpagePublish
  • zenphoto_PHPMailer
  • zenphoto_sendmail
  • zenPhotoTheme
  • zp_apply_filter
  • zp_clearCookie
  • zp_colorAllocate
  • zp_cookieEncode
  • zp_copyCanvas
  • zp_createImage
  • zp_drawRectangle
  • zp_error
  • zp_filter_slot
  • zp_filter_unique_id
  • zp_getCookie
  • zp_getFonts
  • zp_graphicsLibInfo
  • zp_handle_password
  • zp_handle_password_single
  • zp_has_filter
  • zp_image_types
  • zp_imageCanRotate
  • zp_imageColorTransparent
  • zp_imageDims
  • zp_imageFill
  • zp_imageFontHeight
  • zp_imageFontWidth
  • zp_imageFromString
  • zp_imageGet
  • zp_imageGray
  • zp_imageHeight
  • zp_imageIPTC
  • zp_imageKill
  • zp_imageLoadFont
  • zp_imageMerge
  • zp_imageOutput
  • zp_imageResizeAlpha
  • zp_imageUnsharpMask
  • zp_imageWidth
  • zp_load_album
  • zp_load_gallery
  • zp_load_image
  • zp_load_page
  • zp_load_request
  • zp_load_search
  • zp_loggedin
  • zp_mail
  • zp_register_filter
  • zp_remove_filter
  • zp_resampleImage
  • zp_rotateImage
  • zp_session_start
  • zp_setCookie
  • zp_writeString
  • zpErrorHandler
  • zpFormattedDate
  • zpRewriteURL
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  1: <?php
  2: /**
  3:  * An adaption of the jQuery Cycle2 script: http://jquery.malsup.com/cycle2/
  4:  *
  5:  * Shows slideshows of images of an album. Slideshows are responsive by default but beware of theme css.
  6:  *
  7:  * Slideshow
  8:  * The theme file <var>slideshow.php</var> is required witin your theme's folder. A <var>slideshow.css</var> is optional.
  9:  * Required special css should best be incorporated into the theme's css.
 10:  *
 11:  * If you are creating a custom theme, copy these files from an official Zenphoto theme.
 12:  * Note that the Colorbox mode does not require these files as it is called on your theme's image.php and album.php directly
 13:  * via the slideshow button. The Colorbox plugin must be enabled and setup for these pages.
 14:  *
 15:  * <b>NOTE:</b> The jQuery Cycle and the jQuery Colorbox modes do not support movie and audio files.
 16:  * In Colorbox mode there will be no slideshow button on the image page if that current image is a movie/audio file.
 17:  *
 18:  * You can also place the <var>printSlideShow()</var> function anywhere else on your theme to call a slideshow directly.
 19:  *
 20:  * Content macro support:
 21:  * Use [SLIDESHOW <albumname> <true/false for control] for showing a slideshow within image/album descriptions or Zenpage article and page contents.
 22:  * The slideshow size options must fit the space
 23:  * Notes:
 24:  * <ul>
 25:  *  <li>The slideshow scripts must be enabled for the pages you wish to use it on.</li>
 26:  *  <li>Use only one slideshow per page to avoid CSS conflicts.</li>
 27:  *  <li>Also your theme might require extra CSS for this usage, especially the controls.</li>
 28:  *  <li>This only creates a slideshow in jQuery mode, no matter how the mode is set.</li>
 29:  * </ul>
 30:  *
 31:  * @author Malte Müller (acrylian)
 32:  * @package plugins
 33:  * @subpackage media
 34:  */
 35: $plugin_is_filter = 9 | THEME_PLUGIN | ADMIN_PLUGIN;
 36: $plugin_description = gettext("Slideshow plugin based on the Cycle2 jQuery plugin.");
 37: $plugin_author = "Malte Müller (acrylian)";
 38: $plugin_disable = (extensionEnabled('slideshow')) ? sprintf(gettext('Only one slideshow plugin may be enabled. <a href="#%1$s"><code>%1$s</code></a> is already enabled.'), 'slideshow') : '';
 39: 
 40: $option_interface = 'cycle';
 41: 
 42: global $_zp_gallery, $_zp_gallery_page;
 43: if (($_zp_gallery_page == 'slideshow.php' && getOption('cycle-slideshow_mode') == 'cycle') || getOption('cycle_' . $_zp_gallery->getCurrentTheme() . '_' . stripSuffix($_zp_gallery_page))) {
 44:     zp_register_filter('theme_head', 'cycle::cycleJS');
 45: }
 46: zp_register_filter('content_macro', 'cycle::macro');
 47: 
 48: /**
 49:  * Plugin option handling class
 50:  *
 51:  */
 52: class cycle {
 53: 
 54:     function __construct() {
 55:         global $_zp_gallery;
 56:         if (OFFSET_PATH == 2) {
 57:             //normal slideshow
 58:             setOptionDefault('cycle-slideshow_width', '595');
 59:             setOptionDefault('cycle-slideshow_height', '595');
 60:             setOptionDefault('cycle-slideshow_mode', 'cycle');
 61:             setOptionDefault('cycle-slideshow_effect', 'fade');
 62:             setOptionDefault('cycle-slideshow_speed', '1000');
 63:             setOptionDefault('cycle-slideshow_timeout', '3000');
 64:             setOptionDefault('cycle-slideshow_showdesc', 0);
 65:             // colorbox mode
 66:             setOptionDefault('cycle-slideshow_colorbox_transition', 'fade');
 67:             setOptionDefault('cycle-slideshow_colorbox_imagetype', 'sizedimage');
 68:             setOptionDefault('cycle-slideshow_colorbox_imagetitle', 1);
 69:             if (class_exists('cacheManager')) {
 70:                 cacheManager::deleteThemeCacheSizes('cycle');
 71:                 cacheManager::addThemeCacheSize('cycle', NULL, getOption('cycle-slideshow_width'), getOption('cycle-slideshow_height'), NULL, NULL, NULL, NULL, NULL, NULL, NULL, true);
 72:             }
 73:         }
 74:     }
 75: 
 76:     function getOptionsSupported() {
 77: 
 78:         /*       * *********************
 79:          *  slideshow options
 80:          * ********************* */
 81:         $options = array(
 82:                         gettext('Slideshow: Mode')   => array('key'              => 'cycle-slideshow_mode', 'type'           => OPTION_TYPE_SELECTOR,
 83:                                         'order'          => 0,
 84:                                         'selections' => array(gettext("jQuery Cycle") => "cycle", gettext("jQuery Colorbox") => "colorbox"),
 85:                                         'desc'           => gettext('<em>jQuery Cycle</em> for slideshow using the jQuery Cycle2 plugin<br /><em>jQuery Colorbox</em> for slideshow using Colorbox (Colorbox plugin required).<br />NOTE: The jQuery Colorbox mode is attached to the link the printSlideShowLink() function prints and can neither be called directly nor used on the slideshow.php theme page.')),
 86:                         gettext('Slideshow: Speed')  => array('key'      => 'cycle-slideshow_speed', 'type'  => OPTION_TYPE_TEXTBOX,
 87:                                         'order'  => 1,
 88:                                         'desc'   => gettext("Speed of the transition in milliseconds."))
 89:         );
 90: 
 91:         switch (getOption('cycle-slideshow_mode')) {
 92:             case 'cycle':
 93:                 $options = array_merge($options, array(gettext('Slideshow: Slide width')                     => array('key'      => 'cycle-slideshow_width', 'type'  => OPTION_TYPE_TEXTBOX,
 94:                                                 'order'  => 5,
 95:                                                 'desc'   => gettext("Width of the images in the slideshow.")),
 96:                                 gettext('Slideshow: Slide height')               => array('key'      => 'cycle-slideshow_height', 'type'     => OPTION_TYPE_TEXTBOX,
 97:                                                 'order'  => 6,
 98:                                                 'desc'   => gettext("Height of the images in the slideshow.")),
 99:                                 gettext('Slideshow: Effect')                             => array('key'              => 'cycle-slideshow_effect', 'type'             => OPTION_TYPE_SELECTOR,
100:                                                 'order'          => 2,
101:                                                 'selections' => array(
102:                                                                 gettext('none')                          => "none",
103:                                                                 gettext('fade')                          => "fade",
104:                                                                 gettext('fadeOut')                   => "fadeOut",
105:                                                                 gettext('shuffle')                   => "shuffle",
106:                                                                 gettext('Scroll horizontal') => "scrollHorz",
107:                                                                 gettext('Scroll vertical')   => "scrollVert",
108:                                                                 gettext('Flip horizontal')   => "flipHorz",
109:                                                                 gettext('Flip vertical')         => "flipVert",
110:                                                                 gettext('Tile slide')                => "tileSlide",
111:                                                                 gettext('Tile blind')                => "tileBlind"),
112:                                                 'desc'           => gettext("The cycle slide effect to be used. Flip transitions are only supported on browsers that support CSS3 3D transforms. (IE10+, current Chrome, Firefox, Opera and Safari.)")),
113:                                 gettext('Slideshow: Tile Effect - Extra')    => array('key'              => 'cycle-slideshow_tileeffect', 'type'             => OPTION_TYPE_SELECTOR,
114:                                                 'order'          => 3,
115:                                                 'selections' => array(
116:                                                                 gettext('Horziontal')    => "tileVert",
117:                                                                 gettext('Vertical')      => "tileHorz"),
118:                                                 'desc'           => gettext("If one of the tile effects is selected, this is its orientation.")),
119:                                 gettext('Slideshow: Timeout')                            => array('key'      => 'cycle-slideshow_timeout', 'type'    => OPTION_TYPE_TEXTBOX,
120:                                                 'order'  => 4,
121:                                                 'desc'   => gettext("Milliseconds between slide transitions (0 to disable auto advance.)")),
122:                                 gettext('Slideshow: Description')                    => array('key'      => 'cycle-slideshow_showdesc', 'type'   => OPTION_TYPE_CHECKBOX,
123:                                                 'order'  => 7,
124:                                                 'desc'   => gettext("Check if you want to show the image’s description below the slideshow.")),
125:                                 gettext('Slideshow: Swipe gestures')             => array('key'      => 'cycle-slideshow_swipe', 'type'  => OPTION_TYPE_CHECKBOX,
126:                                                 'order'  => 8,
127:                                                 'desc'   => gettext("Check if you want to enable touch screen swipe gestures.")),
128:                                 gettext('Slideshow: Pause on hover')             => array('key'      => 'cycle-slideshow_pausehover', 'type'     => OPTION_TYPE_CHECKBOX,
129:                                                 'order'  => 9,
130:                                                 'desc'   => gettext("Check if you want the slidesshow to pause on hover."))
131:                 ));
132:                 break;
133: 
134:             case 'colorbox':
135:                 $options = array_merge($options, array(gettext('Colorbox: Transition')   => array('key'              => 'cycle-slideshow_colorbox_transition', 'type'            => OPTION_TYPE_SELECTOR,
136:                                                 'order'          => 2,
137:                                                 'selections' => array(
138:                                                                 gettext('elastic') => "elastic",
139:                                                                 gettext('fade')      => "fade",
140:                                                                 gettext('none')      => "none"),
141:                                                 'desc'           => gettext("The Colorbox transition slide effect to be used.")),
142:                                 gettext('Colorbox: Image type')  => array('key'              => 'cycle-slideshow_colorbox_imagetype', 'type'             => OPTION_TYPE_SELECTOR,
143:                                                 'order'          => 3,
144:                                                 'selections' => array(gettext('full image') => "fullimage", gettext("sized image") => "sizedimage"),
145:                                                 'desc'           => gettext("The image type you wish to use for the Colorbox. If you choose “sized image” the slideshow width value will be used for the longest side of the image.")),
146:                                 gettext('Colorbox: Image title') => array('key'      => 'cycle-slideshow_colorbox_imagetitle', 'type'    => OPTION_TYPE_CHECKBOX,
147:                                                 'order'  => 4,
148:                                                 'desc'   => gettext("If the image title should be shown at the bottom of the Colorbox."))
149:                 ));
150:                 if (getOption('cycle-slideshow_colorbox_imagetype') == 'sizedimage') {
151:                     $options = array_merge($options, array(gettext('Colorbox: Slide width') => array('key'       => 'cycle-slideshow_width', 'type'  => OPTION_TYPE_TEXTBOX,
152:                                                     'order'  => 3.5,
153:                                                     'desc'   => gettext("Width of the images in the slideshow."))
154:                     ));
155:                 }
156:                 break;
157:         }
158: 
159:         foreach (getThemeFiles(array('404.php', 'themeoptions.php', 'theme_description.php', 'slideshow.php', 'functions.php', 'password.php', 'sidebar.php', 'register.php', 'contact.php')) as $theme => $scripts) {
160:             $list = array();
161:             foreach ($scripts as $script) {
162:                 $list[$script] = 'cycle_' . $theme . '_' . stripSuffix($script);
163:             }
164:             $options2[$theme] = array('key'              => 'cycle_' . $theme . '_scripts', 'type'           => OPTION_TYPE_CHECKBOX_ARRAY,
165:                             'checkboxes' => $list,
166:                             'desc'           => gettext('The scripts for which the cycle2 plugin is enabled. {If themes require it they might set this, otherwise you need to do it manually!}')
167:             );
168:         }
169: 
170:         $options = array_merge($options, $options2);
171: 
172:         return $options;
173:     }
174: 
175:     function handleOption($option, $currentValue) {
176: 
177:     }
178: 
179:     static function getSlideshowPlayer($album, $controls = false, $width = NULL, $height = NULL) {
180:         $albumobj = NULL;
181:         if (!empty($album)) {
182:             $albumobj = newAlbum($album, NULL, true);
183:         }
184:         if (is_object($albumobj) && $albumobj->loaded) {
185:             $returnpath = rewrite_path(pathurlencode($albumobj->name) . '/', '/index.php?album=' . urlencode($albumobj->name));
186:             return cycle::getShow(false, false, $albumobj, NULL, $width, $height, false, false, false, $controls, $returnpath, 0);
187:         } else {
188:             return '<div class="errorbox" id="message"><h2>' . gettext('Invalid slideshow album name!') . '</h2></div>';
189:         }
190:     }
191: 
192:     static function getShow($heading, $speedctl, $albumobj, $imageobj, $width, $height, $crop, $shuffle, $linkslides, $controls, $returnpath, $imagenumber) {
193:     global $_zp_gallery, $_zp_gallery_page;
194:     setOption('cycle-slideshow_' . $_zp_gallery->getCurrentTheme() . '_' . stripSuffix($_zp_gallery_page), 1);
195:     if (!$albumobj->isMyItem(LIST_RIGHTS) && !checkAlbumPassword($albumobj)) {
196:       return '<div class="errorbox" id="message"><h2>' . gettext('This album is password protected!') . '</h2></div>';
197:     }
198:     // setting the image size
199:     if (empty($width) || empty($height)) {
200:       $width = getOption('cycle-slideshow_width');
201:       $height = getOption('cycle-slideshow_height');
202:     }
203:     if ($crop) {
204:       $cropw = $width;
205:       $croph = $height;
206:     } else {
207:       $cropw = NULL;
208:       $croph = NULL;
209:     }
210:     //echo $imagenumber;
211:     $slides = $albumobj->getImages(0);
212:     $numslides = $albumobj->getNumImages();
213:     if ($shuffle) { // means random order, not the effect!
214:       shuffle($slides);
215:     }
216:     //echo "<pre>";
217:     // print_r($slides);
218:     //echo "</pre>";
219:     //cycle2 in progressive loading mode cannot start with specific slides as it does not "know" them.
220:     //The start slide needs to be set manually so I remove and append those before the desired start slide at the end
221:     if ($imagenumber != 0) { // if start slide not the first
222:       $count = -1; //cycle2 starts with 0
223:       $extractslides = array();
224:       foreach ($slides as $slide) {
225:         $count++;
226:         if ($count < $imagenumber) {
227:           $extractslides[] = $slide;
228:           unset($slides[$count]);
229:         }
230:       }
231:       $slides = array_merge($slides, $extractslides);
232:     }
233:     //echo "<pre>";
234:     // print_r($slides);
235:     //echo "</pre>";
236:     //$albumid = $albumobj->getID();
237:     if (getOption('cycle-slideshow_swipe')) {
238:       $option_swipe = 'true';
239:     } else {
240:       $option_swipe = 'false';
241:     }
242:     if (getOption('cycle-slideshow_pausehover')) {
243:       $option_pausehover = 'true';
244:     } else {
245:       $option_pausehover = 'false';
246:     }
247:     $option_fx = getOption('cycle-slideshow_effect');
248:     $option_tilevertical = '';
249:     if ($option_fx == 'tileSlide' || $option_fx == 'tileBlind') {
250:       $option_tileextra = getOption('cycle-slideshow_tileeffect');
251:       switch ($option_tileextra) {
252:         case 'tileVert':
253:           $option_tilevertical = 'data-cycle-tile-vertical=true';
254:           break;
255:         case 'tileHorz':
256:           $option_tilevertical = 'data-cycle-tile-vertical=false';
257:           break;
258:         default:
259:           $option_tilevertical = '';
260:           break;
261:       }
262:     }
263:     if ($numslides == 0) {
264:       return '<div class="errorbox" id="message"><h2>' . gettext('No images for the slideshow!') . '</h2></div>';
265:     }
266:     $slideshow = '<section class="slideshow"><!-- extra class with album id so we can address slides! -->' . "\n";
267:     if ($controls) {
268:       $slideshow .= '<ul class="slideshow_controls">' . "\n";
269:       $slideshow .= '<li><a href="#" data-cycle-cmd="prev" class="cycle-slideshow-prev icon-backward" title="' . gettext('prev') . '"></a></li>' . "\n";
270:       $slideshow .= '<li><a href="' . $returnpath . '" class="cycle-slideshow-stop icon-stop" title="' . gettext('stop') . '"></a></li>' . "\n";
271:       $slideshow .= '<li><a href="#" data-cycle-cmd="pause" class="cycle-slideshow-pause icon-pause" title="' . gettext('pause') . '"></a></li>' . "\n";
272:       $slideshow .= '<li><a href="#" data-cycle-cmd="resume" class="cycle-slideshow-resume icon-play" title="' . gettext('play') . '"></a></li>' . "\n";
273:       $slideshow .= '<li><a href="#" data-cycle-cmd="next" class="cycle-slideshow-next icon-forward" title="' . gettext('next') . '"></a></li>' . "\n";
274:       $slideshow .= '</ul>' . "\n";
275:     }
276:     //class cylce-slideshow is mandatory!
277:     $slideshow .= '<div class="cycle-slideshow"' . "\n";
278:     $slideshow .= 'data-cycle-pause-on-hover=' . $option_pausehover . "\n";
279:     $slideshow .= 'data-cycle-fx="' . $option_fx . '"' . "\n";
280:     $slideshow .= $option_tilevertical . "\n";
281:     $slideshow .= 'data-cycle-speed=' . getOption('cycle-slideshow_speed') . "\n";
282:     $slideshow .= 'data-cycle-timeout=' . getOption('cycle-slideshow_timeout') . "\n";
283:     $slideshow .= 'data-cycle-slides=".slide"' . "\n";
284:     $slideshow .= 'data-cycle-auto-height=true' . "\n";
285:     $slideshow .= 'data-cycle-center-horz=true' . "\n";
286:     $slideshow .= 'data-cycle-center-vert=true' . "\n";
287:     $slideshow .= 'data-cycle-swipe=' . $option_swipe . "\n";
288:     $slideshow .= 'data-cycle-loader=true' . "\n";
289:     $slideshow .= 'data-cycle-progressive=".slides"' . "\n";
290:     $slideshow .= '>';
291:     // first slide manually for progressive slide loading
292:     $firstslide = array_shift($slides);
293:     /*
294:      * This obj stuff could be done within printslides but we
295:      * might need to exclude types although cycle2 should display all
296:      * In that case we need the filename before printSlide as
297:      * otherwise the slides count is disturbed as it is done on all
298:      */
299:     $slideobj = cycle::getSlideObj($firstslide, $albumobj);
300:     //$ext = slideshow::is_valid($slideobj->filename, $validtypes);
301:     //if ($ext) {
302:     $slideshow .= cycle::getSlide($albumobj, $slideobj, $width, $height, $cropw, $croph, $linkslides, false);
303:     //}
304:     $slideshow .= '<script class="slides" type="text/cycle" data-cycle-split="---">' . "\n";
305:     $count = '';
306:     foreach ($slides as $slide) {
307:       $count++;
308:       $slideobj = cycle::getSlideObj($slide, $albumobj);
309:       $slideshow .= cycle::getSlide($albumobj, $slideobj, $width, $height, $cropw, $croph, $linkslides, false);
310:       if ($count != $numslides) {
311:         $slideshow .= "---\n"; // delimiter for the progressive slide loading
312:       }
313:     }
314:     $slideshow .='</script>' . "\n";
315:     $slideshow .='</div>' . "\n";
316:     $slideshow .='</section>' . "\n";
317:     return $slideshow;
318:   }
319: 
320:   /**
321:      * Helper function to print the individual slides
322:      *
323:      * @param obj $albumobj Album object
324:      * @param obj $imgobj Current slide obj
325:      * @param int $width Slide image width
326:      * @param int $height Slide image height
327:      * @param int $cropw Slide image crop width
328:      * @param int $croph Slide image crop height
329:      * @param bool $linkslides True or false if the slides should be linked to their image page.
330:      *                          Note: In carousel mode this means full image links as here slides are always linked to the image page.
331:      * @param bool $crop True or false to crop the image
332:      * @param bool $carousel if the slideshow is a carousel so we can enable full image linking (only images allowed!)
333:      */
334:  static function getSlide($albumobj, $imgobj, $width, $height, $cropw, $croph, $linkslides, $crop = false, $carousel = false) {
335:     global $_zp_current_image;
336:     if ($crop) {
337:       $imageurl = $imgobj->getCustomImage(NULL, $width, $height, $cropw, $croph, NULL, NULL, true, NULL);
338:     } else {
339:       $maxwidth = $width;
340:       $maxheight = $height;
341:       getMaxSpaceContainer($maxwidth, $maxheight, $imgobj);
342:       $imageurl = $imgobj->getCustomImage(NULL, $maxwidth, $maxheight, NULL, NULL, NULL, NULL, NULL, NULL);
343:     }
344:     $slidecontent = '<div class="slide">' . "\n";
345:     // no space in carousels for titles!
346:     if (!$carousel) {
347:       $slidecontent .= '<h4>' . html_encode($albumobj->getTitle()) . ': ' . html_Encode($imgobj->getTitle()) . '</h4>' . "\n";
348:     }
349:     if ($carousel) {
350:       // on the carousel this means fullimage as they are always linked anyway
351:       if ($linkslides) {
352:         $url = pathurlencode($imgobj->getFullImageURL());
353:       } else {
354:         $url = $imgobj->getLink();
355:       }
356:       $slidecontent .= '<a href="' . $url . '">' . "\n";
357:     } else if (!$carousel && $linkslides) {
358:       $slidecontent .= '<a href="' . $imgobj->getLink() . '">' . "\n";
359:     }
360:     $active = '';
361:     if ($carousel && !is_null($_zp_current_image)) {
362:       if ($_zp_current_image->filename == $imgobj->filename) {
363:         $active = ' class="activeslide"';
364:       } else {
365:         $active = '';
366:       }
367:     }
368:     $slidecontent .='<img src="' . pathurlencode($imageurl) . '" alt=""' . $active . '>' . "\n";
369:     if ($linkslides || $carousel) {
370:       $slidecontent .= '</a>' . "\n";
371:     }
372:     // no space in carousels for this!
373:     if (getOption("cycle-slideshow_showdesc") && !$carousel) {
374:       $slidecontent .= '<div class="slide_desc">' . html_encodeTagged($imgobj->getDesc()) . '</div>' . "\n";
375:     }
376:     $slidecontent .= '</div>' . "\n";
377:     return $slidecontent;
378:   }
379: 
380:   /**
381:    * Helper function to print the individual slides
382:    *
383:    * @param obj $albumobj Album object
384:    * @param obj $imgobj Current slide obj
385:    * @param int $width Slide image width
386:    * @param int $height Slide image height
387:    * @param int $cropw Slide image crop width
388:    * @param int $croph Slide image crop height
389:    * @param bool $linkslides True or false if the slides should be linked to their image page.
390:    *                          Note: In carousel mode this means full image links as here slides are always linked to the image page.
391:    * @param bool $crop True or false to crop the image
392:    * @param bool $carousel if the slideshow is a carousel so we can enable full image linking (only images allowed!)
393:    */
394:   static function printSlide($albumobj, $imgobj, $width, $height, $cropw, $croph, $linkslides, $crop = false, $carousel = false) {
395:     echo getSlide($albumobj, $imgobj, $width, $height, $cropw, $croph, $linkslides, $crop, $carousel);
396:   }
397: 
398:   /**
399:      * We might need this to exclude file types or not…
400:      *
401:      * @param type $slide
402:      * @param type $albumobj
403:      * @return type
404:      */
405:     static function getSlideObj($slide, $albumobj) {
406:         return newImage($albumobj, $slide);
407:     }
408: 
409:     static function macro($macros) {
410:         $macros['SLIDESHOW'] = array(
411:                         'class'  => 'function',
412:                         'params' => array('string', 'bool*', 'int*', 'int*'),
413:                         'value'  => 'cycle::getSlideshowPlayer',
414:                         'owner'  => 'cycle',
415:                         'desc'   => gettext('provide the album name as %1 and (optionally) <code>true</code> (or <code>false</code>) as %2 to show (hide) controls. Hiding the controls is the default. Width(%3) and height(%4) may also be specified to override the defaults.')
416:         );
417:         return $macros;
418:     }
419: 
420:     static function cycleJS() {
421:         ?>
422:         <script src="<?php echo FULLWEBPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER ?>/slideshow2/jquery.cycle2.min.js" type="text/javascript"></script>
423:         <script src="<?php echo FULLWEBPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER ?>/slideshow2/jquery.cycle2.center.min.js" type="text/javascript"></script>
424:         <!-- effect plugins -->
425: 
426:         <?php if (getOption('cycle-slideshow_effect') == 'flipHorz' || getOption('cycle-slideshow_effect') == 'flipVert') { ?>
427:             <script src="<?php echo FULLWEBPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER ?>/slideshow2/jquery.cycle2.flip.min.js" type="text/javascript"></script>
428:         <?php } ?>
429: 
430:         <!--[if lt IE 9]>
431:             <script src="<?php echo FULLWEBPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER ?>/slideshow2/jquery.cycle2.ie-fade.min.js" type="text/javascript"></script>
432:         <![endif]-->
433: 
434:         <?php if (getOption('cycle-slideshow_effect') == 'shuffle') { ?>
435:             <script src="<?php echo FULLWEBPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER ?>/slideshow2/jquery.cycle2.shuffle.min.js" type="text/javascript"></script>
436:         <?php } ?>
437: 
438:         <?php if (getOption('cycle-slideshow_effect') == 'tileSlide' || getOption('cycle-slideshow_effect') == 'tileBlind') { ?>
439:             <script src="<?php echo FULLWEBPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER ?>/slideshow2/jquery.cycle2.tile.min.js" type="text/javascript"></script>
440:         <?php } ?>
441: 
442:         <?php if (getOption('cycle-slideshow_effect') == 'scrollVert') { ?>
443:             <script src="<?php echo FULLWEBPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER ?>/slideshow2/jquery.cycle2.scrollVert.min.js" type="text/javascript"></script>
444:         <?php } ?>
445: 
446:         <script src="<?php echo FULLWEBPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER ?>/slideshow2/jquery.cycle2.carousel.min.js" type="text/javascript"></script>
447: 
448:         <!--  swipe with iOS fix -->
449:         <?php if (getOption('cycle-slideshow_swipe')) { ?>
450:             <script src="<?php echo FULLWEBPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER ?>/slideshow2/jquery.cycle2.swipe.min.js" type="text/javascript"></script>
451:             <script src="<?php echo FULLWEBPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER ?>/slideshow2/ios6fix.js" type="text/javascript"></script>
452:         <?php }
453:         $theme = getCurrentTheme();
454:         $css = SERVERPATH . '/' . THEMEFOLDER . '/' . internalToFilesystem($theme) . '/slideshow2.css';
455:         if (file_exists($css)) {
456:             $css = WEBPATH . '/' . THEMEFOLDER . '/' . $theme . '/slideshow2.css';
457:         } else {
458:             $css = WEBPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/slideshow2/slideshow2.css';
459:         }
460:         ?>
461:         <link rel="stylesheet" type="text/css" href="<?php echo $css ?>" />
462:         <!--[if lte IE 7]>
463:             <link rel="stylesheet" type="text/css" href="<?php echo FULLWEBPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER ?>/slideshow2/fonts/ie7.css" />
464:             <script src="<?php echo FULLWEBPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER ?>/slideshow2/fonts/ie7.js" type="text/javascript"></script>
465:         <![endif]-->
466:         <?php
467:     }
468: 
469:     /** TODO WE MIGHT NOT NEED THIS AS CYCLE2 MIGHT BE ABLE TO DISPLAY ANYTHING!
470:      * Returns the file extension if the item passed is displayable by the player
471:      *
472:      * @param mixed $image either an image object or the filename of an image.
473:      * @param array $valid_types list of the types we will accept
474:      * @return string;
475:      */
476:     static function is_valid($image, $valid_types) {
477:         if (is_object($image)) {
478:             $image = $image->filename;
479:         }
480:         $ext = getSuffix($image);
481:         if (in_array($ext, $valid_types)) {
482:             return $ext;
483:         }
484:         return false;
485:     }
486: 
487: }
488: 
489: // cycle class end
490: 
491: if ($plugin_disable) {
492:     enableExtension('slideshow2', 0);
493: }
494: if (extensionEnabled('slideshow2')) {
495: 
496:     /**
497:      * Prints a link to call the slideshow (not shown if there are no images in the album)
498:      * To be used on album.php and image.php
499:      * A CSS id names 'slideshowlink' is attached to the link so it can be directly styled.
500:      *
501:      * If the mode is set to "jQuery Colorbox" and the Colorbox plugin is enabled this link starts a Colorbox slideshow
502:      * from a hidden HTML list of all images in the album. On album.php it starts with the first always, on image.php with the current image.
503:      *
504:      * @param string $linktext Text for the link
505:      * @param string $linkstyle Style of Text for the link
506:      */
507:     function printSlideShowLink($linktext = NULL, $linkstyle = Null) {
508:         global $_zp_gallery, $_zp_current_image, $_zp_current_album, $_zp_current_search, $slideshow_instance, $_zp_gallery_page, $_myFavorites;
509:         if (is_null($linktext)) {
510:             $linktext = gettext('View Slideshow');
511:         }
512:         if (empty($_GET['page'])) {
513:             $pagenr = 1;
514:         } else {
515:             $pagenr = sanitize_numeric($_GET['page']);
516:         }
517:         $slideshowhidden = '';
518:         $numberofimages = 0;
519:         if (in_context(ZP_SEARCH)) {
520:             $imagenumber = '';
521:             $imagefile = '';
522:             $albumnr = 0;
523:             $slideshowlink = rewrite_path(_PAGE_ . '/slideshow/', "index.php?p=slideshow");
524:             $slideshowhidden = '<input type="hidden" name="preserve_search_params" value="' . html_encode($_zp_current_search->getSearchParams()) . '" />';
525:         } else {
526:             if (in_context(ZP_IMAGE)) {
527:                 $imagenumber = imageNumber();
528:                 $imagefile = $_zp_current_image->filename;
529:             } else {
530:                 $imagenumber = '';
531:                 $imagefile = '';
532:             }
533:             if (in_context(ZP_SEARCH_LINKED)) {
534:                 $albumnr = -$_zp_current_album->getID();
535:                 $slideshowhidden = '<input type="hidden" name="preserve_search_params" value="' . html_encode($_zp_current_search->getSearchParams()) . '" />';
536:             } else {
537:                 $albumnr = $_zp_current_album->getID();
538:             }
539:             if ($albumnr) {
540:                 $slideshowlink = rewrite_path(pathurlencode($_zp_current_album->getFolder()) . '/' . _PAGE_ . '/slideshow/', "index.php?p=slideshow&amp;album=" . urlencode($_zp_current_album->getFolder()));
541:             } else {
542:                 $slideshowlink = rewrite_path(_PAGE_ . '/slideshow', "index.php?p=slideshow");
543:                 $slideshowhidden = '<input type="hidden" name="favorites_page" value="1" />' . "\n" . '<input type="hidden" name="title" value="' . $_myFavorites->instance . '" />';
544:             }
545:         }
546:         $numberofimages = getNumImages();
547:         $option = getOption('cycle-slideshow_mode');
548:         switch ($option) {
549:             case 'cycle':
550:                 if ($numberofimages > 1) {
551:                     ?>
552:                     <form name="slideshow_<?php echo $slideshow_instance; ?>" method="post" action="<?php echo $slideshowlink; ?>">
553:                         <?php echo $slideshowhidden; ?>
554:                         <input type="hidden" name="pagenr" value="<?php echo html_encode($pagenr); ?>" />
555:                         <input type="hidden" name="albumid" value="<?php echo $albumnr; ?>" />
556:                         <input type="hidden" name="numberofimages" value="<?php echo $numberofimages; ?>" />
557:                         <input type="hidden" name="imagenumber" value="<?php echo $imagenumber; ?>" />
558:                         <input type="hidden" name="imagefile" value="<?php echo html_encode($imagefile); ?>" />
559:                         <?php if (!empty($linkstyle)) echo '<p style="' . $linkstyle . '">'; ?>
560:                         <a class="slideshowlink" id="slideshowlink_<?php echo $slideshow_instance; ?>"  href="javascript:document.slideshow_<?php echo $slideshow_instance; ?>.submit()"><?php echo $linktext; ?></a>
561:                         <?php if (!empty($linkstyle)) echo '</p>'; ?>
562:                     </form>
563:                     <?php
564:                 }
565:                 $slideshow_instance++;
566:                 break;
567:             case 'colorbox':
568:                 $theme = $_zp_gallery->getCurrentTheme();
569:                 $script = stripSuffix($_zp_gallery_page);
570:                 if (!getOption('colorbox_' . $theme . '_' . $script)) {
571:                     setOptionDefault('colorbox_' . $theme . '_' . $script, 1);
572:                     $themes = $_zp_gallery->getThemes();
573:                     ?>
574:                     <div class="errorbox"><?php printf(gettext('Slideshow not available because colorbox is not enabled on %1$s <em>%2$s</em> pages.'), $themes[$theme]['name'], $script); ?></div>
575:                     <?php
576:                     break;
577:                 }
578:                 if ($numberofimages > 1) {
579:                     if ((in_context(ZP_SEARCH_LINKED) && !in_context(ZP_ALBUM_LINKED)) || in_context(ZP_SEARCH) && is_null($_zp_current_album)) {
580:                         $images = $_zp_current_search->getImages(0);
581:                     } else {
582:                         $images = $_zp_current_album->getImages(0);
583:                     }
584:                     $count = '';
585:                     ?>
586:                     <script type="text/javascript">
587:                     $(document).ready(function() {
588:                         $("a[rel='slideshow']").colorbox({
589:                             slideshow: true,
590:                             loop: true,
591:                             transition: '<?php echo getOption('cycle-slideshow_colorbox_transition'); ?>',
592:                             slideshowSpeed: <?php echo getOption('cycle-slideshow_speed'); ?>,
593:                             slideshowStart: '<?php echo gettext("start slideshow"); ?>',
594:                             slideshowStop: '<?php echo gettext("stop slideshow"); ?>',
595:                             previous: '<?php echo gettext("prev"); ?>',
596:                             next: '<?php echo gettext("next"); ?>',
597:                             close: '<?php echo gettext("close"); ?>',
598:                             current: '<?php printf(gettext('image %1$s of %2$s'), '{current}', '{total}'); ?>',
599:                             maxWidth: '98%',
600:                             maxHeight: '98%',
601:                             photo: true
602:                         });
603:                     });
604:                     </script>
605:                     <?php
606:                     foreach ($images as $image) {
607:                         if (is_array($image)) {
608:                             $suffix = getSuffix($image['filename']);
609:                         } else {
610:                             $suffix = getSuffix($image);
611:                         }
612:                         $suffixes = array('jpg', 'jpeg', 'gif', 'png');
613:                         if (in_array($suffix, $suffixes)) {
614:                             $count++;
615:                             if (is_array($image)) {
616:                                 $albobj = newAlbum($image['folder']);
617:                                 $imgobj = newImage($albobj, $image['filename']);
618:                             } else {
619:                                 $imgobj = newImage($_zp_current_album, $image);
620:                             }
621:                             if (in_context(ZP_SEARCH_LINKED) || $_zp_gallery_page != 'image.php') {
622:                                 if ($count == 1) {
623:                                     $style = '';
624:                                 } else {
625:                                     $style = ' style="display:none"';
626:                                 }
627:                             } else {
628:                                 if ($_zp_current_image->filename == $image) {
629:                                     $style = '';
630:                                 } else {
631:                                     $style = ' style="display:none"';
632:                                 }
633:                             }
634:                             switch (getOption('cycle-slideshow_colorbox_imagetype')) {
635:                                 case 'fullimage':
636:                                     $imagelink = getFullImageURL($imgobj);
637:                                     break;
638:                                 case 'sizedimage':
639:                                     $imagelink = $imgobj->getCustomImage(getOption("cycle-slideshow_width"), NULL, NULL, NULL, NULL, NULL, NULL, false, NULL);
640:                                     break;
641:                             }
642:                             $imagetitle = '';
643:                             if (getOption('cycle-slideshow_colorbox_imagetitle')) {
644:                                 $imagetitle = html_encode(getBare($imgobj->getTitle()));
645:                             }
646:                             ?>
647:                             <a class="slideshowlink" href="<?php echo html_encode(pathurlencode($imagelink)); ?>" rel="slideshow"<?php echo $style; ?> title="<?php echo $imagetitle; ?>"><?php echo $linktext; ?></a>
648:                             <?php
649:                         }
650:                     }
651:                 }
652:                 break;
653:         }
654:     }
655: 
656:     /**
657:      * Prints the slideshow using the {@link http://http://www.malsup.com/jquery/cycle2/  jQuery plugin Cycle2 }
658:      *
659:      * Two ways to use:
660:      * a) Use on your theme's slideshow.php page and called via printSlideShowLink():
661:      * If called from image.php it starts with that image, called from album.php it starts with the first image (jQuery only)
662:      * To be used on slideshow.php only and called from album.php or image.php.
663:      *
664:      * b) Calling directly via printSlideShow() function (jQuery mode)
665:      * Place the printSlideShow() function where you want the slideshow to appear and set create an album object for $albumobj and if needed an image object for $imageobj.
666:      * The controls are disabled automatically.
667:      *
668:      * NOTE: The jQuery mode does not support movie and audio files anymore. If you need to show them please use the Flash mode.
669:      * Also note that this function is not used for the Colorbox mode!
670:      *
671:      * @param bool $heading set to true (default) to emit the slideshow breadcrumbs in flash mode
672:      * @param bool $speedctl controls whether an option box for controlling transition speed is displayed
673:      * @param obj $albumobj The object of the album to show the slideshow of. If set this overrides the POST data of the printSlideShowLink()
674:      * @param obj $imageobj The object of the image to start the slideshow with. If set this overrides the POST data of the printSlideShowLink(). If not set the slideshow starts with the first image of the album.
675:      * @param int $width The width of the images (jQuery mode). If set this overrides the size the slideshow_width plugin option that otherwise is used.
676:      * @param int $height The heigth of the images (jQuery mode). If set this overrides the size the slideshow_height plugin option that otherwise is used.
677:      * @param bool $crop Set to true if you want images cropped width x height (jQuery mode only)
678:      * @param bool $shuffle Set to true if you want random (shuffled) order
679:      * @param bool $linkslides Set to true if you want the slides to be linked to their image pages (jQuery mode only)
680:      * @param bool $controls Set to true (default) if you want the slideshow controls to be shown (might require theme CSS changes if calling outside the slideshow.php page) (jQuery mode only)
681:      *
682:      */
683:     function printSlideShow($heading = true, $speedctl = false, $albumobj = NULL, $imageobj = NULL, $width = NULL, $height = NULL, $crop = false, $shuffle = false, $linkslides = false, $controls = true) {
684:         global $_myFavorites, $_zp_conf_vars;
685:         if (!isset($_POST['albumid']) AND ! is_object($albumobj)) {
686:             return '<div class="errorbox" id="message"><h2>' . gettext('Invalid linking to the slideshow page.') . '</h2></div>';
687:         }
688:         //getting the image to start with
689:         if (!empty($_POST['imagenumber']) AND ! is_object($imageobj)) {
690:             $imagenumber = sanitize_numeric($_POST['imagenumber']) - 1; // slideshows starts with 0, but zp with 1.
691:         } elseif (is_object($imageobj)) {
692:             $imagenumber = $imageobj->getIndex();
693:         } else {
694:             $imagenumber = 0;
695:         }
696:         // set pagenumber to 0 if not called via POST link
697:         if (isset($_POST['pagenr'])) {
698:             $pagenumber = sanitize_numeric($_POST['pagenr']);
699:         } else {
700:             $pagenumber = 1;
701:         }
702:         // getting the number of images
703:         if (!empty($_POST['numberofimages'])) {
704:             $numberofimages = sanitize_numeric($_POST['numberofimages']);
705:         } elseif (is_object($albumobj)) {
706:             $numberofimages = $albumobj->getNumImages();
707:         } else {
708:             $numberofimages = 0;
709:         }
710:         if ($numberofimages < 2 || $imagenumber > $numberofimages) {
711:             $imagenumber = 0;
712:         }
713: 
714:         //getting the album to show
715:         if (!empty($_POST['albumid']) && !is_object($albumobj)) {
716:             $albumid = sanitize_numeric($_POST['albumid']);
717:         } elseif (is_object($albumobj)) {
718:             $albumid = $albumobj->getID();
719:         } else {
720:             $albumid = 0;
721:         }
722: 
723:         if (isset($_POST['preserve_search_params'])) { // search page
724:             $search = new SearchEngine();
725:             $params = sanitize($_POST['preserve_search_params']);
726:             $search->setSearchParams($params);
727:             $searchwords = $search->getSearchWords();
728:             $searchdate = $search->getSearchDate();
729:             $searchfields = $search->getSearchFields(true);
730:             $page = $search->page;
731:             $returnpath = getSearchURL($searchwords, $searchdate, $searchfields, $page);
732:             $albumobj = new AlbumBase(NULL, false);
733:             $albumobj->setTitle(gettext('Search'));
734:             $albumobj->images = $search->getImages(0);
735:         } else {
736:             if (isset($_POST['favorites_page'])) {
737:                 $albumobj = $_myFavorites;
738:                 $returnpath = $_myFavorites->getLink($pagenumber);
739:             } else {
740:                 $albumq = query_single_row("SELECT title, folder FROM " . prefix('albums') . " WHERE id = " . $albumid);
741:                 $albumobj = newAlbum($albumq['folder']);
742:                 if (empty($_POST['imagenumber'])) {
743:                     $returnpath = $albumobj->getLink($pagenumber);
744:                 } else {
745:                     $image = newImage($albumobj, sanitize($_POST['imagefile']));
746:                     $returnpath = $image->getLink();
747:                 }
748:             }
749:         }
750:         echo cycle::getShow($heading, $speedctl, $albumobj, $imageobj, $width, $height, $crop, $shuffle, $linkslides, $controls, $returnpath, $imagenumber);
751:     }
752: 
753: }
Zenphoto doc API documentation generated by ApiGen