Functions

Add a word to the word-filter.

add_wordfilter_word(\SHORT_TEXT $word, \SHORT_TEXT $replacement = '', \BINARY $substr = 0
package import

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

Switch Conversr to run over the local site-DB connection. Useful when importing and our forum driver is actually connected to a forum other than Conversr.

cns_over_local() 
package import

Undo cns_over_local.

cns_over_msn() 
package import

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

find_derivative_filename(\PATH $dir, string $file, boolean $shun_gif = false) : string
package import

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() 
package import

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
package import

Parameters

$type

\ID_TEXT

An importation type code, from those Composr has defined

$id_old

string

The source (old, original) ID of the mapping

Returns

booleanWhether it has been imported

Returns the NEW ID of an imported old ID, for the specified importation type. Whether it returns NULL or gives an error message depends on $fail_ok.

import_id_remap_get(\ID_TEXT $type, string $id_old, boolean $fail_ok = false) : \?AUTO_LINK
package import

Parameters

$type

\ID_TEXT

An importation type code, from those Composr has defined (E.g. 'download', 'news', ...)

$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 new ID (null: not found)

Set the NEW ID for an imported old ID, which also tacitly indicates completion of importing an item of some type of content. This mapping (old ID to new ID) may be used later for importing related content that requires the new identifier. import_id_remap_get is the inverse of this function.

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

Parameters

$type

\ID_TEXT

An importation type code, from those Composr has defined

$id_old

string

The source (old, original) ID of the mapping

$id_new

\AUTO_LINK

The destination (new) ID of the mapping

Load lots that the importer needs to run.

load_import_deps() 
package import

Load lots that the importer needs to run.

post_import_cleanup() 
package import

Turn index maintenance off to help speed import, or back on.

set_database_index_maintenance(boolean $on) 
package import

Parameters

$on

boolean

Whether index maintenance should be on.