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: User submission

» Return to Contents



sources/submit.php

Global_functions_submit.php

Function summary

boolean content_validated (ID_TEXT content_type, ID_TEXT content_id)
void send_content_validated_notification (ID_TEXT content_type, ID_TEXT content_id)
void send_validation_request (ID_TEXT type, ?ID_TEXT table, boolean non_integer_id, ID_TEXT id, tempcode url, ?MEMBER member_id)
?string give_submit_points (ID_TEXT type, ?MEMBER member)
array wrap_probe_ip (IP ip)
void ban_ip (IP ip, LONG_TEXT descrip)
void unban_ip (IP ip)

boolean content_validated(ID_TEXT content_type, ID_TEXT content_id)

Find whether some content is validated.

Parameters…

Name content_type
Description Content type
Type ID_TEXT

Name content_id
Description Content ID
Type ID_TEXT

Returns…

Description Whether it is validated
Type boolean

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

void send_content_validated_notification(ID_TEXT content_type, ID_TEXT content_id)

Send a "your content has been validated" notification out to the submitter of some content. Only call if this is true ;).

Parameters…

Name content_type
Description Content type
Type ID_TEXT

Name content_id
Description Content ID
Type ID_TEXT

(No return value)


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

void send_validation_request(ID_TEXT type, ?ID_TEXT table, boolean non_integer_id, ID_TEXT id, tempcode url, ?MEMBER member_id)

Send (by e-mail) a validation request for a submitted item to the admin.

Parameters…

Name type
Description The validation request will say one of this type has been submitted. By convention it is the language code of what was done, e.g. ADD_DOWNLOAD
Type ID_TEXT

Name table
Description The table saved into (NULL: unknown)
Type ?ID_TEXT

Name non_integer_id
Description Whether the ID field is not an integer
Type boolean

Name id
Description The validation request will say this ID has been submitted
Type ID_TEXT

Name url
Description The validation request will link to this URL
Type tempcode

Name member_id
Description Member doing the submitting (NULL: current member)
Default value
Type ?MEMBER

(No return value)


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

?string give_submit_points(ID_TEXT type, ?MEMBER member)

Give points to a member for submitting something, then returns the XHTML page to say so.

Parameters…

Name type
Description One of this type has been submitted. By convention it is the language code of what was done, e.g. ADD_DOWNLOAD
Type ID_TEXT

Name member
Description The member to give the points to (NULL: give to current member)
Default value
Type ?MEMBER

Returns…

Description A message about the member being given these submit points (NULL: no message)
Type ?string

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

array wrap_probe_ip(IP ip)

Find a member from their IP address. Unlike plain $GLOBALS['FORUM_DRIVER']->probe_ip, it has the benefit of looking in the adminlogs table also.

Parameters…

Name ip
Description The IP address to probe
Type IP

Returns…

Description The members found
Type array

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

void ban_ip(IP ip, LONG_TEXT descrip)

Ban the specified IP address.

Parameters…

Name ip
Description The IP address to ban
Type IP

Name descrip
Description Explanation for ban
Default value
Type LONG_TEXT

(No return value)


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

void unban_ip(IP ip)

Unban the specified IP address.

Parameters…

Name ip
Description The IP address to unban
Type IP

(No return value)


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