Introduction
Server Platform
Application Server
Content Generation
Class Library API
   Runtime System
   WebServer
   Process
   Database
   Page
   Context
   Elements
   Templates
   Menu
   User
   CGI
   Form
   Table
   TreeAdmin
   DirectoryTree
   Application
Manual Index

next | previous

Maxscape::Page Package

Member Functions

  1. AttributeParameter
  2. canBeEditedBy
  3. Category
  4. CategoryName
  5. CGI
  6. changeElementContentWidget
  7. changePageElement
  8. checkPageElementPermission
  9. checkUploadFileName
  10. clipString
  11. completeContentTypeString
  12. ContactWidget
  13. ContentType
  14. Context
  15. createPage
  16. CreationTime
  17. CreationTimeAsString
  18. decodeCategoryName
  19. decodeText
  20. defaultElementCallback
  21. defineDataVariables
  22. deleteMemberAccount
  23. deleteSecurityCodeImages
  24. displayNodeElement
  25. displayNodeElements
  26. DisplayPageByFormSelectGroup
  27. displayPageTree
  28. displayPath
  29. displayPathElement
  30. Document
  31. editElementContentByPageNumberElementName
  32. editPageElementPermission
  33. editPageElementsInlineMenu
  34. editPageElementsInlineMenuLink
  35. ElementAttribute
  36. ElementAttributes
  37. ElementContent
  38. ElementName
  39. ElementPageNumber
  40. ElementTableName
  41. encodeCategoryName
  42. escapeXML
  43. evalText
  44. evaluateTemplate
  45. executeCallback
  46. executeElementCallbacks
  47. executeFunction
  48. executeObject
  49. Exists
  50. FileAnchor
  51. finalFilter
  52. finalFilterSet
  53. Flash_mp3player
  54. generateCGI_TemplatePage
  55. generateDatabaseTemplatePage
  56. generateSecurityCode
  57. getElements
  58. HelpLink
  59. HelpLinkTopMenu
  60. HelpMenuLinks
  61. HierarchyPathElementQuery
  62. href
  63. HTML_encode
  64. HTML_Table
  65. HTTP_HeaderCallback
  66. HyperLink
  67. IndexOfElement
  68. initPageMenu
  69. initTemplatePage
  70. insertElement
  71. interpreteText
  72. Language
  73. LanguageQuery
  74. LanguageSelectWidget
  75. lastModificationTime
  76. lastModificationTimeAsString
  77. Link
  78. LoginRegisterWidget
  79. lookupPageElements
  80. lookupTemplate
  81. makeObject
  82. Maxscript
  83. Me
  84. MemberHomeDirectory
  85. MemberHomePath
  86. MemberMayNotEditPage
  87. MemberName
  88. MessageFormHandler
  89. MessageToUser
  90. MetaData
  91. MetaDataAttribute
  92. mxsAnchor
  93. mxsImage
  94. mxsLink
  95. new
  96. newForm
  97. niceCharacters
  98. niceUnicode_UTF8_CharacterSet
  99. NodeCounterName
  100. NodeNumberToNodePath
  101. NodePathToNumber
  102. NodeToTableName
  103. NodeType
  104. NumberOfElements
  105. openBrowserWindow
  106. Page
  107. PageGroup
  108. PageGroupIsIn
  109. PageName
  110. PageNumber
  111. PageOwner
  112. PagePath
  113. PagePathToPageNumber
  114. PageTildePath
  115. PageTree
  116. PageTreeDocumentRoot
  117. PageType
  118. PageUserGroups
  119. PageUserGroupsAsString
  120. PageValuesByPageNumber
  121. PageValuesByPagePath
  122. PageViewerIsOwner
  123. ParentCategory
  124. ParentCategoryPath
  125. parsedDatabaseFile
  126. parseEmbperl
  127. parseText
  128. PathDepth
  129. plainPagePath
  130. popParentCategory
  131. printElements
  132. printGermanEnglish
  133. ProfileEditorFrames
  134. PulldownMenu
  135. pushCGI_QueryParameter
  136. reportBugLink
  137. resizeImage
  138. search
  139. searchCategories
  140. SearchStringToRegexp
  141. selectElements
  142. ServerGlobalElementCallback
  143. setCursor
  144. setLanguage
  145. setRootCategoryContext
  146. setTextareaSize
  147. setTextEncoding
  148. showInterestGroups
  149. simpleColorTable
  150. simpleElementLoop
  151. simpleSearch
  152. SongListToJavacript
  153. splitPath
  154. standardTemplateElementCallback
  155. standardTemplateLoop
  156. storeFormVariables
  157. TemplateAttribute
  158. TemplateContent
  159. TemplateContentWidget
  160. TemplateMainNumber
  161. TemplateName
  162. TemplateType
  163. traversePageOutputFunction
  164. URL_decode
  165. URL_encode
  166. User
  167. UserElementLoop
  168. UserTemplateElementCallback

Synopsis

use Maxscape::Page;

Description

The Maxscape::Page package provides the functionality to deal with the Node Tree stored in the Content Database. The run time system creates a $Page object by default. Because all content is generated within the scope of this class, the $Page object can be used within applications to access and manipulate the content generation.

Examples

# Runtime system:
  ...
  my $Page = Maxscape::Page->new (Context => $Context, Cursor => $DB);
  ...
# Example application code:
  ...
  if ($Page->CGI->Query ('Category')) {
    return $Page->ElementContent (Name => 'Form.button', Type => 'parsed');
  }
  ...
# Runtime system:
  ...
  my $Content = $Page->Document; 
  ...

new

Synopsis

my $Page = Maxscape::Page->new (Context  => $Context,
                                Response => $Response,
                                Request  => $Request,
                                CGI      => $CGI,
                                User     => $User,
                                Cursor   => $DB,
                                # ...
);

Description

Creates a new $Page object. It takes several objects, e.g. the $Context, $Response, $Request, $CGI and $User objects as parameters. Because these objects are defined by the run time system, mostly there is no need to create them within applications.
For programming convenience the references to the $CGI and the $User objects of the $Context object are copied to the $self pointer of the $Page object. So, you may say: $Page->CGI instead of $Page->Context->CGI, for example.

Document

Synopsis

my $DocumentContent = $Page->Document(); 

Description

The Document method generates the content of a page. Because applications are executed within its scope, the $Page object is inherited and can be used to access the $Page variables and methods within application objects.
At first, an application defined initial document callback function can be inserted into the generation loop. This is configured via the $::WebServer->{"Page.initialPageGenerationCallback"} variable. The callback can be used to initialy set up the document generation process or to implement application defined generation types (PageType). If the return code of the function is set, the returned text is send to the client and no further content is generated by the server runtime system.
The Document method distinguishes the generation types (PageType) implemented by the server. For each type an own page generation function is called, to implement the special processing sequence. At several stages further callbacks can be pluged into generation process.

Context

Synopsis

my $Context = $Page->Context;

Description

Returns the pages $Context object. It is a convenience function to access a pages context object $Page->{Context} via a function call.

Examples




User

Synopsis

my $User = $Page->User;

Description

Returns the pages $User object. It is a convenience function to access a pages user object $Page->{User} via a function call.

Examples

my $QueryString = $Page->User->UserId eq 'Public' ? '' : '&View=closeFrames';

