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:  * Support for the jPlayer jQuery/Flash 2.0.0 multimedia player (jplayer.org). It will play natively via HTML5 in capable browser
  4:  * if the appropiate multimedia formats are provided.
  5: 
  6:  * Audio: <var>.mp3</var>, <var>.m4a</var>, <var>.fla</var> - Counterpart formats <var>.oga</var> and <var>.webma</var> supported (see note below!)<br>
  7:  * Video: <var>.m4v</var>/<var>.mp4</var>, <var>.flv</var> - Counterpart formats <var>.ogv</var> and <var>.webmv</var> supported (see note below!)
  8:  *
  9:  * IMPORTANT NOTE ON OGG AND WEBM COUNTERPART FORMATS:
 10:  *
 11:  * The counterpart formats are not valid formats for Zenphoto itself as that would confuse the management.
 12:  * Therefore these formats can be uploaded via ftp only.
 13:  * The files needed to have the same file name (beware the character case!). In single player usage the player
 14:  * will check via file system if a counterpart file exists.
 15:  * <b>NOTE:</b> Counterpart format does not work correctly on playlists yet. Detailed reason: Priority solution
 16:  * setting must be "flash" as otherwise flv and fla will not work on some browsers like Safari.
 17:  * This in return disables counterpart support for ogg and webm files for some reason on Firefox).
 18:  * Since the flash fallback covers all essential formats this is not much of an issue for visitors though.
 19:  *
 20:  * Otherwise it will not work. It is all or none.
 21:  * See {@link http://jplayer.org/latest/developer-guide/#reference-html5-media the developer guide} for info on that.
 22:  *
 23:  * If you have problems with any format being recognized, you might need to tell your server about the mime types first:
 24:  * See examples on {@link http://jplayer.org/latest/developer-guide/#jPlayer-server-response the jplayer site}.
 25:  *
 26:  * NOTE on POPCORN Support (http://popcornjs.org):
 27:  * jPlayer has support for this interactive libary and its plugin is included but currently not loaded or implemented. You need to customize the plugin or your theme to use it.
 28:  * Please refer to http://jplayer.org/latest/developer-guide/ and http://popcornjs.org to learn about this extra functionality.
 29:  *
 30:  * NOTE ON PLAYER SKINS:<br>
 31:  * The look of the player is determined by a pure HTML/CSS based skin (theme). There may occur display issues with themes.
 32:  * Only the Zenphoto's own default skins <var>zenphotolight</var> and <var>zenphotodark</var>
 33:  * have been tested with the standard themes (and it does not work perfectly for all)). Those two themes are also have a responsive width.
 34:  * So you might need to adjust the skin yourself to work with your theme. It is recommended that
 35:  * you place your custom skins within the root /plugins folder like:
 36:  *
 37:  * plugins/jplayer/skin/<i>skin name1</i><br>
 38:  * plugins/jplayer/skin/<i>skin name2</i> ...
 39:  *
 40:  * You can select the skin then via the plugin options. <b>NOTE:</b> A skin may have only one CSS file.
 41:  *
 42:  * USING PLAYLISTS:<br>
 43:  * You can use <var>printjPlayerPlaylist()</var> on your theme's album.php directly to display a
 44:  * video/audio playlist (default) or an audio only playlist.
 45:  * Alternativly you can show a playlist of a specific album anywhere. In any case you need to modify your theme.
 46:  * See the documentation for the parameter options.
 47:  *
 48:  * Alternativly you can show a playlist of a specific album anywhere. In any case you need to modify your theme.
 49:  * See the documentation for the parameter options.
 50:  *
 51:  * CONTENT MACRO:<br>
 52:  * jPlayer attaches to the content_macro MEDIAPLAYER you can use within normal text of Zenpage pages or articles for example.
 53:  *
 54:  * Usage:
 55:  * [MEDIAPLAYER <albumname> <imagefilename> <number>]
 56:  *
 57:  * Example:
 58:  * [MEDIAPLAYER album1 video.mp4]
 59:  *
 60:  * If you are using more than one player on a page you need to pass a 2nd parameter with for example an unique number:<br>
 61:  * [MEDIAPLAYER album1 video1.mp4 <var>1</var>]<br>
 62:  * [MEDIAPLAYER album2 video2.mp4 <var>2</var>]
 63:  *
 64:  * <b>NOTE:</b> This player does not support external albums!
 65:  *
 66:  * @author Malte Müller (acrylian)
 67:  * @package plugins
 68:  * @subpackage media
 69:  */
 70: $plugin_is_filter = 5 | CLASS_PLUGIN;
 71: $plugin_description = gettext("Enable <strong>jPlayer</strong> to handle multimedia files.");
 72: $plugin_notice = gettext("<strong>IMPORTANT</strong>: Only one multimedia extension plugin can be enabled at the time and the class-video plugin must be enabled, too.") . '<br /><br />' . gettext("Please see <a href='http://jplayer.org'>jplayer.org</a> for more info about the player and its license.");
 73: $plugin_author = "Malte Müller (acrylian)";
 74: $plugin_disable = (getOption('album_folder_class') === 'external') ? gettext('This player does not support <em>External Albums</em>.') : extensionEnabled('class-video') ? false : gettext('The class-video plugin must be enabled for video support.');
 75: 
 76: $option_interface = 'jplayer_options';
 77: 
 78: if (!empty($_zp_multimedia_extension->name) || $plugin_disable) {
 79:     enableExtension('jplayer', 0);
 80: 
 81: //NOTE: the following text really should be included in the $plugin_disable statement above so that it is visible
 82: //on the plugin tab
 83: 
 84:     if (isset($_zp_multimedia_extension)) {
 85:         trigger_error(sprintf(gettext('jPlayer not enabled, %s is already instantiated.'), get_class($_zp_multimedia_extension)), E_USER_NOTICE);
 86:     }
 87: } else {
 88: 
 89:     Gallery::addImageHandler('flv', 'Video');
 90:     Gallery::addImageHandler('fla', 'Video');
 91:     Gallery::addImageHandler('mp3', 'Video');
 92:     Gallery::addImageHandler('mp4', 'Video');
 93:     Gallery::addImageHandler('m4v', 'Video');
 94:     Gallery::addImageHandler('m4a', 'Video');
 95: 
 96:     zp_register_filter('content_macro', 'jPlayer::macro');
 97: }
 98: 
 99: class jplayer_options {
100: 
101:     public $name = 'jPlayer';
102: 
103:     function __construct() {
104:         if (OFFSET_PATH == 2) {
105:             setOptionDefault('jplayer_autoplay', '');
106:             setOptionDefault('jplayer_poster', 1);
107:             setOptionDefault('jplayer_postercrop', 1);
108:             setOptionDefault('jplayer_showtitle', '');
109:             setOptionDefault('jplayer_playlist', '');
110:             setOptionDefault('jplayer_playlist_numbered', 1);
111:             setOptionDefault('jplayer_playlist_playtime', 0);
112:             setOptionDefault('jplayer_download', '');
113:             setOptionDefault('jplayer_size', 'jp-video-270p');
114:             setOptionDefault('jplayer_skin', 'zenphotolight');
115:             setOptionDefault('jplayer_counterparts', 0);
116:             /* TODO: what are these sizes?
117:               $player = new jPlayer();
118:               cacheManager::deleteThemeCacheSizes('jplayer');
119:               cacheManager::addThemeCacheSize('jplayer', NULL, $player->width, $player->height, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
120:              */
121:         }
122:     }
123: 
124:     function getOptionsSupported() {
125:         $skins = getjPlayerSkins();
126:         /*
127:           The player size is entirely styled via the CSS skin so there is no free size option. For audio (without thumb/poster) that is always 480px width.
128:           The original jPlayer skin comes with 270p (480x270px) and 360p (640x360px) sizes for videos but the Zenphoto custom skin comes with some more like 480p and 1080p.
129:           If you need different sizes than you need to make your own skin (see the skin option for info about that)
130:          */
131: 
132:         return array(gettext('Autoplay')                                     => array('key'  => 'jplayer_autoplay', 'type' => OPTION_TYPE_CHECKBOX,
133:                                         'desc' => gettext("Disabled automatically if several players on one page")),
134:                         gettext('Poster (Videothumb)')           => array('key'  => 'jplayer_poster', 'type' => OPTION_TYPE_CHECKBOX,
135:                                         'desc' => gettext("If the videothumb should be shown (jplayer calls it poster).")),
136:                         gettext('Audio poster (Videothumb)') => array('key'  => 'jplayer_audioposter', 'type' => OPTION_TYPE_CHECKBOX,
137:                                         'desc' => gettext("If the poster should be shown for audio files (mp3,m4a,fla) (does not apply for playlists which are all or none).")),
138:                         gettext('Show title')                                => array('key'  => 'jplayer_showtitle', 'type' => OPTION_TYPE_CHECKBOX,
139:                                         'desc' => gettext("If the title should be shown below the player in single player mode (not needed on normal themes) (ignored in playlists naturally).")),
140:                         gettext('Playlist support')                  => array('key'  => 'jplayer_playlist', 'type' => OPTION_TYPE_CHECKBOX,
141:                                         'desc' => gettext("Enable this if you wish to use the playlist mode this loads the scripts needed. NOTE: You have to add the function printjPlayerPlaylist() to your theme yourself. See the documentation for info.")),
142:                         gettext('Playlist numbered')                 => array('key'  => 'jplayer_playlist_numbered', 'type' => OPTION_TYPE_CHECKBOX,
143:                                         'desc' => gettext("Enable this if you wish the playlist to be numbered.")),
144:                         gettext('Playlist playtime')                 => array('key'  => 'jplayer_playlist_playtime', 'type' => OPTION_TYPE_CHECKBOX,
145:                                         'desc' => gettext("Enable if you want to show the playtime of playlist entries.")),
146:                         gettext('Enable download')                   => array('key'  => 'jplayer_download', 'type' => OPTION_TYPE_CHECKBOX,
147:                                         'desc' => gettext("Enables direct file downloads (playlists only).")),
148:                         gettext('Player size')                           => array('key'              => 'jplayer_size', 'type'           => OPTION_TYPE_SELECTOR,
149:                                         'selections' => array(
150:                                                         gettext('jp-video-270p (480x270px)')         => "jp-video-270p",
151:                                                         gettext('jp-video-360p (640x360px)')         => "jp-video-360p",
152:                                                         gettext('jp-video-480p (720x405px)*')        => "jp-video-480p",
153:                                                         gettext('jp-video-720p (1280x720px)*')   => "jp-video-720p",
154:                                                         gettext('jp-video-1080p (1920x1080px)*') => "jp-video-1080p"),
155:                                         'desc'           => gettext("jPlayer is dependent on their HTML and CSS based skin. Sizes marked with a <strong>*</strong> are supported by the two Zenphoto custom skins only (these two skins are also responsive in width). If you need different sizes you need to modify a skin or make your own and also need to change values in the plugin class method getPlayerSize().")),
156:                         gettext('Player skin')                           => array('key'              => 'jplayer_skin', 'type'           => OPTION_TYPE_SELECTOR,
157:                                         'selections' => $skins,
158:                                         'desc'           => gettext("Select the skin (theme) to use. <br />NOTE: Since the skin is pure HTML/CSS only there may be display issues with certain themes that require manual adjustments. The two Zenphoto custom skins are responsive regarding the player width. Place custom skin within the root plugins folder. See plugin documentation for more info."))
159:         );
160:     }
161: 
162: }
163: 
164: /**
165:  * Gets the skin names and css files
166:  *
167:  */
168: function getjPlayerSkins() {
169:     $default_skins_dir = SERVERPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/jplayer/skin/';
170:     $user_skins_dir = SERVERPATH . '/' . USER_PLUGIN_FOLDER . '/jplayer/skin/';
171:     $filestoignore = array('.', '..', '.DS_Store', 'Thumbs.db', '.htaccess', '.svn');
172:     $skins = array_diff(scandir($default_skins_dir), array_merge($filestoignore));
173:     $default_skins = getjPlayerSkinCSS($skins, $default_skins_dir);
174:     //echo "<pre>";print_r($default_skins);echo "</pre>";
175:     $skins2 = @array_diff(scandir($user_skins_dir), array_merge($filestoignore));
176:     if (is_array($skins2)) {
177:         $user_skins = getjPlayerSkinCSS($skins2, $user_skins_dir);
178:         //echo "<pre>";print_r($user_skins);echo "</pre>";
179:         $default_skins = array_merge($default_skins, $user_skins);
180:     }
181:     return $default_skins;
182: }
183: 
184: /**
185:  * Gets the css files for a skin. Helper function for getjPlayerSkins().
186:  *
187:  */
188: function getjPlayerSkinCSS($skins, $dir) {
189:     $skin_css = array();
190:     foreach ($skins as $skin) {
191:         $css = safe_glob($dir . $skin . '/*.css');
192:         if ($css) {
193:             $skin_css = array_merge($skin_css, array($skin => $skin)); // a skin should only have one css file so we just use the first found
194:         }
195:     }
196:     return $skin_css;
197: }
198: 
199: class jPlayer {
200: 
201:     public $width = '';
202:     public $height = '';
203:     public $playersize = '';
204:     public $mode = '';
205:     public $supplied = '';
206:     public $supplied_counterparts = '';
207: 
208:     function __construct() {
209:         $this->playersize = getOption('jplayer_size');
210:         switch ($this->playersize) {
211:             case 'jp-video-270p':
212:                 $this->width = 480;
213:                 $this->height = 270;
214:                 break;
215:             case 'jp-video-360p':
216:                 $this->width = 640;
217:                 $this->height = 360;
218:                 break;
219:             case 'jp-video-480p':
220:                 $this->width = 720;
221:                 $this->height = 405;
222:                 break;
223:             case 'jp-video-720p':
224:                 $this->width = 1280;
225:                 $this->height = 720;
226:                 break;
227:             case 'jp-video-1080p':
228:                 $this->width = 1920;
229:                 $this->height = 1080;
230:                 break;
231:         }
232:     }
233: 
234:     static function getMacrojplayer($albumname, $imagename, $count = 1) {
235:         global $_zp_multimedia_extension;
236:         $movie = newImage(NULL, array('folder' => $albumname, 'filename' => $imagename), true);
237:         if ($movie->exists) {
238:             return $_zp_multimedia_extension->getPlayerConfig($movie, NULL, (int) $count);
239:         } else {
240:             return '<span class = "error">' . sprintf(gettext('%1$s::%2$s not found.'), $albumname, $imagename) . '</span>';
241:         }
242:     }
243: 
244:     static function macro($macros) {
245:         $macros['MEDIAPLAYER'] = array(
246:                         'class'  => 'function',
247:                         'params' => array('string', 'string', 'int*'),
248:                         'value'  => 'jplayer::getMacrojplayer',
249:                         'owner'  => 'jplayer',
250:                         'desc'   => gettext('provide the album name (%1), media file name (%2) and a unique number (%3). (If there is only player instance on the page the parameter may be omitted.)')
251:         );
252:         return $macros;
253:     }
254: 
255:     static function headJS() {
256:         $skin = @array_shift(getPluginFiles('*.css', 'jplayer/skin/' . getOption('jplayer_skin')));
257:         if (file_exists($skin)) {
258:             $skin = str_replace(SERVERPATH, WEBPATH, $skin); //replace SERVERPATH as that does not work as a CSS link
259:         } else {
260:             $skin = WEBPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/jplayer/skin/zenphotolight/jplayer.zenphotolight.css';
261:         }
262:         ?>
263:         <link href="<?php echo $skin; ?>" rel="stylesheet" type="text/css" />
264:         <script type="text/javascript" src="<?php echo WEBPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER; ?>/jplayer/js/jquery.jplayer.min.js"></script>
265:         <?php
266:     }
267: 
268:     static function playlistJS() {
269:         ?>
270:         <script type="text/javascript" src="<?php echo WEBPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER; ?>/jplayer/js/jplayer.playlist.min.js"></script>
271:         <?php
272:     }
273: 
274:     /**
275:      * Get the JS configuration of jplayer
276:      *
277:      * @param mixed $movie the image object
278:      * @param string $movietitle the title of the movie
279:      * @param string $count number (preferredly the id) of the item to append to the css for multiple players on one page
280:      * @param string $width Not supported as jPlayer is dependend on its CSS based skin to change sizes. Can only be set via plugin options.
281:      * @param string $height Not supported as jPlayer is dependend on its CSS based skin to change sizes. Can only be set via plugin options.
282:      *
283:      */
284:     function getPlayerConfig($movie, $movietitle = NULL, $count = NULL) {
285:         $moviepath = $movie->getFullImage(FULLWEBPATH);
286:         if (is_null($movietitle)) {
287:             $movietitle = $movie->getTitle();
288:         }
289:         $ext = getSuffix($moviepath);
290:         if (!in_array($ext, array('m4a', 'm4v', 'mp3', 'mp4', 'flv', 'fla'))) {
291:             return '<span class="error">' . gettext('This multimedia format is not supported by jPlayer') . '</span>';
292:         }
293:         $this->setModeAndSuppliedFormat($ext);
294:         if (empty($count)) {
295:             $multiplayer = false;
296:             $count = '1'; //we need different numbers in case we embed several via tinyZenpage or macros
297:         } else {
298:             $multiplayer = true; // since we need extra JS if multiple players on one page
299:             $count = $count;
300:         }
301:         $autoplay = '';
302:         if (getOption('jplayer_autoplay') && !$multiplayer) {
303:             $autoplay = '.jPlayer("play")';
304:         }
305:         $videoThumb = '';
306:         if (getOption('jplayer_poster') && ($this->mode == 'video' || ($this->mode == 'audio' && getOption('jplayer_audioposter')))) {
307:             //$splashimagerwidth = $this->width;
308:             //$splashimageheight = $this->height;
309:             //getMaxSpaceContainer($splashimagerwidth, $splashimageheight, $movie, true); // jplayer squishes always if not the right aspect ratio
310:             $videoThumb = ',poster:"' . $movie->getCustomImage(null, $this->width, $this->height, $this->width, $this->height, null, null, true) . '"';
311:         }
312:         $playerconfig = '
313:         <script type="text/javascript">
314:             //<![CDATA[
315:         $(document).ready(function(){
316:             $("#jquery_jplayer_' . $count . '").jPlayer({
317:                 ready: function (event) {
318:                     $(this).jPlayer("setMedia", {
319:                         ' . $this->supplied . ':"' . pathurlencode($moviepath) . '"
320:                         ' . $this->getCounterpartFiles($moviepath, $ext) . '
321:                         ' . $videoThumb . '
322:                     })' . $autoplay . ';
323:                 },
324:                 swfPath: "' . WEBPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/jplayer/js",
325:                 supplied: "' . $this->supplied . $this->supplied_counterparts . '",
326:                 cssSelectorAncestor: "#jp_container_' . $count . '"';
327: 
328:         if ($multiplayer) {
329:             $playerconfig .= ',
330:                 play: function() { // To avoid both jPlayers playing together.
331:                 $(this).jPlayer("pauseOthers");
332:             }
333:             ';
334:         }
335: 
336:         if ($this->mode == 'video' || ($this->mode == 'audio' && getOption('jplayer_poster') && getOption('jplayer_audioposter'))) {
337:             $playerconfig .= '
338:                 ,   size: {
339:             width: "100%",
340:             height: "' . $this->height . 'px",
341:             cssClass: "' . $this->playersize . '"
342:         },';
343:         } else {
344:             $playerconfig .= ',';
345:         }
346: 
347:         $playerconfig .= '
348:             useStateClassSkin: true,
349:             remainingDuration: true,
350:             toggleDuration: true
351:             });
352:         });
353:     //]]>
354:     </script>';
355: 
356:         // I am really too lazy to figure everything out to optimize this quite complex html nesting so I generalized only parts.
357:         // This will also make it easier and more convenient to spot any html changes the jplayer developer might come up with later on (as he did from 2.0 to 2.1!)
358:         if ($this->mode == 'video' || !empty($videoThumb)) {
359:             $playerconfig .= '
360:             <div id="jp_container_' . $count . '" class="jp-video ' . $this->playersize . '" role="application" aria-label="media player">
361:             <div class="jp-type-single">
362:                 <div id="jquery_jplayer_' . $count . '" class="jp-jplayer"></div>
363:                 <div class="jp-gui">
364:                     <div class="jp-video-play">
365:                         <button class="jp-video-play-icon" role="button" tabindex="0">' . gettext('play') . '</button>
366:                     </div>
367:                     <div class="jp-interface">
368:                         <div class="jp-progress">
369:                             <div class="jp-seek-bar">
370:                                 <div class="jp-play-bar"></div>
371:                             </div>
372:                         </div>
373:                         <div class="jp-current-time" role="timer" aria-label="time">&nbsp;</div>
374:                         <div class="jp-duration" role="timer" aria-label="duration">&nbsp;</div>
375:                         <div class="jp-controls-holder">';
376:             $playerconfig .= $this->getPlayerHTMLparts($this->mode, 'controls');
377:             $playerconfig .= '
378:                         <div class="jp-volume-controls">
379:                             <button class="jp-mute" role="button" tabindex="0">' . gettext('mute') . '</button>
380:                             <button class="jp-volume-max" role="button" tabindex="0">' . gettext('max volume') . '</button>
381:                             <div class="jp-volume-bar">
382:                                 <div class="jp-volume-bar-value"></div>
383:                             </div>
384:                         </div>';
385:             $playerconfig .= $this->getPlayerHTMLparts($this->mode, 'toggles');
386:             $playerconfig .= '
387:                         </div>';
388:             $playerconfig .= '
389:                         </div>
390:                     </div>';
391:             if (getOption('jplayer_showtitle')) {
392:                 $playerconfig .= '
393:                     <div class="jp-details">
394:                         <div class="jp-title" aria-label="title">' . html_encode($movietitle) . '</div>
395:                     </div>';
396:             }
397:             $playerconfig .= $this->getPlayerHTMLparts($this->mode, 'no-solution');
398:             $playerconfig .= '
399:             </div>
400:         </div>
401:         ';
402:         } else { // audio
403:             $playerconfig .= '
404:         <div id="jquery_jplayer_' . $count . '" class="jp-jplayer"></div>
405:         <div id="jp_container_' . $count . '" class="jp-audio" role="application" aria-label="media player">
406:             <div class="jp-type-single">
407:                 <div class="jp-gui jp-interface">';
408:             $playerconfig .= $this->getPlayerHTMLparts($this->mode, 'controls');
409:             $playerconfig .= '
410:                     <div class="jp-progress">
411:                         <div class="jp-seek-bar">
412:                             <div class="jp-play-bar"></div>
413:                         </div>
414:                     </div>
415:                     <div class="jp-volume-controls">
416:                         <button class="jp-mute" role="button" tabindex="0">' . gettext('mute') . '</button>
417:                         <button class="jp-volume-max" role="button" tabindex="0">' . gettext('max volume') . '</button>
418:                         <div class="jp-volume-bar">
419:                             <div class="jp-volume-bar-value"></div>
420:                         </div>
421:                     </div>
422:                     <div class="jp-time-holder">
423:                         <div class="jp-current-time" role="timer" aria-label="time">&nbsp;</div>
424:                         <div class="jp-duration" role="timer" aria-label="duration">&nbsp;</div>';
425:             $playerconfig .= $this->getPlayerHTMLparts($this->mode, 'toggles');
426:             $playerconfig .= '
427:                     </div>
428:                 </div>';
429:             if (getOption('jplayer_showtitle')) {
430:                 $playerconfig .= '
431:                     <div class="jp-details">
432:                         <div class="jp-title" aria-label="title">' . html_encode($movietitle) . '</div>
433:                     </div>';
434:             }
435:             $playerconfig .= $this->getPlayerHTMLparts($this->mode, 'no-solution');
436:             $playerconfig .= '
437:             </div>
438:         </div>
439:         ';
440:         } // video/audio if else end
441:         return $playerconfig;
442:     }
443: 
444:     /**
445:      * outputs the player configuration HTML
446:      *
447:      * @param mixed $movie the image object if empty (within albums) the current image is used
448:      * @param string $movietitle the title of the movie. if empty the Image Title is used
449:      * @param string $count unique text for when there are multiple player items on a page
450:      */
451:     function printPlayerConfig($movie = NULL, $movietitle = NULL, $count = NULL) {
452:         global $_zp_current_image;
453:         if (empty($movie)) {
454:             $movie = $_zp_current_image;
455:         }
456:         echo $this->getPlayerConfig($movie, $movietitle, $count, NULL, NULL);
457:     }
458: 
459:     /**
460:      * gets commonly used html parts for the player config
461:      *
462:      * @param string $mode 'video' or 'audio'
463:      * @param string $part part to get: 'controls', 'controls-playlist', 'toggles', 'toggles-playlist','no-solution'
464:      */
465:     function getPlayerHTMLparts($mode = '', $part = '') {
466:         $htmlpart = '';
467:         switch ($part) {
468:             case 'controls':
469:             case 'controls-playlist':
470:                 $htmlpart = '<div class="jp-controls">';
471:                 if ($part == 'controls-playlist') {
472:                     $htmlpart .= '<button class="jp-previous" role="button" tabindex="0">' . gettext('previous') . '</button>';
473:                 }
474:                 $htmlpart .= '<button class="jp-play" role="button" tabindex="0">' . gettext('play') . '</button>';
475:                 if ($part == 'controls-playlist') {
476:                     $htmlpart .= '<button class="jp-next" role="button" tabindex="0">' . gettext('next') . '</button>   ';
477:                 }
478:                 $htmlpart .= '<button class="jp-stop" role="button" tabindex="0">' . gettext('stop') . '</button>';
479:                 $htmlpart .= '</div>';
480:                 break;
481:             case 'toggles':
482:             case 'toggles-playlist':
483:                 $htmlpart = '<div class="jp-toggles">';
484:                 $htmlpart .= '<button class="jp-repeat" role="button" tabindex="0">' . gettext('repeat') . '</button>';
485:                 if ($part == 'toggles-playlist') {
486:                     $htmlpart .= '<button class="jp-shuffle" role="button" tabindex="0">' . gettext('shuffle') . '</button>';
487:                 }
488:                 if ($mode == 'video') {
489:                     $htmlpart .= '<button class="jp-full-screen" role="button" tabindex="0">' . gettext('full screen') . '</button>';
490:                 }
491:                 $htmlpart .= '</div>';
492:                 break;
493:             case 'no-solution':
494:                 $htmlpart = '
495:             <div class="jp-no-solution">
496:                 <span>' . gettext('Update Required') . '</span>
497:                 ' . gettext('To play the media you will need to either update your browser to a recent version or update your <a href="http://get.adobe.com/flashplayer/" target="_blank">Flash plugin</a>.') . '
498:             </div>';
499:                 break;
500:         }
501:         return $htmlpart;
502:     }
503: 
504:     /**
505:      * Returns the width of the player
506:      * @param object $image the image for which the width is requested
507:      *
508:      * @return int
509:      */
510:     function getWidth($image = NULL) {
511:         if (!is_null($image) && $this->mode == 'audio' && !getOption('jplayer_poster') && !getOption('jplayer_audioposter')) {
512:             return 420; //audio default
513:         }
514:         return $this->width;
515:     }
516: 
517:     /**
518:      * Returns the height of the player
519:      * @param object $image the image for which the height is requested
520:      *
521:      * @return int
522:      */
523:     function getHeight($image = NULL) {
524:         if (!is_null($image) && $this->mode == 'audio' && !getOption('jplayer_poster') && !getOption('jplayer_audioposter')) {
525:             return 0;
526:         }
527:         return $this->height;
528:     }
529: 
530:     /**
531:      * Sets the properties $mode, $supplied and $supplied_counterparts
532:      *
533:      */
534:     function setModeAndSuppliedFormat($ext) {
535:         switch ($ext) {
536:             case 'm4a':
537:             case 'mp3':
538:             case 'fla':
539:                 $this->mode = 'audio';
540:                 switch ($ext) {
541:                     case 'm4a':
542:                         $this->supplied = 'm4a';
543:                         break;
544:                     case 'mp3':
545:                         $this->supplied = 'mp3';
546:                         break;
547:                     case 'fla':
548:                         $this->supplied = 'fla';
549:                         break;
550:                 }
551:                 break;
552:             case 'mp4':
553:             case 'm4v':
554:             case 'flv':
555:                 $this->mode = 'video';
556:                 switch ($ext) {
557:                     case 'm4v':
558:                     case 'mp4':
559:                         $this->supplied = 'm4v';
560:                         break;
561:                     case 'flv':
562:                         $this->supplied = 'flv';
563:                         break;
564:                 }
565:                 break;
566:         }
567:     }
568: 
569:     /** TODO: Could not get this to work with Firefox. Low priority so postponed for sometime later...
570:      * Gets the mp3, m4v,m4a,mp4 counterpart formats (webm,ogg) for html5 browser compatibilty
571:      * NOTE: THese formats need to be uploaded via FTP as they are not valid file types for Zenphoto to avoid confusion
572:      *
573:      * @param string $moviepath full link to the multimedia file to get counterpart formats to.
574:      * @param string $ext the file format extention to search the counterpart for (as we already have fetched that)
575:      */
576:     function getCounterpartFiles($moviepath, $ext) {
577:         $counterparts = '';
578:         switch ($ext) {
579:             case 'mp3':
580:             case 'm4a':
581:             case 'fla':
582:                 $suffixes = array('oga', 'webma');
583:                 break;
584:             case 'mp4':
585:             case 'm4v':
586:             case 'flv':
587:                 $suffixes = array('ogv', 'webmv');
588:                 break;
589:             default:
590:                 $suffixes = array();
591:                 break;
592:         }
593:         foreach ($suffixes as $suffix) {
594:             $filesuffix = $suffix;
595:             /* if($suffix == 'oga') {
596:               $filesuffix = 'ogg';
597:               } */
598:             $counterpart = str_replace($ext, $filesuffix, $moviepath);
599:             //$suffix = str_replace('.','',$suffix);
600:             if (file_exists(str_replace(FULLWEBPATH, SERVERPATH, $counterpart))) {
601:                 $this->supplied_counterparts .= ',' . $suffix;
602:                 $counterparts .= ',' . $suffix . ':"' . pathurlencode($counterpart) . '"';
603:             }
604:         }
605:         return $counterparts;
606:     }
607: 
608:     /**
609:      * Prints a playlist using jPlayer. Several playlists per page supported.
610:      *
611:      * The playlist is meant to replace the 'next_image()' loop on a theme's album.php.
612:      * It can be used with a special 'album theme' that can be assigned to media albums with with .flv/.mp4/.mp3s, although Flowplayer 3 also supports images
613:      * Replace the entire 'next_image()' loop on album.php with this:
614:      * <?php printjPlayerPlaylist("playlist"); ?> or <?php printjPlayerPlaylist("playlist-audio"); ?>
615:      *
616:      * @param string $option "playlist" use for pure video and mixed video/audio playlists or if you want to show the poster/videothumb with audio only playlists,
617:      *                                           "playlist-audio" use for pure audio playlists (m4a,mp3,fla supported only) if you don't need the poster/videothumb to be shown only.
618:      * @param string $albumfolder album name to get a playlist from directly
619:      */
620:     function printjPlayerPlaylist($option = "playlist", $albumfolder = "") {
621:         global $_zp_current_album, $_zp_current_search;
622:         if (empty($albumfolder)) {
623:             if (in_context(ZP_SEARCH)) {
624:                 $albumobj = $_zp_current_search;
625:             } else {
626:                 $albumobj = $_zp_current_album;
627:             }
628:         } else {
629:             $albumobj = newAlbum($albumfolder);
630:         }
631:         $entries = $albumobj->getImages(0);
632:         if (($numimages = count($entries)) != 0) {
633:             switch ($option) {
634:                 case 'playlist':
635:                     $suffixes = array('m4a', 'm4v', 'mp3', 'mp4', 'flv', 'fla');
636:                     break;
637:                 case 'playlist-audio':
638:                     $suffixes = array('m4a', 'mp3', 'fla');
639:                     break;
640:                 default:
641:                     //  an invalid option parameter!
642:                     return;
643:             }
644:             if (in_context(ZP_SEARCH)) {
645:                 $id = '1';
646:             } else {
647:                 $id = $albumobj->getID();
648:             }
649:             ?>
650:             <script type="text/javascript">
651:                                 //<![CDATA[
652:                                 $(document).ready(function(){
653:                 new jPlayerPlaylist({
654:                 jPlayer: "#jquery_jplayer_<?php echo $id; ?>",
655:                                 cssSelectorAncestor: "#jp_container_<?php echo $id; ?>"
656:                 }, [
657:             <?php
658:             $count = '';
659:             $number = '';
660: 
661:             foreach ($entries as $entry) {
662:                 $count++;
663:                 if (is_array($entry)) {
664:                     $ext = getSuffix($entry['filename']);
665:                 } else {
666:                     $ext = getSuffix($entry);
667:                 }
668:                 $numbering = '';
669:                 if (in_array($ext, $suffixes)) {
670:                     $number++;
671:                     if (getOption('jplayer_playlist_numbered')) {
672:                         $numbering = '<span>' . $number . '</span>';
673:                     }
674:                     if (is_array($entry)) {
675:                         $albumobj = newAlbum($entry['folder']);
676:                         $video = newImage($albumobj, $entry['filename']);
677:                     } else {
678:                         $video = newImage($albumobj, $entry);
679:                     }
680:                     $videoThumb = '';
681:                     $this->setModeAndSuppliedFormat($ext);
682:                     if ($option == 'playlist' && getOption('jplayer_poster')) {
683:                         $videoThumb = ',poster:"' . $video->getCustomImage(null, $this->width, $this->height, $this->width, $this->height, null, null, true) . '"';
684:                     }
685:                     $playtime = '';
686:                     if (getOption('jplayer_playlist_playtime')) {
687:                             $playtime = ' (' . $video->get('VideoPlaytime') . ')';
688:                     }
689:                     ?>
690:                         {
691:                         title:"<?php echo $numbering . html_encode($video->getTitle()) . $playtime; ?>",
692:                     <?php if (getOption('jplayer_download')) { ?>
693:                             free:true,
694:                     <?php } ?>
695:                     <?php echo $this->supplied; ?>:"<?php echo html_encode(pathurlencode($url = $video->getFullImage(FULLWEBPATH))); ?>"
696:                     <?php echo $this->getCounterpartFiles($url, $ext); ?>
697:                     <?php echo $videoThumb; ?>
698:                         }
699:                     <?php
700:                     if ($numimages != $count) {
701:                         echo ',';
702:                     }
703:                 } // if video
704:             } // foreach
705: // for some reason the playlist must run with supplied: "flash,html" because otherwise neither videothumbs(poster) nor flv/flv work on Safari 4.1.
706: // Seems the flash fallback fails here
707:             ?>
708:                 ], {
709:                 swfPath: "<?php echo WEBPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER; ?>/jplayer/js",
710:                 solution: "flash,html",
711:                 <?php if ($option == 'playlist') { ?>
712:                     supplied: "m4v, mp4, m4a, mp3, fla, flv<?php echo $this->supplied_counterparts; ?>",
713:                 <?php } else { ?>
714:                     supplied: "m4a, mp3, fla<?php echo $this->supplied_counterparts; ?>",
715:                 <?php
716:                 }
717:                 if ($option != 'playlist-audio') {
718:                 ?>
719:                 size: {
720:                     width: "<?php echo $this->width; ?>px",
721:                     height: "<?php echo $this->height; ?>px",
722:                     cssClass: "<?php echo $this->playersize; ?>"
723:                     },
724:                 <?php } ?>
725:                 useStateClassSkin: true,
726:                 autoBlur: false,
727:                 smoothPlayBar: true,
728:                 keyEnabled: true,
729:                 remainingDuration: true,
730:                 toggleDuration: true
731:                 });
732:                 });
733:                                 //]]>
734:             </script>
735:             <?php
736:             if ($option == 'playlist') {
737:                 ?>
738:                 <div id="jp_container_<?php echo $id; ?>" class="jp-video <?php echo $this->playersize; ?>" role="application" aria-label="media player">
739:                     <div class="jp-type-playlist">
740:                         <div id="jquery_jplayer_<?php echo $id; ?>" class="jp-jplayer"></div>
741:                         <div class="jp-gui">
742:                             <div class="jp-video-play">
743:                                 <button class="jp-video-play-icon" role="button" tabindex="0"><?php echo gettext('play'); ?></button>
744:                             </div>
745:                             <div class="jp-interface">
746:                                 <div class="jp-progress">
747:                                     <div class="jp-seek-bar">
748:                                         <div class="jp-play-bar"></div>
749:                                     </div>
750:                                 </div>
751:                                 <div class="jp-current-time" role="timer" aria-label="time">&nbsp;</div>
752:                                 <div class="jp-duration" role="timer" aria-label="duration">&nbsp;</div>
753:                                 <div class="jp-controls-holder">
754:                                     <?php echo $this->getPlayerHTMLparts('video', 'controls-playlist'); ?>
755:                                     <div class="jp-volume-controls">
756:                                         <button class="jp-mute" role="button" tabindex="0"><?php echo gettext('mute'); ?></button>
757:                                         <button class="jp-volume-max" role="button" tabindex="0"><?php echo gettext('max volume'); ?></button>
758:                                         <div class="jp-volume-bar">
759:                                             <div class="jp-volume-bar-value"></div>
760:                                         </div>
761:                                     </div>
762:                                     <?php echo $this->getPlayerHTMLparts('video', 'toggles-playlist'); ?>
763:                                 </div>
764:                                 <div class="jp-details">
765:                                     <div class="jp-title" aria-label="title">&nbsp;</div>
766:                                 </div>
767:                             </div>
768:                         </div>
769:                         <div class="jp-playlist">
770:                             <ul>
771:                                 <!-- The method Playlist.displayPlaylist() uses this unordered list -->
772:                                 <li>&nbsp;</li>
773:                             </ul>
774:                         </div>
775:                         <?php echo $this->getPlayerHTMLparts('video', 'no-solution'); ?>
776:                     </div>
777:                 </div>
778:                 <?php
779:             } else { // playlist-audio
780:                 ?>
781:                 <div id="jquery_jplayer_<?php echo $id; ?>" class="jp-jplayer"></div>
782:                 <div id="jp_container_<?php echo $id; ?>" class="jp-audio" role="application" aria-label="media player">
783:                     <div class="jp-type-playlist">
784:                         <div class="jp-gui jp-interface">
785:                             <?php echo $this->getPlayerHTMLparts('audio', 'controls-playlist'); ?>
786:                             <div class="jp-progress">
787:                                 <div class="jp-seek-bar">
788:                                     <div class="jp-play-bar"></div>
789:                                 </div>
790:                             </div>
791:                             <div class="jp-volume-controls">
792:                                 <button class="jp-mute" role="button" tabindex="0"><?php echo gettext('mute'); ?></button>
793:                                 <button class="jp-volume-max" role="button" tabindex="0"><?php echo gettext('max volume'); ?></button>
794:                                 <div class="jp-volume-bar">
795:                                     <div class="jp-volume-bar-value"></div>
796:                                 </div>
797:                             </div>
798:                             <div class="jp-time-holder">
799:                                 <div class="jp-current-time" role="timer" aria-label="time">&nbsp;</div>
800:                                 <div class="jp-duration" role="timer" aria-label="duration">&nbsp;</div>
801:                             </div>
802:                             <?php echo $this->getPlayerHTMLparts('audio', 'toggles-playlist'); ?>
803:                         </div>
804:                         <div class="jp-playlist">
805:                             <ul>
806:                                 <li>&nbsp;</li>
807:                             </ul>
808:                         </div>
809:                         <?php echo $this->getPlayerHTMLparts('audio', 'no-solution'); ?>
810:                     </div>
811:                 </div>
812: 
813:                 <?php
814:             } // if else playlist
815:         } // if no images at all end
816:     }
817: 
818: // function playlist
819: }
820: 
821: // jplayer class
822: // theme function wrapper for user convenience
823: function printjPlayerPlaylist($option = "playlist", $albumfolder = "") {
824:     global $_zp_multimedia_extension;
825:     $_zp_multimedia_extension->printjPlayerPlaylist($option, $albumfolder);
826: }
827: 
828: $_zp_multimedia_extension = new jPlayer(); // claim to be the flash player.
829: zp_register_filter('theme_head', 'jplayer::headJS');
830: if (getOption('jplayer_playlist')) {
831:     zp_register_filter('theme_head', 'jplayer::playlistJS');
832: }
833: 
Zenphoto doc API documentation generated by ApiGen