Overview

Classes

  • _zp_captcha
  • _zp_HTML_cache
  • admin_approval
  • Album
  • AlbumBase
  • AlbumZip
  • AMFReader
  • AMFStream
  • AnyFile
  • AnyFile_Options
  • auto_backup
  • AVCSequenceParameterSetReader
  • bxslider
  • cacheManager
  • cachemanager_internal_deprecations
  • cacheManagerFeed
  • CI_jsmin
  • CI_load
  • cloneZenphoto
  • codeIgniter_kludge
  • colorbox
  • Combi
  • Comment
  • comment_form
  • contactformOptions
  • cookieConsent
  • crop_image
  • cycle
  • defaultCodeblocks
  • deprecated_functions
  • DownloadList
  • dynamic_locale
  • dynamicAlbum
  • elFinder
  • elFinder_options
  • elFinderConnector
  • elFinderEditor
  • elFinderEditorOnlineConvert
  • elFinderEditorZipArchive
  • elFinderEditorZohoOffice
  • elFinderLibGdBmp
  • elFinderPlugin
  • elFinderPluginAutoResize
  • elFinderPluginAutoRotate
  • elFinderPluginNormalizer
  • elFinderPluginSanitizer
  • elFinderPluginWatermark
  • elFinderSession
  • elFinderVolumeBox
  • elFinderVolumeDriver
  • elFinderVolumeDropbox
  • elFinderVolumeDropbox2
  • elFinderVolumeFlysystemGoogleDriveCache
  • elFinderVolumeFlysystemGoogleDriveNetmount
  • elFinderVolumeFTP
  • elFinderVolumeGoogleDrive
  • elFinderVolumeGroup
  • elFinderVolumeLocalFileSystem
  • elFinderVolumeMySQL
  • elFinderVolumeOneDrive
  • elFinderVolumeTrash
  • elFinderVolumeTrashMySQL
  • email_new_user
  • exampleMacros
  • external_auth
  • favorites
  • favoritesOptions
  • 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
  • hitcounter
  • htmlmetatags
  • Image
  • internal_deprecations
  • ipBlocker
  • jPlayer
  • jplayer_options
  • jquery_rating
  • JSMin
  • lazyload
  • lib_GD_Options
  • lib_Imagick_Options
  • lib_NoGraphics
  • matomoStats
  • 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
  • openStreetMap
  • openStreetMapOptions
  • pagedThumbsNav
  • pagedthumbsOptions
  • PersistentObject
  • PHPMailer\PHPMailer\PHPMailer
  • PHPMailer\PHPMailer\POP3
  • PHPMailer\PHPMailer\SMTP
  • print_album_menu
  • pseudoPlayer
  • publishContent
  • quota_manager
  • reCaptcha
  • RecursiveCallbackFilterIterator
  • redirector
  • redirectorOptions
  • register_user
  • rewriteRules
  • rewriteTokens
  • RSS
  • rss_options
  • scriptlessSocialsharing
  • scriptlessSocialsharingOptions
  • search_statistics
  • SearchEngine
  • security_logger
  • securityHeaders
  • securityheadersOptions
  • seo_locale
  • Services_JSON
  • Services_JSON_Error
  • setup
  • setupMutex
  • setupRSS
  • show_not_loggedin
  • sitemap
  • sitemapOptions
  • static_html_cache
  • staticHTMLCacheOptions
  • tagsuggest
  • TextObject
  • TextObject_Options
  • ThemeObject
  • themeSwitcher
  • tinymce4Options
  • tinyURL
  • Transientimage
  • UploadHandler
  • user_expiry
  • user_groups
  • user_logout_options
  • userAddressFields
  • userDataExport
  • utf8
  • Video
  • VideoObject_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
  • zpFunctions
  • zpMutex
  • zpSimpleSpam
  • zpTrivialSpam

Interfaces

  • elFinderSessionInterface

Exceptions

  • elFinderAbortException
  • elFinderTriggerException
  • getid3_exception
  • JSMin_UnterminatedCommentException
  • JSMin_UnterminatedRegExpException
  • JSMin_UnterminatedStringException
  • OAuthExcept
  • PHPMailer\PHPMailer\Exception

