Unofficial SMF API Documentation

./Sources/Profile-Export.php

export_profile_data

function export_profile_data(int $uid): void

Initiates exports a member’s profile, posts, and personal messages to a file.

Type Parameter Description
int $uid The ID of the member whose data we’re exporting.

download_export_file

function download_export_file(int $uid): void

Downloads exported profile data file.

Type Parameter Description
int $uid The ID of the member whose data we’re exporting.

export_attachment

function export_attachment(int $uid): void

Allows a member to export their attachments.

Mostly just a wrapper for showAttachment() but with a few tweaks.

Type Parameter Description
int $uid The ID of the member whose data we’re exporting.

get_export_formats

function get_export_formats(): array

Helper function that defines data export formats in a single location.

create_export_dir

function create_export_dir($fallback = ''): string|bool

Returns the path to a secure directory for storing exported profile data.

The directory is created if it does not yet exist, and is secured using the same method that we use to secure attachment directories. Files in this directory can only be downloaded via the download_export_file() function.

get_xslt_stylesheet

function get_xslt_stylesheet(string $format, int $uid): array

Provides an XSLT stylesheet to transform an XML-based profile export file into the desired output format.

Type Parameter Description
string $format The desired output format. Currently accepts ‘HTML’ and ‘XML_XSLT’.
int $uid The ID of the member whose data we’re exporting.
Integration hooks
integrate_export_xslt_variables
integrate_export_xslt_stylesheet

export_load_css_js

function export_load_css_js(): void

Loads and prepares CSS and JavaScript for insertion into an XSLT stylesheet.

Integration hooks
integrate_pre_css_output
integrate_pre_javascript_output
integrate_pre_javascript_output

Suggest an edit to this page on GitHub