HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

ocPortal Developer's Guide: Images Of The Day

» Return to Contents



sources/iotds.php

Global_functions_iotds.php

Function summary

AUTO_LINK 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)
void 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)
void delete_iotd (AUTO_LINK id)
void set_iotd (AUTO_LINK id)

AUTO_LINK 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)

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

Parameters…

Name url
Description The URL to the IOTD image
Type URLPATH

Name title
Description The IOTD title
Type SHORT_TEXT

Name caption
Description The IOTD caption
Type LONG_TEXT

Name thumb_url
Description The URL to the IOTD thumbnail image
Type URLPATH

Name current
Description 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)
Type BINARY

Name allow_rating
Description Whether the IOTD may be rated
Type BINARY

Name allow_comments
Description Whether comments are allowed (0=no, 1=yes, 2=review style)
Type SHORT_INTEGER

Name allow_trackbacks
Description Whether the IOTD may be trackbacked
Type BINARY

Name notes
Description Notes for the IOTD
Type LONG_TEXT

Name time
Description The time of submission (NULL: now)
Default value
Type ?TIME

Name submitter
Description The IOTD submitter (NULL: current member)
Default value
Type ?MEMBER

Name used
Description Whether the IOTD has been used before
Default value 0
Type BINARY

Name use_time
Description The time the IOTD was used (NULL: never)
Default value
Type ?TIME

Name views
Description The number of views had
Default value 0
Type integer

Name edit_date
Description The edit date (NULL: never)
Default value
Type ?TIME

Returns…

Description The ID of the IOTD just added
Type AUTO_LINK

Return to the function index for this class Expand: View the source code to this function

void 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)

Edit an IOTD.

Parameters…

Name id
Description The ID of the IOTD to edit
Type AUTO_LINK

Name title
Description The IOTD title
Type SHORT_TEXT

Name caption
Description The IOTD caption
Type LONG_TEXT

Name thumb_url
Description The URL to the IOTD image
Type URLPATH

Name url
Description The URL to the IOTD thumbnail image
Type URLPATH

Name allow_rating
Description Whether the IOTD may be rated
Type BINARY

Name allow_comments
Description Whether comments are allowed (0=no, 1=yes, 2=review style)
Type SHORT_INTEGER

Name allow_trackbacks
Description Whether the IOTD may be trackbacked
Type BINARY

Name notes
Description Notes for the IOTD
Type LONG_TEXT

(No return value)


Return to the function index for this class Expand: View the source code to this function

void delete_iotd(AUTO_LINK id)

Delete an IOTD.

Parameters…

Name id
Description The ID of the IOTD to delete
Type AUTO_LINK

(No return value)


Return to the function index for this class Expand: View the source code to this function

void set_iotd(AUTO_LINK id)

Set the IOTD.

Parameters…

Name id
Description The IOTD ID to set
Type AUTO_LINK

(No return value)


Return to the function index for this class Expand: View the source code to this function