Functions

Add a word to the word-filter.

add_wordfilter_word(\SHORT_TEXT $word, \SHORT_TEXT $replacement, \BINARY $substr) 

Parameters

$word

\SHORT_TEXT

Word to add to the word-filter

$replacement

\SHORT_TEXT

Replacement (blank: block entirely)

$substr

\BINARY

Whether to perform a substring match

Find a similar but non conflicting filename to $file in the given directory.

find_derivative_filename(\PATH $dir, string $file, boolean $shun_gif) : string

Parameters

$dir

\PATH

Directory

$file

string

Preferred filename

$shun_gif

boolean

Whether GIF files are made as PNG fiels

Returns

stringFilename to use

Force a page refresh due to maximum execution timeout.

i_force_refresh() 

Check to see if the given id of the given type has been imported (if it has a mapping).

import_check_if_imported(\ID_TEXT $type, string $id_old) : boolean

Parameters

$type

\ID_TEXT

An importation type code, from those ocPortal has defined

$id_old

string

The source (old, original) ID of the mapping

Returns

booleanWhether it has been imported

Get the remapping for the id in the specified type.

import_id_remap_get(\ID_TEXT $type, string $id_old, boolean $fail_ok) : \?AUTO_LINK

Whether it returns NULL or gives an error message depends on $fail_ok.

Parameters

$type

\ID_TEXT

An importation type code, from those ocPortal has defined

$id_old

string

The source (old, original) ID of the mapping

$fail_ok

boolean

If it is okay to fail to find a mapping

Returns

\?AUTO_LINKThe remapping (NULL: not found)

Set a mapping, indicating completion of importing some kind of content.

import_id_remap_put(\ID_TEXT $type, string $id_old, \AUTO_LINK $id_new) 

This mapping may be used later for importing related content that requires a remapped identifier.

Parameters

$type

\ID_TEXT

An importation type code, from those ocPortal has defined

$id_old

string

The source (old, original) ID of the mapping

$id_new

\AUTO_LINK

The destination (new) ID of the mapping

Standard code module initialisation function.

init__import() 

Switch OCF to run over the local site-DB connection.

ocf_over_local() 

Useful when importing and our forum driver is actually connected to a forum other than OCF.

Undo ocf_over_local.

ocf_over_msn()