entryedit.php

Used to create a new blog entry or article or to edit an existing one..  To delete an entry, refer to the delentry.php file.

The three main input fields on this page are the entry subject, topics, and the post itself.  When creating new articles, there is also a box for the article path, which is the directory name in which th article will be stored.

The topic box has a drop-down list of topics next to it.  This control uses JavaScript such that selecting an item from the drop-down will add it to the comma-separated list of entry topics, provided it is not already in the list.

The main post body is entered in the textarea.  Input is expected to be in the format given in the entry options below the textarea.  If the input mode is set to LBCode, then some simple editor buttons will be displayed just above the textarea.  These use JavaScript to insert prompt for text and insert the appropriate LBCode markup.  There is currently no included HTML post editor, but plugins for both the FCKeditor and TinyMCE JavaScript rich-text HTML editors are available for download.

There are a number of entry options which are initially hidden on the page.  These include a file upload box, a podcast/enclosure URL box, a “sticky” checkbox for articles, the markup mode box, checkboxes to allow posting of comments, TrackBacks, and Pingbacks to the entry, and finally a checkbox determining whether to send Pingback pings after the entry is posted.  Default settings for most of these options are configured on the updateblog.php page.

There are a few couple of settings in the system.ini file that are relevant here.  The first is the AllowInitUpload setting, which determines the number of file upload boxes that appear on the page.  The default setting is 1, but it can be increased to allow multiple files to be uploaded.  To disable uploading files from the new entry page, set this to 0.

The second setting is AllowLocalPingbacks.  This setting determines whether or not Pingback pings should be sent to URLs on the same server.  This might be desirable as an easy way to back-link references to other entries on your blog or other blogs on your server.  To disable this and only send pings to remote servers, set this value to 0.

Summary
entryedit.phpUsed to create a new blog entry or article or to edit an existing one..
Functions
handle_pingback_pingsHandles pingbacks for an entry.
handle_uploadsHandles uploads that are sent when an entry is edited.
handle_saveTakes care of saving an entry and handling the uploads, if applicable.

Functions

handle_pingback_pings

function handle_pingback_pings(&$ent)

Handles pingbacks for an entry.  Sends pingbacks to the appropriate links in the entry body, and returns an error string, if applicable.

Parameters

entThe entry in question.

Returns

An error string.  If there were no errors sending any pingbacks, then the null string is returned.

handle_uploads

function handle_uploads(&$ent)

Handles uploads that are sent when an entry is edited.  It checks the file uploads and moves them to the entry directory.

Parameters

entThe entry we’re editing.

Returns

If all uploads are successful, returns true.  Otherwise, returns an array of error messages, one element for each upload error.

handle_save

function handle_save(&$ent,  
&$blg,  
&$errors,  
$is_draft,  
$is_art =  false)

Takes care of saving an entry and handling the uploads, if applicable.

Parameters

entThe current entry object.
blgThe current blog object, i.e. the parent of ent.
errorsReference string parameter to return error messages generated by uploads.

Returns:A boolean or numeric false on failure, non-false on success.

function handle_pingback_pings(&$ent)
Handles pingbacks for an entry.
function handle_uploads(&$ent)
Handles uploads that are sent when an entry is edited.
function handle_save(&$ent,  
&$blg,  
&$errors,  
$is_draft,  
$is_art =  false)
Takes care of saving an entry and handling the uploads, if applicable.
Used to delete a blog entry.
Used to update the settings on an existing blog.
The system.ini file is used to store selected default global settings.
Close