Functions

  • access
  • accessAlbums
  • accessAllAlbums
  • accessImage
  • add_context
  • addalbumsToDatabase
  • addCategoriesToDatabase
  • addDateToTitlelink
  • addGeoCoord
  • addItem
  • addMissingDefaultRewriteTokens
  • addPagesToDatabase
  • addReconfigureNote
  • addSubalbumMenus
  • addWatermark
  • admin_album_list
  • admin_securityChecks
  • admin_showupdate
  • adminPageNav
  • adminToolbox
  • albumNumber
  • applyMacros
  • authorSelector
  • bind_textdomain_codeset
  • bindtextdomain
  • build_query
  • build_url
  • bulkActionRedirect
  • bulkTags
  • byteConvert
  • cacheImage
  • checkAccess
  • checkAlbumForImages
  • checkAlbumimagesort
  • checkAlbumParentid
  • checkAlbumPassword
  • checkChosenItemStatus
  • checkChosenMenuset
  • checked
  • checkFolder
  • checkForEmptyTitle
  • checkForGuest
  • checkForPage
  • checkForUpdate
  • checkHitcounterDisplay
  • checkIfChecked
  • checkIfLockedNews
  • checkIfLockedPage
  • checkIfNew
  • checkInstall
  • checkLayoutUseForImages
  • checkObjectsThumb
  • checkPageValidity
  • checkParentLayouts
  • checkPublishDates
  • checkRequiredField
  • checkSchedulePublishingNotes
  • checkSelectedAlbum
  • checkSignature
  • checkTitlelinkDuplicate
  • cleanAlbum
  • cleanHTML
  • clonedFrom
  • codeblocktabsJS
  • comment_form_addComment
  • comment_form_handle_comment
  • comment_form_PaginationJS
  • comment_form_postcomment
  • comment_form_print10Most
  • comment_form_visualEditor
  • commentFormUseCaptcha
  • commentReply
  • commentsAllowed
  • compressRow
  • consolidatedEditMessages
  • copyLayoutSelection
  • copyThemeDirectory
  • createMenuIfNotExists
  • createRelatedItemsResultArray
  • createTitlelink
  • cron_starter
  • curlRequest
  • 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_getClientInfo
  • db_getServerInfo
  • db_getSQLmode
  • db_getVersion
  • db_insert_id
  • db_isMariaDB
  • 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
  • debuglogReconfigureNote
  • debugLogVar
  • decompressField
  • decompressRow
  • defaultCodeblocks_codebox
  • deleteArticle
  • deleteCategory
  • deleteItem
  • deleteLayoutSelection
  • deletePage
  • deleteThemeDirectory
  • dircopy
  • disableExtension
  • elFinder_admin_tabs
  • elFinder_tinymce
  • elFinderAutoloader
  • enableExtension
  • executeRSS
  • exitZP
  • exposeZenPhotoInformations
  • extendExecution
  • extensionEnabled
  • fetchComments
  • filesystemToInternal
  • fillbuffer
  • filterImageQuery
  • fix_path_redirect
  • formatList
  • fullText
  • galleryAlbumsPerPage
  • gallerystats_filesize_r
  • genAlbumList
  • generateAttributesFromArray
  • generateImageCacheFile
  • generateLanguageList
  • generateListFromArray
  • generateListFromFiles
  • generateRadiobuttonsFromArray
  • generateUnorderedListFromArray
  • get_AnyFile_suffixes
  • get_context
  • get_filterScript
  • get_instance
  • get_language_string
  • getAdminstratorsOptionsArray
  • getAdminThumb
  • getAdminThumbHTML
  • getAlbumArray
  • getAlbumBreadcrumb
  • getAlbumBreadcrumbAdmin
  • getAlbumCustomData
  • getAlbumData
  • getAlbumDate
  • getAlbumDesc
  • getAlbumFolder
  • getAlbumGeodata
  • getAlbumInherited
  • getAlbumLocation
  • getAlbumPage
  • getAlbumStatistic
  • getAlbumThumb
  • getAlbumTitle
  • getAlbumURL
  • getAllAccessibleAlbums
  • getAllAlbums
  • getAllDates
  • getAllowedTags
  • getAllSubAlbumIDs
  • getAllTagsCount
  • getAllTagsFromAlbum
  • getAllTagsFromAlbum_multi_unique
  • getAllTagsFromZenpage
  • getAllTagsUnique
  • getAllTranslations
  • getAnnotatedAlbumTitle
  • getAnnotatedImageTitle
  • getAnonymIP
  • getAuthor
  • getBare
  • getBareAlbumDesc
  • getBareAlbumTitle
  • getBareGalleryDesc
  • getBareGalleryTitle
  • getBareImageDesc
  • getBareImageTitle
  • getBareNewsTitle
  • getBarePageTitle
  • getCheckboxState
  • getCodeblock
  • getCommentAddress
  • getCommentAuthorEmail
  • getCommentAuthorLink
  • getCommentAuthorName
  • getCommentAuthorSite
  • getCommentBody
  • getCommentCount
  • getCommentDateTime
  • getCommentErrors
  • getCommentStored
  • getContactFormMacros
  • getContentShorten
  • getCookieInfoData
  • getCookieInfoHTML
  • getCookieInfoMacro
  • getCurrentMenuItem
  • getCurrentNewsArchive
  • getCurrentPage
  • getCurrentTheme
  • getCustomAlbumThumb
  • getCustomAlbumThumbMaxSpace
  • getCustomGalleryIndexPage
  • getCustomGalleryIndexURL
  • getCustomImageURL
  • getCustomPageURL
  • getCustomSizedImageMaxSpace
  • getCustomSizedImageThumbMaxSpace
  • getDataUsageNotice
  • getDefaultHeight
  • getDefaultRewriteTokens
  • getDefaultSizedImage
  • getDefaultWidth
  • getdownloadList
  • getDownloadURL
  • getE
  • getEnabledPlugins
  • getExpiryDatePost
  • getFavoritesURL
  • getField
  • getFullHeight
  • getFullImageFilesize
  • getFullImageURL
  • getFullWidth
  • getGalleryDesc
  • getGalleryIndexURL
  • getGalleryTitle
  • getGeoCoord
  • getHeadTitle
  • getHitcounter
  • getImageArgs
  • getImageCacheFilename
  • getImageCachePostfix
  • getImageCity
  • getImageCountry
  • getImageCustomData
  • getImageData
  • getImageDate
  • getImageDesc
  • getImageGeodata
  • getImageLocation
  • getImageMetaData
  • getImageParameters
  • getImageProcessorURI
  • getImageProcessorURIFromCacheName
  • getImageRotation
  • getImageState
  • getImageStatistic
  • getImageThumb
  • getImageTitle
  • getImageType
  • getImageURI
  • getImageURL
  • getItem
  • getItemByID
  • getItemTitleAndURL
  • getjPlayerSkinCSS
  • getjPlayerSkins
  • getLangAttributeLocale
  • getLanguageArray
  • getLanguageDisplayName
  • getLanguageFlag
  • getLanguageSubdomains
  • getLanguageText
  • getLatestComments
  • getLatestNews
  • getLatestZenpageComments
  • getLayout
  • getLayoutSelector
  • getLinkHTML
  • getLogTabs
  • getMacros
  • getMainSiteName
  • getMainSiteURL
  • getManagedAlbumList
  • getMaxSpaceContainer
  • getMenuFromLink
  • getMenuItemChilds
  • getMenuItems
  • getMenumanagerPredicessor
  • getMenumanagerSuccessor
  • getMenuSetSelector
  • getMenuVisibility
  • getMimeString
  • getNestedAlbumList
  • getNewsAdminOption
  • getNewsAdminOptionPath
  • getNewsArchivePath
  • getNewsArchiveURL
  • getNewsAuthor
  • getNewsCategories
  • getNewsCategoryCustomData
  • getNewsCategoryDesc
  • getNewsCategoryURL
  • getNewsContent
  • getNewsCustomData
  • getNewsDate
  • getNewsExtraContent
  • getNewsID
  • getNewsIndexURL
  • getNewsPagesStatistic
  • getNewsPathNav
  • getNewsReadMore
  • getNewsTitle
  • getNewsURL
  • getNextAlbum
  • getNextAlbumURL
  • getNextImageThumb
  • getNextImageURL
  • getNextNewsPageURL
  • getNextNewsURL
  • getNextPageURL
  • getNextPrevNews
  • getNotViewableAlbums
  • getNotViewableImages
  • getNumAlbums
  • getNumAllSubalbums
  • getNumImages
  • getNumNews
  • getNumPages
  • getOption
  • getOptionFromDB
  • getOptionList
  • getOwnerAuthor
  • getOwnerAuthorURL
  • getPageAuthor
  • getPageContent
  • getPageCustomData
  • getPageDate
  • getPageExtraContent
  • getPageID
  • getPageLastChangeDate
  • getPageNavList
  • getPageNumURL
  • getPageParentID
  • getPageRedirect
  • getPageSelector
  • getPageSortorder
  • getPageTitle
  • getPageTitleLink
  • getPageURL
  • getParentAlbums
  • getParentAlbumsAdmin
  • getParentBreadcrumb
  • getParentMenuItems
  • getPasswordProtectImage
  • getPHPFiles
  • getPictureOfTheDay
  • getPlugin
  • getPluginFiles
  • getPluginTabs
  • getPrevAlbum
  • getPrevAlbumURL
  • getPrevImageThumb
  • getPrevImageURL
  • getPrevNewsPageURL
  • getPrevNewsURL
  • getPrevPageURL
  • getProtectedImageURL
  • getRandomImages
  • getRandomImagesAlbum
  • getRating
  • getReconfigureNote
  • getRelatedItems
  • getRequestURI
  • getrow
  • getRSSLink
  • getRules
  • getSearchDate
  • getSearchURL
  • getSearchWords
  • getSelectedLayout
  • getSerializedArray
  • getSetClause
  • getSiteHomeURL
  • getSizeCustomImage
  • getSizeDefaultImage
  • getSizeDefaultThumb
  • getSizedImageURL
  • getSizeFullImage
  • getSortByOptions
  • getSortByStatusOptions
  • getStandardGalleryIndexURL
  • getSubtabs
  • getSuffix
  • getSystemLocales
  • getTagCountByAccess
  • getTagOrder
  • getTags
  • gettext
  • gettext_pl
  • gettext_th
  • getThemeFiles
  • getThemeOption
  • getTimezones
  • getTinyMCE4ConfigFiles
  • getTitle
  • getTotalHitcounter
  • getTotalImagesIn
  • getTotalNewsPages
  • getTotalPages
  • getUnprotectedImageURL
  • getUrAlbum
  • getUserIP
  • getUserLocale
  • getUserURL
  • getVersion
  • getWatermarkParam
  • getWatermarkPath
  • getWatermarks
  • getWhereClause
  • getXSRFToken
  • getZenpagePagesOptionsArray
  • getZenpageStatistic
  • handleSearchParms
  • hasDynamicAlbumSuffix
  • hasNextImage
  • hasNextNewsPage
  • hasNextPage
  • hasPrevImage
  • hasPrevNewsPage
  • hasPrevPage
  • hasPrimaryScripts
  • hl_attrval
  • hl_bal
  • hl_cmtcd
  • hl_ent
  • hl_prot
  • hl_regex
  • hl_spec
  • hl_tag
  • hl_tag2
  • hl_tidy
  • hl_version
  • html_decode
  • html_encode
  • html_encodeTagged
  • html_pathurlencode
  • htmLawed
  • httpsRedirect
  • httpUploadHandler
  • httpUploadHandler_admin_tabs
  • i18nSetLocale
  • ignoreSetupRunRequest
  • imageBlurGD
  • imagecreatefrombmp
  • imageDebug
  • imageError
  • imageNumber
  • imgSrcURI
  • in_context
  • installSignature
  • instrument
  • internalToFilesystem
  • inventMenuItem
  • iptc_make_tag
  • is_AdminEditPage
  • is_connected
  • is_News
  • is_NewsArchive
  • is_NewsArticle
  • is_NewsCategory
  • is_NewsPage
  • is_Pages
  • is_valid_email_zp
  • is_zip
  • isAlbumClass
  • isAlbumPage
  • isArchive
  • isCurrentitemParent
  • isHandledAlbum
  • isImageClass
  • isImagePage
  • isImagePhoto
  • isImageVideo
  • isIncompatibleExtension
  • isLandscape
  • isolate
  • isSetupProtected
  • isValidEmail
  • 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
  • myts_date
  • newAlbum
  • newImage
  • next_album
  • next_comment
  • next_image
  • next_news
  • next_page
  • ngettext
  • ngettext_pl
  • ngettext_th
  • omsAdditions
  • parse_query
  • parse_size
  • parseAllowedTags
  • parseHttpAcceptLanguage
  • pathurlencode
  • pluginDebug
  • populateManagedObjectsList
  • postAlbumSort
  • postIndexDecode
  • postIndexEncode
  • prefix
  • prepareAlbumPage
  • prepareCustomPage
  • prepareImagePage
  • prepareIndexPage
  • print404status
  • print_language_string_list
  • printAddToFavorites
  • printAdminFooter
  • printAdminHeader
  • printAdminRightsTable
  • printAdminThumb
  • printAlbumBreadcrumb
  • printAlbumButtons
  • printAlbumCustomData
  • printAlbumData
  • printAlbumDate
  • printAlbumDesc
  • printAlbumEditForm
  • printAlbumEditRow
  • printAlbumLegend
  • printAlbumLocation
  • printAlbumMenu
  • printAlbumMenuJump
  • printAlbumMenuList
  • printAlbumMenuListAlbum
  • printAlbumsSelector
  • printAlbumStatistic
  • printAlbumStatisticItem
  • printAlbumThumbImage
  • printAlbumTitle
  • printAlbumURL
  • printAllDates
  • printAllNestedList
  • printAllNewsCategories
  • printAllTags
  • printAllTagsAs
  • printAllTagsFromAlbum
  • printAllTagsFromZenpage
  • printAnnotatedAlbumTitle
  • printAnnotatedImageTitle
  • printArticleCategories
  • printArticleDatesDropdown
  • printArticlesPerPageDropdown
  • printAuthorDropdown
  • printBareAlbumDesc
  • printBareAlbumTitle
  • printBareGalleryDesc
  • printBareGalleryTitle
  • printBareImageDesc
  • printBareImageTitle
  • printBareNewsTitle
  • printBarePageTitle
  • printBarGraph
  • printBulkActions
  • printCategoriesStatistic
  • printCategoryCheckboxListEntry
  • printCategoryDropdown
  • printCategoryListSortableTable
  • printCategorySelection
  • printCodeblock
  • printCodeblockEdit
  • printCommentAuthorLink
  • printCommentErrors
  • printCommentForm
  • printContactForm
  • printContactFormMacro
  • printCookieInfo
  • printCopyrightNotice
  • printCurrentNewsArchive
  • printCurrentNewsCategory
  • printCustomAlbumThumbImage
  • printCustomAlbumThumbMaxSpace
  • printCustomMenu
  • printCustomPageSelector
  • printCustomPageURL
  • printCustomSizedImage
  • printCustomSizedImageMaxSpace
  • printCustomSizedImageThumbMaxSpace
  • printDataUsageNotice
  • printDefaultSizedImage
  • printDownloadAlbumZipURL
  • printdownloadList
  • printDownloadURL
  • printEditCommentLink
  • printEditDropdown
  • printExpired
  • printFavoritesURL
  • printFullAlbumsList
  • printFullImageDownloadURL
  • printGalleryDesc
  • printGalleryIndexURL
  • printGalleryTitle
  • printGoogleMap
  • printHeadTitle
  • printHomeLink
  • printImageCustomData
  • printImageData
  • printImageDate
  • printImageDesc
  • printImageMetadata
  • printImageslist
  • printImageStatistic
  • printImageThumb
  • printImageTitle
  • printImageURL
  • printItemEditLink
  • printItemsList
  • printItemsListTable
  • printItemStatusDropdown
  • printjPlayerPlaylist
  • printLangAttribute
  • printLanguageSelector
  • printLastChangeInfo
  • printLatestAlbums
  • printLatestComments
  • printLatestImages
  • printLatestImagesByDate
  • printLatestImagesByMtime
  • printLatestNews
  • printLatestUpdatedAlbums
  • printLinkHTML
  • printLogoAndLinks
  • printManagedObjects
  • printMenuemanagerPageList
  • printMenuemanagerPageListWithNav
  • printMenumanagerBreadcrumb
  • printMenumanagerNextLink
  • printMenumanagerPrevLink
  • printMostPopularItems
  • printMostRatedAlbums
  • printMostRatedImages
  • printMostRatedItems
  • printNestedAlbumsList
  • printNestedItemsList
  • printNestedMenu
  • printNews
  • printNewsArchive
  • printNewsArticlesList
  • printNewsAuthor
  • printNewsCategories
  • printNewsCategoryCustomData
  • printNewsCategoryDesc
  • printNewsCategoryURL
  • printNewsContent
  • printNewsCustomData
  • printNewsDate
  • printNewsExtraContent
  • printNewsIndexURL
  • printNewsPageList
  • printNewsPageListWithNav
  • printNewsStatistic
  • printNewsTitle
  • printNewsURL
  • printNextNewsLink
  • printNextNewsPageLink
  • printNextPageURL
  • printOpenStreetMap
  • printOwnerAuthor
  • printOwnerAuthorURL
  • printPageArticleTags
  • printPageAuthor
  • printPageContent
  • printPageCustomData
  • printPageDate
  • printPagedThumbsNav
  • printPageExtraContent
  • printPageID
  • printPageLastChangeDate
  • printPageList
  • printPageListWithNav
  • printPageMenu
  • printPageNav
  • printPageSelector
  • printPagesListTable
  • printPagesStatistic
  • printPageTitle
  • printPageTitleLink
  • printPageURL
  • printParentBreadcrumb
  • printPasswordForm
  • printPopularAlbums
  • printPopularImages
  • printPrevNewsLink
  • printPrevNewsPageLink
  • printPrevPageURL
  • printPrivacyPageLink
  • printPublished
  • printPublishIconLink
  • printPublishIconLinkGallery
  • printRandomImages
  • printRating
  • printReconfigureError
  • printReconfigureNote
  • printRegisterURL
  • printRegistrationForm
  • printRelatedItems
  • printRSSHeaderLink
  • printRSSLink
  • printScheduledPublishingNotes
  • printSearchBreadcrumb
  • printSearchForm
  • printSelectorWithCustomField
  • printSiteHomeURL
  • printSizedImageURL
  • printSlideShow
  • printSlideShowLink
  • printSortableHead
  • printSortOrderDropdown
  • printSubLevelAlbums
  • printSubPagesExcerpts
  • printSubtabs
  • printTabs
  • printTags
  • printThumbNav
  • printTinyPageNav
  • printTinyZenpageCategorySelector
  • printTopRatedAlbums
  • printTopRatedImages
  • printTopRatedItems
  • printUnpublishedDropdown
  • printUserLogin_out
  • printUserSelector
  • printUserURL
  • printVersion
  • printZenJavascripts
  • printZenpageIconLegend
  • printZenpageItems
  • printZenpageItemsBreadcrumb
  • printZenpageNewsCategorySelector
  • printZenpagePageSelector
  • printZenpagePagesSelector
  • printZenpageStatistic
  • printZenphotoLink
  • process_language_string_save
  • processAlbumBulkActions
  • processAlbumEdit
  • processCodeblockSave
  • processCommentBulkActions
  • processCredentials
  • processCustomOptionSave
  • processEditSelection
  • processExtensionVariable
  • processImageBulkActions
  • processImageEdit
  • processManagedObjects
  • processMenuBulkActions
  • processOrder
  • processRights
  • processTags
  • processZenpageBulkActions
  • propSizes
  • protectSetupFiles
  • publishItem
  • purgeOption
  • purgeThemeOption
  • query
  • query_full_array
  • query_single_row
  • rc4
  • read_exif_data_protected
  • readTags
  • reconfigureAction
  • reconfigureCSS
  • recordMissing
  • redirectionHandler
  • redirectURL
  • rem_context
  • removeDir
  • removeParentAlbumNames
  • removeTrailingSlash
  • renameOption
  • replaceOption
  • replaceThemeOption
  • restore_context
  • reveal
  • rewrite_get_album_image
  • rewrite_path
  • rewriteHandler
  • RSS_Channel
  • RSS_Retrieve
  • RSS_Tags
  • rulesList
  • 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
  • setAlbumSubtabs
  • setexifvars
  • setMainDomain
  • setOption
  • setOptionDefault
  • setSiteState
  • setThemeColumns
  • setThemeOption
  • setThemeOptionDefault
  • setTinyZenpageLocale
  • setupCurrentLocale
  • setupDomain
  • setupTheme
  • shortenContent
  • shortentitle
  • showOrNotShowField
  • showZenphotoOptions
  • shuffle_assoc
  • signatureChange
  • site_upgrade_button
  • site_upgrade_status
  • skipScheduledPublishing
  • sortArray
  • sortByKey
  • sortByMultilingual
  • sortMultiArray
  • standardScripts
  • standardThemeOptions
  • stickyNews
  • storeConfig
  • storeTags
  • stripSuffix
  • submenuOf
  • switchLog
  • tagSelector
  • tagSuggestJS
  • tagSuggestJS_admin
  • tagSuggestJS_frontend
  • tagURLs
  • textdomain
  • themeIsEditable
  • themeSetup
  • tidyHTML
  • timezoneDiff
  • tinymce4ConfigJS
  • truncate_string
  • unprotectSetupFiles
  • unpublishedZenpageItemCheck
  • unpublishedZenphotoItemCheck
  • unpublishSubalbums
  • unQuote
  • unTagURLs
  • unzip
  • updateArticle
  • updateCacheName
  • updateCategory
  • updateConfigItem
  • updateImageProcessorLink
  • updateItemSortorder
  • updateItemsSortorder
  • updateMenuItem
  • updatePage
  • upload_extra
  • upload_form
  • upload_head
  • user_mailing_list_button
  • validateLocale
  • writeHeader
  • XSRFdefender
  • XSRFToken
  • zenpageAlbumImage
  • zenpageBulkActionMessage
  • zenpageJSCSS
  • 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_imageResizeTransparent
  • 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_destroy
  • zp_session_start
  • zp_setCookie
  • zp_writeString
  • zpErrorHandler
  • zpFormattedDate
  • zpRewriteURL
  • Overview
  • Class
  • Tree
  • Package
  • Deprecated
  1:   2:   3:   4:   5:   6:   7:   8:   9:  10:  11:  12:  13:  14:  15:  16:  17:  18:  19:  20:  21:  22:  23:  24:  25:  26:  27:  28:  29:  30:  31:  32:  33:  34:  35:  36:  37:  38:  39:  40:  41:  42:  43:  44:  45:  46:  47:  48:  49:  50:  51:  52:  53:  54:  55:  56:  57:  58:  59:  60:  61:  62:  63:  64:  65:  66:  67:  68:  69:  70:  71:  72:  73:  74:  75:  76:  77:  78:  79:  80:  81:  82:  83:  84:  85:  86:  87:  88:  89:  90:  91:  92:  93:  94:  95:  96:  97:  98:  99: 100: 101: 102: 103: 104: 105: 106: 107: 108: 109: 110: 111: 112: 113: 114: 115: 116: 117: 118: 119: 120: 121: 122: 123: 124: 125: 126: 127: 128: 129: 130: 131: 132: 133: 134: 135: 136: 137: 138: 139: 140: 141: 142: 143: 144: 145: 146: 147: 148: 149: 150: 151: 152: 153: 154: 155: 156: 157: 158: 159: 160: 161: 162: 163: 164: 165: 166: 167: 168: 169: 170: 171: 172: 173: 174: 175: 176: 177: 178: 179: 180: 181: 182: 183: 184: 185: 186: 187: 188: 189: 190: 191: 192: 193: 194: 195: 196: 197: 198: 199: 200: 201: 202: 203: 204: 205: 206: 207: 208: 209: 210: 211: 212: 213: 214: 215: 216: 217: 218: 219: 220: 221: 222: 223: 224: 225: 226: 227: 228: 229: 230: 231: 232: 233: 234: 235: 236: 237: 238: 239: 240: 241: 242: 243: 244: 245: 246: 247: 248: 249: 250: 251: 252: 253: 254: 255: 256: 257: 258: 259: 260: 261: 262: 263: 264: 265: 266: 267: 268: 269: 270: 271: 272: 273: 274: 275: 276: 277: 278: 279: 280: 281: 282: 283: 284: 285: 286: 287: 288: 289: 290: 291: 292: 293: 294: 295: 296: 297: 298: 299: 300: 301: 302: 303: 304: 305: 306: 307: 308: 309: 310: 311: 312: 313: 314: 315: 316: 317: 318: 319: 320: 321: 322: 323: 324: 325: 326: 327: 328: 329: 330: 331: 332: 333: 334: 335: 336: 337: 338: 339: 340: 341: 342: 343: 344: 345: 346: 347: 348: 349: 350: 351: 352: 353: 354: 355: 356: 357: 358: 359: 360: 361: 362: 363: 364: 365: 366: 367: 368: 369: 370: 371: 372: 373: 374: 375: 376: 377: 378: 379: 380: 381: 382: 383: 384: 385: 386: 387: 388: 389: 390: 391: 392: 393: 394: 395: 396: 397: 398: 399: 400: 401: 402: 403: 404: 405: 406: 407: 408: 409: 410: 411: 412: 413: 414: 415: 416: 417: 418: 419: 420: 421: 422: 423: 424: 425: 426: 427: 428: 429: 430: 431: 432: 433: 434: 435: 436: 437: 438: 439: 440: 441: 442: 443: 444: 445: 446: 447: 448: 449: 450: 451: 452: 453: 454: 455: 456: 457: 458: 459: 460: 461: 462: 463: 464: 465: 466: 467: 468: 469: 470: 471: 472: 473: 474: 475: 476: 477: 478: 479: 480: 481: 482: 483: 484: 485: 486: 487: 488: 489: 490: 491: 492: 493: 494: 495: 496: 497: 498: 499: 500: 501: 502: 503: 504: 505: 506: 507: 508: 509: 510: 511: 512: 513: 514: 515: 516: 517: 518: 519: 520: 521: 522: 523: 524: 525: 526: 527: 528: 529: 530: 531: 532: 533: 534: 535: 536: 537: 538: 539: 540: 541: 542: 543: 544: 545: 546: 547: 548: 549: 550: 551: 552: 553: 554: 555: 556: 557: 558: 559: 560: 561: 562: 563: 564: 565: 566: 567: 568: 569: 570: 571: 572: 573: 574: 575: 576: 577: 578: 579: 580: 581: 582: 583: 584: 585: 586: 587: 588: 589: 590: 591: 592: 593: 594: 595: 596: 597: 598: 599: 600: 601: 602: 603: 604: 605: 606: 607: 608: 609: 610: 611: 612: 613: 614: 615: 616: 617: 618: 619: 620: 621: 622: 623: 624: 625: 626: 627: 628: 629: 630: 631: 632: 633: 634: 635: 636: 637: 638: 639: 640: 641: 642: 643: 644: 645: 646: 647: 648: 649: 650: 651: 652: 653: 654: 655: 656: 657: 658: 659: 660: 661: 662: 663: 664: 665: 666: 667: 668: 669: 670: 671: 672: 673: 674: 675: 676: 677: 678: 679: 680: 681: 682: 683: 684: 685: 686: 687: 688: 689: 690: 691: 692: 693: 694: 695: 696: 697: 698: 699: 700: 701: 702: 703: 704: 705: 706: 707: 708: 709: 710: 711: 712: 713: 714: 715: 716: 717: 718: 719: 720: 721: 722: 723: 724: 725: 726: 727: 728: 729: 730: 731: 732: 733: 734: 735: 736: 737: 738: 739: 740: 741: 742: 743: 744: 745: 746: 747: 748: 749: 750: 751: 752: 753: 754: 755: 756: 757: 758: 759: 760: 761: 762: 763: 764: 765: 766: 767: 768: 769: 770: 771: 772: 773: 774: 775: 776: 777: 778: 779: 780: 781: 782: 783: 784: 785: 786: 787: 788: 789: 790: 791: 792: 793: 794: 795: 796: 797: 798: 799: 800: 801: 802: 803: 804: 805: 806: 807: 808: 809: 810: 811: 812: 813: 814: 815: 816: 817: 818: 819: 820: 821: 822: 823: 824: 825: 826: 827: 828: 829: 830: 831: 832: 833: 834: 835: 836: 837: 838: 839: 840: 841: 842: 843: 844: 845: 846: 847: 848: 
<?php
/**
 * Support for the jPlayer jQuery/Flash 2.0.0 multimedia player (jplayer.org). It will play natively via HTML5 in capable browser
 * if the appropiate multimedia formats are provided.

 * Audio: <var>.mp3</var>, <var>.m4a</var>, <var>.fla</var> - Counterpart formats <var>.oga</var> and <var>.webma</var> supported (see note below!)<br>
 * Video: <var>.m4v</var>/<var>.mp4</var>, <var>.flv</var> - Counterpart formats <var>.ogv</var> and <var>.webmv</var> supported (see note below!)
 *
 * IMPORTANT NOTE ON OGG AND WEBM COUNTERPART FORMATS:
 *
 * The counterpart formats are not valid formats for Zenphoto itself as that would confuse the management.
 * Therefore these formats can be uploaded via ftp only.
 * The files needed to have the same file name (beware the character case!). In single player usage the player
 * will check via file system if a counterpart file exists.
 * <b>NOTE:</b> Counterpart format does not work correctly on playlists yet. Detailed reason: Priority solution
 * setting must be "flash" as otherwise flv and fla will not work on some browsers like Safari.
 * This in return disables counterpart support for ogg and webm files for some reason on Firefox).
 * Since the flash fallback covers all essential formats this is not much of an issue for visitors though.
 *
 * Otherwise it will not work. It is all or none.
 * See {@link http://jplayer.org/latest/developer-guide/#reference-html5-media the developer guide} for info on that.
 *
 * If you have problems with any format being recognized, you might need to tell your server about the mime types first:
 * See examples on {@link http://jplayer.org/latest/developer-guide/#jPlayer-server-response the jplayer site}.
 *
 * NOTE on POPCORN Support (http://popcornjs.org):
 * 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.
 * Please refer to http://jplayer.org/latest/developer-guide/ and http://popcornjs.org to learn about this extra functionality.
 *
 * NOTE ON PLAYER SKINS:<br>
 * The look of the player is determined by a pure HTML/CSS based skin (theme). There may occur display issues with themes.
 * Only the Zenphoto's own default skins <var>zenphotolight</var> and <var>zenphotodark</var>
 * have been tested with the standard themes (and it does not work perfectly for all)). Those two themes are also have a responsive width.
 * So you might need to adjust the skin yourself to work with your theme. It is recommended that
 * you place your custom skins within the root /plugins folder like:
 *
 * plugins/jplayer/skin/<i>skin name1</i><br>
 * plugins/jplayer/skin/<i>skin name2</i> ...
 *
 * You can select the skin then via the plugin options. <b>NOTE:</b> A skin may have only one CSS file.
 *
 * USING PLAYLISTS:<br>
 * You can use <var>printjPlayerPlaylist()</var> on your theme's album.php directly to display a
 * video/audio playlist (default) or an audio only playlist.
 * Alternativly you can show a playlist of a specific album anywhere. In any case you need to modify your theme.
 * See the documentation for the parameter options.
 *
 * Alternativly you can show a playlist of a specific album anywhere. In any case you need to modify your theme.
 * See the documentation for the parameter options.
 *
 * CONTENT MACRO:<br>
 * jPlayer attaches to the content_macro MEDIAPLAYER you can use within normal text of Zenpage pages or articles for example.
 *
 * Usage:
 * [MEDIAPLAYER <albumname> <imagefilename> <number>]
 *
 * Example:
 * [MEDIAPLAYER album1 video.mp4]
 *
 * 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>
 * [MEDIAPLAYER album1 video1.mp4 <var>1</var>]<br>
 * [MEDIAPLAYER album2 video2.mp4 <var>2</var>]
 *
 * <b>NOTE:</b> This player does not support external albums!
 *
 * @author Malte Müller (acrylian)
 * @package plugins
 * @subpackage jplayer
 */
$plugin_is_filter = 5 | CLASS_PLUGIN;
$plugin_description = gettext("Enable <strong>jPlayer</strong> to handle multimedia files.");
$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.");
$plugin_author = "Malte Müller (acrylian)";
$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.');
$plugin_category = gettext('Media');
$option_interface = 'jplayer_options';

if (!empty($_zp_multimedia_extension->name) || $plugin_disable) {
    enableExtension('jplayer', 0);

//NOTE: the following text really should be included in the $plugin_disable statement above so that it is visible
//on the plugin tab

    if (isset($_zp_multimedia_extension)) {
        trigger_error(sprintf(gettext('jPlayer not enabled, %s is already instantiated.'), get_class($_zp_multimedia_extension)), E_USER_NOTICE);
    }
} else {

    Gallery::addImageHandler('flv', 'Video');
    Gallery::addImageHandler('fla', 'Video');
    Gallery::addImageHandler('mp3', 'Video');
    Gallery::addImageHandler('mp4', 'Video');
    Gallery::addImageHandler('m4v', 'Video');
    Gallery::addImageHandler('m4a', 'Video');

    zp_register_filter('content_macro', 'jPlayer::macro');
}

class jplayer_options {

    public $name = 'jPlayer';

    function __construct() {
        if (OFFSET_PATH == 2) {
            setOptionDefault('jplayer_autoplay', '');
            setOptionDefault('jplayer_poster', 1);
            setOptionDefault('jplayer_postercrop', 1);
            setOptionDefault('jplayer_showtitle', '');
            setOptionDefault('jplayer_playlist', '');
            setOptionDefault('jplayer_playlist_numbered', 1);
            setOptionDefault('jplayer_playlist_playtime', 0);
            setOptionDefault('jplayer_download', '');
            setOptionDefault('jplayer_size', 'jp-video-270p');
            setOptionDefault('jplayer_skin', 'zenphotolight');
            setOptionDefault('jplayer_counterparts', 0);
        }
    }