CGI

Synopsis

my $CGI = $Page->CGI;

Description

Returns the pages $CGI object. It is a convenience function to access a pages CGI object $Page->{CGI} via a function call.

Examples

my $Lang = $Page->CGI->{Language};

executeCallback

Synopsis

my ($Text, $ReturnState) = $Page->executeCallback ($Object, $Function,
                                                   @Parameter);

Description

If the functions first parameter is not defined ('undef'), it takes a name of a global function and executes that function. The @Parameter parameter is passed then to this function. If this parameter is not given, the actual $Page object is passed to the called callback function, as the first parameter.

Examples

my ($CallbackText, $ReturnState) = $Page->executeCallback(undef, $FunctionName);
if ($ReturnState) {
  return $CallbackText;
} else {
  $Text = $CallbackText;
}

initTemplatePage

Synopsis

my $TemplateGenerationFunction = $Page->initTemplatePage ($PageType, $TemplateType);

Description

Initializes a template page.

generateCGI_TemplatePage

Synopsis

$Text = $Page->generateCGI_TemplatePage ($TemplateType, $TemplateGenFunction );

Description

The generateCGI_TemplatePage method implements the servers default CGI-Template generation type. The function uses the following strategie:

1. Lookup the page elements and execute a callback for each element
2. Call a page generation function to actualy generate the content
The classes PageStandardSkeleton member function is called by default, if no template generation callback function ($TemplateGenerationFunction) was passed to the function call. Within the runtime system, the callback may be configured via the global $::WebServer object configuration.

generateDatabaseTemplatePage

Synopsis

my $Text = $Page->generateDatabaseTemplatePage ($TemplateType,
                                                $TemplateGenerationFunction);

Description

The generateDatabaseTemplatePage method implements the servers default DB-Template generation type. The function uses the following strategie:

1. Lookup elements
Lookup the page elements and execute a callback for each element.

2. Lookup templates
Call a page generation function to actualy generate the content lookup the page templates and execute a callback for each template element.

3. Execute the template generation callback
Call a page generation function to actualy generate the content

The plainTemplate and the ElementTemplate template types are provided by default. To implement other template types a template generation callback function ($TemplateGenerationFunction) may passed to the function call. Within the runtime system, this has to be configured via the '$::WebServer' object's configuration.

parsedDatabaseFile

Synopsis

my $Text = $Page->parsedDatabaseFile ();

Description

The parsedDatabaseFile method implements the servers default parsedDatabaseFile generation type. A parsedDatabaseFile is a piece of text that is parsed and evaluated by the Perl interpreter.

HierarchyPathElementQuery

Synopsis

my $HierarchyPathToElementQuery = $Page->HierarchyPathElementQuery (
                                    $Context->{PageHierarchy});

Description

Constructs a page hierarchy query.

LanguageQuery

Synopsis

my ($LanguageColumn, $LanguageQuery) = $Page->LanguageQuery($TableName); 

Description

Queries the Content Database for the language.

lookupPageElements

Synopsis

$Text = $Page->lookupPageElements();

Description

This subroutine fetches the page elements from the ELEMENTS database table. After each record fetch, element callback functions may be called. Callbacks are configured in the $::WebServer configuration and pluged in via the application plugin.
The callbacks are executed in the following order: default, server, process, template.

executeElementCallbacks

Synopsis

$ElementText = $Page->executeElementCallbacks;

Description

Executes the defined element callbacks for each element.

defaultElementCallback

Synopsis

my $ElementText = $Page->defaultElementCallback($Element);

Description

The classes default element callback function. The function is executed by the run time system, if the global $::WebServer objects 'Element.Callback.default' entry is set.

lookupTemplate

Synopsis

$Text = $Page->lookupTemplate();

Description

The runtime system default function to fetch the template elements from the content database.

evaluateTemplate

Synopsis

$Text = $Page->evaluateTemplate();

Description

The runtime system default function to generate a template page.

setCursor

Synopsis

$Page->setCursor ($Cursor);

Description

Sets the current pages cursor ($Page->{Cursor}) to the taken cursor.

newForm

Synopsis

my $Form = $Page->newForm ();

Description

Creates a new Form object.

pushCGI_QueryParameter

Synopsis

$Page->pushCGI_QueryParameter ();

Description

Pushes a CGI variable onto the %CGI_QueryParameter stack, to be used in the mxsLink method.

Link

Synopsis

my $HyperLink = $Page->Link ( %P );

Description

Creates an HTML hyperlink.

Examples

my $Link = $Page->Link ( HREF        => '',
                         Text        => '',
                         Target      => '',
                         Title       => '',
                         Query       => [
                           Query1            => '',
                           ...               => '',
                           QueryN            => '',
                         ],
                         Attributes  => [ 
                           Attribute1        => '',
                           ...               => '',
                           AttributeN        => '',     
                         ]);
);

mxsLink

Synopsis

my $maxscapeLink = $Page->mxsLink ( %P );

Description

Creates a Maxscape HTML hyperlink.

Examples

my $maxscapeLink = $Page->mxsLink (
                            Sheme       => '',
                            Port        => '',
                            Process     => '',
                            Category    => '',
                            Page        => '',
                            Text        => '',
                            Target      => '',
                            QueryString => '',
                            Style       => '',
                            CSS_Class   => '',
                            CSS_ID      => '',
                            Title       => '',
                            Query       => [
                              Query1        => 'show',
                              ...           => $PropertyClass,
                              QueryN        => $PropertyParentPath,
                            ],
                            Attributes  => [ 
                              Attribute1    => '',
                              ...           => '',
                              AttributeN    => '',     
                            ]
);
# embedded link
@{[
  $Page->mxsLink (Category => '', Page => '',
    Text        => '',
    StatusLine  => '',
  )
]}

HelpLinkTopMenu

Synopsis

my $HelpLinkTopMenu = $Page->HelpLinkTopMenu ( %P )

Description

Opens a help page in a browser tab or window.

Examples

$HelpLinkTopMenu = $Page->HelpLinkTopMenu (
    Name         => '',
    Process      => '',
    Category     => '',
    Page         => '',
    StatusLine   => '',
    Text         => '',
    Style        => '',
    StatusLine   => '',
    WindowParameter => "resizable=yes,scrollbars=yes,toolbar=no"
            . ",menubar=no,width=600,height=450,top=140,left=200",
  )

openBrowserWindow

Synopsis

my $openBrowserWindowLink = $Page->openBrowserWindow ( %P )

Description

Opens a browser window.

Examples

$openBrowserWindowLink = $Page->openBrowserWindow (
    Name         => '',
    Process      => '',
    Category     => '',
    Page         => '',
    StatusLine   => '',
    Text         => '',
    Style        => '',
    StatusLine   => '',
    WindowParameter => "resizable=yes,scrollbars=yes,toolbar=no"
            . ",menubar=no,width=600,height=450,top=140,left=200",
  )
# embedded link
@{[
  $Page->openBrowserWindow (
    Name         => 'Music',
    Category     => '',
    Page         => '',
    StatusLine   => '',
    Text         => 'Music',
    Style        => '',
    StatusLine   => '',
    WindowParameter => "resizable=yes,scrollbars=yes,toolbar=no,menubar=no,"
      . "width=600,height=$Page->{Layout}{WindowHeight},top=$Page->{Layout}{WindowTop},left=200",
  )
]}

