ZenphotoCMS 1.6.2

admin

Table of Contents

Functions

getExpiryDatePost()  : string
Retrieves posted expiry date and checks it against the current date/time Returns the posted date if it is in the future Returns NULL if the date is past
processTags()  : mixed
processes the taglist save
updatePage()  : object
Updates or adds a page and returns the object of that page
deletePage()  : mixed
Deletes a page (and also if existing its subpages) from the database
printPagesListTable()  : mixed
Prints the table part of a single page item for the sortable pages list
updateArticle()  : object
Updates or adds a news article and returns the object of that article
deleteArticle()  : mixed
Deletes an news article from the database
printArticleCategories()  : mixed
Print the categories of a news article for the news articles list
printPageArticleTags()  : mixed
Print the categories of a news article for the news articles list
printCategorySelection()  : mixed
Prints the checkboxes to select and/or show the category of an news article on the edit or add page
printArticleDatesDropdown()  : mixed
Prints the dropdown menu for the date archive selector for the news articles list
getNewsAdminOption()  : array<string|int, mixed>
Compiles an option parameter list
getNewsAdminOptionPath()  : string
Creates the admin paths for news articles if you use the dropdowns on the admin news article list together
printUnpublishedDropdown()  : mixed
Prints the dropdown menu for the published/un-publishd selector for the news articles list
printSortOrderDropdown()  : mixed
Prints the dropdown menu for the sortorder selector for the news articles list
printCategoryDropdown()  : mixed
Prints the dropdown menu for the category selector for the news articles list
printArticlesPerPageDropdown()  : mixed
Prints the dropdown menu for the articles per page selector for the news articles list
printAuthorDropdown()  : mixed
Prints the dropdown menu all authors that currently are authors of news articles
updateCategory()  : mixed
Updates or adds a category
deleteCategory()  : mixed
Deletes a category (and also if existing its subpages) from the database
printCategoryListSortableTable()  : string
Prints the list entry of a single category for the sortable list
printCategoryCheckboxListEntry()  : mixed
Prints the checkboxes to select and/or show the category of an news article on the edit or add page
printNestedItemsList()  : string
Prints the nested list for pages and categories
updateItemSortorder()  : array<string|int, mixed>
Updates the sortorder of the items list in the database
checkForEmptyTitle()  : string
Checks if no title has been provide for items on new item creation
zenpagePublish()  : string
Publishes a page or news article
skipScheduledPublishing()  : string
Skips the scheduled future publishing by setting the date of a page or article to the current date to publish it immediately or the expiration handling by setting the expiredate to null.
checkHitcounterDisplay()  : string
Checks if there are hitcounts and if they are displayed behind the news article, page or category title
getNewsPagesStatistic()  : mixed
returns an array of how many pages, articles, categories and news or pages comments we got.
printPagesStatistic()  : mixed
printNewsStatistic()  : mixed
printCategoriesStatistic()  : mixed
zenpageJSCSS()  : mixed
Prints the links to JavaScript and CSS files zenpage needs.
printZenpageIconLegend()  : mixed
authorSelector()  : mixed
Prints a dropdown to select the author of a page or news article (Admin rights users only)
printPublishIconLink()  : mixed
Prints the publish/un-published/scheduled publishing icon with a link for the pages and news articles list.
checkIfChecked()  : mixed
Checks if a checkbox is selected and checks it if.
checkIfLockedPage()  : bool
Checks if the current logged in admin user is the author that locked the page/article.
checkIfLockedNews()  : bool
Checks if the current logged in admin user is the author that locked the article.
is_AdminEditPage()  : bool
Checks if the current admin-edit.php page is called for news articles or for pages.
processZenpageBulkActions()  : mixed
Processes the check box bulk actions
zenpageBulkActionMessage()  : mixed
createTitlelink()  : type
Creates the titlelink from the title passed.
checkTitlelinkDuplicate()  : bool
Checks if a title link of this itemtype already exists
addDateToTitlelink()  : string
Append or prepends a date string to a titlelink as defined.

Functions

getExpiryDatePost()

Retrieves posted expiry date and checks it against the current date/time Returns the posted date if it is in the future Returns NULL if the date is past

getExpiryDatePost() : string
Return values
string

processTags()

processes the taglist save

processTags(object $object) : mixed
Parameters
$object : object

the object on which the save happened

updatePage()

Updates or adds a page and returns the object of that page

updatePage(array<string|int, mixed> &$reports[, bool $newpage = false ]) : object
Parameters
$reports : array<string|int, mixed>

report display

$newpage : bool = false

true if it is a new page

Return values
object

deletePage()

Deletes a page (and also if existing its subpages) from the database

deletePage(mixed $titlelink) : mixed
Parameters
$titlelink : mixed

printPagesListTable()