    function getOptionsSupported() {
        $skins = getjPlayerSkins();
        /*
          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.
          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.
          If you need different sizes than you need to make your own skin (see the skin option for info about that)
         */

        return array(gettext('Autoplay') => array(
                        'key' => 'jplayer_autoplay',
                        'type' => OPTION_TYPE_CHECKBOX,
                        'desc' => gettext("Disabled automatically if several players on one page")),
                gettext('Poster (Videothumb)') => array(
                        'key' => 'jplayer_poster',
                        'type' => OPTION_TYPE_CHECKBOX,
                        'desc' => gettext("If the videothumb should be shown (jplayer calls it poster).")),
                gettext('Audio poster (Videothumb)') => array(
                        'key' => 'jplayer_audioposter',
                        'type' => OPTION_TYPE_CHECKBOX,
                        'desc' => gettext("If the poster should be shown for audio files (mp3,m4a,fla) (does not apply for playlists which are all or none).")),
                gettext('Show title') => array(
                        'key' => 'jplayer_showtitle',
                        'type' => OPTION_TYPE_CHECKBOX,
                        'desc' => gettext("If the title should be shown below the player in single player mode (not needed on normal themes) (ignored in playlists naturally).")),
                gettext('Playlist support') => array(
                        'key' => 'jplayer_playlist',
                        'type' => OPTION_TYPE_CHECKBOX,
                        '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.")),
                gettext('Playlist numbered') => array(
                        'key' => 'jplayer_playlist_numbered',
                        'type' => OPTION_TYPE_CHECKBOX,
                        'desc' => gettext("Enable this if you wish the playlist to be numbered.")),
                gettext('Playlist playtime') => array(
                        'key' => 'jplayer_playlist_playtime',
                        'type' => OPTION_TYPE_CHECKBOX,
                        'desc' => gettext("Enable if you want to show the playtime of playlist entries.")),
                gettext('Enable download') => array(
                        'key' => 'jplayer_download',
                        'type' => OPTION_TYPE_CHECKBOX,
                        'desc' => gettext("Enables direct file downloads (playlists only).")),
                gettext('Player size') => array(
                        'key' => 'jplayer_size',
                        'type' => OPTION_TYPE_SELECTOR,
                        'selections' => array(
                                gettext('jp-video-270p (480x270px)') => "jp-video-270p",
                                gettext('jp-video-360p (640x360px)') => "jp-video-360p",
                                gettext('jp-video-480p (720x405px)*') => "jp-video-480p",
                                gettext('jp-video-720p (1280x720px)*') => "jp-video-720p",
                                gettext('jp-video-1080p (1920x1080px)*') => "jp-video-1080p"),
                        '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().")),
                gettext('Player skin') => array(
                        'key' => 'jplayer_skin',
                        'type' => OPTION_TYPE_SELECTOR,
                        'selections' => $skins,
                        '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."))
        );
    }

}

/**
 * Gets the skin names and css files
 *
 */
function getjPlayerSkins() {
    $default_skins_dir = SERVERPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/jplayer/skin/';
    $user_skins_dir = SERVERPATH . '/' . USER_PLUGIN_FOLDER . '/jplayer/skin/';
    $filestoignore = array('.', '..', '.DS_Store', 'Thumbs.db', '.htaccess', '.svn');
    $skins = array_diff(scandir($default_skins_dir), array_merge($filestoignore));
    $default_skins = getjPlayerSkinCSS($skins, $default_skins_dir);
    //echo "<pre>";print_r($default_skins);echo "</pre>";
    $skins2 = @array_diff(scandir($user_skins_dir), array_merge($filestoignore));
    if (is_array($skins2)) {
        $user_skins = getjPlayerSkinCSS($skins2, $user_skins_dir);
        //echo "<pre>";print_r($user_skins);echo "</pre>";
        $default_skins = array_merge($default_skins, $user_skins);
    }
    return $default_skins;
}

/**
 * Gets the css files for a skin. Helper function for getjPlayerSkins().
 *
 */
function getjPlayerSkinCSS($skins, $dir) {
    $skin_css = array();
    foreach ($skins as $skin) {
        $css = safe_glob($dir . $skin . '/*.css');
        if ($css) {
            $skin_css = array_merge($skin_css, array($skin => $skin)); // a skin should only have one css file so we just use the first found
        }
    }
    return $skin_css;
}

class jPlayer {

    public $width = '';
    public $height = '';
    public $playersize = '';
    public $mode = '';
    public $supplied = '';
    public $supplied_counterparts = '';

    function __construct() {
        $this->playersize = getOption('jplayer_size');
        switch ($this->playersize) {
            case 'jp-video-270p':
                $this->width = 480;
                $this->height = 270;
                break;
            case 'jp-video-360p':
                $this->width = 640;
                $this->height = 360;
                break;
            case 'jp-video-480p':
                $this->width = 720;
                $this->height = 405;
                break;
            case 'jp-video-720p':
                $this->width = 1280;
                $this->height = 720;
                break;
            case 'jp-video-1080p':
                $this->width = 1920;
                $this->height = 1080;
                break;
        }
    }

    static function getMacrojplayer($albumname, $imagename, $count = 1) {
        global $_zp_multimedia_extension;
        $movie = newImage(NULL, array('folder' => $albumname, 'filename' => $imagename), true);
        if ($movie->exists) {
            return $_zp_multimedia_extension->getPlayerConfig($movie, NULL, (int) $count);
        } else {
            return '<span class = "error">' . sprintf(gettext('%1$s::%2$s not found.'), $albumname, $imagename) . '</span>';
        }
    }

    static function macro($macros) {
        $macros['MEDIAPLAYER'] = array(
                        'class'  => 'function',
                        'params' => array('string', 'string', 'int*'),
                        'value'  => 'jplayer::getMacrojplayer',
                        'owner'  => 'jplayer',
                        '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.)')
        );
        return $macros;
    }

    static function headJS() {
        $skin = @array_shift(getPluginFiles('*.css', 'jplayer/skin/' . getOption('jplayer_skin')));
        if (file_exists($skin)) {
            $skin = str_replace(SERVERPATH, WEBPATH, $skin); //replace SERVERPATH as that does not work as a CSS link
        } else {
            $skin = WEBPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/jplayer/skin/zenphotolight/jplayer.zenphotolight.css';
        }
        ?>
        <link href="<?php echo $skin; ?>" rel="stylesheet" type="text/css" />
        <script type="text/javascript" src="<?php echo WEBPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER; ?>/jplayer/js/jquery.jplayer.min.js"></script>
        <?php
    }

    static function playlistJS() {
        ?>
        <script type="text/javascript" src="<?php echo WEBPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER; ?>/jplayer/js/jplayer.playlist.min.js"></script>
        <?php
    }

    /**
     * Get the JS configuration of jplayer
     *
     * @param mixed $movie the image object
     * @param string $movietitle the title of the movie
     * @param string $count number (preferredly the id) of the item to append to the css for multiple players on one page
     * @param string $width Not supported as jPlayer is dependend on its CSS based skin to change sizes. Can only be set via plugin options.
     * @param string $height Not supported as jPlayer is dependend on its CSS based skin to change sizes. Can only be set via plugin options.
     *
     */
    function getPlayerConfig($movie, $movietitle = NULL, $count = NULL) {
        $moviepath = $movie->getFullImage(FULLWEBPATH);
        if (is_null($movietitle)) {
            $movietitle = $movie->getTitle();
        }
        $ext = getSuffix($moviepath);
        if (!in_array($ext, array('m4a', 'm4v', 'mp3', 'mp4', 'flv', 'fla'))) {
            return '<span class="error">' . gettext('This multimedia format is not supported by jPlayer') . '</span>';
        }
        $this->setModeAndSuppliedFormat($ext);
        if (empty($count)) {
            $multiplayer = false;
            $count = '1'; //we need different numbers in case we embed several via tinyZenpage or macros
        } else {
            $multiplayer = true; // since we need extra JS if multiple players on one page
            $count = $count;
        }
        $autoplay = '';
        if (getOption('jplayer_autoplay') && !$multiplayer) {
            $autoplay = '.jPlayer("play")';
        }
        $videoThumb = '';
        if (getOption('jplayer_poster') && ($this->mode == 'video' || ($this->mode == 'audio' && getOption('jplayer_audioposter')))) {
            //$splashimagerwidth = $this->width;
            //$splashimageheight = $this->height;
            //getMaxSpaceContainer($splashimagerwidth, $splashimageheight, $movie, true); // jplayer squishes always if not the right aspect ratio
            $videoThumb = ',poster:"' . $movie->getCustomImage(null, $this->width, $this->height, $this->width, $this->height, null, null, true) . '"';
        }
        $playerconfig = '
        <script type="text/javascript">
            //<![CDATA[
        $(document).ready(function(){
            $("#jquery_jplayer_' . $count . '").jPlayer({
                ready: function (event) {
                    $(this).jPlayer("setMedia", {
                        ' . $this->supplied . ':"' . pathurlencode($moviepath) . '"
                        ' . $this->getCounterpartFiles($moviepath, $ext) . '
                        ' . $videoThumb . '
                    })' . $autoplay . ';
                },
                swfPath: "' . WEBPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/jplayer/js",
                supplied: "' . $this->supplied . $this->supplied_counterparts . '",
                cssSelectorAncestor: "#jp_container_' . $count . '"';

        if ($multiplayer) {
            $playerconfig .= ',
                play: function() { // To avoid both jPlayers playing together.
                $(this).jPlayer("pauseOthers");
            }
            ';
        }

        if ($this->mode == 'video' || ($this->mode == 'audio' && getOption('jplayer_poster') && getOption('jplayer_audioposter'))) {
            $playerconfig .= '
                ,   size: {
            width: "100%",
            height: "' . $this->height . 'px",
            cssClass: "' . $this->playersize . '"
        },';
        } else {
            $playerconfig .= ',';
        }

        $playerconfig .= '
            useStateClassSkin: true,
            remainingDuration: true,
            toggleDuration: true
            });
        });
    //]]>
    </script>';

        // I am really too lazy to figure everything out to optimize this quite complex html nesting so I generalized only parts.
        // 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!)
        if ($this->mode == 'video' || !empty($videoThumb)) {
            $playerconfig .= '
            <div id="jp_container_' . $count . '" class="jp-video ' . $this->playersize . '" role="application" aria-label="media player">
            <div class="jp-type-single">
                <div id="jquery_jplayer_' . $count . '" class="jp-jplayer"></div>
                <div class="jp-gui">
                    <div class="jp-video-play">
                        <button class="jp-video-play-icon" role="button" tabindex="0">' . gettext('play') . '</button>
                    </div>
                    <div class="jp-interface">
                        <div class="jp-progress">
                            <div class="jp-seek-bar">
                                <div class="jp-play-bar"></div>
                            </div>
                        </div>
                        <div class="jp-current-time" role="timer" aria-label="time">&nbsp;</div>
                        <div class="jp-duration" role="timer" aria-label="duration">&nbsp;</div>
                        <div class="jp-controls-holder">';
            $playerconfig .= $this->getPlayerHTMLparts($this->mode, 'controls');
            $playerconfig .= '
                        <div class="jp-volume-controls">
                            <button class="jp-mute" role="button" tabindex="0">' . gettext('mute') . '</button>
                            <button class="jp-volume-max" role="button" tabindex="0">' . gettext('max volume') . '</button>
                            <div class="jp-volume-bar">
                                <div class="jp-volume-bar-value"></div>
                            </div>
                        </div>';
            $playerconfig .= $this->getPlayerHTMLparts($this->mode, 'toggles');
            $playerconfig .= '
                        </div>';
            $playerconfig .= '
                        </div>
                    </div>';
            if (getOption('jplayer_showtitle')) {
                $playerconfig .= '
                    <div class="jp-details">
                        <div class="jp-title" aria-label="title">' . html_encode($movietitle) . '</div>
                    </div>';
            }
            $playerconfig .= $this->getPlayerHTMLparts($this->mode, 'no-solution');
            $playerconfig .= '
            </div>
        </div>
        ';
        } else { // audio
            $playerconfig .= '
        <div id="jquery_jplayer_' . $count . '" class="jp-jplayer"></div>
        <div id="jp_container_' . $count . '" class="jp-audio" role="application" aria-label="media player">
            <div class="jp-type-single">
                <div class="jp-gui jp-interface">';
            $playerconfig .= $this->getPlayerHTMLparts($this->mode, 'controls');
            $playerconfig .= '
                    <div class="jp-progress">
                        <div class="jp-seek-bar">
                            <div class="jp-play-bar"></div>
                        </div>
                    </div>
                    <div class="jp-volume-controls">
                        <button class="jp-mute" role="button" tabindex="0">' . gettext('mute') . '</button>
                        <button class="jp-volume-max" role="button" tabindex="0">' . gettext('max volume') . '</button>
                        <div class="jp-volume-bar">
                            <div class="jp-volume-bar-value"></div>
                        </div>
                    </div>
                    <div class="jp-time-holder">
                        <div class="jp-current-time" role="timer" aria-label="time">&nbsp;</div>
                        <div class="jp-duration" role="timer" aria-label="duration">&nbsp;</div>';
            $playerconfig .= $this->getPlayerHTMLparts($this->mode, 'toggles');
            $playerconfig .= '
                    </div>
                </div>';
            if (getOption('jplayer_showtitle')) {
                $playerconfig .= '
                    <div class="jp-details">
                        <div class="jp-title" aria-label="title">' . html_encode($movietitle) . '</div>
                    </div>';
            }
            $playerconfig .= $this->getPlayerHTMLparts($this->mode, 'no-solution');
            $playerconfig .= '
            </div>
        </div>
        ';
        } // video/audio if else end
        return $playerconfig;
    }

    /**
     * outputs the player configuration HTML
     *
     * @param mixed $movie the image object if empty (within albums) the current image is used
     * @param string $movietitle the title of the movie. if empty the Image Title is used
     * @param string $count unique text for when there are multiple player items on a page
     */
    function printPlayerConfig($movie = NULL, $movietitle = NULL, $count = NULL) {
        global $_zp_current_image;
        if (empty($movie)) {
            $movie = $_zp_current_image;
        }
        echo $this->getPlayerConfig($movie, $movietitle, $count, NULL, NULL);
    }

    /**
     * gets commonly used html parts for the player config
     *
     * @param string $mode 'video' or 'audio'
     * @param string $part part to get: 'controls', 'controls-playlist', 'toggles', 'toggles-playlist','no-solution'
     */
    function getPlayerHTMLparts($mode = '', $part = '') {
        $htmlpart = '';
        switch ($part) {
            case 'controls':
            case 'controls-playlist':
                $htmlpart = '<div class="jp-controls">';
                if ($part == 'controls-playlist') {
                    $htmlpart .= '<button class="jp-previous" role="button" tabindex="0">' . gettext('previous') . '</button>';
                }
                $htmlpart .= '<button class="jp-play" role="button" tabindex="0">' . gettext('play') . '</button>';
                if ($part == 'controls-playlist') {
                    $htmlpart .= '<button class="jp-next" role="button" tabindex="0">' . gettext('next') . '</button>   ';
                }
                $htmlpart .= '<button class="jp-stop" role="button" tabindex="0">' . gettext('stop') . '</button>';
                $htmlpart .= '</div>';
                break;
            case 'toggles':
            case 'toggles-playlist':
                $htmlpart = '<div class="jp-toggles">';
                $htmlpart .= '<button class="jp-repeat" role="button" tabindex="0">' . gettext('repeat') . '</button>';
                if ($part == 'toggles-playlist') {
                    $htmlpart .= '<button class="jp-shuffle" role="button" tabindex="0">' . gettext('shuffle') . '</button>';
                }
                if ($mode == 'video') {
                    $htmlpart .= '<button class="jp-full-screen" role="button" tabindex="0">' . gettext('full screen') . '</button>';
                }
                $htmlpart .= '</div>';
                break;
            case 'no-solution':
                $htmlpart = '
            <div class="jp-no-solution">
                <span>' . gettext('Update Required') . '</span>
                ' . 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>.') . '
            </div>';
                break;
        }
        return $htmlpart;
    }

    /**
     * Returns the width of the player
     * @param object $image the image for which the width is requested
     *
     * @return int
     */
    function getWidth($image = NULL) {
        if (!is_null($image) && $this->mode == 'audio' && !getOption('jplayer_poster') && !getOption('jplayer_audioposter')) {
            return 420; //audio default
        }
        return $this->width;
    }

    /**
     * Returns the height of the player
     * @param object $image the image for which the height is requested
     *
     * @return int
     */
    function getHeight($image = NULL) {
        if (!is_null($image) && $this->mode == 'audio' && !getOption('jplayer_poster') && !getOption('jplayer_audioposter')) {
            return 0;
        }
        return $this->height;
    }

    /**
     * Sets the properties $mode, $supplied and $supplied_counterparts
     *
     */
    function setModeAndSuppliedFormat($ext) {
        switch ($ext) {
            case 'm4a':
            case 'mp3':
            case 'fla':
                $this->mode = 'audio';
                switch ($ext) {
                    case 'm4a':
                        $this->supplied = 'm4a';
                        break;
                    case 'mp3':
                        $this->supplied = 'mp3';
                        break;
                    case 'fla':
                        $this->supplied = 'fla';
                        break;
                }
                break;
            case 'mp4':
            case 'm4v':
            case 'flv':
                $this->mode = 'video';
                switch ($ext) {
                    case 'm4v':
                    case 'mp4':
                        $this->supplied = 'm4v';
                        break;
                    case 'flv':
                        $this->supplied = 'flv';
                        break;
                }
                break;
        }
    }

    /** TODO: Could not get this to work with Firefox. Low priority so postponed for sometime later...
     * Gets the mp3, m4v,m4a,mp4 counterpart formats (webm,ogg) for html5 browser compatibilty
     * NOTE: THese formats need to be uploaded via FTP as they are not valid file types for Zenphoto to avoid confusion
     *
     * @param string $moviepath full link to the multimedia file to get counterpart formats to.
     * @param string $ext the file format extention to search the counterpart for (as we already have fetched that)
     */
    function getCounterpartFiles($moviepath, $ext) {
        $counterparts = '';
        switch ($ext) {
            case 'mp3':
            case 'm4a':
            case 'fla':
                $suffixes = array('oga', 'webma');
                break;
            case 'mp4':
            case 'm4v':
            case 'flv':
                $suffixes = array('ogv', 'webmv');
                break;
            default:
                $suffixes = array();
                break;
        }
        foreach ($suffixes as $suffix) {
            $filesuffix = $suffix;
            /* if($suffix == 'oga') {
              $filesuffix = 'ogg';
              } */
            $counterpart = str_replace($ext, $filesuffix, $moviepath);
            //$suffix = str_replace('.','',$suffix);
            if (file_exists(str_replace(FULLWEBPATH, SERVERPATH, $counterpart))) {
                $this->supplied_counterparts .= ',' . $suffix;
                $counterparts .= ',' . $suffix . ':"' . pathurlencode($counterpart) . '"';
            }
        }
        return $counterparts;
    }

    /**
     * Prints a playlist using jPlayer. Several playlists per page supported.
     *
     * The playlist is meant to replace the 'next_image()' loop on a theme's album.php.
     * 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
     * Replace the entire 'next_image()' loop on album.php with this:
     * <?php printjPlayerPlaylist("playlist"); ?> or <?php printjPlayerPlaylist("playlist-audio"); ?>
     *
     * @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,
     *                                           "playlist-audio" use for pure audio playlists (m4a,mp3,fla supported only) if you don't need the poster/videothumb to be shown only.
     * @param string $albumfolder album name to get a playlist from directly
     */
    function printjPlayerPlaylist($option = "playlist", $albumfolder = "") {
        global $_zp_current_album, $_zp_current_search;
        if (empty($albumfolder)) {
            if (in_context(ZP_SEARCH)) {
                $albumobj = $_zp_current_search;
            } else {
                $albumobj = $_zp_current_album;
            }
        } else {
            $albumobj = newAlbum($albumfolder);
        }
        $entries = $albumobj->getImages(0);
        if (($numimages = count($entries)) != 0) {
            switch ($option) {
                case 'playlist':
                    $suffixes = array('m4a', 'm4v', 'mp3', 'mp4', 'flv', 'fla');
                    break;
                case 'playlist-audio':
                    $suffixes = array('m4a', 'mp3', 'fla');
                    break;
                default:
                    //  an invalid option parameter!
                    return;
            }
            if (in_context(ZP_SEARCH)) {
                $id = '1';
            } else {
                $id = $albumobj->getID();
            }
            ?>
            <script type="text/javascript">
                                //<![CDATA[
                                $(document).ready(function(){
                new jPlayerPlaylist({
                jPlayer: "#jquery_jplayer_<?php echo $id; ?>",
                                cssSelectorAncestor: "#jp_container_<?php echo $id; ?>"
                }, [
            <?php
            $count = '';
            $number = '';

            foreach ($entries as $entry) {
                $count++;
                if (is_array($entry)) {
                    $ext = getSuffix($entry['filename']);
                } else {
                    $ext = getSuffix($entry);
                }
                $numbering = '';
                if (in_array($ext, $suffixes)) {
                    $number++;
                    if (getOption('jplayer_playlist_numbered')) {
                        $numbering = '<span>' . $number . '</span>';
                    }
                    if (is_array($entry)) {
                        $albumobj = newAlbum($entry['folder']);
                        $video = newImage($albumobj, $entry['filename']);
                    } else {
                        $video = newImage($albumobj, $entry);
                    }
                    $videoThumb = '';
                    $this->setModeAndSuppliedFormat($ext);
                    if ($option == 'playlist' && getOption('jplayer_poster')) {
                        $videoThumb = ',poster:"' . $video->getCustomImage(null, $this->width, $this->height, $this->width, $this->height, null, null, true) . '"';
                    }
                    $playtime = '';
                    if (getOption('jplayer_playlist_playtime')) {
                            $playtime = ' (' . $video->get('VideoPlaytime') . ')';
                    }
                    ?>
                        {
                        title:"<?php echo $numbering . html_encode($video->getTitle()) . $playtime; ?>",
                    <?php if (getOption('jplayer_download')) { ?>
                            free:true,
                    <?php } ?>
                    <?php echo $this->supplied; ?>:"<?php echo html_encode(pathurlencode($url = $video->getFullImage(FULLWEBPATH))); ?>"
                    <?php echo $this->getCounterpartFiles($url, $ext); ?>
                    <?php echo $videoThumb; ?>
                        }
                    <?php
                    if ($numimages != $count) {
                        echo ',';
                    }
                } // if video
            } // foreach
// for some reason the playlist must run with supplied: "flash,html" because otherwise neither videothumbs(poster) nor flv/flv work on Safari 4.1.
// Seems the flash fallback fails here
            ?>
                ], {
                swfPath: "<?php echo WEBPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER; ?>/jplayer/js",
                solution: "flash,html",
                <?php if ($option == 'playlist') { ?>
                    supplied: "m4v, mp4, m4a, mp3, fla, flv<?php echo $this->supplied_counterparts; ?>",
                <?php } else { ?>
                    supplied: "m4a, mp3, fla<?php echo $this->supplied_counterparts; ?>",
                <?php
                }
                if ($option != 'playlist-audio') {
                ?>
                size: {
                    width: "<?php echo $this->width; ?>px",
                    height: "<?php echo $this->height; ?>px",
                    cssClass: "<?php echo $this->playersize; ?>"
                    },
                <?php } ?>
                useStateClassSkin: true,
                autoBlur: false,
                smoothPlayBar: true,
                keyEnabled: true,
                remainingDuration: true,
                toggleDuration: true
                });
                });
                                //]]>
            </script>
            <?php
            if ($option == 'playlist') {
                ?>
                <div id="jp_container_<?php echo $id; ?>" class="jp-video <?php echo $this->playersize; ?>" role="application" aria-label="media player">
                    <div class="jp-type-playlist">
                        <div id="jquery_jplayer_<?php echo $id; ?>" class="jp-jplayer"></div>
                        <div class="jp-gui">
                            <div class="jp-video-play">
                                <button class="jp-video-play-icon" role="button" tabindex="0"><?php echo gettext('play'); ?></button>
                            </div>
                            <div class="jp-interface">
                                <div class="jp-progress">
                                    <div class="jp-seek-bar">
                                        <div class="jp-play-bar"></div>
                                    </div>
                                </div>
                                <div class="jp-current-time" role="timer" aria-label="time">&nbsp;</div>
                                <div class="jp-duration" role="timer" aria-label="duration">&nbsp;</div>
                                <div class="jp-controls-holder">
                                    <?php echo $this->getPlayerHTMLparts('video', 'controls-playlist'); ?>
                                    <div class="jp-volume-controls">
                                        <button class="jp-mute" role="button" tabindex="0"><?php echo gettext('mute'); ?></button>
                                        <button class="jp-volume-max" role="button" tabindex="0"><?php echo gettext('max volume'); ?></button>
                                        <div class="jp-volume-bar">
                                            <div class="jp-volume-bar-value"></div>
                                        </div>
                                    </div>
                                    <?php echo $this->getPlayerHTMLparts('video', 'toggles-playlist'); ?>
                                </div>
                                <div class="jp-details">
                                    <div class="jp-title" aria-label="title">&nbsp;</div>
                                </div>
                            </div>
                        </div>
                        <div class="jp-playlist">
                            <ul>
                                <!-- The method Playlist.displayPlaylist() uses this unordered list -->
                                <li>&nbsp;</li>
                            </ul>
                        </div>
                        <?php echo $this->getPlayerHTMLparts('video', 'no-solution'); ?>
                    </div>
                </div>
                <?php
            } else { // playlist-audio
                ?>
                <div id="jquery_jplayer_<?php echo $id; ?>" class="jp-jplayer"></div>
                <div id="jp_container_<?php echo $id; ?>" class="jp-audio" role="application" aria-label="media player">
                    <div class="jp-type-playlist">
                        <div class="jp-gui jp-interface">
                            <?php echo $this->getPlayerHTMLparts('audio', 'controls-playlist'); ?>
                            <div class="jp-progress">
                                <div class="jp-seek-bar">
                                    <div class="jp-play-bar"></div>
                                </div>
                            </div>
                            <div class="jp-volume-controls">
                                <button class="jp-mute" role="button" tabindex="0"><?php echo gettext('mute'); ?></button>
                                <button class="jp-volume-max" role="button" tabindex="0"><?php echo gettext('max volume'); ?></button>
                                <div class="jp-volume-bar">
                                    <div class="jp-volume-bar-value"></div>
                                </div>
                            </div>
                            <div class="jp-time-holder">
                                <div class="jp-current-time" role="timer" aria-label="time">&nbsp;</div>
                                <div class="jp-duration" role="timer" aria-label="duration">&nbsp;</div>
                            </div>
                            <?php echo $this->getPlayerHTMLparts('audio', 'toggles-playlist'); ?>
                        </div>
                        <div class="jp-playlist">
                            <ul>
                                <li>&nbsp;</li>
                            </ul>
                        </div>
                        <?php echo $this->getPlayerHTMLparts('audio', 'no-solution'); ?>
                    </div>
                </div>

                <?php
            } // if else playlist
        } // if no images at all end
    }

// function playlist
}

// jplayer class
// theme function wrapper for user convenience
function printjPlayerPlaylist($option = "playlist", $albumfolder = "") {
    global $_zp_multimedia_extension;
    $_zp_multimedia_extension->printjPlayerPlaylist($option, $albumfolder);
}

$_zp_multimedia_extension = new jPlayer(); // claim to be the flash player.
zp_register_filter('theme_head', 'jplayer::headJS');
if (getOption('jplayer_playlist')) {
    zp_register_filter('theme_head', 'jplayer::playlistJS');
}
ZenphotoCMS 1.5.x API documentation generated by ApiGen