EntriesFlat EntriesFlat(
[
$loadindex = TRUE], [
$allow_write = TRUE]
)
|
|
Parameters:
|
|
$loadindex: |
|
|
|
$allow_write: |
|
void checkTimedPublish(
)
|
|
Checks if any entries set to 'timed publish' should be published.
void check_current_index(
)
|
|
void clearIndex(
string
$type
)
|
|
Clears the index for searching or tags (by deleteing all files whose filename don't starting with 'filtered_words' or 'index.html').
Parameters:
void delete_comment(
int
$uid, [boolean
$save = true]
)
|
|
Deletes a comment from the current entry. Also deletes it from the moderation queue and from latest comments.
Parameters:
|
int |
$uid: |
|
|
boolean |
$save: |
whether the entry should be saved. |
boolean delete_entries(
array
$ids
)
|
|
Delete one or more entries
Parameters:
Deletes the current entry (and it's tags and comments).
void delete_trackback(
int
$uid, [boolean
$save = true]
)
|
|
Deletes a trackback from the current entry. Also deletes it from the last trackbacks.
Parameters:
|
int |
$uid: |
|
|
boolean |
$save: |
whether the entry should be saved. |
boolean depublish_entries(
array
$ids
)
|
|
Set one or more entries to 'hold'
Parameters:
boolean entry_exists(
int
$code
)
|
|
Tells if the entry exists - flat file implementation.
Parameters:
|
int |
$code: |
The code/id of the entry. |
array getArchiveArray(
[boolean
$force = FALSE], [
$unit_para = ''], string
$unit
)
|
|
Gets an array of archives - flat file implementation.
Reads or creates/updates "ser-archives.php". The file contains 3 arrays - one for each time unit.
Parameters:
|
boolean |
$force: |
tells if "ser-archives.php" should be updated |
|
string |
$unit: |
the unit of the archives |
|
|
$unit_para: |
|
integer get_code_from_uri(
$uri, string
$date, string
$code
)
|
|
Gets a code from a given $uri and $date.
Parameters:
|
string |
$code: |
|
|
string |
$date: |
|
|
|
$uri: |
|
array get_comment(
int
$uid
)
|
|
Returns a comment from the current entry.
Parameters:
string get_date(
int
$code
)
|
|
Gets the date for an entry
Parameters:
int get_entries_count(
[mixed
$params = false]
)
|
|
Gets the number of entries
Parameters:
|
mixed |
$params: |
optional, the same as read_entries |
array get_entry_by_uri(
string
$uri
)
|
|
Get an entry by it's (complete) URI The entry is returned as an associative array.
Parameters:
int get_next_code(
int
$num
)
|
|
Gets the code of the next entry - flat file implementation.
Parameters:
int get_previous_code(
int
$num
)
|
|
Gets the code of the previous entry - flat file implementation.
Parameters:
array get_trackback(
int
$uid
)
|
|
Returns a trackback from the current entry.
Parameters:
array guess_entry(
string
$uri, string
$date
)
|
|
Tries to guess an entry by it's (incomplete) URI and date (if necessary). The entry is returned as an associative array.
Parameters:
|
string |
$uri: |
|
|
string |
$date: |
|
void index_entries(
$dirname
)
|
|
Parameters:
void intersect(
$arr1,
$arr2
)
|
|
Parameters:
void make_entry_index_filename(
)
|
|
boolean publish_entries(
array
$ids
)
|
|
Set one or more entries to 'publish'
Parameters:
void read_admin_entries(
$params
)
|
|
Admin version of read_entries
SQL has a difference here, but flat files don't
Parameters:
array read_entries(
array
$params
)
|
|
Read a bunch of entries
Parameters:
array read_entry(
mixed
$code, [string
$date = '']
)
|
|
Retrieves a full entry as an associative array, and returns it. The $code parameter can be a code/uid or an URI. The optional $date parameter helps to narrow it down, if there's more than one option.
Parameters:
|
mixed |
$code: |
|
|
string |
$date: |
|
void read_entry_filename(
$filename, [
$updateindex = TRUE], [
$force = FALSE]
)
|
|
Parameters:
|
|
$filename: |
|
|
|
$updateindex: |
|
|
|
$force: |
|
void read_entry_index(
$filename
)
|
|
Parameters:
array read_lasttrackbacks(
array
$params
)
|
|
Read the last trackbacks
Parameters:
array read_latestcomments(
array
$params
)
|
|
Read the latest comments
Parameters:
boolean save_entry(
[boolean
$update_index = TRUE]
)
|
|
Saves the current entry - flat file implementation.
Returns true if successfully saved. Current implementation seems to return true no matter what...
Parameters:
|
boolean |
$update_index: |
Whether to update the date index. |
array set_entry(
array
$entry
)
|
|
Sets the current entry to the contents of $entry - flat file implementation.
Returns the inserted entry as it got stored in the database with correct code/id.
Parameters:
|
array |
$entry: |
The entry to be inserted |
void set_filename(
[
$code = ""]
)
|
|
Parameters:
void update_index(
[
$update = TRUE]
)
|
|
Parameters:
void write_entry_index(
[
$force = FALSE]
)
|
|
Parameters: