Overview

Namespaces

  • None
  • Xmf
    • Database
    • Module
      • Helper
    • Template
  • Xoops
    • Auth
    • Core
      • Cache
      • Database
        • Logging
        • Schema
      • Exception
      • Handler
        • Scheme
      • Kernel
        • Dtype
        • Handlers
        • Model
      • Lists
      • Locale
        • Punic
      • Service
        • Contract
      • Session
      • Text
        • Sanitizer
          • Extensions
      • Theme
        • Plugins
    • Form
    • Html
    • Locale
    • Module
      • Helper
      • Plugin

Classes

  • ArtObject
  • ArtObjectHandler
  • Avatars
  • AvatarsAvatar
  • AvatarsAvatar_userForm
  • AvatarsAvatarForm
  • AvatarsAvatarHandler
  • AvatarsLocale
  • AvatarsLocaleEn_US
  • AvatarsPreload
  • AvatarsProvider
  • AvatarsUserlink
  • AvatarsUserlinkHandler
  • AwesomeButton
  • BannerRender
  • Banners
  • BannersBanner
  • BannersBannerclient
  • BannersBannerclientForm
  • BannersBannerclientHandler
  • BannersBannerForm
  • BannersBannerHandler
  • BannersPreload
  • BloggerApi
  • CodexMenusPlugin
  • CodexSearchPlugin
  • CodexSystemPlugin
  • CodexUserconfigsPlugin
  • Comments
  • CommentsComment
  • CommentsCommentForm
  • CommentsCommentHandler
  • CommentsCommentRenderer
  • CommentsPreload
  • CommentsSystemPlugin
  • CommentsUserconfigsPlugin
  • Cookie
  • CountryFlagProvider
  • Criteria
  • CriteriaCompo
  • CriteriaElement
  • DebugbarLogger
  • DebugbarPreload
  • DebugbarUserconfigsPlugin
  • DefaultThemeLocale
  • DefaultThemeLocaleEn_US
  • FormDhtmlTextArea
  • FormTextArea
  • GravatarsPreload
  • GravatarsProvider
  • htmLawed
  • HtmlToPdfProvider
  • imageLib
  • Images
  • ImagesCategory
  • ImagesCategory_imagemanagerForm
  • ImagesCategoryForm
  • ImagesCategoryHandler
  • ImagesCategoryselectForm
  • ImagesImage
  • ImagesImage_Body
  • ImagesImage_imagemanagerForm
  • ImagesImagebody
  • ImagesImagebodyHandler
  • ImagesImageForm
  • ImagesImageHandler
  • ImagesPreload
  • JUpload
  • LegacyLogger
  • LoggerPreload
  • LoggerUserconfigsPlugin
  • Maintenance
  • MaintenanceMaintenanceForm
  • Menus
  • MenusBuilder
  • MenusConstantDecorator
  • MenusDecorator
  • MenusDecoratorAbstract
  • MenusDefaultDecorator
  • MenusDynamicDecorator
  • MenusMenu
  • MenusMenuHandler
  • MenusMenus
  • MenusMenus_menuForm
  • MenusMenus_menusForm
  • MenusMenusHandler
  • MenusPreload
  • MenusSmartyDecorator
  • MetaWeblogApi
  • MonologLogger
  • MonologPreload
  • MonologUserconfigsPlugin
  • MovableTypeApi
  • MyTextSanitizer
  • MyTextSanitizerExtended
  • Notifications
  • NotificationsNotification
  • NotificationsNotificationHandler
  • NotificationsPreload
  • NotificationsSystemPlugin
  • Page
  • PageCommentsPlugin
  • PageGroupPermHandler
  • PageLocale
  • PageLocaleEn_US
  • PageNotificationsPlugin
  • PagePage_content
  • PagePage_contentForm
  • PagePage_contentHandler
  • PagePage_rating
  • PagePage_ratingHandler
  • PagePage_related
  • PagePage_related_link
  • PagePage_related_linkHandler
  • PagePage_relatedForm
  • PagePage_relatedHandler
  • PagePreload
  • PageSearchPlugin
  • PageSystemPlugin
  • PdfPreload
  • PmMessage
  • PmMessageHandler
  • PmPreload
  • ProfileCategory
  • ProfileCategoryForm
  • ProfileCategoryHandler
  • ProfileCorePreload
  • ProfileField
  • ProfileFieldForm
  • ProfileFieldHandler
  • ProfileMenusPlugin
  • ProfileProfile
  • ProfileProfileHandler
  • ProfileRegstep
  • ProfileRegstepForm
  • ProfileRegstepHandler
  • ProfileVisibility
  • ProfileVisibilityHandler
  • Protector
  • protector_bruteforce_overrun_message
  • protector_crawler_overrun_message
  • protector_f5attack_overrun_message
  • protector_postcommon_post_deny_by_httpbl
  • protector_postcommon_post_deny_by_rbl
  • protector_postcommon_post_htmlpurify4everyone
  • protector_postcommon_post_htmlpurify4guest
  • protector_postcommon_post_need_multibyte
  • protector_postcommon_post_register_moratorium
  • protector_postcommon_register_insert_js_check
  • protector_precommon_badip_errorlog
  • protector_precommon_badip_message
  • protector_precommon_badip_redirection
  • protector_precommon_bwlimit_errorlog
  • protector_precommon_bwlimit_message
  • protector_prepurge_exit_message
  • protector_spamcheck_overrun_message
  • ProtectorCenterForm
  • ProtectorCorePreload
  • ProtectorFilterAbstract
  • ProtectorFilterHandler
  • ProtectorMySQLDatabase
  • Publisher
  • PublisherBlockForm
  • PublisherCategory
  • PublisherCategoryForm
  • PublisherCategoryHandler
  • PublisherCommentsPlugin
  • PublisherFile
  • PublisherFileForm
  • PublisherFileHandler
  • PublisherFormDateTime
  • PublisherGroupPermHandler
  • PublisherItem
  • PublisherItemForm
  • PublisherItemHandler
  • PublisherMenusPlugin
  • PublisherMetagen
  • PublisherMimetype
  • PublisherMimetypeHandler
  • PublisherNotificationsPlugin
  • PublisherPermissionHandler
  • PublisherPreload
  • PublisherRating
  • PublisherRatingHandler
  • PublisherSearchPlugin
  • PublisherSystemPlugin
  • PublisherUtils
  • QrcodePreload
  • QrcodeProvider
  • ReCaptchaResponse
  • RpcArrayHandler
  • RpcBase64Handler
  • RpcBooleanHandler
  • RpcDateTimeHandler
  • RpcDoubleHandler
  • RpcIntHandler
  • RpcMemberHandler
  • RpcMethodNameHandler
  • RpcNameHandler
  • RpcStringHandler
  • RpcStructHandler
  • RpcValueHandler
  • RssAuthorHandler
  • RssCategoryHandler
  • RssChannelHandler
  • RssCommentsHandler
  • RssCopyrightHandler
  • RssDescriptionHandler
  • RssDocsHandler
  • RssGeneratorHandler
  • RssGuidHandler
  • RssHeightHandler
  • RssImageHandler
  • RssItemHandler
  • RssLanguageHandler
  • RssLastBuildDateHandler
  • RssLinkHandler
  • RssManagingEditorHandler
  • RssNameHandler
  • RssPubDateHandler
  • RssSourceHandler
  • RssTextInputHandler
  • RssTitleHandler
  • RssTtlHandler
  • RssUrlHandler
  • RssWebMasterHandler
  • RssWidthHandler
  • SaxParser
  • Search
  • SearchPreload
  • SearchSearchForm
  • Smarty_Resource_Admin
  • Smarty_Resource_Block
  • Smarty_Resource_Db
  • Smarty_Resource_Module
  • Smilies
  • SmiliesPreload
  • SmiliesProvider
  • SmiliesSmiley
  • SmiliesSmileyHandler
  • SmiliesSmiliesForm
  • Snoopy
  • SqlUtility
  • System
  • SystemBlockForm
  • SystemBreadcrumb
  • SystemExtension
  • SystemGroupForm
  • SystemLocale
  • SystemLocaleEn_US
  • SystemMenuHandler
  • SystemModule
  • SystemPreferencesForm
  • SystemPreload
  • SystemUserForm
  • tar
  • ThemeSetAuthorHandler
  • ThemeSetDateCreatedHandler
  • ThemeSetDescriptionHandler
  • ThemeSetEmailHandler
  • ThemeSetFileTypeHandler
  • ThemeSetGeneratorHandler
  • ThemeSetImageHandler
  • ThemeSetLinkHandler
  • ThemeSetModuleHandler
  • ThemeSetNameHandler
  • ThemeSetTagHandler
  • ThemeSetTemplateHandler
  • Thumbs
  • ThumbsPreload
  • ThumbsProvider
  • TinyMCE
  • Userconfigs
  • UserconfigsConfigHandler
  • UserconfigsConfigsForm
  • UserconfigsItem
  • UserconfigsItemHandler
  • UserconfigsMenusPlugin
  • UserconfigsModulesForm
  • UserconfigsOption
  • UserconfigsOptionHandler
  • UserconfigsPreload
  • UserconfigsSystemPlugin
  • UserrankPreload
  • UserRankProvider
  • UserrankRank
  • UserrankRankHandler
  • UserrankRanksForm
  • Xcaptcha
  • XcaptchaCaptchaForm
  • XcaptchaImage
  • XcaptchaImageForm
  • XcaptchaRecaptcha
  • XcaptchaRecaptchaForm
  • XcaptchaText
  • XcaptchaTextForm
  • Xlanguage
  • XlanguageLanguage
  • XlanguageLanguageForm
  • XlanguagePreload
  • XlanguageTinymceForm
  • XlanguageXlanguageHandler
  • Xmf\Database\TableLoad
  • Xmf\Database\Tables
  • Xmf\Debug
  • Xmf\FilterInput
  • Xmf\Highlighter
  • Xmf\Language
  • Xmf\Loader
  • Xmf\Metagen
  • Xmf\Module\Admin
  • Xmf\Module\Cache
  • Xmf\Module\Helper
  • Xmf\Module\Helper\AbstractHelper
  • Xmf\Module\Helper\GenericHelper
  • Xmf\Module\Permission
  • Xmf\Module\Session
  • Xmf\Request
  • Xmf\Template\AbstractTemplate
  • Xmf\Template\Breadcrumb
  • Xmf\Template\Buttonbox
  • Xmf\Template\Feed
  • Xmf\Template\PrintContent
  • Xmf\Utilities
  • Xmf\Yaml
  • XmfPreload
  • XmlTagHandler
  • Xoops
  • Xoops\Auth\Ads
  • Xoops\Auth\AuthAbstract
  • Xoops\Auth\Factory
  • Xoops\Auth\Ldap
  • Xoops\Auth\Provisioning
  • Xoops\Auth\Xoops
  • Xoops\Cache
  • Xoops\Core\Assets
  • Xoops\Core\Cache\Access
  • Xoops\Core\Cache\CacheManager
  • Xoops\Core\Cache\DriverList
  • Xoops\Core\Cache\Legacy
  • Xoops\Core\ComposerUtility
  • Xoops\Core\Database\Connection
  • Xoops\Core\Database\Factory
  • Xoops\Core\Database\Logging\XoopsDebugStack
  • Xoops\Core\Database\QueryBuilder
  • Xoops\Core\Database\Schema\ExportVisitor
  • Xoops\Core\Database\Schema\ImportSchema
  • Xoops\Core\Database\Schema\PrefixStripper
  • Xoops\Core\Database\Schema\RemovePrefixes
  • Xoops\Core\Events
  • Xoops\Core\FilterInput
  • Xoops\Core\FixedGroups
  • Xoops\Core\Handler\Factory
  • Xoops\Core\Handler\FactorySpec
  • Xoops\Core\Handler\Scheme\FQN
  • Xoops\Core\Handler\Scheme\Kernel
  • Xoops\Core\Handler\Scheme\LegacyModule
  • Xoops\Core\HttpRequest
  • Xoops\Core\Kernel\Criteria
  • Xoops\Core\Kernel\CriteriaCompo
  • Xoops\Core\Kernel\CriteriaElement
  • Xoops\Core\Kernel\Dtype
  • Xoops\Core\Kernel\Dtype\DtypeAbstract
  • Xoops\Core\Kernel\Dtype\DtypeArray
  • Xoops\Core\Kernel\Dtype\DtypeDateTime
  • Xoops\Core\Kernel\Dtype\DtypeDecimal
  • Xoops\Core\Kernel\Dtype\DtypeEmail
  • Xoops\Core\Kernel\Dtype\DtypeEnumeration
  • Xoops\Core\Kernel\Dtype\DtypeFloat
  • Xoops\Core\Kernel\Dtype\DtypeInt
  • Xoops\Core\Kernel\Dtype\DtypeJson
  • Xoops\Core\Kernel\Dtype\DtypeMoney
  • Xoops\Core\Kernel\Dtype\DtypeOther
  • Xoops\Core\Kernel\Dtype\DtypeSimpleTime
  • Xoops\Core\Kernel\Dtype\DtypeSource
  • Xoops\Core\Kernel\Dtype\DtypeTextArea
  • Xoops\Core\Kernel\Dtype\DtypeTextBox
  • Xoops\Core\Kernel\Dtype\DtypeTimeZone
  • Xoops\Core\Kernel\Dtype\DtypeUrl
  • Xoops\Core\Kernel\Handlers\XoopsBlock
  • Xoops\Core\Kernel\Handlers\XoopsBlockHandler
  • Xoops\Core\Kernel\Handlers\XoopsBlockModuleLink
  • Xoops\Core\Kernel\Handlers\XoopsBlockModuleLinkHandler
  • Xoops\Core\Kernel\Handlers\XoopsConfigHandler
  • Xoops\Core\Kernel\Handlers\XoopsConfigItem
  • Xoops\Core\Kernel\Handlers\XoopsConfigItemHandler
  • Xoops\Core\Kernel\Handlers\XoopsConfigOption
  • Xoops\Core\Kernel\Handlers\XoopsConfigOptionHandler
  • Xoops\Core\Kernel\Handlers\XoopsGroup
  • Xoops\Core\Kernel\Handlers\XoopsGroupHandler
  • Xoops\Core\Kernel\Handlers\XoopsGroupPerm
  • Xoops\Core\Kernel\Handlers\XoopsGroupPermHandler
  • Xoops\Core\Kernel\Handlers\XoopsMemberHandler
  • Xoops\Core\Kernel\Handlers\XoopsMembership
  • Xoops\Core\Kernel\Handlers\XoopsMembershipHandler
  • Xoops\Core\Kernel\Handlers\XoopsModule
  • Xoops\Core\Kernel\Handlers\XoopsModuleHandler
  • Xoops\Core\Kernel\Handlers\XoopsOnline
  • Xoops\Core\Kernel\Handlers\XoopsOnlineHandler
  • Xoops\Core\Kernel\Handlers\XoopsPrivateMessage
  • Xoops\Core\Kernel\Handlers\XoopsPrivateMessageHandler
  • Xoops\Core\Kernel\Handlers\XoopsTplFile
  • Xoops\Core\Kernel\Handlers\XoopsTplFileHandler
  • Xoops\Core\Kernel\Handlers\XoopsTplSet
  • Xoops\Core\Kernel\Handlers\XoopsTplSetHandler
  • Xoops\Core\Kernel\Handlers\XoopsUser
  • Xoops\Core\Kernel\Handlers\XoopsUserHandler
  • Xoops\Core\Kernel\Model\Joint
  • Xoops\Core\Kernel\Model\Read
  • Xoops\Core\Kernel\Model\Stats
  • Xoops\Core\Kernel\Model\Sync
  • Xoops\Core\Kernel\Model\Write
  • Xoops\Core\Kernel\XoopsModelAbstract
  • Xoops\Core\Kernel\XoopsModelFactory
  • Xoops\Core\Kernel\XoopsObject
  • Xoops\Core\Kernel\XoopsObjectHandler
  • Xoops\Core\Kernel\XoopsPersistableObjectHandler
  • Xoops\Core\Lists\Country
  • Xoops\Core\Lists\Directory
  • Xoops\Core\Lists\Editor
  • Xoops\Core\Lists\File
  • Xoops\Core\Lists\HtmlFile
  • Xoops\Core\Lists\ImageFile
  • Xoops\Core\Lists\ListAbstract
  • Xoops\Core\Lists\Locale
  • Xoops\Core\Lists\Module
  • Xoops\Core\Lists\Month
  • Xoops\Core\Lists\SubjectIcon
  • Xoops\Core\Lists\SubSet
  • Xoops\Core\Lists\Theme
  • Xoops\Core\Lists\Time
  • Xoops\Core\Lists\TimeZone
  • Xoops\Core\Locale\LegacyCodes
  • Xoops\Core\Locale\Punic\Calendar
  • Xoops\Core\Locale\Time
  • Xoops\Core\Logger
  • Xoops\Core\MediaUploader
  • Xoops\Core\MimeTypes
  • Xoops\Core\PreloadItem
  • Xoops\Core\Psr0ClassLoader
  • Xoops\Core\Psr4ClassLoader
  • Xoops\Core\Random
  • Xoops\Core\Registry
  • Xoops\Core\Request
  • Xoops\Core\Security
  • Xoops\Core\Service\AbstractContract
  • Xoops\Core\Service\Manager
  • Xoops\Core\Service\NullProvider
  • Xoops\Core\Service\Provider
  • Xoops\Core\Service\Response
  • Xoops\Core\Session\Fingerprint
  • Xoops\Core\Session\Handler
  • Xoops\Core\Session\Manager
  • Xoops\Core\Session\RememberMe
  • Xoops\Core\Session\SessionUser
  • Xoops\Core\Text\Sanitizer
  • Xoops\Core\Text\Sanitizer\Configuration
  • Xoops\Core\Text\Sanitizer\ConfigurationAbstract
  • Xoops\Core\Text\Sanitizer\DefaultConfiguration
  • Xoops\Core\Text\Sanitizer\ExtensionAbstract
  • Xoops\Core\Text\Sanitizer\Extensions\Censor
  • Xoops\Core\Text\Sanitizer\Extensions\Clickable
  • Xoops\Core\Text\Sanitizer\Extensions\Embed
  • Xoops\Core\Text\Sanitizer\Extensions\Flash
  • Xoops\Core\Text\Sanitizer\Extensions\Iframe
  • Xoops\Core\Text\Sanitizer\Extensions\Image
  • Xoops\Core\Text\Sanitizer\Extensions\Mms
  • Xoops\Core\Text\Sanitizer\Extensions\Mp3
  • Xoops\Core\Text\Sanitizer\Extensions\Quote
  • Xoops\Core\Text\Sanitizer\Extensions\Rtsp
  • Xoops\Core\Text\Sanitizer\Extensions\SoundCloud
  • Xoops\Core\Text\Sanitizer\Extensions\SyntaxHighlight
  • Xoops\Core\Text\Sanitizer\Extensions\TextFilter
  • Xoops\Core\Text\Sanitizer\Extensions\UnorderedList
  • Xoops\Core\Text\Sanitizer\Extensions\Wiki
  • Xoops\Core\Text\Sanitizer\Extensions\Wmp
  • Xoops\Core\Text\Sanitizer\Extensions\XoopsCode
  • Xoops\Core\Text\Sanitizer\Extensions\Xss
  • Xoops\Core\Text\Sanitizer\Extensions\YouTube
  • Xoops\Core\Text\Sanitizer\FilterAbstract
  • Xoops\Core\Text\Sanitizer\NullExtension
  • Xoops\Core\Text\Sanitizer\NullFilter
  • Xoops\Core\Text\Sanitizer\SanitizerComponent
  • Xoops\Core\Text\Sanitizer\SanitizerConfigurable
  • Xoops\Core\Text\ShortCodes
  • Xoops\Core\Theme\AdminFactory
  • Xoops\Core\Theme\Factory
  • Xoops\Core\Theme\NullTheme
  • Xoops\Core\Theme\PluginAbstract
  • Xoops\Core\Theme\Plugins\Blocks
  • Xoops\Core\Theme\XoopsTheme
  • Xoops\Core\XoopsTpl
  • Xoops\Core\Yaml
  • Xoops\Form\BlockForm
  • Xoops\Form\Button
  • Xoops\Form\ButtonTray
  • Xoops\Form\Captcha
  • Xoops\Form\Checkbox
  • Xoops\Form\ColorPicker
  • Xoops\Form\DateSelect
  • Xoops\Form\DateTime
  • Xoops\Form\DhtmlTextArea
  • Xoops\Form\Editor
  • Xoops\Form\Element
  • Xoops\Form\ElementFactory
  • Xoops\Form\ElementTray
  • Xoops\Form\File
  • Xoops\Form\Form
  • Xoops\Form\GroupCheckbox
  • Xoops\Form\GroupFormCheckbox
  • Xoops\Form\GroupPermissionForm
  • Xoops\Form\Hidden
  • Xoops\Form\Label
  • Xoops\Form\Mail
  • Xoops\Form\OptionElement
  • Xoops\Form\Password
  • Xoops\Form\Radio
  • Xoops\Form\RadioYesNo
  • Xoops\Form\Raw
  • Xoops\Form\Select
  • Xoops\Form\SelectCountry
  • Xoops\Form\SelectEditor
  • Xoops\Form\SelectGroup
  • Xoops\Form\SelectLanguage
  • Xoops\Form\SelectLocale
  • Xoops\Form\SelectMatchOption
  • Xoops\Form\SelectTheme
  • Xoops\Form\SelectTimeZone
  • Xoops\Form\SelectUser
  • Xoops\Form\SimpleForm
  • Xoops\Form\Tab
  • Xoops\Form\TableForm
  • Xoops\Form\TabTray
  • Xoops\Form\Text
  • Xoops\Form\TextArea
  • Xoops\Form\ThemeForm
  • Xoops\Form\Token
  • Xoops\Form\Url
  • Xoops\Html\Attributes
  • Xoops\Html\Img
  • Xoops\Locale
  • Xoops\Locale\AbstractLocale
  • Xoops\Module\Admin
  • Xoops\Module\Helper
  • Xoops\Module\Helper\Dummy
  • Xoops\Module\Helper\HelperAbstract
  • Xoops\Module\Plugin
  • Xoops\Module\Plugin\ConfigCollector
  • Xoops\Module\Plugin\PluginAbstract
  • Xoops\Utils
  • Xoops_Locale_Mailer_Abstract
  • XoopsAdminThemeFactory
  • XoopsApi
  • XoopsArt
  • XoopsBaseConfig
  • XoopsBlock
  • XoopsBlockHandler
  • XoopsBlockmodulelink
  • XoopsBlockmodulelinkHandler
  • XoopsCache
  • XoopsCaptcha
  • XoopsCaptchaImage
  • XoopsCaptchaImageHandler
  • XoopsCaptchaMethod
  • XoopsCaptchaRecaptcha
  • XoopsCaptchaText
  • XoopsConfigHandler
  • XoopsConfigItem
  • XoopsConfigItemHandler
  • XoopsConfigOption
  • XoopsConfigOptionHandler
  • XoopsDatabase
  • XoopsDatabaseFactory
  • XoopsDatabaseManager
  • XoopsDownloader
  • XoopsEditor
  • XoopsEditorHandler
  • XoopsFile
  • XoopsFileHandler
  • XoopsFilterInput
  • XoopsFolderHandler
  • XoopsForm
  • XoopsFormButton
  • XoopsFormButtonTray
  • XoopsFormCaptcha
  • XoopsFormCheckBox
  • XoopsFormColorPicker
  • XoopsFormDateTime
  • XoopsFormDhtmlTextArea
  • XoopsFormEditor
  • XoopsFormElement
  • XoopsFormElementTray
  • XoopsFormFile
  • XoopsFormHidden
  • XoopsFormHiddenToken
  • XoopsFormLabel
  • XoopsFormPassword
  • XoopsFormRadio
  • XoopsFormRadioYN
  • XoopsFormSelect
  • XoopsFormSelectCheckGroup
  • XoopsFormSelectCountry
  • XoopsFormSelectEditor
  • XoopsFormSelectGroup
  • XoopsFormSelectLang
  • XoopsFormSelectMatchOption
  • XoopsFormSelectTheme
  • XoopsFormSelectTimezone
  • XoopsFormSelectUser
  • XoopsFormText
  • XoopsFormTextArea
  • XoopsFormTextDateSelect
  • XoopsFormTinymce
  • XoopsFormTinymce4
  • XoopsGroup
  • XoopsGroupHandler
  • XoopsGroupPerm
  • XoopsGroupPermForm
  • XoopsGroupPermHandler
  • XoopsGTicket
  • XoopsGuiDefault
  • XoopsInstallWizard
  • XoopsLists
  • XoopsLoad
  • XoopsLocal
  • XoopsLocale
  • XoopsLocaleEn_US
  • XoopsLogger
  • XoopsMailer
  • XoopsMailerLocal
  • XoopsMailerLocale
  • XoopsMediaUploader
  • XoopsMemberHandler
  • XoopsMembership
  • XoopsMembershipHandler
  • XoopsModule
  • XoopsModuleHandler
  • XoopsMultiMailer
  • XoopsMySQLDatabase
  • XoopsMySQLDatabaseProxy
  • XoopsMySQLDatabaseSafe
  • XoopsObject
  • XoopsObjectHandler
  • XoopsObjectTree
  • XoopsOnline
  • XoopsOnlineHandler
  • XoopsPageNav
  • XoopsPathController
  • XoopsPersistableObjectHandler
  • XoopsPreload
  • XoopsPreloadItem
  • XoopsPrivmessage
  • XoopsPrivmessageHandler
  • XoopsRequest
  • XoopsSecurity
  • XoopsSimpleForm
  • XoopsTableForm
  • XoopsTarDownloader
  • XoopsTheme
  • XoopsThemeBlocksPlugin
  • XoopsThemeFactory
  • XoopsThemeForm
  • XoopsThemePlugin
  • XoopsThemeSetParser
  • XoopsTpl
  • XoopsTplfile
  • XoopsTplfileHandler
  • XoopsTplset
  • XoopsTplsetHandler
  • XoopsUser
  • XoopsUserHandler
  • XoopsUserUtility
  • XoopsUtility
  • XoopsXmlRpcApi
  • XoopsXmlRpcArray
  • XoopsXmlRpcBase64
  • XoopsXmlRpcBoolean
  • XoopsXmlRpcDatetime
  • XoopsXmlRpcDocument
  • XoopsXmlRpcDouble
  • XoopsXmlRpcFault
  • XoopsXmlRpcInt
  • XoopsXmlRpcParser
  • XoopsXmlRpcRequest
  • XoopsXmlRpcResponse
  • XoopsXmlRpcString
  • XoopsXmlRpcStruct
  • XoopsXmlRpcTag
  • XoopsXmlRss2Parser
  • XoopsZipDownloader
  • zipfile

