Admidio API
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo

Packages

  • com
    • tecnick
      • tcpdf
  • None
  • PHPMailer
    • easypeasyics
  • PHPWavUtils
  • Securimage
    • classes

Classes

  • AutoLogin
  • Component
  • ComponentUpdate
  • ConditionParser
  • Database
  • DateTimeExtended
  • Email
  • Folder
  • FormValidation
  • FunctionClass
  • Htaccess
  • HtmlDiv
  • HtmlElement
  • HtmlForm
  • HtmlFormBasic
  • HtmlFormInstallation
  • HtmlList
  • HtmlNavbar
  • HtmlPage
  • HtmlTable
  • HtmlTableBasic
  • Image
  • Inventory
  • InventoryFields
  • Language
  • LanguageData
  • ListConfiguration
  • Menu
  • Message
  • ModuleAnnouncements
  • ModuleDates
  • ModuleLists
  • ModuleMenu
  • ModuleMessages
  • Modules
  • ModuleWeblinks
  • MyFiles
  • Navigation
  • ntlm_sasl_client_class
  • Organization
  • Participants
  • PasswordHash
  • PasswordHashing
  • ProfileFields
  • RoleDependency
  • RolesRights
  • RSSfeed
  • Session
  • SystemMail
  • TableAccess
  • TableAnnouncement
  • TableCategory
  • TableDate
  • TableFile
  • TableFolder
  • TableGuestbook
  • TableGuestbookComment
  • TableInventory
  • TableInventoryField
  • TableLists
  • TableMembers
  • TableMessage
  • TablePhotos
  • TableRoles
  • TableRooms
  • TableText
  • TableUserField
  • TableUsers
  • TableWeblink
  • UploadHandlerDownload
  • UploadHandlerPhoto
  • User
  • UserRegistration

Exceptions

  • AdmException
  • WavFileException
  • WavFormatException

Functions

  • admFuncAutoload
  • admFuncGeneratePagination
  • admFuncGetBytesFromSize
  • admFuncGetDirectoryEntries
  • admFuncMaxUploadSize
  • admFuncProcessableImageSize
  • admFuncShowCreateChangeInfoById
  • admFuncShowCreateChangeInfoByName
  • admFuncVariableIsValid
  • admReadTemplateFile
  • admStrIsValidFileName
  • admStrStripTagsSpecial
  • admStrToLower
  • admStrToUpper
  • bzip2Version
  • checkDatabaseVersion
  • checkPhpVersion
  • EmailAttachment
  • FileSizeNiceDisplay
  • FormattedTimeRemaining
  • FunctionIsDisabled
  • getFormerRolesFromDatabase
  • getFutureRolesFromDatabase
  • getmicrotime
  • getRoleMemberships
  • getRolesFromDatabase
  • gzipVersion
  • hasRole
  • hl_attrval
  • hl_bal
  • hl_cmtcd
  • hl_ent
  • hl_prot
  • hl_regex
  • hl_spec
  • hl_tag
  • hl_tag2
  • hl_tidy
  • hl_version
  • htmLawed
  • HTMLFilter
  • isGroupLeader
  • isMember
  • kses
  • kses_hook
  • MySQLdumpVersion
  • OutputInformation
  • SafeExec
  • showNotice
  • strAddSlashesDeep
  • strNextLetter
  • strStripSlashesDeep
  • strStripTags
  • strValidCharacters
  • tln_body2div
  • tln_casenormalize
  • tln_deent
  • tln_defang
  • tln_findnxreg
  • tln_findnxstr
  • tln_fixatts
  • tln_fixstyle
  • tln_fixurl
  • tln_getnxtag
  • tln_sanitize
  • tln_skipspace
  • tln_tagprint
  • tln_unspace
  • version_compare_replacement
  • version_compare_replacement_sub

Class Message

Copyright: 2004-2016 The Admidio Team
License: GNU General Public License v2.0 only **********************************************************************************************
Brief:

Simple presentation of messages to the user

This class creates a new html page with a simple headline and a message. It's designed to easily integrate this class into your code. An object @b $gMessage of this class is created in the common.php. You can set a url that should be open after user confirmed the message or you can show a question with two default buttons yes and no. There is also an option to automatically leave the message after some time.


Class: Message
Code:

// show a message with a back button, the object $gMessage is created in common.php $gMessage->show($gL10n->get('SYS_MESSAGE_TEXT_ID'));

// show a message and set a link to a page that should be shown after user click ok $gMessage->setForwardUrl('http://www.example.de/mypage.php'); $gMessage->show($gL10n->get('SYS_MESSAGE_TEXT_ID'));

// show a message with yes and no button and set a link to a page that should be shown after user click yes $gMessage->setForwardYesNo('http://www.example.de/mypage.php'); $gMessage->show($gL10n->get('SYS_MESSAGE_TEXT_ID')); @endcode


Par: Examples
Located at message.php

Methods summary

public
# __construct( )

Constructor that initialize the class member parameters

Constructor that initialize the class member parameters

public
# hideButtons( )

No button will be shown in the message window.

No button will be shown in the message window.

public
# showInModaleWindow( )

If this is set to true than the message will be show with html of the bootstrap modal window.

If this is set to true than the message will be show with html of the bootstrap modal window.

public
# setForwardUrl( string $url, integer $timer = 0 )

Set a URL to which the user should be directed if he confirmed the message. It's possible to set a timer after that the page of the url will be automatically displayed without user interaction.

Set a URL to which the user should be directed if he confirmed the message. It's possible to set a timer after that the page of the url will be automatically displayed without user interaction.

Parameters

$url
The full url to which the user should be directed.
$timer
Optional a timer in millisecond after the user will be automatically redirected to the $url.
public
# setForwardYesNo( string $url )

Add two buttons with the labels @b yes and @b no to the message. If the user choose yes he will be redirected to the $url. If he chooses no he will be directed back to the previous page.

Add two buttons with the labels @b yes and @b no to the message. If the user choose yes he will be redirected to the $url. If he chooses no he will be directed back to the previous page.

Parameters

$url
The full url to which the user should be directed if he chooses @b yes.
public
# show( string $content, string $headline = '' )

Create a html page if necessary and show the message with the configured buttons.

Create a html page if necessary and show the message with the configured buttons.

Parameters

$content
The message text that should be shown. The content could have html.
$headline
Optional a headline for the message. Default will be SYS_NOTE.
public
# showHtmlTextOnly( boolean $showText )

If this will be set then only the text message will be shown. If this message contains html elements then these will also be shown in the output.

If this will be set then only the text message will be shown. If this message contains html elements then these will also be shown in the output.

Parameters

$showText
If set to true than only the message text with their html elements will be shown.
public
# showThemeBody( boolean $showTheme )

If set no theme files will be integrated in the page. This setting is useful if the message should be loaded in a small window.

If set no theme files will be integrated in the page. This setting is useful if the message should be loaded in a small window.

Parameters

$showTheme
If set to true than theme body and header will be shown. Otherwise this will be hidden.
public
# showTextOnly( boolean $showText )

If this will be set then no html elements will be shown in the output, only pure text. This is useful if you have a script that is used in ajax mode.

If this will be set then no html elements will be shown in the output, only pure text. This is useful if you have a script that is used in ajax mode.

Parameters

$showText
If set to true than only the message text without any html will be shown.

Properties summary

private $inline
#
private $forwardUrl
#
private $timer
#
private $includeThemeBody
#
private $showTextOnly
#
private $showHtmlTextOnly
#
private $showButtons
#
private $showYesNoButtons
#
private $modalWindowMode
#
Admidio API API documentation generated by ApiGen