Functions

Add an IOTD to the database and return the ID of the new entry.

add_iotd(\URLPATH $url, \SHORT_TEXT $title, \LONG_TEXT $caption, \URLPATH $thumb_url, \BINARY $current, \BINARY $allow_rating, \SHORT_INTEGER $allow_comments, \BINARY $allow_trackbacks, \LONG_TEXT $notes, \?TIME $time, \?MEMBER $submitter, \BINARY $used, \?TIME $use_time, integer $views, \?TIME $edit_date) : \AUTO_LINK

Parameters

$url

\URLPATH

The URL to the IOTD image

$title

\SHORT_TEXT

The IOTD title

$caption

\LONG_TEXT

The IOTD caption

$thumb_url

\URLPATH

The URL to the IOTD thumbnail image

$current

\BINARY

Whether the IOTD is currently in use (note: setting this to 1 will not actually set the IOTD, and if it is 1, then the IOTD must be explicitly set only to this)

$allow_rating

\BINARY

Whether the IOTD may be rated

$allow_comments

\SHORT_INTEGER

Whether comments are allowed (0=no, 1=yes, 2=review style)

$allow_trackbacks

\BINARY

Whether the IOTD may be trackbacked

$notes

\LONG_TEXT

Notes for the IOTD

$time

\?TIME

The time of submission (NULL: now)

$submitter

\?MEMBER

The IOTD submitter (NULL: current member)

$used

\BINARY

Whether the IOTD has been used before

$use_time

\?TIME

The time the IOTD was used (NULL: never)

$views

integer

The number of views had

$edit_date

\?TIME

The edit date (NULL: never)

Returns

\AUTO_LINKThe ID of the IOTD just added

Delete an IOTD.

delete_iotd(\AUTO_LINK $id) 

Parameters

$id

\AUTO_LINK

The ID of the IOTD to delete

Edit an IOTD.

edit_iotd(\AUTO_LINK $id, \SHORT_TEXT $title, \LONG_TEXT $caption, \URLPATH $thumb_url, \URLPATH $url, \BINARY $allow_rating, \SHORT_INTEGER $allow_comments, \BINARY $allow_trackbacks, \LONG_TEXT $notes) 

Parameters

$id

\AUTO_LINK

The ID of the IOTD to edit

$title

\SHORT_TEXT

The IOTD title

$caption

\LONG_TEXT

The IOTD caption

$thumb_url

\URLPATH

The URL to the IOTD image

$url

\URLPATH

The URL to the IOTD thumbnail image

$allow_rating

\BINARY

Whether the IOTD may be rated

$allow_comments

\SHORT_INTEGER

Whether comments are allowed (0=no, 1=yes, 2=review style)

$allow_trackbacks

\BINARY

Whether the IOTD may be trackbacked

$notes

\LONG_TEXT

Notes for the IOTD

Set the IOTD.

set_iotd(\AUTO_LINK $id) 

Parameters

$id

\AUTO_LINK

The IOTD ID to set