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: /**
  4:  * functions-i18n.php -- support functions for internationalization
  5:  * @package core
  6:  */
  7: // force UTF-8 Ø
  8: function getLanguageArray() {
  9:     return array(
 10:                     'af'         => gettext('Afrikaans'),
 11:                     'sq_AL'  => gettext('Albanian'),
 12:                     'ar_AE'  => gettext('Arabic (United Arab Emirates)'),
 13:                     'ar_BH'  => gettext('Arabic (Bahrain)'),
 14:                     'ar_DZ'  => gettext('Arabic (Algeria)'),
 15:                     'ar_EG'  => gettext('Arabic (Egypt)'),
 16:                     'ar_IN'  => gettext('Arabic (Iran)'),
 17:                     'ar_IQ'  => gettext('Arabic (Iraq)'),
 18:                     'ar_JO'  => gettext('Arabic (Jordan)'),
 19:                     'ar_KW'  => gettext('Arabic (Kuwait)'),
 20:                     'ar_LB'  => gettext('Arabic (Lebanon)'),
 21:                     'ar_LY'  => gettext('Arabic (Libya)'),
 22:                     'ar_MA'  => gettext('Arabic (Morocco)'),
 23:                     'ar_OM'  => gettext('Arabic (Oman)'),
 24:                     'ar_QA'  => gettext('Arabic (Qatar)'),
 25:                     'ar_SA'  => gettext('Arabic (Saudi Arabia)'),
 26:                     'ar_SD'  => gettext('Arabic (Sudan)'),
 27:                     'ar_SY'  => gettext('Arabic (Syria)'),
 28:                     'ar_TN'  => gettext('Arabic (Tunisia)'),
 29:                     'ar_YE'  => gettext('Arabic (Yemen)'),
 30:                     'eu_ES'  => gettext('Basque (Basque)'),
 31:                     'be_BY'  => gettext('Belarusian'),
 32:                     'bn_BD'  => gettext('Bengali'),
 33:                     'bg_BG'  => gettext('Bulgarian'),
 34:                     'ca_ES'  => gettext('Catalan'),
 35:                     'zh_CN'  => gettext('Chinese (People’s Republic of China)'),
 36:                     'zh_HK'  => gettext('Chinese (Hong Kong)'),
 37:                     'zh_TW'  => gettext('Chinese (Taiwan)'),
 38:                     'hr_HR'  => gettext('Croatian'),
 39:                     'cs_CZ'  => gettext('Czech'),
 40:                     'km_KH'  => gettext('Cambodian'),
 41:                     'da_DK'  => gettext('Danish'),
 42:                     'nl_BE'  => gettext('Dutch (Belgium)'),
 43:                     'nl_NL'  => gettext('Dutch (The Netherlands)'),
 44:                     'en_AU'  => gettext('English (Australia)'),
 45:                     'en_CA'  => gettext('English (Canada)'),
 46:                     'en_GB'  => gettext('English (United Kingdom)'),
 47:                     'en_IN'  => gettext('English (India)'),
 48:                     'en_NZ'  => gettext('English (New Zealand)'),
 49:                     'en_PH'  => gettext('English (Philippines)'),
 50:                     'en_US'  => gettext('English (United States)'),
 51:                     'en_ZA'  => gettext('English (South Africa)'),
 52:                     'en_ZW'  => gettext('English (Zimbabwe)'),
 53:                     'eo'         => gettext('Esperanto'),
 54:                     'et_EE'  => gettext('Estonian'),
 55:                     'fi_FI'  => gettext('Finnish'),
 56:                     'fo_FO'  => gettext('Faroese'),
 57:                     'fr_BE'  => gettext('French (Belgium)'),
 58:                     'fr_CA'  => gettext('French (Canada)'),
 59:                     'fr_CH'  => gettext('French (Switzerland)'),
 60:                     'fr_FR'  => gettext('French (France)'),
 61:                     'fr_LU'  => gettext('French (Luxembourg)'),
 62:                     'gl_ES'  => gettext('Galician'),
 63:                     'gu_IN'  => gettext('Gujarati'),
 64:                     'el'         => gettext('Greek'),
 65:                     'de_AT'  => gettext('German (Austria)'),
 66:                     'de_BE'  => gettext('German (Belgium)'),
 67:                     'de_CH'  => gettext('German (Switzerland)'),
 68:                     'de_DE'  => gettext('German (Germany)'),
 69:                     'de_LU'  => gettext('German (Luxembourg)'),
 70:                     'he_IL'  => gettext('Hebrew'),
 71:                     'hi_IN'  => gettext('Hindi'),
 72:                     'hu_HU'  => gettext('Hungarian'),
 73:                     'id_ID'  => gettext('Indonesian'),
 74:                     'is_IS'  => gettext('Icelandic'),
 75:                     'it_CH'  => gettext('Italian (Switzerland)'),
 76:                     'it_IT'  => gettext('Italian (Italy)'),
 77:                     'ja_JP'  => gettext('Japanese'),
 78:                     'ko_KR'  => gettext('Korean'),
 79:                     'lt_LT'  => gettext('Lithuanian'),
 80:                     'lv_LV'  => gettext('Latvian'),
 81:                     'mk_MK'  => gettext('Macedonian'),
 82:                     'mn_MN'  => gettext('Mongolian'),
 83:                     'ms_MY'  => gettext('Malay'),
 84:                     'mg_MG'  => gettext('Malagasy'),
 85:                     'nb_NO'  => gettext('Norwegian (Bokmål)'),
 86:                     'no_NO'  => gettext('Norwegian'),
 87:                     'ni_ID'  => gettext('Nias'),
 88:                     'fa_IR'  => gettext('Persian'),
 89:                     'pl_PL'  => gettext('Polish'),
 90:                     'pt_BR'  => gettext('Portuguese (Brazil)'),
 91:                     'pt_PT'  => gettext('Portuguese (Portugal)'),
 92:                     'ro_RO'  => gettext('Romanian'),
 93:                     'ru_RU'  => gettext('Russian (Russia)'),
 94:                     'ru_UA'  => gettext('Russian (Ukraine)'),
 95:                     'si_LK'  => gettext('Sinhala'),
 96:                     'sk_SK'  => gettext('Slovak'),
 97:                     'sl_SI'  => gettext('Slovenian'),
 98:                     'es_AR'  => gettext('Spanish (Argentina)'),
 99:                     'es_BO'  => gettext('Spanish (Bolivia)'),
100:                     'es_CL'  => gettext('Spanish (Chile)'),
101:                     'es_CO'  => gettext('Spanish (Columbia)'),
102:                     'es_CR'  => gettext('Spanish (Costa Rica)'),
103:                     'es_DO'  => gettext('Spanish (Dominican Republic)'),
104:                     'es_EC'  => gettext('Spanish (Ecuador)'),
105:                     'es_ES'  => gettext('Spanish (Spain)'),
106:                     'es_GT'  => gettext('Spanish (Guatemala)'),
107:                     'es_HN'  => gettext('Spanish (Honduras)'),
108:                     'es_MX'  => gettext('Spanish (Mexico)'),
109:                     'es_NI'  => gettext('Spanish (Nicaragua)'),
110:                     'es_PA'  => gettext('Spanish (Panama)'),
111:                     'es_PE'  => gettext('Spanish (Peru)'),
112:                     'es_PR'  => gettext('Spanish (Puerto Rico)'),
113:                     'es_PY'  => gettext('Spanish (Paraguay)'),
114:                     'es_SV'  => gettext('Spanish (El Salvador)'),
115:                     'es_US'  => gettext('Spanish (United States)'),
116:                     'es_UY'  => gettext('Spanish (Uruguay)'),
117:                     'es_VE'  => gettext('Spanish (Venezuela)'),
118:                     'es_LA'  => gettext('Spanish (Latin America)'),
119:                     'sr_YU'  => gettext('Serbian'),
120:                     'sr_RS'  => gettext('Serbian'),
121:                     'sv_FI'  => gettext('Swedish (Finland)'),
122:                     'sv_SE'  => gettext('Swedish (Sweden)'),
123:                     'ta_IN'  => gettext('Tamil'),
124:                     'te_IN'  => gettext('Telugu'),
125:                     'th_TH'  => gettext('Thai'),
126:                     'tr_TR'  => gettext('Turkish'),
127:                     'uk_UA'  => gettext('Ukrainian'),
128:                     'uz_UZ'  => gettext('Uzbek'),
129:                     'ur_PK'  => gettext('Urdu (Pakistan)'),
130:                     'vi_VN'  => gettext('Vietnamese'),
131:                     'cy'         => gettext('Welsh')
132:     );
133: }
134: 
135: /**
136:  * Returns an array of available language locales.
137:  *
138:  * @return array
139:  *
140:  */
141: function generateLanguageList($all = false) {
142:     global $_zp_active_languages, $_zp_all_languages;
143:     if (is_null($_zp_all_languages)) {
144:         $zp_languages = getLanguageArray();
145:         $dir = @opendir(SERVERPATH . "/" . ZENFOLDER . "/locale/");
146:         $_zp_active_languages = $_zp_all_languages = array();
147:         if ($dir !== false) {
148:             while ($dirname = readdir($dir)) {
149:                 if (is_dir(SERVERPATH . "/" . ZENFOLDER . "/locale/" . $dirname) && (substr($dirname, 0, 1) != '.')) {
150:                     if (isset($zp_languages[$dirname])) {
151:                         $language = $zp_languages[$dirname];
152:                         if (empty($language)) {
153:                             $language = $dirname;
154:                         }
155:                     } else {
156:                         $language = $dirname;
157:                     }
158:                     $_zp_all_languages[$language] = $dirname;
159:                     if (!getOption('disallow_' . $dirname)) {
160:                         $_zp_active_languages[$language] = $dirname;
161:                     }
162:                 }
163:             }
164:             closedir($dir);
165:         }
166:         ksort($_zp_all_languages);
167:         ksort($_zp_active_languages);
168:     }
169:     if ($all) {
170:         return $_zp_all_languages;
171:     } else {
172:         return $_zp_active_languages;
173:     }
174: }
175: 
176: /**
177:  * Sets the locale, etc. to the zenphoto domain details.
178:  * Returns the result of setupCurrentLocale()
179:  *
180:  */
181: function setMainDomain() {
182:     $locale = getUserLocale();
183:     return setupCurrentLocale($locale);
184: }
185: 
186: /**
187:  * Gettext replacement function for separate translations of third party themes.
188:  * @param string $string The string to be translated
189:  * @param string $theme The name of the plugin. Only required for strings on the 'theme_description.php' file like the general theme description. If the theme is the current theme the function sets it automatically.
190:  * @return string
191:  */
192: function gettext_th($string, $theme = Null) {
193:     global $_zp_gallery;
194:     if (empty($theme)) {
195:         $theme = $_zp_gallery->getCurrentTheme();
196:     }
197:     setupDomain($theme, 'theme');
198:     $translation = gettext($string);
199:     setupDomain();
200:     return $translation;
201: }
202: 
203: /**
204:  * ngettext replacement function for separate translations of third party themes.
205:  * @param string $msgid1
206:  * @param string $msgid2
207:  * @param int $n
208:  * @param string $plugin
209:  * @return string
210:  */
211: function ngettext_th($msgid1, $msgid2, $n, $theme = NULL) {
212:     global $_zp_gallery;
213:     if (empty($theme)) {
214:         $theme = $_zp_gallery->getCurrentTheme();
215:     }
216:     setupDomain($theme, 'theme');
217:     $translation = ngettext($msgid1, $msgid2, $n);
218:     setupDomain();
219:     return $translation;
220: }
221: 
222: /**
223:  * Gettext replacement function for separate translations of third party plugins within the root plugins folder.
224:  * @param string $string The string to be translated
225:  * @param string $plugin The name of the plugin. Required.
226:  * @return string
227:  */
228: function gettext_pl($string, $plugin) {
229:     setupDomain($plugin, 'plugin');
230:     $translation = gettext($string);
231:     setupDomain();
232:     return $translation;
233: }
234: 
235: /**
236:  * ngettext replacement function for separate translations of third party plugins within the root plugins folder.
237:  * @param string $msgid1
238:  * @param string $msgid2
239:  * @param int $n
240:  * @param string $plugin
241:  * @return string
242:  */
243: function ngettext_pl($msgid1, $msgid2, $n, $plugin) {
244:     setupDomain($plugin, 'plugin');
245:     $translation = ngettext($msgid1, $msgid2, $n);
246:     setupDomain();
247:     return $translation;
248: }
249: 
250: /**
251:  * Wrapper function for setLocale() so that all the proper permutations are used
252:  * Returns the result from the setLocale call
253:  * @param $locale the local desired
254:  * @return string
255:  */
256: function i18nSetLocale($locale) {
257:     global $_zp_RTL_css;
258:     $en1 = LOCAL_CHARSET;
259:     $en2 = str_replace('ISO-', 'ISO', $en1);
260:     $locale_hyphen = str_replace('_', '-', $locale);
261:     $simple = explode('-', $locale_hyphen);
262:     $try[$locale . '.UTF8'] = $locale . '.UTF8';
263:     $try[$locale . '.UTF-8'] = $locale . '.UTF-8';
264:     $try[$locale . '.@euro'] = $locale . '.@euro';
265:     $try[$locale . '.' . $en2] = $locale . '.' . $en2;
266:     $try[$locale . '.' . $en1] = $locale . '.' . $en1;
267:     $try[$locale] = $locale;
268:     $try[$simple[0]] = $simple[0];
269:     $try['NULL'] = NULL;
270:     $rslt = setlocale(LC_ALL, $try);
271:     $_zp_RTL_css = in_array(substr($rslt, 0, 2), array('fa', 'ar', 'he', 'hi', 'ur'));
272:     if (DEBUG_LOCALE) {
273:         debugLog("setlocale(" . implode(',', $try) . ") returned: $rslt");
274:     }
275:     return $rslt;
276: }
277: 
278: /**
279:  * Sets the translation domain and type for optional theme or plugin based translations
280:  * @param $domaine If $type "plugin" or "theme" the file/folder name of the theme or plugin
281:  * @param $type NULL (Zenphoto main translation), "theme" or "plugin"
282:  */
283: function setupDomain($domain = NULL, $type = NULL) {
284:     global $_zp_active_languages, $_zp_all_languages;
285:     switch ($type) {
286:         case "plugin":
287:             $domainpath = getPlugin($domain . "/locale/");
288:             break;
289:         case "theme":
290:             $domainpath = SERVERPATH . "/" . THEMEFOLDER . "/" . $domain . "/locale/";
291:             break;
292:         default:
293:             $domain = 'zenphoto';
294:             $domainpath = SERVERPATH . "/" . ZENFOLDER . "/locale/";
295:             break;
296:     }
297:     bindtextdomain($domain, $domainpath);
298:     // function only since php 4.2.0
299:     if (function_exists('bind_textdomain_codeset')) {
300:         bind_textdomain_codeset($domain, 'UTF-8');
301:     }
302:     textdomain($domain);
303:     //invalidate because the locale was not setup until now
304:     $_zp_active_languages = $_zp_all_languages = NULL;
305: }
306: 
307: /**
308:  * Setup code for gettext translation
309:  * Returns the result of the setlocale call
310:  *
311:  * @param string $override force locale to this
312:  * @return mixed
313:  */
314: function setupCurrentLocale($override = NULL) {
315:     if (is_null($override)) {
316:         $locale = getOption('locale');
317:     } else {
318:         $locale = $override;
319:     }
320:     if (getOption('disallow_' . $locale)) {
321:         if (DEBUG_LOCALE)
322:             debugLogBacktrace("setupCurrentLocale($override): $locale denied by option.");
323:         $locale = getOption('locale');
324:         if (empty($locale) || getOption('disallow_' . $locale)) {
325:             $languages = generateLanguageList();
326:             $locale = array_shift($languages);
327:         }
328:     }
329:     // gettext setup
330:     @putenv("LANG=$locale"); // Windows ???
331:     @putenv("LANGUAGE=$locale"); // Windows ???
332:     $result = i18nSetLocale($locale);
333:     if (!$result) {
334:         if (isset($_REQUEST['locale']) || is_null($override)) { // and it was chosen via locale
335:             if (isset($_REQUEST['oldlocale'])) {
336:                 $locale = sanitize($_REQUEST['oldlocale'], 3);
337:                 setOption('locale', $locale, false);
338:                 zp_clearCookie('dynamic_locale');
339:             }
340:         }
341:     }
342:     if (DEBUG_LOCALE)
343:         debugLogBacktrace("setupCurrentLocale($override): locale=$locale, \$result=$result");
344:     setupDomain();
345:     return $result;
346: }
347: 
348: /**
349:  * This function will parse a given HTTP Accepted language instruction
350:  * (or retrieve it from $_SERVER if not provided) and will return a sorted
351:  * array. For example, it will parse fr;en-us;q=0.8
352:  *
353:  * Thanks to Fredbird.org for this code.
354:  *
355:  * @param string $str optional language string
356:  * @return array
357:  */
358: function parseHttpAcceptLanguage($str = NULL) {
359:     // getting http instruction if not provided
360:     if (!$str) {
361:         $str = @$_SERVER['HTTP_ACCEPT_LANGUAGE'];
362:     }
363:     if (!is_string($str)) {
364:         return array();
365:     }
366:     $langs = explode(',', $str);
367:     // creating output list
368:     $accepted = array();
369:     foreach ($langs as $lang) {
370:         // parsing language preference instructions
371:         // 2_digit_code[-longer_code][;q=coefficient]
372:         if (preg_match('/([A-Za-z]{1,2})(-([A-Za-z0-9]+))?(;q=([0-9\.]+))?/', $lang, $found)) {
373:             // 2 digit lang code
374:             $code = $found[1];
375:             // lang code complement
376:             $morecode = array_key_exists(3, $found) ? $found[3] : false;
377:             // full lang code
378:             $fullcode = $morecode ? $code . '_' . $morecode : $code;
379:             // coefficient (preference value, will be used in sorting the list)
380:             $coef = sprintf('%3.1f', array_key_exists(5, $found) ? $found[5] : '1');
381:             // for sorting by coefficient
382:             if ($coef) { // q=0 means do not supply this language
383:                 // adding
384:                 $accepted[$coef . '-' . $code] = array('code' => $code, 'coef' => $coef, 'morecode' => $morecode, 'fullcode' => $fullcode);
385:             }
386:         }
387:     }
388: 
389:     // sorting the list by coefficient desc
390:     krsort($accepted);
391:     if (DEBUG_LOCALE) {
392:         debugLog("parseHttpAcceptLanguage($str)");
393:         debugLogVar('parseHttpAcceptLanguage::$accepted', $accepted);
394:     }
395:     return $accepted;
396: }
397: 
398: /**
399:  * checks a "supplied" locale against the valid locales.
400:  * Returns a valid locale if one exists else returns NULL
401:  * @param string $userlocale
402:  */
403: function validateLocale($userlocale, $source) {
404:     if (DEBUG_LOCALE)
405:         debugLog("validateLocale($userlocale,$source)");
406:     $userlocale = strtoupper(str_replace('-', '_', $userlocale));
407:     $languageSupport = generateLanguageList();
408:     $locale = NULL;
409:     if (!empty($userlocale)) {
410:         foreach ($languageSupport as $key => $value) {
411:             if (strtoupper($value) == $userlocale) { // we got a match
412:                 $locale = $value;
413:                 if (DEBUG_LOCALE)
414:                     debugLog("locale set from $source: " . $locale);
415:                 break;
416:             } else if (@preg_match('/^' . $userlocale . '/', strtoupper($value))) { // we got a partial match
417:                 $locale = $value;
418:                 if (DEBUG_LOCALE)
419:                     debugLog("locale set from $source (partial match): " . $locale);
420:                 break;
421:             }
422:         }
423:     }
424:     return $locale;
425: }
426: 
427: /**
428:  * Returns a saved (or posted) locale. Posted locales are stored as a cookie.
429:  *
430:  * Sets the 'locale' option to the result (non-persistent)
431:  */
432: function getUserLocale() {
433:     global $_zp_current_admin_obj, $_zp_current_locale;
434:     if (!$_zp_current_locale) {
435:         if (DEBUG_LOCALE)
436:             debugLogBackTrace("getUserLocale()");
437:         if (isset($_REQUEST['locale'])) {
438:             if (isset($_POST['locale'])) {
439:                 $_zp_current_locale = validateLocale(sanitize($_POST['locale']), 'POST');
440:             } else {
441:                 $_zp_current_locale = validateLocale(sanitize($_GET['locale']), 'URI string');
442:             }
443:             if ($_zp_current_locale) {
444:                 zp_setCookie('dynamic_locale', $_zp_current_locale);
445:             }
446:             if (DEBUG_LOCALE)
447:                 debugLog("dynamic_locale from URL: " . sanitize($_REQUEST['locale']) . "=>$_zp_current_locale");
448:         } else {
449:             $matches = explode('.', @$_SERVER['HTTP_HOST']);
450:             if ($_zp_current_locale = validateLocale($matches[0], 'HTTP_HOST')) {
451:                 zp_clearCookie('dynamic_locale');
452:             }
453:         }
454: 
455:         if (!$_zp_current_locale && is_object($_zp_current_admin_obj)) {
456:             $_zp_current_locale = $_zp_current_admin_obj->getLanguage();
457:             if (DEBUG_LOCALE)
458:                 debugLog("locale from user: " . $_zp_current_locale);
459:         }
460: 
461:         if (!$_zp_current_locale) {
462:             $localeOption = getOption('locale');
463:             $_zp_current_locale = zp_getCookie('dynamic_locale');
464: 
465:             if (DEBUG_LOCALE)
466:                 debugLog("locale from option: " . $localeOption . '; dynamic locale=' . $_zp_current_locale);
467:             if (empty($localeOption) && empty($_zp_current_locale)) { // if one is not set, see if there is a match from 'HTTP_ACCEPT_LANGUAGE'
468:                 $languageSupport = generateLanguageList();
469:                 $userLang = parseHttpAcceptLanguage();
470:                 foreach ($userLang as $lang) {
471:                     $l = strtoupper($lang['fullcode']);
472:                     $_zp_current_locale = validateLocale($l, 'HTTP Accept Language');
473:                     if ($_zp_current_locale)
474:                         break;
475:                 }
476:             } else {
477:                 if (empty($_zp_current_locale)) {
478:                     $_zp_current_locale = $localeOption;
479:                 }
480:             }
481:         }
482: 
483:         if (empty($_zp_current_locale)) {
484:             // return "default" language, English if allowed, otherwise whatever is the "first" allowed language
485:             $languageSupport = generateLanguageList();
486:             if (in_array('en_US', $languageSupport)) {
487:                 $_zp_current_locale = 'en_US';
488:             } else {
489:                 $_zp_current_locale = array_shift($languageSupport);
490:             }
491:         } else {
492:             setOption('locale', $_zp_current_locale, false);
493:         }
494:         if (DEBUG_LOCALE)
495:             debugLog("getUserLocale Returning locale: " . $_zp_current_locale);
496:     }
497:     return $_zp_current_locale;
498: }
499: 
500: /**
501:  * Returns the sring for the current language from a serialized set of language strings
502:  * Defaults to the string for the current locale, the en_US string, or the first string which ever is present
503:  *
504:  * @param string $dbstring either a serialized languag string array or a single string
505:  * @param string $locale optional locale of the translation desired
506:  * @return string
507:  */
508: function get_language_string($dbstring, $locale = NULL) {
509:     $strings = getSerializedArray($dbstring);
510:     $actual_local = getOption('locale');
511:     if (is_null($locale))
512:         $locale = $actual_local;
513:     if (isset($strings[$locale])) {
514:         return $strings[$locale];
515:     }
516:     if (isset($strings[$actual_local])) {
517:         return $strings[$actual_local];
518:     }
519:     if (isset($strings['en_US'])) {
520:         return $strings['en_US'];
521:     }
522:     return array_shift($strings);
523: }
524: 
525: /**
526:  * Returns a list of timezones
527:  *
528:  * @return unknown
529:  */
530: function getTimezones() {
531:     $cities = array();
532:     if (function_exists('timezone_abbreviations_list')) {
533:         $timezones = timezone_abbreviations_list();
534:         foreach ($timezones as $key => $zones) {
535:             foreach ($zones as $id => $zone) {
536:                 /**
537:                  * Only get timezones explicitely not part of "Others".
538:                  * @see http://www.php.net/manual/en/timezones.others.php
539:                  */
540:                 if (preg_match('/^(Africa|America|Antarctica|Arctic|Asia|Atlantic|Australia|Europe|Indian|Pacific)\//', $zone['timezone_id'])) {
541:                     $cities[] = $zone['timezone_id'];
542:                 }
543:             }
544:         }
545:         // Only keep one city (the first and also most important) for each set of possibilities.
546:         $cities = array_unique($cities);
547: 
548:         // Sort by area/city name.
549:         ksort($cities, SORT_LOCALE_STRING);
550:     }
551:     return $cities;
552: }
553: 
554: /**
555:  * Returns the difference between the server timez one and the local (users) time zone
556:  *
557:  * @param string $server
558:  * @param string $local
559:  * @return int
560:  */
561: function timezoneDiff($server, $local) {
562:     if (function_exists('timezone_abbreviations_list')) {
563:         $timezones = timezone_abbreviations_list();
564:         foreach ($timezones as $key => $zones) {
565:             foreach ($zones as $id => $zone) {
566:                 if (!isset($offset_server) && $zone['timezone_id'] === $server) {
567:                     $offset_server = (int) $zone['offset'];
568:                 }
569:                 if (!isset($offset_local) && $zone['timezone_id'] === $local) {
570:                     $offset_local = (int) $zone['offset'];
571:                 }
572:                 if (isset($offset_server) && isset($offset_local)) {
573:                     return ($offset_server - $offset_local) / 3600;
574:                 }
575:             }
576:         }
577:     }
578:     return 0;
579: }
580: 
581: /**
582:  * returns a serialized "multilingual array" of translations
583:  * Used for setting default options with multi-lingual strings.
584:  * @param string $text to be translated
585:  */
586: function getAllTranslations($text) {
587:     $entry_locale = getUserLocale();
588:     $result = array('en_US' => $text);
589:     $languages = generateLanguageList();
590:     foreach ($languages as $language) {
591:         setupCurrentLocale($language);
592:         $xlated = gettext($text);
593:         if ($xlated != $text) { // the string has a translation in this language
594:             $result[$language] = $xlated;
595:         }
596:     }
597:     setupCurrentLocale($entry_locale);
598:     if (count($result) == 1) {
599:         return $text;
600:     }
601:     return serialize($result);
602: }
603: 
604: if (function_exists('date_default_timezone_set')) { // insure a correct time zone
605:     $tz = getOption('time_zone');
606:     if (!empty($tz)) {
607:         $err = error_reporting(0);
608:         date_default_timezone_set($tz);
609:         @ini_set('date.timezone', $tz);
610:         error_reporting($err);
611:     }
612:     unset($tz);
613: }
614: ?>
Zenphoto doc API documentation generated by ApiGen