mxsImage

Synopsis

my $ImageLink = $Page->mxsImage ( %P );

Description

Maxscape style image.

Examples

my $ImageLink = $Page->mxsImage (
  Process      => '',
  src          => '/Images/Help.gif',
  width        => 20,
  height       => 20,
  alt          => 'Help',
  title        => $self->ElementContent(Name => 'Help'),
  border       => 0,
  #align="Ausrichtung" hspace="10" vspace="10">
);

resizeImage

Synopsis

$Page->resizeImage ( maxSize => 250, UserId => $UserId, Type => $ProfileType );

Description

Resizes an image using the GD library.

checkUploadFileName

Synopsis

my $ErrorMessage = $Page->checkUploadFileName ( FileName => $FileName );

Description

Checks the file name of an uploaded file.

Examples

my %MimeTypes = ('png' => 'image/png',
                 'gif' => 'image/gif',
                 'jpeg' => 'image/jpeg',
                 'jpg' => 'image/jpeg',
                 'bmp' => 'image/bmp',
                );
$Error = $Page->checkUploadFileName(FileName => $PictureName, MimeTypes => \%MimeTypes, );
if ($Error)
{
  return qq(

$ErrorMessage

); }

mxsAnchor

Synopsis

my $AnchorText = $Page->mxsAnchor ( %P );

Description

Creates an HTML link.

Examples

 $AnchorText = $Page->mxsAnchor (
  Process      => $p{Process},
  Sheme        => $p{Sheme},
  Port         => $p{Port},
  Page         => $p{Page},
  Category     => $p{Category},
  Target       => $p{Target},
  Text         => $p{Text},
  QueryString  => $p{QueryString},
);

HyperLink

Synopsis

$HyperLink = $Page->HyperLink ( %P );

Description

Creates an HTML hyperlink.

Examples

@{[ $Page->HyperLink(
      Process      => $Process,
      Method       => $Method,
      Page         => $Page,
      Category     => $Category,
      QueryString  => $QueryString,
      Text         => $Text
    )
]}

href

Synopsis

$HyperLink = $Page->href ();

Description

Creates an HTML hyperlink by href.

Examples