Prints the table part of a single page item for the sortable pages list

printPagesListTable(object $page, bool $flag) : mixed
Parameters
$page : object

The array containing the single page

$flag : bool

set to true to flag the element as having a problem with nesting level

updateArticle()

Updates or adds a news article and returns the object of that article

updateArticle(array<string|int, mixed> &$reports[, bool $newarticle = false ]) : object
Parameters
$reports : array<string|int, mixed>

display

$newarticle : bool = false

true if a new article

Return values
object

deleteArticle()

Deletes an news article from the database

deleteArticle(mixed $titlelink) : mixed
Parameters
$titlelink : mixed

printArticleCategories()

Print the categories of a news article for the news articles list

printArticleCategories(obj $obj) : mixed
Parameters
$obj : obj

object of the news article

printPageArticleTags()

Print the categories of a news article for the news articles list

printPageArticleTags(obj $obj) : mixed
Parameters
$obj : obj

object of the news article

printCategorySelection()

Prints the checkboxes to select and/or show the category of an news article on the edit or add page

printCategorySelection([int $id = '' ][, string $option = '' ]) : mixed
Parameters
$id : int = ''

ID of the news article if the categories an existing articles is assigned to shall be shown, empty if this is a new article to be added.

$option : string = ''

"all" to show all categories if creating a new article without categories assigned, empty if editing an existing article that already has categories assigned.

printArticleDatesDropdown()

Prints the dropdown menu for the date archive selector for the news articles list

printArticleDatesDropdown(mixed $pagenumber) : mixed
Parameters
$pagenumber : mixed

getNewsAdminOption()

Compiles an option parameter list

getNewsAdminOption(array<string|int, mixed> $test) : array<string|int, mixed>
Parameters
$test : array<string|int, mixed>

array of parameter=>type elements. type=0:string type=1:numeric

Return values
array<string|int, mixed>

getNewsAdminOptionPath()

Creates the admin paths for news articles if you use the dropdowns on the admin news article list together

getNewsAdminOptionPath(array<string|int, mixed> $list) : string
Parameters
$list : array<string|int, mixed>

an parameter array of item=>value for instance, the result of getNewsAdminOption()

Return values
string

printUnpublishedDropdown()

Prints the dropdown menu for the published/un-publishd selector for the news articles list

printUnpublishedDropdown() : mixed

printSortOrderDropdown()

Prints the dropdown menu for the sortorder selector for the news articles list

printSortOrderDropdown() : mixed

printCategoryDropdown()

Prints the dropdown menu for the category selector for the news articles list

printCategoryDropdown() : mixed

printArticlesPerPageDropdown()

Prints the dropdown menu for the articles per page selector for the news articles list

printArticlesPerPageDropdown(mixed $pagenumber, mixed $articles_page) : mixed
Parameters
$pagenumber : mixed
$articles_page : mixed

printAuthorDropdown()

Prints the dropdown menu all authors that currently are authors of news articles

printAuthorDropdown() : mixed

updateCategory()

Updates or adds a category

updateCategory(array<string|int, mixed> &$reports[, bool $newcategory = false ]) : mixed
Parameters
$reports : array<string|int, mixed>

the results display

$newcategory : bool = false

true if a new article

deleteCategory()

Deletes a category (and also if existing its subpages) from the database

deleteCategory(mixed $titlelink) : mixed
Parameters
$titlelink : mixed

printCategoryListSortableTable()

Prints the list entry of a single category for the sortable list

printCategoryListSortableTable(array<string|int, mixed> $cat, string $flag) : string
Parameters
$cat : array<string|int, mixed>

Array storing the db info of the category

$flag : string

If the category is protected

Return values
string

printCategoryCheckboxListEntry()

Prints the checkboxes to select and/or show the category of an news article on the edit or add page

printCategoryCheckboxListEntry(mixed $cat, mixed $articleid, string $option[, mixed $class = '' ]) : mixed
Parameters
$cat : mixed
$articleid : mixed
$option : string

"all" to show all categories if creating a new article without categories assigned, empty if editing an existing article that already has categories assigned.

$class : mixed = ''

printNestedItemsList()

Prints the nested list for pages and categories

printNestedItemsList([string $listtype = 'cats-sortablelist' ][,  $obj = '' ][, string $option = '' ][, mixed $class = 'nestedItem' ]) : string
Parameters
$listtype : string = 'cats-sortablelist'

'cats-checkboxlist' for a fake nested checkbock list of categories for the news article edit/add page 'cats-sortablelist' for a sortable nested list of categories for the admin categories page 'pages-sortablelist' for a sortable nested list of pages for the admin pages page

$obj : = ''

