WIKINDX API 6.9.0

EXPORTCOMMON
in package

EXPORT COMMON class

Provides methods common to the export scripts. Exporting of both bibliographic formats (bibTeX, RIS etc.) and document formats (RTF, HTML etc.) is handled here.

Table of Contents

Properties

$browserTabID  : mixed
$db  : mixed
$sb  : mixed
$session  : mixed
$store  : mixed
$vars  : mixed

Methods

checkPrivate()  : bool
Check availability of comment or musing to this user
cleanInput()  : string
Do some cleaning of HTML input before further processing
documentExportToHtmlSections()  : string
Export of blocks of HTML text such as from the word processor, doing it in sections where source has sectionbreak in it.
failure()  : mixed
ftBib()  : string
Compile a bibliography for cited resources in footnotes style — best to re-initialize the bibCite object.
getComments()  : array<string|int, mixed>
Get resource's quote comments or paraphrase comments
getConcatenatedKeywords()  : array<string|int, mixed>
Get concatenated keywords for a resource for document export
getMusings()  : array<string|int, mixed>
Get resource's musings
htmlFooter()  : mixed
htmlHeader()  : mixed
ideasDetails()  : string
Add user details to ideas
initDocumentExportToHtml()  : object
Initialize the bibcite engine when exporting to HTML from the word processor.
inlineHtmlImagePlaceholders()  : string
Replace image src attribut by a placeholder pointing to a cached file on disk
makeForm()  : mixed
storeExportOptions()  : mixed
Store form data from RTF and HTML export options for resource lists and ideas NB Not for documentExportToHtml() which is for the word processor—options there are stored in the database/paper

Properties

$sb

private mixed $sb = "<span data-wikindxsectionbreak='1'>–––––––– section break –––––––––</span>"

Methods

checkPrivate()

Check availability of comment or musing to this user

private checkPrivate(mixed $row) : bool
Parameters
$row : mixed
Return values
bool

cleanInput()

Do some cleaning of HTML input before further processing

private cleanInput(string $text) : string
Parameters
$text : string
Return values
string

documentExportToHtmlSections()

Export of blocks of HTML text such as from the word processor, doing it in sections where source has sectionbreak in it.

private documentExportToHtmlSections(string $text, array<string|int, mixed> $exportPrefs[, bool $html = TRUE ]) : string
Parameters
$text : string
$exportPrefs : array<string|int, mixed>
$html : bool = TRUE

Default = TRUE

Return values
string

failure()

private failure(mixed $error) : mixed
Parameters
$error : mixed

ftBib()

Compile a bibliography for cited resources in footnotes style — best to re-initialize the bibCite object.

private ftBib(array<string|int, mixed> $resIds[, bool $wp = FALSE ][, bool $html = FALSE ][, array<string|int, mixed> $exportPrefs = [] ]) : string
Parameters
$resIds : array<string|int, mixed>
$wp : bool = FALSE

default FALSE

$html : bool = FALSE

default FALSE

$exportPrefs : array<string|int, mixed> = []

Default []

Return values
string

getComments()

Get resource's quote comments or paraphrase comments

private getComments(array<string|int, mixed> $mId, string $type) : array<string|int, mixed>
Parameters
$mId : array<string|int, mixed>
$type : string

('qc' or 'pc')

Return values
array<string|int, mixed>

getConcatenatedKeywords()

Get concatenated keywords for a resource for document export

private getConcatenatedKeywords(int $resId) : array<string|int, mixed>
Parameters
$resId : int
Return values
array<string|int, mixed>

getMusings()

Get resource's musings

private getMusings(array<string|int, mixed> $rId) : array<string|int, mixed>
Parameters
$rId : array<string|int, mixed>
Return values
array<string|int, mixed>

htmlFooter()

private htmlFooter([mixed $writeToFile = TRUE ]) : mixed
Parameters
$writeToFile : mixed = TRUE

htmlHeader()

private htmlHeader([mixed $writeToFile = TRUE ]) : mixed
Parameters
$writeToFile : mixed = TRUE

ideasDetails()

Add user details to ideas

private ideasDetails(object $userObj, array<string|int, mixed> $row) : string
Parameters
$userObj : object
$row : array<string|int, mixed>
Return values
string

initDocumentExportToHtml()

Initialize the bibcite engine when exporting to HTML from the word processor.

private initDocumentExportToHtml(array<string|int, mixed> $exportPrefs, bool $html) : object

Preferences set here are just for the HTML export Note that format-specific settings might be set elsewhere. e.g., RTF:

  1. General settings, word processor, lists, ideas etc. are initialized in RTFEXPORT::parseHtml()
  2. Word processor-specific export settings are initialized in dialog.php's exportRTF()
Parameters
$exportPrefs : array<string|int, mixed>
$html : bool
Return values
object

inlineHtmlImagePlaceholders()

Replace image src attribut by a placeholder pointing to a cached file on disk

private inlineHtmlImagePlaceholders(string $html) : string

The file is base64 encoded in cache/files and its filename is inserted inside src, using a pattern as "##.img.base64##"

Online resources are not embedded. Their src attribut remains intact.

The real insertion is postponed and delegated to \UTILS\insertExportImages() that consumes less memory.

Parameters
$html : string
Return values
string

makeForm()

private makeForm(mixed $checked, mixed $session, mixed $text[, mixed $comments = FALSE ]) : mixed
Parameters
$checked : mixed
$session : mixed
$text : mixed
$comments : mixed = FALSE

storeExportOptions()

Store form data from RTF and HTML export options for resource lists and ideas NB Not for documentExportToHtml() which is for the word processor—options there are stored in the database/paper

private storeExportOptions() : mixed

        
On this page

Search results