@{[ $Page->href (qq(http://ApplicationServer.com/@@{[ $Page->User->UserId ]}), 'Tab',) ]}

FileAnchor

Synopsis

my $AnchorText = $Page->Anchor ( %P );

Description

Returns an anchor to a file.

Examples

$AnchorText = $Page->Anchor (
  Sheme        => $p{Sheme},
  Port         => $p{Port},
  Path         => $p{Path},
  Text         => $p{Text},
);

NodeCounterName

Synopsis

my $NodeCounterName = $Page->NodeCounterName ($NodeType);

Description

Returns the node counter name for this node type (PageCounter, CategoryCounter, TemplateCounter).

PageValuesByPageNumber

Synopsis

$PageData = $Page->PageValuesByPageNumber ($PageNumber, $QueryColumns, $Cursor);

Description

Asks the database for the page values of a page.

Examples

$PageData = $Page->PageValuesByPageNumber ($PageNumber, $QueryColumns);

my $Category = ${PageData}{NODE_CATEGORY};
my $Page     = ${PageData}{NODE_NAME};

NodePathToNumber

Synopsis

my $PageNumber = $Page->NodePathToNumber ($PageCategory, $PageName, $NodeType);

Description

Asks the database for the $PageNumber of a node. If the $NodeType is ommitted 'Document' is assumed.

Exists

Synopsis

my $PageNumber = $Page->Exists ($PageCategory, $PageName, $NodeType);

Description

Asks the database for the $PageNumber of a page. If the $NodeType is ommitted 'Document' is assumed.

PagePathToPageNumber

Synopsis

my ($PageNumber, $NodeType, $PageGeneration) =
      $Page->PagePathToPageNumber ($PageCategory, $PageName, $NodeType);

Description

Asks the database for the '$PageNumber, $NodeType, $PageGeneration' of a page.

NodeNumberToNodePath

Synopsis

my ($NodeCategory, $NodeName) = $Page->NodeNumberToNodePath ($PageNumber);

Description

Returns the .

PageValuesByPagePath

Synopsis

@P = $Page->PageValuesByPagePath ($PageCategory, $PageName);

Description

Asks the database for the '$PageNumber, $NodeType, $PageGeneration' of a page.

Examples

($PageNumber, $NodeType, $PageGeneration, $PageOwner, $PageGroup, $TemplateType,
 $TemplateName, $TemplateNumber, $CreationDate,
  $ModificationDate) =  $Page->PageValuesByPagePath ($PageCategory, $PageName);

executeFunction

Synopsis

$Text = $Page->executeFunction ($Function, $Object);

Description

Executes a function passing the '$Object' object to it.

executeObject

Synopsis

$Text = $Page->executeObject ( $ClassName, $MemberFunction, $Parameter );

Description

Executes a member function of an object, passing the '$Parameter' object to it. By default the '$Page' object is passed as the parameter.

makeObject

Synopsis

$Object = $Page->makeObject (%P);

Description

Makes an object, passing the '%P' parameter to the 'new' function of the object.

Examples

$Object = $Page->makeObject (ClassName => 'myObject',);

SearchStringToRegexp

Synopsis

my $Regexp = $Page->SearchStringToRegexp ($QueryString);

Description

Returns a regexp of $QueryString for case-insensetive database search. The percent character '%' is used as a wildcard.

simpleSearch

Synopsis

$Text = $Page->simpleSearch( %P );

Description

The default function to search the content database.

Examples

 
$Text .= $Page->simpleSearch('Cursor' => $self-{Cursor},
             'QueryString'       => $QueryString,
             'Type'              => $searchType, # all, Content, Attribute
             'Category'          => $searchCategory,
             'Page'              => $searchPage,
             'Mode'              => 'Page',      #
             ElementNameQuery    => 'Text%',
             'Function'          => '::_printRow',
             DontQueryHashedOutElements => 1,    # 0, 1
             #'orderDirection'    => 'DESC',
             'NoResultFoundText' => 'Nothing found.'
             );

$Text .= $Page->simpleSearch('Cursor' => $self-{Cursor},
      QueryString        => $QueryString,
      #Type              => $searchType, # all, Content, Attribute
      Category           => $Page->CGI}->Query('Search.Category'), #$searchCategory,
      searchCategories   => $Page->Search.Categories'},
      Mode               => 'allTablesInSequenceTemplates', # 'allTables' 'Page', 'allTablesInSequence'
      ElementNameQuery   => 'Text%',
      Page               => $Page->CGI}->Query('Search.Page'), #$searchPage,
#      otherColumns       => 'NODE_DESCRIPTION, NODE_TITLE',
      otherColumns       => 'NODE_TITLE',
      Function           => $Function,
      orderDirection     => 'DESC',
      sinceTime          => $sinceTime,
      DontQueryHashedOutElements => 1,  # 0, 1
      'Query.Privilege'  => 1,
      StringToShort      => $Form->start_tr . $Form->start_td
                         .  'String to short!'
                         .  $Form->end_td . $Form->end_tr,
      NoResultFoundText  => $Form->start_tr . $Form->start_td
                          . ' No match found...'
                          . $Form->end_td . $Form->end_tr,
    );

search

Synopsis

$Text .= $Page->search( %P );

Description

Examples

$Text .= $Page->search('DBConnection' => $::DB,
                       'QueryString' => $QueryString, 'Action' => $Action,
                       'type' => $CGI->{'search.type'}, # Pages, all, Content, Attribute
                       'Category' => $searchCategory,
                       'Page' => $searchPage,
                       'Function' => '::_printRow',
                       'NoResultFoundText' => &::_printRowLine("Nicht's gefunden."));

searchCategories

Synopsis

my $Text = $Page->searchCategories (QueryString => 'PageName',
                                    Function    => 'FunctionName',);

Description

Searches the content database categories for the query string.

Page

Synopsis

my $Page = $Page->Page(); 

Description

Pages are categorized within the 'application servers' page tree. They could be accessed via their page name and category.

PageName

Synopsis

my $Page = $Page->Name(); # synonym
my $Page = $Page->PageName(); 

Description

Pages are categorized within the 'application servers' page tree. They could be accessed via their page name and category.

Category

Synopsis

my $Category = $Page->Category(); 

Description

Pages are categorized within the 'application servers' page tree. They could be accessed via their page name and category.

CategoryName

Synopsis

my $Category = $Page->CategoryName(); 

Description

Pages are categorized within the 'application servers' page tree. They could be accessed via their page name and category.

PagePath

Synopsis

my $PagePath = $Page->PagePath();

Description

Returns the page path (e.g. Category=MyCategory&Page=MyPage).

PageTildePath

Synopsis

my $MemberHomePagePath = $Page->PageTildePath();

Description

Converts a users profile path (e.g. ~Max) into the real page path.

plainPagePath

Synopsis

my $Path = $Page->plainPagePath(); 
my $Path = $Page->plainPagePath($CategoryName, $PageName); 

Description

Pages are categorized within the 'application servers' page tree. They could be accessed via their page name and category.

Me

Synopsis

my $MyPageAndCategory = $Page->Me(); 

Description

PageNumber

Synopsis

my $PageNumber = $Context->PageNumber();

Description

Returns the number of the page.

NodeType

Synopsis

my $NodeType = $self->NodeType(); 

Description

The node type of a page is given by the member function NodeType.

PageType

Synopsis

my $PageType = $Page->PageType(); 

Description

How a page actualy is generated, depends on the 'Generation Type' of the page (see the UserGuide also).

MetaData

Synopsis

my $MetaData = $Page->MetaData(); 

Description

Meta date are given by the member function MetaData.

MetaDataAttribute

Synopsis

my $MetaDataAttribute = $Page->MetaDataAttribute ($AttributeName, $MetaData); 

Description

Returns a META_DATA attribute.

ContentType

Synopsis

my $ContentType = $Page->ContentType(); 

Description

The content type of a page is given by the member function ContentType.

completeContentTypeString

Synopsis

my $ContentTypeString = $Page->completeContentTypeString('text/html'); 

# $ContentTypeString yields "Content-Type: text/html\n\n"

my $HTML_Text = $ContentTypeString . "Hallo world.";
...

Description

Completes the 'Content-Type' line to be send to a client to the nesseccary form. Within the servers runtime system, defaults are taken from the '$::WebServer' object.

TemplateType

Synopsis

my $TemplateType = $Page->TemplateType(); 

Within database templates use:

@{[ $Page->TemplateType() ]}

Description

A page may be generated via a template stored in the database or an application function. The type of template is provided by the above function call.
The type of a template defines a class of templates, using a set of related templates, elements and methods to generate a page, whereas the HTML layout my differ. This can be used to change the 'look and feel' of a site with a few mouse clicks, - if the system is well designed.
Currently the following types are predefined:

ElementTemplate
The defines some standart elements and adds additional HTML code.

plainTemplate
No elements are predefined. The page is constructed only from the templates and elements.

The 'Template Types' may be used, to define classes of templates working on a similar set of elements and application functions, but having a different design and layout. Thus, if the site's template structure is well defined, you can change the 'look and feel' with a few mouse click's.

TemplateName

Synopsis

my $TemplateName = $Page->TemplateName(); 

Description

Name of the template.

TemplateMainNumber

Synopsis

my $TemplateNumber = $Page->TemplateMainNumber(); 

Description

Returns the number of the main template.

PageOwner

Synopsis

my $PageOwner = $Page->PageOwner();

Description

Return the owner of a page from the Context object.

PageGroup

Synopsis

my $PageGroup = $Page->PageGroup();

Description

Each page page has an owner and belongs to a group. The owner of a page is given by the above function.

PageGroupIsIn

Synopsis

my $Yes = $Page->PageGroupIsIn ('Public,Users', $PageGroups);

Description

Checks if a page is in the given groups. If $PageGroups is ommitted the current page is checked.

PageUserGroups

Synopsis

my $PageUserGroups = $Page->PageUserGroups ();

Description

Returns all the user groups of the given user that matches the page groups as a list..

PageUserGroupsAsString

Synopsis

my $PageUserGroupsAsString = $Page->PageUserGroupsAsString ();

Description

Returns all the user groups of the given user that matches the page groups as a string..

CreationTime

Synopsis

my $CreationTime = $Page->CreationTime ();

Description

Returns the creation time of a page.

CreationTimeAsString

Synopsis

my $CreationTimeAsString = $Page->CreationTimeAsString ();

Description

Returns the creation time of a page as a string.

lastModificationTime

Synopsis

my $lastModificationTime = $Page->lastModificationTime ();

Description

Returns the time, the page was last modified.

lastModificationTimeAsString

Synopsis

my $lastModificationTimeAsString = $Page->lastModificationTimeAsString ();

Description

Returns the time, the page was last modified, as a string.

HTML_encode

Synopsis

my $lastModificationTimeAsString = $Page->HTML_encode ();

Description

Convenience function.

URL_encode

Synopsis

my $Encoded = $Page->URL_encode ();

Description

Convenience function.

URL_decode

Synopsis

my $Encoded = $Page->URL_decode ();

Description

Convenience function.

ElementTableName

Synopsis

my $TableName = $Page->ElementTableName ();

Description

Convenience function.

getElements

Synopsis

my @Elements = $Page->getElements (Name => 'Text');

Description

Returns a list reference to the elements with the name 'Name'.

ElementName

Synopsis

my $ElementName = $Page->ElementName (Number => 3);

Description

Returns the name of element $i.

NumberOfElements

Synopsis

my $NumberOfElements = $Page->NumberOfElements();

Description

Convenience function.

ElementAttribute

Synopsis

my $ElementAttribute = $Page->ElementAttribute (Number => $i);

Description

Returns the attribute of element $i. If a parameter is given, returns the value of that parameter. Attribute parameter must have the form:

Type="myType" myAttribute="foo" ...
In an array context it returns the list of attributes with the name given by the 'Name' funtction parameter.

Examples

my $ElementAttribute = $Page->ElementAttribute (Number => 3);

my $ElementAttribute = $Page->ElementAttribute (Number    => $i,
                                                Parameter => 'Type');

my @ActionAttributes = $Page->ElementAttribute (Name => 'Actions') ;

AttributeParameter

Synopsis

my $ElementAttributeParameter = $Page->AttributeParameter(
                                          'Attribute' => $Attribute,
                                          'Parameter' => $Parameter);

if ($Page->AttributeParameter('Attribute' => $Attribute, 'Parameter' => 'Type') eq 'parsed') { ... }
my $ElementAttributeHashReference = $Page->AttributeParameter('Attribute' => ${$Element}{ELEMENT_ATTRIBUTE}); my $TypeValue = ${$ElementAttributeHashReference}{Type};

Description

Returns the 'Type' parameter value of the taken attribute, if called with the 'Parameter' parameter. Else if no 'Parameter' parameter is passed to the subroutine, returns a hash reference containing the values of all attribute parameters of the form:
my1stParameter="myParameterValue" my2ndParameter="myParameterValue" a.s.o.

ElementAttributes

Synopsis

my $ElementAttributes = $Page->ElementAttributes(Number => $i);

Description

Returns the attribute of element $i.

ElementContent

Synopsis

my $Content = $Page->ElementContent (Number       => $i,
                                     Name         => 'ElementName',
                                     Type         => 'parsed', # 'parsed', 'execute'
                                     DefaultValue => '',
                                     Separator    => $::SP,
);

Description

Returns the content of the database element given by the parameters 'Number' and/or 'Name'. The content can additionaly be parsed by the Perl interpreter, as specified by the Type parameter.

Examples

# Returns the content of the elements with the element number $i.

  my $ElementContent = $Page->ElementContent(Number => $i);

# Returns the content of elements with the element name 'Text'.

  my $Content = $Page->ElementContent(Name => 'Text');

changeElementContentWidget

Synopsis

my $Form = $Page->changeElementContentWidget (%P);

Description

Form to change the size of a ${::TEXTAREA} tag.

ElementPageNumber

Synopsis

my $ElementPageNumber = $Page->ElementPageNumber(Number => $i);

Description

Returns the page number of element $i (if configured).

IndexOfElement

Synopsis

$Page->IndexOfElement($Name, $Elements);

Description

parseText

Synopsis

my $parsedText = $Page->parseText ($Text);

Description

The taken parameter '$Text' is parsed by the PERL interpreter, thus doing variable substitution and executes embedded closure function calls. So, this function call may be expensive, what mostly doesn't matter.

Examples

my $Text = "The generation type is: \@{[\$Page->PageType]}.";
my $parsedText = $Page->parseText ($Text);
if ($Page->Error) {
  $Text .= $Page->printError;
  $Page->resetError;
}

evalText

Synopsis

my $Text = $Page->evalText ($Text);

Description

The taken parameter '$Text' is PERL code, which is executed by the function via an internal call of the interpreter.

Examples

my $Text = $Page->evalText ($Text);
if ($Page->Error) {
  $Text .= "Error=$Text.";
}

parseEmbperl

Synopsis

my $Text = $Page->parseEmbperl ($Text);

Description

The taken parameter '$Text' is HTML with embeded PERL code, which is executed by the function, via an internal call of the HTML::Embperl interpreter.

Examples

my $Text = $Page->parseEmbperl ($Text);
if ($Page->Error) {
  $Text .= "Error: " . $Text;
}

defineDataVariables

Synopsis

$Page->defineDataVariables (%P);

Description

Assigns variables to the Page objects data container.

Examples

$Page->defineDataVariables (Speed => 1,);
my $Speed = $Page->{Data}{Speed};

escapeXML

Synopsis

my $Text = $Page->escapeXML ($Text);

Description

Converts XML text.

selectElements

Synopsis

$Page->selectElements (%P);

Description

Displays elements by its name, below the category 'PageCategory'.

Examples

&{[
$Page->selectElements (ElementName  => 'Title',
                       PageCategory => "/Profile%",
                       CSS_Style    => 'padding-left:20px;')
]}

TemplateAttribute

Synopsis

$Page->TemplateAttribute (%P);

Description

Return a template elements attribute.

TemplateContent

Synopsis

my $TemplateContent = $Page->TemplateContent (%P);

Description

Returns the content of a template element.

TemplateContentWidget

Synopsis

$Page->TemplateContentWidget (%P);

Description

Returns an HTML widget.

ParentCategoryPath

Synopsis

my $ParentPath = $Page->ParentCategoryPath ($Path);

Description

Returns the path to the parent category of $Path. If $Path is omitted, $Path is set to the current category.

ParentCategory

Synopsis

my $ParentName = $Page->ParentCategory ($Path);

Description

Returns the name of the $Path's parent category. If $Path is omitted, $Path is set to the current category.

PageTree

Synopsis

my $Text = $self->PageTree (%P);

Description

Returns a page tree of the content database.

Examples

my $Text = $Page->PageTree (Category               => $Category,
                            openFolderImage        => '',
                            encodeTextFunctionName => 'Maxscape::Page::encodeCategoryName',
                            changeSlashTo          => '',);

traversePageOutputFunction

Synopsis

$Page->traversePageOutputFunction ($self, $Table, $Page);

Description

Method to display a row of the node tree.

displayPath

Synopsis

my $Path = $Page->displayPath (%P);

Description

Displays a clickable path to the current category.

Examples

my $Text = $Page->displayPath ( Category               => $Category,
                                openFolderImage        => '', # text of the root category
                                encodeTextFunctionName => '',
                                changeSlashTo          => '',
                                Mode                   => '',
);
my $Text = $Page->displayPath ( Category               => $CategoryPath,
                                openFolderImage        => '', # text of the root category
                                encodeTextFunctionName => '',
                                encodeTextFunctionName => 'Maxscape::Page::encodeCategoryName',
                                changeSlashTo          => ' > ',
                                Mode                   => 'PathToQueryString',
                                CGI_VariableName       => $Page->{CGI}->{myCGI_Variable},
                                thisPagePath           => '/Hyperlinks',
                                StartCategoryNr        => $StartCategoryNr,
                                StartCategory          => 2,
                                RootPage               => 'Index.Categories',
                                RootPage               => $RootPage,
                                QueryString            => $QueryString,
                                openFolderImage        => $RootText,
                                dontShowRootElement    => 1,
);

displayPathElement

Synopsis

my $Text = $Page->displayPathElement($Category, $PageName, $Text,
              $QueryString, $encodeTextFunctionName, $changeSlashTo
);

Description

Displays a path element of a category path.

displayPageTree

Synopsis

my $Text = $Page->displayPageTree (%P);

Description

Displays a page tree of the content database.

Examples

$CategoryName = $Page->displayPageTree (
  'Callback'     => qq(\$Page),
);

editElementContentByPageNumberElementName

Synopsis

my $Text = $Page->editElementContentByPageNumberElementName (%P);

Description

Edit an element given by its elment name. Returns 'EditElement: No elements found!', in case there is no element.

Examples

my $Text = $Page->editElementContentByPageNumberElementName (
             TableName   => $TableName,   # default = 'ELEMENTS'
             PageNumber  => $PageNumber,  # default = $Page->PageNumber
             ElementName => $ElementName, # default = 'Text'
             TextareaSubmitSeparator => '',
             TextareaCols            => '60',
             TextareaRows            => '20',
             hiddenQueryString       => '


createPage

Synopsis

$ErrorText = $Page->createPage (%P);

Description

Creates a page in the content tree.

Examples

$ErrorText = $Page->createPage (
                  Category  => '/User/Project',
                  Page      => 'TestProject',
                  UserId    => $UserId,
                  PageGoup  => 'TestProject', 
);

insertElement

Synopsis

$ErrorText = $Page->insertElement (%P);

Description

Inserts an element into a node.

Examples

$ErrorText = $Page->insertElement (
               TableName        => $TableName,        # default = 'ELEMENTS'
               PageNumber       => $PageNumber,       # default = $Page->PageNumber
               ElementNumber    => $ElementNumber,    # default = 999
               ElementName      => $ElementName,      # default = 'Text'
               ElementAttribute => $ElementAttribute, # default = 'Text'
               ElementContent   => $ElementContent,   # default = 'Text'
);

encodeCategoryName

Synopsis

my $CategoryName = $Page->encodeCategoryName ($CategoryName, $changeSlashTo, $SlashIs);

Description

Encodes a category name.

clipString

Synopsis

my $clipString = $Page->clipString ($String);

Description

Clips a string. Default is 30 character.

Examples

my $clipString = $Page->clipString ($String, 100);

showInterestGroups

Synopsis

my $Groups = $Page->showInterestGroups ($Groups);

Description

Displays InterestGroups.

decodeCategoryName

Synopsis

my $CategoryName = $Page->decodeCategoryName ($CategoryName);

Description

Decodes category names.

storeFormVariables

Synopsis

my $CategoryName = $Page->storeFormVariables (%P);

Description

Function to store the variables of a form for later use.

Examples

$Page->storeFormVariables (FormType        => 'PageName',
                           excludeExactly  => {Page => 1, Category => 1,
                                               DisplayCategories => 1,
                                               FormState => 1, },
                           excludeByMatch  => '__CATEGORY__',

initPageMenu

Synopsis

my $Page->initPageMenu (otherText => $UserChannelText . $otherMenuText);

Description

Initialises the systems Menu Object.

finalFilterSet

Synopsis

$Page->finalFilterSet ? return $Page->finalFilter : '';

Description

The finalFilterSet subroutine first looks if a finalFilter is enabled via the $WebServer object's configuration mechanism. If an application server's local enableFinalFilter subroutine is supplied, it is executed.
This gives applications the possibility to define the conditions under which the finalFilter is invoked (see 'finalFilter' subroutine).

Examples

# e.g. in the servers 'ProcessConfiguration.pl' file:

use Maxscape::ServerApplication;

# e.g. in the servers 'ServerApplication.pm' file:
# /maxscape/server/'application server id'/lib/perl/Maxscape/ServerApplication.pm

%ServerInitialisationData = (
  WebServer => {
    ...
    'Page.enableFinalFilter' =>
                              'Maxscape::ServerApplication::enableFinalFilter',
    'Page.finalFilterCallback'   => 'Maxscape::ServerApplication::finalFilter',
    ...
    ...
  }
);

sub enableFinalFilter {
  my $self = shift;
  return ($self->{CGI}->{"Search.QueryString"} || $self->ContentType() eq 'XML');
}

finalFilter

Synopsis

print $Page->finalFilter();

Description

The the final filter callback is enabled, the 'Page.finalFilterCallback' function is executed, giving applications the chance to parse/change the previously collected document content (see 'finalFilterSet' subroutine).

Examples

# for example in the servers 'ServerApplication.pm' file:
# /maxscape/server/'application server id'/lib/perl/Maxscape/ServerApplication.pm

sub finalFilter {
  my ($self) = shift;
  my ($Text) = @_;

  my $ContentType = $self->ContentType;
  if ($ContentType eq 'XML') {
    $Text = myXMLParser ($self, $Text);
  }
  my $CGI = $self->{CGI};
  if ($CGI->{QueryString}) {

    my $Substitute = $CGI->{QueryString"};
    ...
  }
}

HTTP_HeaderCallback

Synopsis

my HTTP_HeaderCallback = $Page->HTTP_HeaderCallback;

Description

Executes the HTTP header callback function $::WebServer->{'Page.HTTP_HeaderCallback'}.

Language

Synopsis

$Language = $Page->Language(); # de, en

Description

Returns the language to be displayed (CGI variable 'Language').

setLanguage

Synopsis

$Language = $Page->setLanguage(); # de, en

Description

Sets the Pages and the CGI objects language variables.

LanguageSelectWidget

Synopsis

my $LanguagSelectorWidget = $Page->LanguageSelectWidget (%P);

Description

Return a widget to select the language of a displayed page.

Examples

my $LanguagWidget = $Page->LanguageSelectWidget (
                      Class       => 'LanguageSelectWidget',
                      Separator   => ' | '
                      Target      => $Target,
                      Text        => 'Deutsch',
                      QueryString => $QueryString,
                      Title       => 'Seite in Deutsch.',
                      Style       => $Style,
                      CSS_Class   => $Class,
                      CSS_ID      => $ID,
);

ContactWidget

Synopsis

my $ContactWidget = $Page->ContactWidget (%P);

Description

Outputs a widget to the contact page.

Examples

my $ContactLink = $Page->ContactWidget (
     Style     => $LinkStyle,
     CSS_Class => $Class,
     Separator => 'none', # none, e.g. |
     Target    => '_top',
);

editPageElementsInlineMenuLink

Synopsis

my $editPageElementsInlineMenuLink = $Page->editPageElementsInlineMenuLink ();

Description

Return a widget to edit the displayed page.

Examples

To be added.

editPageElementsInlineMenu

Synopsis

my $editPageElementsInlineMenu = $Page->editPageElementsInlineMenu ();

Description

Return a widget to edit the displayed page.

Examples

To be added.

PageTreeDocumentRoot

Synopsis

$Page->PageTreeDocumentRoot;

Description

Returns the DocumentRoot of PageTree Content Manager.

Examples

my $PageTreeDocumentRoot = $Page->PageTreeDocumentRoot;

canBeEditedBy

Synopsis

$Page->canBeEditedBy ('Users');

Description

Finds out if someone may edit a page.

Examples

my $canEdit = $Page->canBeEditedBy ('Administrator');

MemberMayNotEditPage

Synopsis

my $MemberMayNotEditPage = $Page->MemberMayNotEditPage ('Users');

Description

Finds out if someone may edit a page or page element. Return the 'noEditText' text, if a member may not edit the page or element. Otherwise returns ''.

Examples

my $cannotEdit = $Page->MemberMayNotEditPage (
                   PageOwner       => $Page->{Context}->{NODE_OWNER},
                   PageWriteGroups => $Page->{Context}->{NODE_WRITE_GROUPS},);
                   noEditText      => 'Not allowed',);

PageViewerIsOwner

Synopsis

my $ViewerIsOwner = $Page->PageViewerIsOwner ();

Description

Finds out, if the page viewer is also the page owner.

displayNodeElement

Synopsis

my $NodeElementAsText = $Page->displayNodeElement ($PageCategory, $PageName,
                                                   'Template', $Page->{Cursor});

Description

Displays the elements of content tree node as a text.

displayNodeElements

Synopsis

my $NodeElementsAsText = $Page->displayNodeElements (\@Templates, 'Template',
                                                     '', $Page->{Cursor});

Description

Returns the elements of content tree nodes as a text.

Examples

my $PageCategory = '/Templates/DB-Template/UserTemplate';
my @Templates = ({ CategoryName => $PageCategory, PageName => 'SongList' },
                 { CategoryName => $PageCategory, PageName => 'simpleLayout' },
);
my $Text = $Page->displayNodeElements (\@Templates);

NodeToTableName

Synopsis

my $TableName = $self->NodeToTableName ($NodeType, $PageType);

Description

Return the associated database table name. This method needs to be worked out!

setTextEncoding

Synopsis

use Encode qw(decode encode);
$Page->setTextEncoding('utf-8');
$Page->setTextEncoding('iso-8859-1');

Description

Sets the text encoding.

decodeText

Synopsis

Not used so far.

Description

interpreteText

Synopsis

my $HTML = $Page->interpreteText ( Text => $Text,
              ContentType => $ContentType, ImageDirectory => $Dir);

Description

An XML parser.

HTML_Table

Synopsis

my $HTML_Table = $Page->HTML_Table (%P);

Description

Returns an HTML table.

Examples

my $HTML_Table = $Page->HTML_Table (
                   Type      => 'ThreeColumns',
                   table     => '<table cellspacing="0" cellpadding="0">',
                   colgroup  => '<colgroup>
                     <col width="25%"> 
                     <col width="5%"> 
                     <col width="70%"> 
                   <colgroup>',
                   tr        => '<tr>',
                   td        => '<td id="glossary">',
                   Content   => [
                                     [ 'API', ' - ', 'API' ],
                                   ],
);

my $HTML_Table = $Page->HTML_Table (
   # th  => '<tr colspan="2"><th align="left">Table Header<th><tr>',
   tr    => '<tr>',
   td    => '<td nowrap>',
   colgroup  => '<colgroup> <col width="30%"> <col width="70%"> <colgroup>',
   Content   => [
                     [ 'Header', 'Content' . $::DOT ],
                     [ '', '' . $::DOT ],
                   ],
   style => 'padding: 0px ' . $Page->{Layout}{ContentInnerPadding}
         .  qq( 0px $Page->{Layout}{ContentInnerPadding};),
   );

DisplayPageByFormSelectGroup

Synopsis

my $Text = $Page->DisplayPageByFormSelectGroup (%P);

Description

Displays pages by FormSelectGroup.

Examples

my $Text = $Text = $Page->DisplayPageByFormSelectGroup (
                     LinkText   => $Page->pge('Anzeigen', 'Display'),
                     Target     => '_top',
                     CSS_Class  => 'smallMenu',);

splitPath

Synopsis

my $splitPath = $Page->splitPath ($Path, $StartLevel, $EndLevel);

Description

Splits a path.

Examples

my $splitPath = $splitPath = $Page->splitPath($Path, 1, 3);

popParentCategory

Synopsis

my ($ParentCategory, $CategoryName) = $Page->popParentCategory($Path);

Description

Returns the parent category and the category name.

Examples

my ($ParentCategory, $CategoryName) = $Page->popParentCategory($AbsolutePath);

PathDepth

Synopsis

my $PathDepth = $Page->PathDepth ("/User/Home/T/Template-Manager");

Description

Returns the path depth.

MemberName

Synopsis

my $MemberName = $Page->MemberName;

Description

Returns the member name.

MemberHomePath

Synopsis

my $MemberHomePath = $Page->MemberHomePath ();

Description

Return the home path of a member. Outside a members home category path, the $MemberAccountName must be provided.

Examples

my $MemberHomePath = $Page->MemberHomePath ($MemberAccountName);

MemberHomeDirectory

Synopsis

my $MemberHomeDirectory = $Page->MemberHomeDirectory ();

Description

Return the root directory of a member.

Maxscript

Synopsis

my $interpretedText = $Page->Maxscript ($Text);

Description

A stub for the Maxscript parser. Creates a Maxscript object and executes the Maxscript method on the $Text parameter.

LoginRegisterWidget

Synopsis



Description

$Page->LoggedInRegisterWidget ( %P );

Examples

$Page->LoginRegisterWidget ( LinkStyle        => $LinkStyle,
                             RegisterCategory => '/',
                             NewLine          => $Page->{Layout}{MenuNewLine},
                             LinkTarget       => $Page->{Layout}{LinkTarget},
       );

MessageToUser

Synopsis

my $Text = $Page->MessageToUser ();

Description

Examples

$Error = $self->MessageToUser ('InputError', (
          en => 'A node name may not contain a forward slash!',
          de => ''));

reportBugLink

Synopsis

my $BugLink = $Page->reportBugLink (
                Category => '/Forum/Index',
                Texts    => { en=>'report bugs and suggestions',
                              de=>'melden Sie Bugs und Vorschläge', }
);

Description

Returns an hyperlink to the report bugs page.

setRootCategoryContext

Synopsis

$Page->setRootCategoryContext ($defaultProperties);

Description

Sets the context and theme for an application server. The properties are derived from the app server settings and the users preferences stored in the USER_PROFILE table. Is usually called in an element in the content databases root category.

Examples

my @defaultPreferences = split (';', '#f6f6f6;#FFFFFF;16;float;80;100;800;');

$Page->setRootCategoryContext ($defaultProperties);

ServerGlobalElementCallback

Synopsis

&Maxscape::Page::ServerGlobalElementCallback ($Page, $Element);

Description

This function can be used as an database element callback in order to do element specific actions, when a page is generated. It has to be configurated in the global (/maxscape/etc/maxscape.cnf) or a local (e.g. /maxscape/server/MaXscape/etc/maxscape.conf) Maxscape configuration file.

Examples

sub ServerGlobalElementCallback {
  my ($self) = shift;
  my ($Element) = @_;

  my $Text = '';

  my $ElementAttribute = $self->AttributeParameter(
        'Attribute' => ${$Element}{ELEMENT_ATTRIBUTE}
        #,'Parameter' => 'Type'
  );

  my $TypeAttribute = ${$ElementAttribute}{Type};

  if ($TypeAttribute eq 'XML') {
   # ...
  };
  return $Text;
}

standardTemplateElementCallback

Synopsis

&Maxscape::Page::standardTemplateElementCallback ($Page, $Element);

Description

This function is called for each database element in order to do element specific actions, when a page of template type 'standardTemplate' is generated. It has to be configurated via the administration surface (main menu/TreeAdm) for that template type.

Examples

###############################################################################

sub standardTemplateElementCallback  {
  my ($self) = shift;
  my ($Element) = @_;

  my $Text = '';

  my $ElementName = ${$Element}{ELEMENT_NAME};
  my $ElementAttribute = $self->AttributeParameter(
                            'Attribute' => ${$Element}{ELEMENT_ATTRIBUTE}
                            #,'Parameter' => 'name'
  );
  if ($ElementName eq 'h3' || $ElementName eq 'h2') {

    ${$Element}{ELEMENT_CONTENT} =
             '

' . ${$Element}{ELEMENT_CONTENT} . '

'; } elsif ($ElementName eq 'pre') { ${$Element}{ELEMENT_CONTENT} = '
' . ${$Element}{ELEMENT_CONTENT} . '
'; } elsif ($ElementName eq 'pre') { ${$Element}{ELEMENT_CONTENT} = '${::LT}pre$::GT' . ${$Element}{ELEMENT_CONTENT} . '${::LT}/pre$::GT'; } elsif ($ElementName eq 'whatever') { # send me a postcard # .. } else { } return ''; }

UserTemplateElementCallback

Synopsis

&Maxscape::Page::UserTemplateElementCallback ($Page, $Element);

Description

This function is called for each database element in order to do element specific actions, when a page of template type 'standardTemplate' is generated. It has to be configurated via the administration surface (main menu/TreeAdm) for that template type.

Examples

sub UserTemplateElementCallback  {
  my ($self) = shift;
  my ($Element) = @_;

  my $Text = '';

  my $ElementName = ${$Element}{ELEMENT_NAME};
  my $ElementAttribute = $self->AttributeParameter(
                            'Attribute' => ${$Element}{ELEMENT_ATTRIBUTE}
                            #,'Parameter' => 'name'
  );
  if ($ElementName eq 'h3' || $ElementName eq 'h2') {

    ${$Element}{ELEMENT_CONTENT} =
             '

' . ${$Element}{ELEMENT_CONTENT} . '

'; } elsif ($ElementName eq 'pre') { ${$Element}{ELEMENT_CONTENT} = '
' . ${$Element}{ELEMENT_CONTENT} . '
'; } elsif ($ElementName eq 'pre') { ${$Element}{ELEMENT_CONTENT} = '${::LT}pre$::GT' . ${$Element}{ELEMENT_CONTENT} . '${::LT}/pre$::GT'; } elsif ($ElementName eq 'whatever') { # send me a postcard # .. } else { } return ''; }

setTextareaSize

Synopsis

$Page->setTextareaSize ($Element, $ElementAttribute);

Description

Sets the size of a textarefield via some buttons.

standardTemplateLoop

Synopsis

&Maxscape::Page::standardTemplateLoop ($Page);

Description

This function generates a page of template type standardTemplate. It has to be configurated via the administration surface (main menu/TreeAdm) for that template type.

printElements

Synopsis

&Maxscape::Page::printElements ();

Description

Example of a generation function,that generates a page from the page elements.

simpleElementLoop

Synopsis

&Maxscape::Page::simpleElementLoop ($Page);

Description

Example of a generation function, that generates a page from the page elements.

UserElementLoop

Synopsis

&Maxscape::Page::UserElementLoop ($Page);

Description

Example of a generation function, that generates a page from the page elements.

editPageElementPermission

Synopsis

my $allowToEdit = &Maxscape::Page::editPageElementPermission ($Page, $editPageElementPermission);
my $allowToEdit = $Page->editPageElementPermission ($Page->{Data}{editPageElementPermission});

Description

Check page element permission given by $editPageElementPermission.

checkPageElementPermission

Synopsis

my $allowToEdit = &Maxscape::Page::checkPageElementPermission ($Page, $checkPageElementPermission);
my $allowToEdit = $Page->checkPageElementPermission ($Page->{Data}{checkPageElementPermission});

Description

Check page element permissions attribute.

HelpLink

Synopsis

my $HelpLink = $Page->HelpLink ();
my $HelpLink = $Page->HelpLink ( FontSize => 'little', Text => 'Help' );

Description

deleteMemberAccount

Synopsis

$Text = $Page->deleteMemberAccount ( %P );

Description

Examples

$Text = $Page->deleteMemberAccount ( promptPasswordText  => 'Password: ',
                                     confirmDeletionText => 'Confirm: ',
                                     PasswordDoesntMatch => 'Password does not match: ',
        );

Flash_mp3player

Synopsis

my $Flash_mp3player = $Page->Flash_mp3player ();
my $Flash_mp3player = $Page->Flash_mp3player ( File => 'MP3-Song',
                                               SongNumber => 1,
                                               WidgetLength => 240,
                                               ShowDigits => 'true',
                                             );
my $Song1 = $Page->Flash_mp3player ( 
              SongNumber   => 1,
              File         => '/Music/Strinx/Strinx-MD-128-KB.mp3',
              WidgetLength => 200,
              ShowDigits   => 'true',
);

Description

SongListToJavacript

Synopsis

my $Text = $Page->SongListToJavacript ();

Description

Examples




printGermanEnglish

Synopsis

my $GermanOREnglishText = $Page->printGermanEnglish ("GermanText","EnglishText");
# alias is $Page->pge();

Description

changePageElement

Synopsis

my $changed = $Page->changePageElement ($Element, $ElementAttribute);

Description

Edit elements within a displayed page. Works together with the method 'standardTemplateElementCallback'.

ProfileEditorFrames

Synopsis

my $HTML_Help_Frame = $Page->ProfileEditorFrames ( %P );

Description

Examples

my $HTML_Help_Frame = $Page->ProfileEditorFrames (
  editMode       => 'ProfileHelpFrameView', # CGI_Property name
  editModeState  => 'off', # CGI_Property value,'HelpHTML'
  openFrameText  => 'Help Frame',
  closeFrameText => 'No Frame',
  #CSS_Class      => 'Menu',
);

my $ProfileHelpFrame = $Page->ProfileEditorFrames (
  editMode       => 'ProfileHelpFrame',   # CGI_Property name
  editModeState  => 'displayProfile',     # CGI_Property value,
  openFrameText  => 'FrameView',
  closeFrameText => 'No Frame',
  #CSS_Class      => 'Menu',
);

if ($Page->{CGI}->{ProfileHelpFrameView} eq 'HelpHTML')
{
  $Addr1 = "/?Category=/User/UserData&Page=Index&"
         . "ProfileHelpFrameView=$ProfileHelpFrameView";
  $Addr2 = "/?Category=/User/Manuals&Page=HTML&"
         . "ProfileHelpFrameView=$ProfileHelpFrameView";
}
elsif ($Page->{CGI}->{ProfileFrame} eq 'displayProfile')
{
  $Addr1 = "/User/?Category=/User/UserData&Page=Index&"
         . "ProfileFrame=$ProfileFrame";
  $Addr2 = "/User/?$UserHomePagePath&ProfileFrame=$ProfileFrame";
}

generateSecurityCode

Synopsis

$Page->generateSecurityCode ();

Description

MessageFormHandler

Synopsis

$Page->MessageFormHandler ();

Description

Maxscape message form.

Examples

return $Page->MessageFormHandler ($MessageReceiver, $MessageTextColor,
                $MessageErrorTextColor, $MessageBackgroundColor,
                $MessageErrorBackgroundColor, $FormSubmitBarBackgroundColor,
                $MessageSentText);

deleteSecurityCodeImages

Synopsis

$Page->deleteSecurityCodeImages ();

Description

PulldownMenu

Synopsis

my $PulldownMenu = $Page->PulldownMenu (@HyperlinkList);

Description

Returns a pulldown menu. The CSS is defined in the database templates.

HelpMenuLinks

Synopsis

my $HelpMenuLinks = $Page->HelpMenuLinks ();

Description

Returns links to all help manuals.

simpleColorTable

Synopsis

my $simpleColorTable = $Page->simpleColorTable ();

Description

niceCharacters

Synopsis

my $niceCharacter = $Page->niceCharacters ('jin_jang');

Description

niceUnicode_UTF8_CharacterSet

Synopsis

$Page->niceUnicode_UTF8_CharacterSet ();

Description


nextprevioustopbecome a membercontact © Maxscape