Functions
Adds an author (re-creating them if they already exist - thus it also serves to edit; the reason for this is the fluidity of authors - members are automatically authors even before an author profile is made)
add_author(\ID_TEXT $author, \URLPATH $url, \?MEMBER $member_id, \LONG_TEXT $description, \LONG_TEXT $skills, \?SHORT_TEXT $meta_keywords = ''
, \?LONG_TEXT $meta_description = ''
)
Parameters
$author
\ID_TEXT
The name of an author
$url
\URLPATH
The URL to the authors home page
$member_id
\?MEMBER
The member ID of the author (null: no forum profile)
$description
\LONG_TEXT
A description of the author
$skills
\LONG_TEXT
A terse string showing author skills
$meta_keywords
\?SHORT_TEXT
Meta keywords for this resource (null: do not edit) (blank: implicit)
$meta_description
\?LONG_TEXT
Meta description for this resource (null: do not edit) (blank: implicit)
Shows an HTML page of all authors clickably.
authors_script()
Delete an author
delete_author(\ID_TEXT $author)
Parameters
$author
\ID_TEXT
The name of an author
Get a member ID from an author name. First by trying authors table, second by trying forum usernames.
get_author_id_from_name(\ID_TEXT $author) : \?MEMBER
Parameters
$author
\ID_TEXT
The name of an author
Returns
\?MEMBER
The member ID (null: none found)
Find if a member's usergroup has permission to delete an author
has_delete_author_permission(\MEMBER $member, \ID_TEXT $author) : boolean
Parameters
$member
\MEMBER
The member being checked whether to have the access
$author
\ID_TEXT
An author
Returns
boolean
Whether the member can edit this author
Find if a member's usergroup has permission to edit an author
has_edit_author_permission(\MEMBER $member, \ID_TEXT $author) : boolean
Parameters
$member
\MEMBER
The member being checked whether to have the access
$author
\ID_TEXT
An author
Returns
boolean
Whether the member can edit this author
Merge two authors.
merge_authors(\ID_TEXT $from, \ID_TEXT $to)
Parameters
$from
\ID_TEXT
The first author (being removed effectively)
$to
\ID_TEXT
The second author (subsuming the first)
Render an author box.
render_author_box(array $row, \ID_TEXT $zone = '_SEARCH'
, boolean $give_context = true
, \ID_TEXT $guid = ''
) : \Tempcode
Parameters
$zone
\ID_TEXT
Zone to link through to
$give_context
boolean
Whether to include context (i.e. say WHAT this is, not just show the actual content)
$guid
\ID_TEXT
Overridden GUID to send to templates (blank: none)
Returns
\Tempcode
The author box