ZenphotoCMS 1.6.3

related_items.php

Provides functionality to list (or get) objects related to the current object based on a search of the tags the assigned to the current object.

Tags
author

Malte Müller (acrylian)

Table of Contents

Functions

getRelatedItems()  : mixed
createRelatedItemsResultArray()  : mixed
Helper function for getRelatedItems() only.
printRelatedItems()  : mixed
Prints the x related articles based on a tag search

Functions

getRelatedItems()

getRelatedItems([mixed $type = 'news' ][, mixed $album = NULL ]) : mixed
Parameters
$type : mixed = 'news'
$album : mixed = NULL

createRelatedItemsResultArray()

Helper function for getRelatedItems() only.

createRelatedItemsResultArray(array<string|int, mixed> $result, string $type) : mixed

Returns an array with array for each item with name, album (images only), type and weight (search weight value) Excludes the current item itself.

Parameters
$result : array<string|int, mixed>

array with search results

$type : string

"albums", "images", "news", "pages"

printRelatedItems()

Prints the x related articles based on a tag search

printRelatedItems([int $number = 5 ][, string $type = 'news' ][, string $specific = NULL ][, bool $excerpt = NULL ][, bool $thumb = false ][, mixed $date = false ]) : mixed
Parameters
$number : int = 5

Number of items to get

$type : string = 'news'

'albums', 'images','news','pages', "all" for all combined.

$specific : string = NULL

If $type = 'albums' or 'images' name of album

$excerpt : bool = NULL

If a text excerpt (gallery items: description; Zenpage items: content) should be shown. NULL for none or number of length

$thumb : bool = false

For $type = 'albums' or 'images' if a thumb should be shown (default size as set on the options)

$date : mixed = false

        
On this page

Search results