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:  * Supports showing slideshows of images.
  4:  *  <ul>
  5:  *      <li>Plugin Option 'slideshow_size' -- Size of the images</li>
  6:  *      <li>Plugin Option 'slideshow_mode' -- The player to be used</li>
  7:  *      <li>Plugin Option 'slideshow_effect' -- The cycle effect</li>
  8:  *      <li>Plugin Option 'slideshow_speed' -- How fast it runs</li>
  9:  *      <li>Plugin Option 'slideshow_timeout' -- Transition time</li>
 10:  *      <li>Plugin Option 'slideshow_showdesc' -- Allows the show to display image descriptions</li>
 11:  *  </ul>
 12:  *
 13:  * For the jQuery Cycle mode, the theme file <var>slideshow.php</var> must reside in the theme
 14:  * folder. If you are creating a custom theme, copy this file from an included theme of the Zenphoto
 15:  * distribution. A custom theme css file <var>slideshow.css</var> will be loaded from the theme
 16:  * folder, if not present, a default css file in the plugin folder will be loaded.
 17:  *
 18:  * Note that the Colorbox mode does not require these files as it is called on your theme's <i>image.php</i>, <i>album.php</i>,
 19:  * <i>search.php</i>, and <i>favorites.php</i> (if enabled) directly via the slideshow button. The Colorbox plugin must be enabled and setup for these pages.
 20:  *
 21:  * <b>NOTE:</b> The jQuery Cycle and the jQuery Colorbox modes do not support movie and audio files.
 22:  * In Colorbox mode there will be no slideshow button on the image page if that current image is a movie/audio file.
 23:  *
 24:  * Content macro support:
 25:  * Use [SLIDESHOW <albumname> <true/false for control] for showing a slideshow within image/album descriptions or Zenpage article and page contents.
 26:  * The slideshow size options must fit the space
 27:  * Notes:
 28:  * <ul>
 29:  *  <li>The slideshow scripts must be enabled for the pages you wish to use it on.</li>
 30:  *  <li>Use only one slideshow per page to avoid CSS conflicts.</li>
 31:  *  <li>Also your theme might require extra CSS for this usage, especially the controls.</li>
 32:  *  <li>This only creates a slideshow in jQuery mode, no matter how the mode is set.</li>
 33:  * </ul>
 34:  *
 35:  * @author Malte Müller (acrylian), Stephen Billard (sbillard), Don Peterson (dpeterson)
 36:  * @package plugins
 37:  * @subpackage media
 38:  */
 39: $plugin_is_filter = 9 | THEME_PLUGIN | ADMIN_PLUGIN;
 40: $plugin_description = gettext("Adds a theme function to call a slideshow either based on jQuery (default) or Colorbox.");
 41: $plugin_author = "Malte Müller (acrylian), Stephen Billard (sbillard), Don Peterson (dpeterson)";
 42: $plugin_disable = (extensionEnabled('slideshow2')) ? sprintf(gettext('Only one slideshow plugin may be enabled. <a href="#%1$s"><code>%1$s</code></a> is already enabled.'), 'slideshow2') : '';
 43: 
 44: $option_interface = 'slideshow';
 45: 
 46: global $_zp_gallery, $_zp_gallery_page;
 47: if ($_zp_gallery_page == 'slideshow.php' || getOption('slideshow_' . $_zp_gallery->getCurrentTheme() . '_' . stripSuffix($_zp_gallery_page))) {
 48:     zp_register_filter('theme_head', 'slideshow::header_js');
 49: }
 50: zp_register_filter('content_macro', 'slideshow::macro');
 51: 
 52: 
 53: //if (!OFFSET_PATH) {
 54: //}
 55: 
 56: /**
 57:  * slideshow
 58:  *
 59:  */
 60: class slideshow {
 61: 
 62:     function __construct() {
 63:         global $_zp_gallery;
 64:         if (OFFSET_PATH == 2) {
 65:             //setOptionDefault('slideshow_size', '595');
 66:             setOptionDefault('slideshow_width', '595');
 67:             setOptionDefault('slideshow_height', '595');
 68:             setOptionDefault('slideshow_mode', 'jQuery');
 69:             setOptionDefault('slideshow_effect', 'fade');
 70:             setOptionDefault('slideshow_speed', '1000');
 71:             setOptionDefault('slideshow_timeout', '3000');
 72:             setOptionDefault('slideshow_showdesc', '');
 73:             setOptionDefault('slideshow_colorbox_transition', 'fade');
 74:             // incase the flowplayer has not been enabled!!!
 75:             setOptionDefault('slideshow_colorbox_imagetype', 'sizedimage');
 76:             setOptionDefault('slideshow_colorbox_imagetitle', 1);
 77:             if (class_exists('cacheManager')) {
 78:                 cacheManager::deleteThemeCacheSizes('slideshow');
 79:                 cacheManager::addThemeCacheSize('slideshow', NULL, getOption('slideshow_width'), getOption('slideshow_height'), NULL, NULL, NULL, NULL, NULL, NULL, NULL, true);
 80:             }
 81:         }
 82:     }
 83: 
 84:     function getOptionsSupported() {
 85:         $options = array(gettext('Mode')     => array('key'              => 'slideshow_mode', 'type'             => OPTION_TYPE_SELECTOR,
 86:                                         'order'          => 0,
 87:                                         'selections' => array(gettext("jQuery Cycle") => "jQuery", gettext("jQuery Colorbox") => "colorbox"),
 88:                                         'desc'           => gettext('<em>jQuery Cycle</em> for slideshow using the jQuery Cycle 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.')),
 89:                         gettext('Speed') => array('key'      => 'slideshow_speed', 'type'    => OPTION_TYPE_TEXTBOX,
 90:                                         'order'  => 1,
 91:                                         'desc'   => gettext("Speed of the transition in milliseconds."))
 92:         );
 93:         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) {
 94:             $list = array();
 95:             foreach ($scripts as $script) {
 96:                 $list[$script] = 'slideshow_' . $theme . '_' . stripSuffix($script);
 97:             }
 98:             $opts[$theme] = array('key'              => 'slideshow_' . $theme . '_scripts', 'type'           => OPTION_TYPE_CHECKBOX_ARRAY,
 99:                             'checkboxes' => $list,
100:                             'desc'           => gettext('The scripts for which the slideshow is enabled. {Should have been set by the themes!}')
101:             );
102:         }
103:         $options = array_merge($options, $opts);
104: 
105:         switch (getOption('slideshow_mode')) {
106:             case 'jQuery':
107:                 $options = array_merge($options, array(gettext('Slide width')    => array('key'      => 'slideshow_width', 'type'    => OPTION_TYPE_TEXTBOX,
108:                                                 'order'  => 5,
109:                                                 'desc'   => gettext("Width of the images in the slideshow.")),
110:                                 gettext('Slide height')  => array('key'      => 'slideshow_height', 'type'   => OPTION_TYPE_TEXTBOX,
111:                                                 'order'  => 6,
112:                                                 'desc'   => gettext("Height of the images in the slideshow.")),
113:                                 gettext('Cycle Effect')  => array('key'              => 'slideshow_effect', 'type'           => OPTION_TYPE_SELECTOR,
114:                                                 'order'          => 2,
115:                                                 'selections' => array(gettext('fade') => "fade", gettext('shuffle') => "shuffle", gettext('zoom') => "zoom", gettext('slide X') => "slideX", gettext('slide Y') => "slideY", gettext('scroll up') => "scrollUp", gettext('scroll down') => "scrollDown", gettext('scroll left') => "scrollLeft", gettext('scroll right') => "scrollRight"),
116:                                                 'desc'           => gettext("The cycle slide effect to be used.")),
117:                                 gettext('Timeout')           => array('key'      => 'slideshow_timeout', 'type'  => OPTION_TYPE_TEXTBOX,
118:                                                 'order'  => 3,
119:                                                 'desc'   => gettext("Milliseconds between slide transitions (0 to disable auto advance.)")),
120:                                 gettext('Description')   => array('key'      => 'slideshow_showdesc', 'type'     => OPTION_TYPE_CHECKBOX,
121:                                                 'order'  => 4,
122:                                                 'desc'   => gettext("Check if you want to show the image’s description below the slideshow."))
123:                 ));
124:                 break;
125:             case 'colorbox':
126:                 $options = array_merge($options, array(gettext('Colorbox transition')    => array('key'              => 'slideshow_colorbox_transition', 'type'          => OPTION_TYPE_SELECTOR,
127:                                                 'order'          => 2,
128:                                                 'selections' => array(gettext('elastic') => "elastic", gettext('fade') => "fade", gettext('none') => "none"),
129:                                                 'desc'           => gettext("The Colorbox transition slide effect to be used.")),
130:                                 gettext('Colorbox image type')   => array('key'              => 'slideshow_colorbox_imagetype', 'type'           => OPTION_TYPE_SELECTOR,
131:                                                 'order'          => 3,
132:                                                 'selections' => array(gettext('full image') => "fullimage", gettext('sized image') => "sizedimage"),
133:                                                 '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.")),
134:                                 gettext('Colorbox image title')  => array('key'      => 'slideshow_colorbox_imagetitle', 'type'  => OPTION_TYPE_CHECKBOX,
135:                                                 'order'  => 4,
136:                                                 'desc'   => gettext("If the image title should be shown at the bottom of the Colorbox."))
137:                 ));
138:                 if (getOption('slideshow_colorbox_imagetype') == 'sizedimage') {
139:                     $options = array_merge($options, array(gettext('Slide width') => array('key'         => 'slideshow_width', 'type'    => OPTION_TYPE_TEXTBOX,
140:                                                     'order'  => 3.5,
141:                                                     'desc'   => gettext("Width of the images in the slideshow."))
142:                     ));
143:                 }
144:                 break;
145:         }
146:         return $options;
147:     }
148: 
149:     function handleOption($option, $currentValue) {
150: 
151:     }
152: 
153:     static function getPlayer($album, $controls = false, $width = NULL, $height = NULL) {
154:         $albumobj = NULL;
155:         if (!empty($album)) {
156:             $albumobj = newAlbum($album, NULL, true);
157:         }
158:         if (is_object($albumobj) && $albumobj->loaded) {
159:             $returnpath = $albumobj->getLink();
160:             return slideshow::getShow(false, false, $albumobj, NULL, $width, $height, false, false, false, $controls, $returnpath, 0);
161:         } else {
162:             return '<div class="errorbox" id="message"><h2>' . gettext('Invalid slideshow album name!') . '</h2></div>';
163:         }
164:     }
165: 
166:     static function getShow($heading, $speedctl, $albumobj, $imageobj, $width, $height, $crop, $shuffle, $linkslides, $controls, $returnpath, $imagenumber) {
167:         global $_zp_gallery, $_zp_gallery_page;
168:         setOption('slideshow_' . $_zp_gallery->getCurrentTheme() . '_' . stripSuffix($_zp_gallery_page), 1);
169:         if (!$albumobj->isMyItem(LIST_RIGHTS) && !checkAlbumPassword($albumobj)) {
170:             return '<div class="errorbox" id="message"><h2>' . gettext('This album is password protected!') . '</h2></div>';
171:         }
172:         $slideshow = '';
173:         $numberofimages = $albumobj->getNumImages();
174:         // setting the image size
175:         if ($width) {
176:             $wrapperwidth = $width;
177:         } else {
178:             $width = $wrapperwidth = getOption("slideshow_width");
179:         }
180:         if ($height) {
181:             $wrapperheight = $height;
182:         } else {
183:             $height = $wrapperheight = getOption("slideshow_height");
184:         }
185:         if ($numberofimages == 0) {
186:             return '<div class="errorbox" id="message"><h2>' . gettext('No images for the slideshow!') . '</h2></div>';
187:         }
188:         $option = getOption("slideshow_mode");
189:         // jQuery Cycle slideshow config
190:         // get slideshow data
191: 
192:         $showdesc = getOption("slideshow_showdesc");
193:         // slideshow display section
194:         $validtypes = array('jpg', 'jpeg', 'gif', 'png', 'mov', '3gp');
195:         $slideshow .= '
196:                 <script type="text/javascript">
197:                 // <!-- <![CDATA[
198:                 $(document).ready(function(){
199:                 $(function() {
200:                 var ThisGallery = "' . html_encode($albumobj->getTitle()) . '";
201:                 var ImageList = new Array();
202:                 var TitleList = new Array();
203:                 var DescList = new Array();
204:                 var ImageNameList = new Array();
205:                 var DynTime=(' . (int) getOption("slideshow_timeout") . ');
206:                 ';
207:         $images = $albumobj->getImages(0);
208:         if ($shuffle) {
209:             shuffle($images);
210:         }
211:         for ($imgnr = 0, $cntr = 0, $idx = $imagenumber; $imgnr < $numberofimages; $imgnr++, $idx++) {
212:             if (is_array($images[$idx])) {
213:                 $filename = $images[$idx]['filename'];
214:                 $album = newAlbum($images[$idx]['folder']);
215:                 $image = newImage($album, $filename);
216:             } else {
217:                 $filename = $images[$idx];
218:                 $image = newImage($albumobj, $filename);
219:             }
220:             $ext = slideshow::is_valid($filename, $validtypes);
221:             if ($ext) {
222:                 if ($crop) {
223:                     $img = $image->getCustomImage(NULL, $width, $height, $width, $height, NULL, NULL, NULL, NULL);
224:                 } else {
225:                     $maxwidth = $width;
226:                     $maxheight = $height;
227:                     getMaxSpaceContainer($maxwidth, $maxheight, $image);
228:                     $img = $image->getCustomImage(NULL, $maxwidth, $maxheight, NULL, NULL, NULL, NULL, NULL, NULL);
229:                 }
230:                 $slideshow .= 'ImageList[' . $cntr . '] = "' . $img . '";' . "\n";
231:                 $slideshow .= 'TitleList[' . $cntr . '] = "' . js_encode($image->getTitle()) . '";' . "\n";
232:                 if ($showdesc) {
233:                     $desc = $image->getDesc();
234:                     $desc = str_replace("\r\n", '<br />', $desc);
235:                     $desc = str_replace("\r", '<br />', $desc);
236:                     $slideshow .= 'DescList[' . $cntr . '] = "' . js_encode($desc) . '";' . "\n";
237:                 } else {
238:                     $slideshow .= 'DescList[' . $cntr . '] = "";' . "\n";
239:                 }
240:                 if ($idx == $numberofimages - 1) {
241:                     $idx = -1;
242:                 }
243:                 $slideshow .= 'ImageNameList[' . $cntr . '] = "' . urlencode($filename) . '";' . "\n";
244:                 $cntr++;
245:             }
246:         }
247: 
248:         $slideshow .= "\n";
249:         $numberofimages = $cntr;
250:         $slideshow .= '
251:                 var countOffset = ' . $imagenumber . ';
252:                 var totalSlideCount = ' . $numberofimages . ';
253:                 var currentslide = 2;
254:                 function onBefore(curr, next, opts) {
255:                 if (opts.timeout != DynTime) {
256:                 opts.timeout = DynTime;
257:         }
258:         if (!opts.addSlide)
259:         return;
260:         var currentImageNum = currentslide;
261:         currentslide++;
262:         if (currentImageNum == totalSlideCount) {
263:         opts.addSlide = null;
264:         return;
265:         }
266:         var relativeSlot = (currentslide + countOffset) % totalSlideCount;
267:         if (relativeSlot == 0) {relativeSlot = totalSlideCount;}
268:         var htmlblock = "<span class=\"slideimage\"><h4><strong>" + ThisGallery + ":</strong> ";
269:         htmlblock += TitleList[currentImageNum]  + " (" + relativeSlot + "/" + totalSlideCount + ")</h4>";
270:         ';
271:         if ($linkslides) {
272:             if (MOD_REWRITE) {
273:                 $slideshow .= 'htmlblock += "<a href=\"' . pathurlencode($albumobj->name) . '/"+ImageNameList[currentImageNum]+"' . getOption('mod_rewrite_image_suffix') . '\">";';
274:             } else {
275:                 $slideshow .= 'htmlblock += "<a href=\"index.php?album=' . pathurlencode($albumobj->name) . '&image="+ImageNameList[currentImageNum]+"\">";';
276:             }
277:         }
278:         $slideshow .= ' htmlblock += "<img src=\"" + ImageList[currentImageNum] + "\"/>";';
279:         if ($linkslides) {
280:             $slideshow .= ' htmlblock += "</a>";';
281:         }
282: 
283:         $slideshow .= 'htmlblock += "<p class=\"imgdesc\">" + DescList[currentImageNum] + "</p></span>";';
284:         $slideshow .= 'opts.addSlide(htmlblock);';
285:         $slideshow .= '}';
286: 
287:         $slideshow .= '
288:                 function onAfter(curr, next, opts){
289:                 ';
290:         if (!$albumobj->isMyItem(LIST_RIGHTS)) {
291:             $slideshow .= '
292:                     //Only register at hit count the first time the image is viewed.
293:                     if ($(next).attr("viewed") != 1) {
294:                     $.get("' . FULLWEBPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/slideshow/slideshow-counter.php?album=' . pathurlencode($albumobj->name) . '&img="+ImageNameList[opts.currSlide]);
295:                     $(next).attr("viewed", 1 );
296:                 }
297:                 ';
298:         }
299:         $slideshow .='}';
300:         $slideshow .='
301:                 $("#slides").cycle({
302:                 fx:     "' . getOption("slideshow_effect") . '",
303:                 speed:   "' . getOption("slideshow_speed") . '",
304:                 timeout: DynTime,
305:                 next:   "#next",
306:                 prev:   "#prev",
307:                 cleartype: 1,
308:                 before: onBefore,
309:                 after: onAfter
310:         });
311: 
312:         $("#speed").change(function () {
313:         DynTime = this.value;
314:         return false;
315:         });
316: 
317:         $("#pause").click(function() { $("#slides").cycle("pause"); return false; });
318:         $("#play").click(function() { $("#slides").cycle("resume"); return false; });
319:         });
320: 
321:         }); // Documentready()
322:         // ]]> -->
323:         </script>
324:         <div id="slideshow" style="height:' . ($wrapperheight + 40) . 'px; width:' . $wrapperwidth . 'px;">
325:         ';
326:         // 7/21/08dp
327:         if ($speedctl) {
328:             $slideshow .= '<div id="speedcontrol">'; // just to keep it away from controls for sake of this demo
329:             $minto = getOption("slideshow_speed");
330:             while ($minto % 500 != 0) {
331:                 $minto += 100;
332:                 if ($minto > 10000) {
333:                     break;
334:                 } // emergency bailout!
335:             }
336:             $dflttimeout = (int) getOption("slideshow_timeout");
337:             /* don't let min timeout = speed */
338:             $thistimeout = ($minto == getOption("slideshow_speed") ? $minto + 250 : $minto);
339:             $slideshow .= 'Select Speed: <select id="speed" name="speed">';
340:             while ($thistimeout <= 60000) { // "around" 1 minute :)
341:                 $slideshow .= "<option value=$thistimeout " . ($thistimeout == $dflttimeout ? " selected='selected'>" : ">") . round($thistimeout / 1000, 1) . " sec</option>";
342:                 /* put back timeout to even increments of .5 */
343:                 if ($thistimeout % 500 != 0) {
344:                     $thistimeout -= 250;
345:                 }
346:                 $thistimeout += ($thistimeout < 1000 ? 500 : ($thistimeout < 10000 ? 1000 : 5000));
347:             }
348:             $slideshow .= '</select> </div>';
349:         }
350:         if ($controls) {
351:             $slideshow .= '
352:                     <div id="controls">
353:                     <div>
354:                     <a href="#" id="prev" title="' . gettext("Previous") . '"></a>
355:                     <a href="' . html_encode($returnpath) . '" id="stop" title="' . gettext("Stop and return to album or image page") . '"></a>
356:                     <a href="#" id="pause" title="' . gettext("Pause (to stop the slideshow without returning)") . '"></a>
357:                     <a href="#" id="play" title="' . gettext("Play") . '"></a>
358:                     <a href="#" id="next" title="' . gettext("Next") . '"></a>
359:                     </div>
360:                     </div>
361:                     ';
362:         }
363:         $slideshow .= '
364:                 <div id="slides" class="pics">
365:                 ';
366: 
367:         if ($cntr > 1)
368:             $cntr = 1;
369:         for ($imgnr = 0, $idx = $imagenumber; $imgnr <= $cntr; $idx++) {
370:             if ($idx >= $numberofimages) {
371:                 $idx = 0;
372:             }
373:             if (is_array($images[$idx])) {
374:                 $folder = $images[$idx]['folder'];
375:                 $dalbum = newAlbum($folder);
376:                 $filename = $images[$idx]['filename'];
377:                 $image = newImage($dalbum, $filename);
378:                 $imagepath = FULLWEBPATH . ALBUM_FOLDER_EMPTY . $folder . "/" . $filename;
379:             } else {
380:                 $folder = $albumobj->name;
381:                 $filename = $images[$idx];
382:                 //$filename = $animage;
383:                 $image = newImage($albumobj, $filename);
384:                 $imagepath = FULLWEBPATH . ALBUM_FOLDER_EMPTY . $folder . "/" . $filename;
385:             }
386:             $ext = slideshow::is_valid($filename, $validtypes);
387:             if ($ext) {
388:                 $imgnr++;
389:                 $slideshow .= '<span class="slideimage"><h4><strong>' . $albumobj->getTitle() . gettext(":") . '</strong> ' . $image->getTitle() . ' (' . ($idx + 1) . '/' . $numberofimages . ')</h4>';
390: 
391:                 if ($ext == "3gp") {
392:                     $slideshow .= '</a>
393:                             <object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" width="352" height="304" codebase="http://www.apple.com/qtactivex/qtplugin.cab">
394:                             <param name="src" value="' . pathurlencode(internalToFilesystem($imagepath)) . '"/>
395:                             <param name="autoplay" value="false" />
396:                             <param name="type" value="video/quicktime" />
397:                             <param name="controller" value="true" />
398:                             <embed src="' . pathurlencode(internalToFilesystem($imagepath)) . '" width="352" height="304" autoplay="false" controller"true" type="video/quicktime"
399:                             pluginspage="http://www.apple.com/quicktime/download/" cache="true"></embed>
400:                             </object>
401:                             <a>';
402:                 } elseif ($ext == "mov") {
403:                     $slideshow .= '</a>
404:                             <object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" width="640" height="496" codebase="http://www.apple.com/qtactivex/qtplugin.cab">
405:                             <param name="src" value="' . pathurlencode(internalToFilesystem($imagepath)) . '"/>
406:                             <param name="autoplay" value="false" />
407:                             <param name="type" value="video/quicktime" />
408:                             <param name="controller" value="true" />
409:                             <embed src="' . pathurlencode(internalToFilesystem($imagepath)) . '" width="640" height="496" autoplay="false" controller"true" type="video/quicktime"
410:                             pluginspage="http://www.apple.com/quicktime/download/" cache="true"></embed>
411:                             </object>
412:                             <a>';
413:                 } else {
414:                     if ($linkslides)
415:                         $slideshow .= '<a href="' . html_encode($image->getLink()) . '">';
416:                     if ($crop) {
417:                         $img = $image->getCustomImage(NULL, $width, $height, $width, $height, NULL, NULL, NULL, NULL);
418:                     } else {
419:                         $maxwidth = $width;
420:                         $maxheight = $height;
421:                         getMaxSpaceContainer($maxwidth, $maxheight, $image);
422:                         $img = $image->getCustomImage(NULL, $maxwidth, $maxheight, NULL, NULL, NULL, NULL, NULL, NULL);
423:                     }
424:                     $slideshow .= '<img src="' . html_encode(pathurlencode($img)) . '" alt="" />';
425:                     if ($linkslides)
426:                         $slideshow .= '</a>';
427:                 }
428:                 if ($showdesc) {
429:                     $desc = $image->getDesc();
430:                     $desc = str_replace("\r\n", '<br />', $desc);
431:                     $desc = str_replace("\r", '<br />', $desc);
432:                     $slideshow .= '<p class="imgdesc">' . $desc . '</p>';
433:                 }
434:                 $slideshow .= '</span>';
435:             }
436:         }
437:         $slideshow .= '
438:         </div>
439:         </div>
440:         ';
441:         return $slideshow;
442:     }
443: 
444:     static function macro($macros) {
445:         $macros['SLIDESHOW'] = array(
446:                         'class'  => 'function',
447:                         'params' => array('string', 'bool*', 'int*', 'int*'),
448:                         'value'  => 'slideshow::getPlayer',
449:                         'owner'  => 'slideshow',
450:                         '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.')
451:         );
452:         return $macros;
453:     }
454: 
455:     static function header_js() {
456:         $theme = getCurrentTheme();
457:         $css = SERVERPATH . '/' . THEMEFOLDER . '/' . internalToFilesystem($theme) . '/slideshow.css';
458:         if (file_exists($css)) {
459:             $css = WEBPATH . '/' . THEMEFOLDER . '/' . $theme . '/slideshow.css';
460:         } else {
461:             $css = WEBPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/slideshow/slideshow.css';
462:         }
463:         ?>
464:         <script src="<?php echo FULLWEBPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER ?>/slideshow/jquery.cycle.all.js" type="text/javascript"></script>
465:         <link rel="stylesheet" type="text/css" href="<?php echo $css; ?>" />
466:         <?php
467:     }
468: 
469:     /**
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:         $ext = getSuffix($image);
480:         if (in_array($ext, $valid_types)) {
481:             return $ext;
482:         }
483:         return false;
484:     }
485: 
486: }
487: 
488: if ($plugin_disable) {
489:     enableExtension('slideshow', 0);
490: }
491: if (extensionEnabled('slideshow')) {
492:     $slideshow_instance = 0;
493: 
494:     /**
495:      * Prints a link to call the slideshow (not shown if there are no images in the album)
496:      * To be used on album.php and image.php
497:      * A CSS id names 'slideshowlink' is attached to the link so it can be directly styled.
498:      *
499:      * If the mode is set to "jQuery Colorbox" and the Colorbox plugin is enabled this link starts a Colorbox slideshow
500:      * 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.
501:      *
502:      * @param string $linktext Text for the link
503:      * @param string $linkstyle Style of Text for the link
504:      */
505:     function printSlideShowLink($linktext = NULL, $linkstyle = Null) {
506:         global $_zp_gallery, $_zp_current_image, $_zp_current_album, $_zp_current_search, $slideshow_instance, $_zp_gallery_page;
507:         if (is_null($linktext)) {
508:             $linktext = gettext('View Slideshow');
509:         }
510:         if (empty($_GET['page'])) {
511:             $pagenr = 1;
512:         } else {
513:             $pagenr = sanitize_numeric($_GET['page']);
514:         }
515:         $slideshowhidden = '';
516:         $numberofimages = 0;
517:         if (in_context(ZP_SEARCH)) {
518:             $imagenumber = '';
519:             $imagefile = '';
520:             $albumnr = 0;
521:             $slideshowlink = rewrite_path(_PAGE_ . '/slideshow/', "index.php?p=slideshow");
522:             $slideshowhidden = '<input type="hidden" name="preserve_search_params" value="' . html_encode($_zp_current_search->getSearchParams()) . '" />';
523:         } else {
524:             if (in_context(ZP_IMAGE)) {
525:                 $imagenumber = imageNumber();
526:                 $imagefile = $_zp_current_image->filename;
527:             } else {
528:                 $imagenumber = '';
529:                 $imagefile = '';
530:             }
531:             if (in_context(ZP_SEARCH_LINKED)) {
532:                 $albumnr = -$_zp_current_album->getID();
533:                 $slideshowhidden = '<input type="hidden" name="preserve_search_params" value="' . html_encode($_zp_current_search->getSearchParams()) . '" />';
534:             } else {
535:                 $albumnr = $_zp_current_album->getID();
536:             }
537:             if ($albumnr) {
538:                 $slideshowlink = rewrite_path(pathurlencode($_zp_current_album->getFileName()) . '/' . _PAGE_ . '/slideshow/', "index.php?p=slideshow&amp;album=" . urlencode($_zp_current_album->getFileName()));
539:             } else {
540:                 $slideshowlink = rewrite_path(_PAGE_ . '/slideshow/', "index.php?p=slideshow");
541:                 $slideshowhidden = '<input type="hidden" name="favorites_page" value="1" />' . "\n" . '<input type="hidden" name="title" value="' . $_myFavorites->instance . '" />';
542:             }
543:         }
544:         $numberofimages = getNumImages();
545:         $option = getOption('slideshow_mode');
546:         switch ($option) {
547:             case 'jQuery':
548:                 if ($numberofimages > 1) {
549:                     ?>
550:                     <form name="slideshow_<?php echo $slideshow_instance; ?>" method="post" action="<?php echo zp_apply_filter('getLink', $slideshowlink, 'slideshow.php', NULL); ?>">
551:                         <?php echo $slideshowhidden; ?>
552:                         <input type="hidden" name="pagenr" value="<?php echo html_encode($pagenr); ?>" />
553:                         <input type="hidden" name="albumid" value="<?php echo $albumnr; ?>" />
554:                         <input type="hidden" name="numberofimages" value="<?php echo $numberofimages; ?>" />
555:                         <input type="hidden" name="imagenumber" value="<?php echo $imagenumber; ?>" />
556:                         <input type="hidden" name="imagefile" value="<?php echo html_encode($imagefile); ?>" />
557:                         <?php if (!empty($linkstyle)) echo '<p style="' . $linkstyle . '">'; ?>
558:                         <a class="slideshowlink" id="slideshowlink_<?php echo $slideshow_instance; ?>"  href="javascript:document.slideshow_<?php echo $slideshow_instance; ?>.submit()"><?php echo $linktext; ?></a>
559:                         <?php if (!empty($linkstyle)) echo '</p>'; ?>
560:                     </form>
561:                     <?php
562:                 }
563:                 $slideshow_instance++;
564:                 break;
565:             case 'colorbox':
566:                 $theme = $_zp_gallery->getCurrentTheme();
567:                 $script = stripSuffix($_zp_gallery_page);
568:                 if (!getOption('colorbox_' . $theme . '_' . $script)) {
569:                     setOptionDefault('colorbox_' . $theme . '_' . $script, 1);
570:                     $themes = $_zp_gallery->getThemes();
571:                     ?>
572:                     <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>
573:                     <?php
574:                     break;
575:                 }
576:                 if ($numberofimages > 1) {
577:                     if ((in_context(ZP_SEARCH_LINKED) && !in_context(ZP_ALBUM_LINKED)) || in_context(ZP_SEARCH) && is_null($_zp_current_album)) {
578:                         $images = $_zp_current_search->getImages(0);
579:                     } else {
580:                         $images = $_zp_current_album->getImages(0);
581:                     }
582:                     $count = '';
583:                     ?>
584:                     <script type="text/javascript">
585:                         $(document).ready(function() {
586:                             $("a[rel='slideshow']").colorbox({
587:                                 slideshow: true,
588:                                 loop: true,
589:                                 transition: '<?php echo getOption('slideshow_colorbox_transition'); ?>',
590:                                 slideshowSpeed: <?php echo getOption('slideshow_speed'); ?>,
591:                                 slideshowStart: '<?php echo gettext("start slideshow"); ?>',
592:                                 slideshowStop: '<?php echo gettext("stop slideshow"); ?>',
593:                                 previous: '<?php echo gettext("prev"); ?>',
594:                                 next: '<?php echo gettext("next"); ?>',
595:                                 close: '<?php echo gettext("close"); ?>',
596:                                 current: '<?php printf(gettext('image %1$s of %2$s'), '{current}', '{total}'); ?>',
597:                                 maxWidth: '98%',
598:                                 maxHeight: '98%',
599:                                 photo: true
600:                             });
601:                         });
602:                     </script>
603:                     <?php
604:                     foreach ($images as $image) {
605:                         if (is_array($image)) {
606:                             $suffix = getSuffix($image['filename']);
607:                         } else {
608:                             $suffix = getSuffix($image);
609:                         }
610:                         $suffixes = array('jpg', 'jpeg', 'gif', 'png');
611:                         if (in_array($suffix, $suffixes)) {
612:                             $count++;
613:                             if (is_array($image)) {
614:                                 $albobj = newAlbum($image['folder']);
615:                                 $imgobj = newImage($albobj, $image['filename']);
616:                             } else {
617:                                 $imgobj = newImage($_zp_current_album, $image);
618:                             }
619:                             if (in_context(ZP_SEARCH_LINKED) || $_zp_gallery_page != 'image.php') {
620:                                 if ($count == 1) {
621:                                     $style = '';
622:                                 } else {
623:                                     $style = ' style="display:none"';
624:                                 }
625:                             } else {
626:                                 if ($_zp_current_image->filename == $image) {
627:                                     $style = '';
628:                                 } else {
629:                                     $style = ' style="display:none"';
630:                                 }
631:                             }
632:                             switch (getOption('slideshow_colorbox_imagetype')) {
633:                                 case 'fullimage':
634:                                     $imagelink = getFullImageURL($imgobj);
635:                                     break;
636:                                 case 'sizedimage':
637:                                     $imagelink = $imgobj->getCustomImage(getOption("slideshow_width"), NULL, NULL, NULL, NULL, NULL, NULL, false, NULL);
638:                                     break;
639:                             }
640:                             $imagetitle = '';
641:                             if (getOption('slideshow_colorbox_imagetitle')) {
642:                                 $imagetitle = html_encode(getBare($imgobj->getTitle()));
643:                             }
644:                             ?>
645:                             <a href="<?php echo html_encode(pathurlencode($imagelink)); ?>" rel="slideshow"<?php echo $style; ?> title="<?php echo $imagetitle; ?>"><?php echo $linktext; ?></a>
646:                             <?php
647:                         }
648:                     }
649:                 }
650:                 break;
651:         }
652:     }
653: 
654:     /**
655:      * Gets the slideshow using the {@link http://http://www.malsup.com/jquery/cycle/  jQuery plugin Cycle}
656:      *
657:      * NOTE: The jQuery mode does not support movie and audio files anymore. If you need to show them please use the Flash mode.
658:      * Also note that this function is not used for the Colorbox mode!
659:      *
660:      * @param bool $heading set to true (default) to emit the slideshow breadcrumbs in flash mode
661:      * @param bool $speedctl controls whether an option box for controlling transition speed is displayed
662:      * @param obj $albumobj The object of the album to show the slideshow of. If set this overrides the POST data of the printSlideShowLink()
663:      * @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.
664:      * @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.
665:      * @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.
666:      * @param bool $crop Set to true if you want images cropped width x height (jQuery mode only)
667:      * @param bool $shuffle Set to true if you want random (shuffled) order
668:      * @param bool $linkslides Set to true if you want the slides to be linked to their image pages (jQuery mode only)
669:      * @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)
670:      *
671:      */
672: 
673:     /**
674:      * Prints the slideshow using the {@link http://http://www.malsup.com/jquery/cycle/  jQuery plugin Cycle}
675:      *
676:      * Two ways to use:
677:      * a) Use on your theme's slideshow.php page and called via printSlideShowLink():
678:      * If called from image.php it starts with that image, called from album.php it starts with the first image (jQuery only)
679:      * To be used on slideshow.php only and called from album.php or image.php.
680:      *
681:      * b) Calling directly via printSlideShow() function (jQuery mode)
682:      * 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.
683:      * The controls are disabled automatically.
684:      *
685:      * NOTE: The jQuery mode does not support movie and audio files anymore. If you need to show them please use the Flash mode.
686:      * Also note that this function is not used for the Colorbox mode!
687:      *
688:      * @param bool $heading set to true (default) to emit the slideshow breadcrumbs in flash mode
689:      * @param bool $speedctl controls whether an option box for controlling transition speed is displayed
690:      * @param obj $albumobj The object of the album to show the slideshow of. If set this overrides the POST data of the printSlideShowLink()
691:      * @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.
692:      * @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.
693:      * @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.
694:      * @param bool $crop Set to true if you want images cropped width x height (jQuery mode only)
695:      * @param bool $shuffle Set to true if you want random (shuffled) order
696:      * @param bool $linkslides Set to true if you want the slides to be linked to their image pages (jQuery mode only)
697:      * @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)
698:      *
699:      */
700:     function printSlideShow($heading = true, $speedctl = false, $albumobj = NULL, $imageobj = NULL, $width = NULL, $height = NULL, $crop = false, $shuffle = false, $linkslides = false, $controls = true) {
701:         global $_myFavorites, $_zp_conf_vars;
702:         if (!isset($_POST['albumid']) AND ! is_object($albumobj)) {
703:             return '<div class="errorbox" id="message"><h2>' . gettext('Invalid linking to the slideshow page.') . '</h2></div>';
704:         }
705:         //getting the image to start with
706:         if (!empty($_POST['imagenumber']) AND ! is_object($imageobj)) {
707:             $imagenumber = sanitize_numeric($_POST['imagenumber']) - 1; // slideshows starts with 0, but zp with 1.
708:         } elseif (is_object($imageobj)) {
709:             $imagenumber = $imageobj->getIndex();
710:         } else {
711:             $imagenumber = 0;
712:         }
713:         // set pagenumber to 0 if not called via POST link
714:         if (isset($_POST['pagenr'])) {
715:             $pagenumber = sanitize_numeric($_POST['pagenr']);
716:         } else {
717:             $pagenumber = 1;
718:         }
719:         // getting the number of images
720:         if (!empty($_POST['numberofimages'])) {
721:             $numberofimages = sanitize_numeric($_POST['numberofimages']);
722:         } elseif (is_object($albumobj)) {
723:             $numberofimages = $albumobj->getNumImages();
724:         } else {
725:             $numberofimages = 0;
726:         }
727:         if ($imagenumber < 2 || $imagenumber > $numberofimages) {
728:             $imagenumber = 0;
729:         }
730:         //getting the album to show
731:         if (!empty($_POST['albumid']) && !is_object($albumobj)) {
732:             $albumid = sanitize_numeric($_POST['albumid']);
733:         } elseif (is_object($albumobj)) {
734:             $albumid = $albumobj->getID();
735:         } else {
736:             $albumid = 0;
737:         }
738: 
739:         if (isset($_POST['preserve_search_params'])) { // search page
740:             $search = new SearchEngine();
741:             $params = sanitize($_POST['preserve_search_params']);
742:             $search->setSearchParams($params);
743:             $searchwords = $search->getSearchWords();
744:             $searchdate = $search->getSearchDate();
745:             $searchfields = $search->getSearchFields(true);
746:             $page = $search->page;
747:             $returnpath = getSearchURL($searchwords, $searchdate, $searchfields, $page);
748:             $albumobj = new AlbumBase(NULL, false);
749:             $albumobj->setTitle(gettext('Search'));
750:             $albumobj->images = $search->getImages(0);
751:         } else {
752:             if (isset($_POST['favorites_page'])) {
753:                 $albumobj = $_myFavorites;
754:                 $returnpath = $_myFavorites->getLink($pagenumber);
755:             } else {
756:                 $albumq = query_single_row("SELECT title, folder FROM " . prefix('albums') . " WHERE id = " . $albumid);
757:                 $albumobj = newAlbum($albumq['folder']);
758:                 if (empty($_POST['imagenumber'])) {
759:                     $returnpath = $albumobj->getLink($pagenumber);
760:                 } else {
761:                     $image = newImage($albumobj, sanitize($_POST['imagefile']));
762:                     $returnpath = $image->getLink();
763:                 }
764:             }
765:         }
766:         echo slideshow::getShow($heading, $speedctl, $albumobj, $imageobj, $width, $height, $crop, $shuffle, $linkslides, $controls, $returnpath, $imagenumber);
767:     }
768: 
769: }
770: ?>
771: 
Zenphoto doc API documentation generated by ApiGen