Interfaces

  • CommentsPluginInterface
  • MenusDecoratorInterface
  • MenusPluginInterface
  • NotificationsPluginInterface
  • SearchPluginInterface
  • SystemPluginInterface
  • UserconfigsPluginInterface
  • Xoops\Core\AttributeInterface
  • Xoops\Core\Handler\Scheme\SchemeInterface
  • Xoops\Core\Service\Contract\AvatarInterface
  • Xoops\Core\Service\Contract\CountryflagInterface
  • Xoops\Core\Service\Contract\EmojiInterface
  • Xoops\Core\Service\Contract\HtmlToPdfInterface
  • Xoops\Core\Service\Contract\QrcodeInterface
  • Xoops\Core\Service\Contract\ThumbnailInterface
  • Xoops\Core\Service\Contract\UserRankInterface
  • Xoops\Core\Session\FingerprintInterface
  • Xoops\Form\ContainerInterface

Exceptions

  • Xoops\Core\Exception\InvalidHandlerSpecException
  • Xoops\Core\Exception\NoHandlerException

Functions

  • _changeMimeValue
  • _clearAddSessionVars
  • _clearEditSessionVars
  • _ee
  • _recaptcha_aes_encrypt
  • _recaptcha_aes_pad
  • _recaptcha_http_post
  • _recaptcha_mailhide_email_parts
  • _recaptcha_mailhide_urlbase64
  • _recaptcha_qsencode
  • _tt
  • add
  • addCriteria
  • admin_refcheck
  • b_comments_edit
  • b_comments_show
  • b_notification_show
  • b_search_show
  • b_system_info_edit
  • b_system_info_show
  • b_system_login_show
  • b_system_main_edit
  • b_system_main_show
  • b_system_newmembers_edit
  • b_system_newmembers_show
  • b_system_online_show
  • b_system_themes_edit
  • b_system_themes_show
  • b_system_topposters_edit
  • b_system_topposters_show
  • b_system_user_show
  • b_system_waiting_show
  • b_xlanguage_select_edit
  • b_xlanguage_select_show
  • banners_blocks_edit
  • banners_blocks_show
  • base_url
  • buildRssFeedCache
  • buildTable
  • check_files_extensions_on_path
  • check_files_extensions_on_phar
  • checkEmail
  • clearAddSession
  • clearEditSession
  • config_loading
  • create_folder
  • create_img
  • create_img_gd
  • createConfigform
  • createDir
  • createThemeform
  • dateSort
  • debugger
  • delete
  • deleteDir
  • duplicate_file
  • edit
  • endsWith
  • exception_handler
  • extensionSort
  • file_put_contents
  • filenameSort
  • filescount
  • fix_dirname
  • fix_filename
  • fix_get_params
  • fix_path
  • fix_strtolower
  • fix_strtoupper
  • foldersize
  • formatTimestamp
  • formatURL
  • genPathCheckHtml
  • get_file_by_url
  • get_writeoks_from_protector
  • getBrightness
  • getDbConnection
  • getDbConnectionParams
  • getDirList
  • handle_uploaded_files
  • http_response_code
  • image_check_memory_usage
  • install_acceptUser
  • install_finalize
  • installHtmlSpecialCharacters
  • is_function_callable
  • is_really_writable
  • load_functions
  • load_object
  • load_objectHandler
  • loadModuleAdminMenu
  • makeSize
  • manage
  • menus_block_edit
  • menus_block_show
  • menus_mainmenu_show
  • mod_clearCacheFile
  • mod_clearConfg
  • mod_clearConfig
  • mod_clearFile
  • mod_clearSmartyCache
  • mod_constant
  • mod_createCacheFile
  • mod_createCacheFile_byGroup
  • mod_createFile
  • mod_DB_prefix
  • mod_fetchConfg
  • mod_fetchConfig
  • mod_generateCacheId
  • mod_generateCacheId_byGroup
  • mod_getDirname
  • mod_getMysqlVersion
  • mod_isModuleAction
  • mod_loadCacheFile
  • mod_loadCacheFile_byGroup
  • mod_loadConfg
  • mod_loadConfig
  • mod_loadFile
  • mod_loadFunctions
  • mod_loadRenderer
  • mod_message
  • modify_chmod
  • new_thumbnails_creation
  • normalizeColor
  • page_blocks_edit
  • page_blocks_show
  • profile_getRegisterForm
  • profile_getUserForm
  • profile_install_addCategory
  • profile_install_addField
  • profile_install_addStep
  • profile_install_initializeProfiles
  • profile_install_setPermissions
  • protector_ip_cmp
  • protector_postcheck
  • protector_precheck
  • publisher_category_items_sel_edit
  • publisher_category_items_sel_show
  • publisher_cloneFileFolder
  • publisher_createLogo
  • publisher_date_to_date_edit
  • publisher_date_to_date_show
  • publisher_displayCategory
  • publisher_editCat
  • publisher_editFile
  • publisher_editItem
  • publisher_items_columns_edit
  • publisher_items_columns_show
  • publisher_items_menu_edit
  • publisher_items_menu_show
  • publisher_items_new_edit
  • publisher_items_new_show
  • publisher_items_random_item_show
  • publisher_items_recent_edit
  • publisher_items_recent_show
  • publisher_items_spot_edit
  • publisher_items_spot_show
  • publisher_latest_files_edit
  • publisher_latest_files_show
  • publisher_latest_news_edit
  • publisher_latest_news_show
  • publisher_mk_chkbox
  • publisher_mk_select
  • publisher_pagewrap_upload
  • publisher_search
  • publisher_search_show
  • publisher_tag_iteminfo
  • publisher_tag_synchronization
  • rcopy
  • recaptcha_check_answer
  • recaptcha_get_html
  • recaptcha_get_signup_url
  • recaptcha_mailhide_html
  • recaptcha_mailhide_url
  • redirect_header
  • rename_file
  • rename_folder
  • rrename
  • rrename_after_cleaner
  • search
  • sizeSort
  • smarty_block_assets
  • smarty_block_noshortcodes
  • smarty_compiler_xoAdminIcons
  • smarty_compiler_xoAdminNav
  • smarty_compiler_xoAppUrl
  • smarty_compiler_xoImgUrl
  • smarty_compiler_xoModuleIcons16
  • smarty_compiler_xoModuleIcons32
  • smarty_compiler_xoModuleIconsBookmarks
  • smarty_function_addBaseScript
  • smarty_function_addBaseStylesheet
  • smarty_function_securityToken
  • smarty_function_thumbnail
  • smarty_function_translate
  • smarty_function_translateTheme
  • smarty_function_xoblock
  • smarty_function_xoInboxCount
  • smarty_function_xoMemberInfo
  • smarty_function_xoops_link
  • smarty_function_xoPageNav
  • smarty_modifier_datetime
  • smarty_modifier_debug_print_var
  • smarty_outputfilter_shortcodes
  • synchronize
  • system_AdminIcons
  • system_adminVersion
  • system_cleanVars
  • system_loadLanguage
  • system_loadTemplate
  • updateMimeValue
  • userTimeToServerTime
  • xhtmlspecialchars
  • xlanguage_convert_encoding
  • xlanguage_convert_item
  • xlanguage_copyfile
  • xlanguage_detectLang
  • xlanguage_encoding
  • xlanguage_lang_detect
  • xlanguage_mkdirs
  • xlanguage_ml
  • xlanguage_ml_escape_bracket
  • xlanguage_select_show
  • xoBoolField
  • xoDiag
  • xoDiagBoolSetting
  • xoDiagIfWritable
  • xoFormField
  • xoops_comment_count
  • xoops_comment_delete
  • xoops_confirm
  • xoops_convert_encoding
  • xoops_cp_footer
  • xoops_cp_header
  • xoops_error
  • xoops_footer
  • xoops_getActiveModules
  • xoops_getbanner
  • xoops_getBaseDomain
  • xoops_getConfigOption
  • xoops_getcss
  • xoops_getenv
  • xoops_getHandler
  • xoops_getMailer
  • xoops_getModuleHandler
  • xoops_getModuleOption
  • xoops_getOption
  • xoops_getrank
  • xoops_getUrlDomain
  • xoops_getUserTimestamp
  • xoops_groupperm_deletebymoditem
  • xoops_header
  • xoops_isActiveModule
  • xoops_load
  • xoops_loadLanguage
  • xoops_makepass
  • xoops_message
  • xoops_module_install_avatars
  • xoops_module_install_banners
  • xoops_module_install_comments
  • xoops_module_install_debugbar
  • xoops_module_install_notifications
  • xoops_module_install_page
  • xoops_module_install_pm
  • xoops_module_install_profile
  • xoops_module_install_publisher
  • xoops_module_install_smilies
  • xoops_module_install_system
  • xoops_module_install_userrank
  • xoops_module_install_xlanguage
  • xoops_module_pre_uninstall_comments
  • xoops_module_pre_uninstall_notifications
  • xoops_module_update_comments
  • xoops_module_update_debugbar
  • xoops_module_update_notifications
  • xoops_module_update_pm
  • xoops_module_update_profile
  • xoops_module_update_publisher
  • xoops_module_update_search
  • xoops_module_update_system
  • xoops_module_update_xlanguage
  • xoops_notification_deletebyitem
  • xoops_notification_deletebymodule
  • xoops_notification_deletebyuser
  • xoops_result
  • xoops_setActiveModules
  • xoops_setConfigOption
  • xoops_substr
  • xoops_template_clear_module_cache
  • xoops_template_touch
  • xoops_trim
  • xoops_utf8_encode
  • xoopseditor_get_rootpath
  • xoPassField
  • xoPhpVersion
  • Overview
  • Namespace
  • Class
  • Tree
  1: <?php
  2: /*
  3:  You may not change or alter any portion of this comment or credits
  4:  of supporting developers from this source code or any supporting source code
  5:  which is considered copyrighted (c) material of the original comment or credit authors.
  6: 
  7:  This program is distributed in the hope that it will be useful,
  8:  but WITHOUT ANY WARRANTY; without even the implied warranty of
  9:  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 10: */
 11: 
 12: namespace Xoops\Core\Theme;
 13: 
 14: use Xoops\Core\FixedGroups;
 15: use Xoops\Core\XoopsTpl;
 16: 
 17: /**
 18:  * XoopsTheme component class file
 19:  *
 20:  * @category  Xoops\Core
 21:  * @package   Theme
 22:  * @author    Skalpa Keo <skalpa@xoops.org>
 23:  * @author    Taiwen Jiang <phppp@users.sourceforge.net>
 24:  * @copyright 2008-2015 XOOPS Project (http://xoops.org)
 25:  * @license   GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
 26:  * @link      http://xoops.org
 27:  */
 28: class XoopsTheme
 29: {
 30:     /**
 31:      * Should we render banner? Not for redirect pages or admin side
 32:      *
 33:      * @var bool
 34:      */
 35:     public $renderBanner = true;
 36: 
 37:     /**
 38:      * The name of this theme
 39:      *
 40:      * @var string
 41:      */
 42:     public $folderName = '';
 43: 
 44:     /**
 45:      * Physical path of this theme folder
 46:      *
 47:      * @var string
 48:      */
 49:     public $path = '';
 50: 
 51:     /**
 52:      * @var string
 53:      */
 54:     public $url = '';
 55: 
 56:     /**
 57:      * Whether or not the theme engine should include the output generated by php
 58:      *
 59:      * @var string
 60:      */
 61:     public $bufferOutput = true;
 62: 
 63:     /**
 64:      * Canvas-level template to use
 65:      *
 66:      * @var string
 67:      */
 68:     public $canvasTemplate = 'theme.html';
 69: 
 70:     /**
 71:      * Theme folder path
 72:      *
 73:      * @var string
 74:      */
 75:     public $themesPath = 'themes';
 76: 
 77:     /**
 78:      * Content-level template to use
 79:      *
 80:      * @var string
 81:      */
 82:     public $contentTemplate = '';
 83: 
 84:     /**
 85:      * @var int
 86:      */
 87:     public $contentCacheLifetime = 0;
 88: 
 89:     /**
 90:      * @var string
 91:      */
 92:     public $contentCacheId = null;
 93: 
 94:     /**
 95:      * Text content to display right after the contentTemplate output
 96:      *
 97:      * @var string
 98:      */
 99:     public $content = '';
100: 
101:     /**
102:      * Page construction plug-ins to use
103:      *
104:      * @var array
105:      * @access public
106:      */
107:     public $plugins = array('\Xoops\Core\Theme\Plugins\Blocks');
108: 
109:     /**
110:      * @var int
111:      */
112:     public $renderCount = 0;
113: 
114:     /**
115:      * Pointer to the theme template engine
116:      *
117:      * @var XoopsTpl
118:      */
119:     public $template = false;
120: 
121:     /**
122:      * Array containing the document meta-information
123:      *
124:      * @var array
125:      */
126:     public $metas = array(
127:         'meta' => array(), 'link' => array(), 'script' => array()
128:     );
129: 
130:     /**
131:      * Asset manager instance
132:      *
133:      * @var object
134:      */
135:     public $assets = null;
136: 
137:     /**
138:      * Array containing base assets for the document
139:      *
140:      * @var array
141:      */
142:     public $baseAssets = array(
143:         'js' => array(),
144:         'css' => array(),
145:     );
146: 
147:     /**
148:      * Array of strings to be inserted in the head tag of HTML documents
149:      *
150:      * @var array
151:      */
152:     public $htmlHeadStrings = array();
153: 
154:     /**
155:      * Custom variables that will always be assigned to the template
156:      *
157:      * @var array
158:      */
159:     public $templateVars = array();
160: 
161:     /**
162:      * User extra information for cache id, like language, user groups
163:      *
164:      * @var boolean
165:      */
166:     public $use_extra_cache_id = true;
167: 
168:     /**
169:      * Engine used for caching headers information
170:      * Default is 'file', you can choose 'model' for database storage
171:      * or any other cache engine available in the class/cache folder
172:      *
173:      * @var boolean
174:      */
175:     public $headersCacheEngine = 'default';
176: 
177:     /**
178:      * *#@-
179:      */
180: 
181:     /**
182:      * *#@+
183:      * @tasktype 10 Initialization
184:      */
185:     /**
186:      * Initializes this theme
187:      * Upon initialization, the theme creates its template engine and instantiates the
188:      * plug-ins from the specified {@link $plugins} list. If the theme is a 2.0 theme, that does not
189:      * display redirection messages, the HTTP redirection system is disabled to ensure users will
190:      * see the redirection screen.
191:      *
192:      * @return bool
193:      */
194:     public function xoInit()
195:     {
196:         $xoops = \Xoops::getInstance();
197:         $this->assets = $xoops->assets();
198:         $this->path = \XoopsBaseConfig::get('themes-path') . '/' . $this->folderName;
199:         $this->url = \XoopsBaseConfig::get('themes-url') . '/' . $this->folderName;
200:         $this->template = null;
201:         $this->template = new XoopsTpl();
202:         //$this->template->currentTheme = $this;
203:         $this->template->assignByRef('xoTheme', $this);
204:         $this->template->assign(array(
205:             'xoops_theme'      => $xoops->getConfig('theme_set'),
206:             'xoops_imageurl'   => \XoopsBaseConfig::get('themes-url') . '/' . $xoops->getConfig('theme_set') . '/',
207:             'xoops_themecss'   => $xoops->getCss($xoops->getConfig('theme_set')),
208:             'xoops_requesturi' => htmlspecialchars($_SERVER['REQUEST_URI'], ENT_QUOTES),
209:             'xoops_sitename'   => htmlspecialchars($xoops->getConfig('sitename'), ENT_QUOTES),
210:             'xoops_slogan'     => htmlspecialchars($xoops->getConfig('slogan'), ENT_QUOTES),
211:             'xoops_dirname'    => $xoops->moduleDirname,
212:             'xoops_banner'     => $this->renderBanner ? $xoops->getBanner() : '&nbsp;',
213:             'xoops_pagetitle'  => $xoops->isModule()
214:                 ? $xoops->module->getVar('name')
215:                 : htmlspecialchars($xoops->getConfig('slogan'), ENT_QUOTES)
216:         ));
217:         $this->template->assign(array(
218:             'theme_path' => $this->path, 'theme_tpl' => $this->path . '/xotpl', 'theme_url' => $this->url,
219:             'theme_img'  => $this->url . '/img', 'theme_icons' => $this->url . '/icons',
220:             'theme_css'  => $this->url . '/css', 'theme_js' => $this->url . '/js',
221:             'theme_lang' => $this->url . '/language',
222:         ));
223: 
224:         if ($xoops->isUser()) {
225:             $response = $xoops->service("Avatar")->getAvatarUrl($xoops->user);
226:             $avatar = $response->getValue();
227:             $avatar = empty($avatar) ? '' : $avatar;
228: 
229:             $this->template->assign(array(
230:                 'xoops_isuser'     => true,
231:                 'xoops_avatar'     => $avatar,
232:                 'xoops_userid'     => $xoops->user->getVar('uid'), 'xoops_uname' => $xoops->user->getVar('uname'),
233:                 'xoops_name'       => $xoops->user->getVar('name'), 'xoops_isadmin' => $xoops->isAdmin(),
234:                 'xoops_usergroups' => $xoops->user->getGroups()
235:             ));
236:         } else {
237:             $this->template->assign(array(
238:                 'xoops_isuser' => false,
239:                 'xoops_isadmin' => false,
240:                 'xoops_usergroups' => array(FixedGroups::ANONYMOUS)
241:             ));
242:         }
243: 
244:         // Meta tags
245:         $metas = array(
246:             'description', 'keywords', 'robots', 'rating', 'author', 'copyright'
247:         );
248:         foreach ($metas as $name) {
249:             $this->addMeta('meta', $name, $xoops->getConfig('meta_' . $name));
250:         }
251: 
252:         // Other assigns
253:         $assigns = array(
254:             'title', 'slogan', 'locale', 'footer', 'jquery_theme', 'startpage'
255:         );
256:         foreach ($assigns as $name) {
257:             // prefix each tag with 'xoops_'
258:             $this->template->assign("xoops_$name", $xoops->getConfig($name));
259:         }
260: 
261:         // Load global javascript
262:         //$this->addScript('include/xoops.js');
263:         //$this->loadLocalization();
264:         list($cssAssets, $jsAssets) = $this->getLocalizationAssets();
265:         if (!empty($cssAssets)) {
266:             $this->addBaseStylesheetAssets($cssAssets);
267:         }
268:         $this->addBaseScriptAssets('include/xoops.js');
269:         $this->addBaseScriptAssets('@jquery');
270:         //$this->addBaseScriptAssets('media/bootstrap/js/bootstrap.min.js');
271:         if (!empty($jsAssets)) {
272:             $this->addBaseScriptAssets($jsAssets);
273:         }
274: 
275:         if ($this->bufferOutput) {
276:             ob_start();
277:         }
278:         $xoops->setTheme($this);
279:         $xoops->setTpl($this->template);
280: 
281:         //For legacy only, never use this Globals
282:         $GLOBALS['xoTheme'] = $xoops->theme();
283:         $GLOBALS['xoopsTpl'] = $xoops->tpl();
284: 
285:         //to control order of loading JS and CSS
286:         // TODO - this should be done in such a way it can join the base asset
287:         //        load above.
288:         if (\XoopsLoad::fileExists($this->path . "/theme_onload.php")) {
289:             include_once($this->path . "/theme_onload.php");
290:         }
291: 
292:         // Instantiate and initialize all the theme plugins
293:         foreach ($this->plugins as $k => $bundleId) {
294:             if (!is_object($bundleId)) {
295:                 /* @var $plugin PluginAbstract */
296:                 $plugin = new $bundleId();
297:                 $plugin->theme = $this;
298:                 $plugin->xoInit();
299: 
300:                 $this->plugins[$bundleId] = null;
301:                 $this->plugins[$bundleId] = $plugin;
302:                 unset($this->plugins[$k]);
303:             }
304:         }
305:         return true;
306:     }
307: 
308:     /**
309:      * Generate cache id based on extra information of language and user groups
310:      * User groups other than anonymous should be detected to avoid disclosing group sensitive contents
311:      *
312:      * @param string $cache_id    raw cache id
313:      * @param string $extraString extra string
314:      *
315:      * @return string complete cache id
316:      */
317:     public function generateCacheId($cache_id, $extraString = '')
318:     {
319:         $xoops = \Xoops::getInstance();
320:         static $extra_string;
321:         if (!$this->use_extra_cache_id) {
322:             return $cache_id;
323:         }
324: 
325:         if (empty($extraString)) {
326:             if (empty($extra_string)) {
327:                 // Generate language section
328:                 $extra_string = $xoops->getConfig('locale');
329:                 // Generate group section
330:                 if (!$xoops->isUser()) {
331:                     $extra_string .= '-' . FixedGroups::ANONYMOUS;
332:                 } else {
333:                     $groups = $xoops->user->getGroups();
334:                     sort($groups);
335:                     // Generate group string for non-anonymous groups,
336:                     // db-pass and db-name (before we find better variables) are used
337:                     // to protect group sensitive contents
338:                     $extra_string .= '-' . substr(md5(implode('-', $groups)), 0, 8) . '-' . substr(md5(
339:                         \XoopsBaseConfig::get('db-pass') . \XoopsBaseConfig::get('db-name')
340:                         . \XoopsBaseConfig::get('db-user')
341:                     ), 0, 8);
342:                 }
343:             }
344:             $extraString = $extra_string;
345:         }
346:         $cache_id .= '-' . $extraString;
347:         return $cache_id;
348:     }
349: 
350:     /**
351:      * XoopsTheme::checkCache()
352:      *
353:      * @return bool
354:      */
355:     public function checkCache()
356:     {
357:         if ($_SERVER['REQUEST_METHOD'] !== 'POST' && $this->contentCacheLifetime) {
358:             $template = $this->contentTemplate ? $this->contentTemplate : 'module:system/system_dummy.tpl';
359:             $this->template->caching = 2;
360:             $this->template->cache_lifetime = $this->contentCacheLifetime;
361:             $uri = str_replace(\XoopsBaseConfig::get('url'), '', $_SERVER['REQUEST_URI']);
362:             // Clean uri by removing session id
363:             if (defined('SID') && SID && strpos($uri, SID)) {
364:                 $uri = preg_replace("/([\?&])(" . SID . "$|" . SID . "&)/", "\\1", $uri);
365:             }
366:             $this->contentCacheId = $this->generateCacheId('page_' . substr(md5($uri), 0, 8));
367:             if ($this->template->isCached($template, $this->contentCacheId)) {
368:                 \Xoops::getInstance()->events()->triggerEvent('core.theme.checkcache.success', array($template, $this));
369:                 $this->render(null, null, $template);
370:                 return true;
371:             }
372:         }
373:         return false;
374:     }
375: 
376:     /**
377:      * Render the page
378:      * The theme engine builds pages from 2 templates: canvas and content.
379:      * A module can call this method directly and specify what templates the theme engine must use.
380:      * If render() hasn't been called before, the theme defaults will be used for the canvas and
381:      * page template (and xoopsOption['template_main'] for the content).
382:      *
383:      * @param string $canvasTpl  The canvas template, if different from the theme default
384:      * @param string $pageTpl    The page template, if different from the theme default (unsupported, 2.3+ only)
385:      * @param string $contentTpl The content template
386:      * @param array  $vars       Template variables to send to the template engine
387:      *
388:      * @return bool
389:      */
390:     public function render($canvasTpl = null, $pageTpl = null, $contentTpl = null, $vars = array())
391:     {
392:         if ($this->renderCount) {
393:             return false;
394:         }
395:         $xoops = \Xoops::getInstance();
396:         $xoops->events()->triggerEvent('core.theme.render.start', array($this));
397:         $cache = $xoops->cache($this->headersCacheEngine);
398: 
399:         //Get meta information for cached pages
400:         if ($this->contentCacheLifetime && $this->contentCacheId && $content = $cache->read($this->contentCacheId)) {
401:             //we need to merge metas set by blocks with the module cached meta
402:             $this->htmlHeadStrings = array_merge($this->htmlHeadStrings, $content['htmlHeadStrings']);
403:             foreach ($content['metas'] as $type => $value) {
404:                 $this->metas[$type] = array_merge($this->metas[$type], $content['metas'][$type]);
405:             }
406:             $xoops->setOption('xoops_pagetitle', $content['xoops_pagetitle']);
407:             $xoops->setOption('xoops_module_header', $content['header']);
408:         }
409: 
410:         if ($xoops->getOption('xoops_pagetitle')) {
411:             $this->template->assign('xoops_pagetitle', $xoops->getOption('xoops_pagetitle'));
412:         }
413:         $header = !$xoops->getOption('xoops_module_header')
414:             ? $this->template->getTemplateVars('xoops_module_header')
415:             : $xoops->getOption('xoops_module_header');
416: 
417:         //save meta information of cached pages
418:         if ($this->contentCacheLifetime && $this->contentCacheId && !$contentTpl) {
419:             $content['htmlHeadStrings'] = (array)$this->htmlHeadStrings;
420:             $content['metas'] = (array)$this->metas;
421:             $content['xoops_pagetitle'] = $this->template->getTemplateVars('xoops_pagetitle');
422:             $content['header'] = $header;
423:             $cache->write($this->contentCacheId, $content);
424:         }
425: 
426:         //  @internal : Lame fix to ensure the metas specified in the xoops config page don't appear twice
427:         $old = array('robots', 'keywords', 'description', 'rating', 'author', 'copyright');
428:         foreach ($this->metas['meta'] as $name => $value) {
429:             if (in_array($name, $old)) {
430:                 $this->template->assign("xoops_meta_$name", htmlspecialchars($value, ENT_QUOTES));
431:                 unset($this->metas['meta'][$name]);
432:             }
433:         }
434: 
435:         // We assume no overlap between $GLOBALS['xoopsOption']['xoops_module_header'] and
436:         // $this->template->getTemplateVars( 'xoops_module_header' ) ?
437:         $this->template->assign('xoops_module_header', $this->renderMetas(true) . "\n" . $header);
438: 
439:         if ($canvasTpl) {
440:             $this->canvasTemplate = $canvasTpl;
441:         }
442:         if ($contentTpl) {
443:             $this->contentTemplate = $contentTpl;
444:         }
445:         if (!empty($vars)) {
446:             $this->template->assign($vars);
447:         }
448:         if ($this->contentTemplate) {
449:             $this->content = $this->template->fetch($this->contentTemplate, $this->contentCacheId);
450:         }
451:         if ($this->bufferOutput) {
452:             $this->content .= ob_get_contents();
453:             ob_end_clean();
454:         }
455: 
456:         $this->template->assignByRef('xoops_contents', $this->content);
457: 
458:         // Do not cache the main (theme.html) template output
459:         $this->template->caching = 0;
460:         if (false === (bool)($xoops->getConfig('disable_theme_shortcodes'))) {
461:             $this->template->loadFilter('output', 'shortcodes');
462:         }
463:         $this->template->display($this->path . '/' . $this->canvasTemplate);
464:         $this->renderCount++;
465:         $xoops->events()->triggerEvent('core.theme.render.end', array($this));
466:         return true;
467:     }
468: 
469:     /**
470:      * Load localization information
471:      * Folder structure for localization:
472:      * themes/themefolder/english
473:      *    - main.php - language definitions
474:      *    - style.css - localization stylesheet
475:      *    - script.js - localization script
476:      *
477:      * @param string $type language domain (unused?)
478:      *
479:      * @return array list of 2 arrays, one
480:      */
481:     public function getLocalizationAssets($type = "main")
482:     {
483:         $cssAssets = array();
484:         $jsAssets = array();
485: 
486:         $xoops = \Xoops::getInstance();
487: 
488:         \Xoops\Locale::loadThemeLocale($this);
489: 
490:         $language = \XoopsLocale::getLocale();
491:         // Load global localization stylesheet if available
492:         if (\XoopsLoad::fileExists($xoops->path('locale/' . $language . '/style.css'))) {
493:             $cssAssets[] = $xoops->path('locale/' . $language . '/style.css');
494:         }
495:         //$this->addLanguage($type);
496:         // Load theme localization stylesheet and scripts if available
497:         if (\XoopsLoad::fileExists($this->path . '/locale/' . $language . '/script.js')) {
498:             $jsAssets[] = $this->url . '/locale/' . $language . '/script.js';
499:         }
500:         if (\XoopsLoad::fileExists($this->path . '/locale/' . $language . '/style.css')) {
501:             $cssAssets[] = $this->path . '/locale/' . $language . '/style.css';
502:         }
503:         return array($cssAssets, $jsAssets);
504:     }
505: 
506:     /**
507:      * Load theme specific language constants
508:      *
509:      * @param string $type     language type, like 'main', 'admin'; Needs to be declared in theme xo-info.php
510:      * @param string $language specific language
511:      *
512:      * @return bool|mixed
513:      */
514:     /*
515:     public function addLanguage($type = "main", $language = null)
516:     {
517:         $xoops = \Xoops::getInstance();
518:         $language = is_null($language) ? $xoops->getConfig('locale') : $language;
519:         if (!XoopsLoad::fileExists($file = $xoops->path($this->resourcePath("/locale/{$language}/{$type}.php")))) {
520:             if (!XoopsLoad::fileExists($file = $xoops->path($this->resourcePath("/locale/en_US/{$type}.php")))) {
521:                 return false;
522:             }
523:         }
524:         $ret = include_once $file;
525:         return $ret;
526:     }*/
527: 
528:     /**
529:      * *#@+
530:      * @tasktype 20 Manipulating page meta-information
531:      */
532:     /**
533:      * Adds script code to the document head
534:      * This methods allows the insertion of an external script file (if $src is provided), or
535:      * of a script snippet. The file URI is parsed to take benefit of the theme resource
536:      * overloading system.
537:      * The $attributes parameter allows you to specify the attributes that will be added to the
538:      * inserted <script> tag. If unspecified, the <var>type</var> attribute value will default to
539:      * 'text/javascript'.
540:      * <code>
541:      * // Add an external script using a physical path
542:      * $theme->addScript( 'www/script.js', null, '' );
543:      * $theme->addScript( 'modules/newbb/script.js', null, '' );
544:      * // Specify attributes for the <script> tag
545:      * $theme->addScript( 'mod_xoops_SiteManager#common.js', array( 'type' => 'application/x-javascript' ), '' );
546:      * // Insert a code snippet
547:      * $theme->addScript( null, array( 'type' => 'application/x-javascript' ), 'window.open("Hello world");' );
548:      * </code>
549:      *
550:      * @param string $src        path to an external script file
551:      * @param array  $attributes hash of attributes to add to the <script> tag
552:      * @param string $content    Code snippet to output within the <script> tag
553:      *
554:      * @return void
555:      */
556:     public function addScript($src = '', $attributes = array(), $content = '')
557:     {
558:         $xoops = \Xoops::getInstance();
559:         if (empty($attributes)) {
560:             $attributes = array();
561:         }
562:         if (!empty($src)) {
563:             $src = $xoops->url($this->resourcePath($src));
564:             $attributes['src'] = $src;
565:         }
566:         if (!empty($content)) {
567:             $attributes['_'] = $content;
568:         }
569:         if (!isset($attributes['type'])) {
570:             $attributes['type'] = 'text/javascript';
571:         }
572:         $this->addMeta('script', $src, $attributes);
573:     }
574: 
575:     /**
576:      * Add StyleSheet or CSS code to the document head
577:      *
578:      * @param string|null $src        path to .css file
579:      * @param array|null  $attributes name => value paired array of attributes such as title
580:      * @param string      $content    CSS code to output between the <style> tags (in case $src is empty)
581:      *
582:      * @return void
583:      */
584:     public function addStylesheet($src = '', $attributes = array(), $content = '')
585:     {
586:         $xoops = \Xoops::getInstance();
587:         if (empty($attributes)) {
588:             $attributes = array();
589:         }
590:         if (!empty($src)) {
591:             $src = $xoops->url($this->resourcePath($src));
592:             $attributes['href'] = $src;
593:         }
594:         if (!isset($attributes['type'])) {
595:             $attributes['type'] = 'text/css';
596:         }
597:         if (!empty($content)) {
598:             $attributes['_'] = $content;
599:         }
600:         $this->addMeta('stylesheet', $src, $attributes);
601:     }
602: 
603:     /**
604:      * addScriptAssets - add a list of scripts to the page
605:      *
606:      * @param array  $assets  list of source files to process
607:      * @param string $filters comma separated list of filters
608:      * @param string $target  target path, will default to assets directory
609:      *
610:      * @return void
611:      */
612:     public function addScriptAssets($assets, $filters = 'default', $target = null)
613:     {
614:         $url = $this->assets->getUrlToAssets('js', $assets, $filters, $target);
615:         $this->addScript($url);
616:     }
617: 
618:     /**
619:      * addStylesheetAssets - add a list of stylesheets to the page
620:      *
621:      * @param string[] $assets  list of source files to process
622:      * @param string   $filters comma separated list of filters
623:      * @param string   $target  target path, will default to assets directory
624:      *
625:      * @return void
626:      */
627:     public function addStylesheetAssets($assets, $filters = 'default', $target = null)
628:     {
629:         $url = $this->assets->getUrlToAssets('css', $assets, $filters, $target);
630:         $this->addStylesheet($url);
631:     }
632: 
633:     /**
634:      * addBaseAssets - add a list of assets to the page, these will all
635:      * be combined into a single asset file at render time
636:      *
637:      * @param string $type   type of asset, i.e. 'css' or 'js'
638:      * @param array  $assets list of source files to process
639:      *
640:      * @return void
641:      */
642:     public function addBaseAssets($type, $assets)
643:     {
644:         if (is_scalar($assets)) {
645:             $this->baseAssets[$type][]=$assets;
646:         } elseif (is_array($assets)) {
647:             $this->baseAssets[$type] = array_merge($this->baseAssets[$type], $assets);
648:         }
649:     }
650: 
651:     /**
652:      * addBaseScriptAssets - add a list of scripts to the page
653:      *
654:      * @param array $assets list of source files to process
655:      *
656:      * @return void
657:      */
658:     public function addBaseScriptAssets($assets)
659:     {
660:         $this->addBaseAssets('js', $assets);
661:     }
662: 
663:     /**
664:      * addBaseStylesheetAssets - add a list of stylesheets to the page
665:      *
666:      * @param array $assets list of source files to process
667:      *
668:      * @return void
669:      */
670:     public function addBaseStylesheetAssets($assets)
671:     {
672:         $this->addBaseAssets('css', $assets);
673:     }
674: 
675:     /**
676:      * setNamedAsset - Add an asset reference to the asset manager.
677:      * The specified asset will be added to the asset manager with the specified
678:      * name. As an example:
679:      *
680:      *   $theme->setNamedAsset('aacss','module/aa/assets/css/*.css');
681:      *
682:      * This will create an asset reference which can be added using other asset
683:      * functions, such as:
684:      *
685:      *   $theme->addBaseStylesheetAssets('@aacss');
686:      *
687:      * Additional custom filters can be specified for the named asset if needed.
688:      *
689:      * @param string $name    the name of the reference to be added
690:      * @param mixed  $assets  a string asset path, or an array of asset paths, may include wildcard
691:      * @param string $filters comma separated list of filters
692:      *
693:      * @return boolean true if asset registers, false on error
694:      */
695:     public function setNamedAsset($name, $assets, $filters = null)
696:     {
697:         return $this->assets->registerAssetReference($name, $assets, $filters);
698:     }
699: 
700:     /**
701:      * Add a <link> to the header
702:      *
703:      * @param string $rel        Relationship from the current doc to the anchored one
704:      * @param string $href       URI of the anchored document
705:      * @param array  $attributes Additional attributes to add to the <link> element
706:      *
707:      * @return void
708:      */
709:     public function addLink($rel, $href = '', $attributes = array())
710:     {
711:         if (empty($attributes)) {
712:             $attributes = array();
713:         }
714:         if (!empty($href)) {
715:             $attributes['href'] = $href;
716:         }
717:         $attributes['rel'] = $rel;
718:         $this->addMeta('link', '', $attributes);
719:     }
720: 
721:     /**
722:      * Set a meta http-equiv value
723:      *
724:      * @param string $name  meta tag name
725:      * @param null   $value meta tag value
726:      *
727:      * @return string|false
728:      */
729:     public function addHttpMeta($name, $value = null)
730:     {
731:         if (isset($value)) {
732:             return $this->addMeta('http', $name, $value);
733:         }
734:         unset($this->metas['http'][$name]);
735:         return false;
736:     }
737: 
738:     /**
739:      * Change output page meta-information
740:      *
741:      * @param string $type  type
742:      * @param string $name  name
743:      * @param string $value value
744:      *
745:      * @return string
746:      */
747:     public function addMeta($type = 'meta', $name = '', $value = '')
748:     {
749:         if (!isset($this->metas[$type])) {
750:             $this->metas[$type] = array();
751:         }
752:         if (!empty($name)) {
753:             $this->metas[$type][$name] = $value;
754:         } else {
755:             $this->metas[$type][md5(serialize(array($value)))] = $value;
756:         }
757:         return $value;
758:     }
759: 
760:     /**
761:      * XoopsTheme::headContent()
762:      *
763:      * @param mixed  $params  unused
764:      * @param string $content content
765:      * @param mixed  $smarty  unused
766:      * @param bool   $repeat  repeat
767:      *
768:      * @return void
769:      */
770:     public function headContent($params, $content, &$smarty, &$repeat)
771:     {
772:         if (!$repeat) {
773:             $this->htmlHeadStrings[] = $content;
774:         }
775:     }
776: 
777:     /**
778:      * XoopsTheme::renderMetas()
779:      *
780:      * @param bool $return true to return as string, false to echo
781:      *
782:      * @return bool|string
783:      */
784:     public function renderMetas($return = false)
785:     {
786:         $str = '';
787: 
788:         if (!empty($this->baseAssets['js'])) {
789:             $url = $this->assets->getUrlToAssets('js', $this->baseAssets['js']);
790:             if (!empty($url)) {
791:                 $str .= '<script src="' . $url . '" type="text/javascript"></script>'."\n";
792:             }
793:         }
794: 
795:         if (!empty($this->baseAssets['css'])) {
796:             $url = $this->assets->getUrlToAssets('css', $this->baseAssets['css']);
797:             if (!empty($url)) {
798:                 $str .= '<link rel="stylesheet" href="' . $url . '" type="text/css" />'."\n";
799:             }
800:         }
801: 
802:         foreach (array_keys($this->metas) as $type) {
803:             $str .= $this->renderMetasByType($type);
804:         }
805:         $str .= implode("\n", $this->htmlHeadStrings);
806: 
807:         if ($return) {
808:             return $str;
809:         }
810:         echo $str;
811:         return true;
812:     }
813: 
814:     /**
815:      * XoopsTheme::renderMetasByType() render the specified metadata type
816:      *
817:      * @param string $type type to render
818:      *
819:      * @return string
820:      */
821:     public function renderMetasByType($type)
822:     {
823:         if (!isset($type)) {
824:             return '';
825:         }
826: 
827:         $str = '';
828:         switch ($type) {
829:             case 'script':
830:                 foreach ($this->metas[$type] as $attrs) {
831:                     $str .= "<script" . $this->renderAttributes($attrs) . ">";
832:                     if (@$attrs['_']) {
833:                         $str .= "\n//<![CDATA[\n" . $attrs['_'] . "\n//]]>";
834:                     }
835:                     $str .= "</script>\n";
836:                 }
837:                 break;
838:             case 'link':
839:                 foreach ($this->metas[$type] as $attrs) {
840:                     $rel = $attrs['rel'];
841:                     unset($attrs['rel']);
842:                     $str .= '<link rel="' . $rel . '"' . $this->renderAttributes($attrs) . " />\n";
843:                 }
844:                 break;
845:             case 'stylesheet':
846:                 foreach ($this->metas[$type] as $attrs) {
847:                     if (@$attrs['_']) {
848:                         $str .= '<style' . $this->renderAttributes($attrs)
849:                             . ">\n/* <![CDATA[ */\n" . $attrs['_'] . "\n/* //]]> */\n</style>";
850:                     } else {
851:                         $str .= '<link rel="stylesheet"' . $this->renderAttributes($attrs) . " />\n";
852:                     }
853:                 }
854:                 break;
855:             case 'http':
856:                 foreach ($this->metas[$type] as $name => $content) {
857:                     $str .= '<meta http-equiv="' . htmlspecialchars($name, ENT_QUOTES) . '" content="'
858:                         . htmlspecialchars($content, ENT_QUOTES) . "\" />\n";
859:                 }
860:                 break;
861:             default:
862:                 foreach ($this->metas[$type] as $name => $content) {
863:                     $str .= '<meta name="' . htmlspecialchars($name, ENT_QUOTES) . '" content="'
864:                         . htmlspecialchars($content, ENT_QUOTES) . "\" />\n";
865:                 }
866:                 break;
867:         }
868: 
869:         return $str;
870:     }
871: 
872:     /**
873:      * Generates a unique element ID
874:      *
875:      * @param string $tagName tag
876:      *
877:      * @return string
878:      */
879:     public function genElementId($tagName = 'xos')
880:     {
881:         static $cache = array();
882:         if (!isset($cache[$tagName])) {
883:             $cache[$tagName] = 1;
884:         }
885:         return $tagName . '-' . $cache[$tagName]++;
886:     }
887: 
888:     /**
889:      * Transform an attributes collection to an XML string
890:      *
891:      * @param array $coll collection of attributes
892:      *
893:      * @return string
894:      */
895:     public function renderAttributes($coll)
896:     {
897:         $str = '';
898:         foreach ($coll as $name => $val) {
899:             if ($name !== '_') {
900:                 $str .= ' ' . $name . '="' . htmlspecialchars($val, ENT_QUOTES) . '"';
901:             }
902:         }
903:         return $str;
904:     }
905: 
906:     /**
907:      * Return a themable file resource path
908:      *
909:      * @param string $path file path
910:      *
911:      * @return string
912:      */
913:     public function resourcePath($path)
914:     {
915:         if (substr($path, 0, 1) === '/') {
916:             $path = substr($path, 1);
917:         }
918:         $xoops_root_path = \XoopsBaseConfig::get('root-path');
919: //\Xoops::getInstance()->events()->triggerEvent('debug.log', $this);
920:         if (\XoopsLoad::fileExists($xoops_root_path . "/{$this->themesPath}/{$this->folderName}/{$path}")) {
921: //\Xoops::getInstance()->events()->triggerEvent('debug.log', "custom theme path {$this->themesPath}/{$this->folderName}/{$path}");
922:             return "{$this->themesPath}/{$this->folderName}/{$path}";
923:         }
924: 
925:         if (\XoopsLoad::fileExists($xoops_root_path . "/themes/{$this->folderName}/{$path}")) {
926: //\Xoops::getInstance()->events()->triggerEvent('debug.log', "main theme folder themes/{$this->folderName}/{$path}");
927:             return "themes/{$this->folderName}/{$path}";
928:         }
929: //\Xoops::getInstance()->events()->triggerEvent('debug.log', "drop thru {$path}");
930:         return $path;
931:     }
932: }
933: 
API documentation generated by ApiGen