$obj Optional, default empty. Passing an articledid is deprecated and will be removed in ZenphotoCMS 2.0.

  • listtype = 'cats-checkboxlist': Object of the news article if the categories an existing articles is assigned to shall be shown, empty if this is a new article to be added.
  • listtype = 'pages-sortablelist': Object of the page object to show sub pages of or empty for all
$option : string = ''

Only for $listtype = 'cats-checkboxlist': "all" to show all categories if creating a new article without categories assigned, empty if editing an existing article that already has categories assigned.

$class : mixed = 'nestedItem'
Return values
string

| bool

updateItemSortorder()

Updates the sortorder of the items list in the database

updateItemSortorder([string $mode = 'pages' ]) : array<string|int, mixed>
Parameters
$mode : string = 'pages'

'pages' or 'categories'

Return values
array<string|int, mixed>

checkForEmptyTitle()

Checks if no title has been provide for items on new item creation

checkForEmptyTitle(string $titlefield, string $type[, mixed $truncate = true ]) : string
Parameters
$titlefield : string

The title field

$type : string

'page', 'news' or 'category'

$truncate : mixed = true
Return values
string

zenpagePublish()

Publishes a page or news article

zenpagePublish(object $obj, int $show) : string
Parameters
$obj : object
$show : int

the value for publishing

Return values
string

skipScheduledPublishing()

Skips the scheduled future publishing by setting the date of a page or article to the current date to publish it immediately or the expiration handling by setting the expiredate to null.

skipScheduledPublishing(object $obj[, string $type = 'futuredate' ]) : string
Parameters
$obj : object
$type : string = 'futuredate'

"futuredate" or "expiredate"

Tags
since
1.5.7
Return values
string

checkHitcounterDisplay()

Checks if there are hitcounts and if they are displayed behind the news article, page or category title

checkHitcounterDisplay(string $item) : string
Parameters
$item : string

The array of the current news article, page or category in the list.

Return values
string

getNewsPagesStatistic()

returns an array of how many pages, articles, categories and news or pages comments we got.

getNewsPagesStatistic(string $option) : mixed
Parameters
$option : string

What the statistic should be shown of: "news", "pages", "categories"

zenpageJSCSS()

Prints the links to JavaScript and CSS files zenpage needs.

zenpageJSCSS() : mixed

Actually the same as for zenphoto but with different paths since we are in the plugins folder.

authorSelector()

Prints a dropdown to select the author of a page or news article (Admin rights users only)

authorSelector([mixed $author = NULL ]) : mixed
Parameters
$author : mixed = NULL

Prints the publish/un-published/scheduled publishing icon with a link for the pages and news articles list.

printPublishIconLink(obj $obj[, mixed $type = '' ][, mixed $linkback = '' ]) : mixed
Parameters
$obj : obj

Object of the page or news article to check

$type : mixed = ''
$linkback : mixed = ''
Tags
since
1.6.1

checkIfChecked()

Checks if a checkbox is selected and checks it if.

checkIfChecked(string $field) : mixed
Parameters
$field : string

the array field of an item array to be checked (for example "permalink" or "comments on")

checkIfLockedPage()

Checks if the current logged in admin user is the author that locked the page/article.

checkIfLockedPage(object $page) : bool

Only that author or any user with admin rights will be able to edit or unlock.

Parameters
$page : object

The array of the page or article to check

Return values
bool

checkIfLockedNews()

Checks if the current logged in admin user is the author that locked the article.

checkIfLockedNews(mixed $news) : bool

Only that author or any user with admin rights will be able to edit or unlock.

Parameters
$news : mixed
Return values
bool

is_AdminEditPage()

Checks if the current admin-edit.php page is called for news articles or for pages.

is_AdminEditPage(string $page) : bool
Parameters
$page : string

What you want to check for, "page" or "newsarticle"

Return values
bool

processZenpageBulkActions()

Processes the check box bulk actions

processZenpageBulkActions(mixed $type) : mixed
Parameters
$type : mixed

zenpageBulkActionMessage()

zenpageBulkActionMessage(mixed $action) : mixed
Parameters
$action : mixed

Creates the titlelink from the title passed.

createTitlelink(string|array<string|int, mixed> $title, string $date) : type
Parameters
$title : string|array<string|int, mixed>

The title respectively language array of titles

$date : string

The date the article is saved

Tags
since
1.5.2
Return values
type

checkTitlelinkDuplicate()

Checks if a title link of this itemtype already exists

checkTitlelinkDuplicate(string $titlelink, string $itemtype) : bool
Parameters
$titlelink : string

The titlelink to check

$itemtype : string
Tags
since
1.5.2
Return values
bool

Append or prepends a date string to a titlelink as defined.

addDateToTitlelink(string $titlelink) : string

Note: This does not check the item type option and will add to any string passed!

Parameters
$titlelink : string

The titleink (e.g. as created by createTitleink())

Tags
since
1.5.2
Return values
string

        
On this page

Search results