Hotaru Docs

 [həʊdɒks]

Function Reference/addPost

Description

Adds a new post to the database.

Usage

<?php addPost( ) ?>

Parameters

none. paramaters should be assigned to the $h->post object

$h->post->author $h->post->status $h->post->type $h->post->category $h->post->tags $h->post->title $h->post->origUrl $h->post->domain $h->post->url $h->post->content $h->post->subscribe

Return Values

boolean true.

Examples

<?php
     $h->post = new Post();
     $h->post->title = "title";
     $h->post->content = "content";
     $h->post->type ="news";
     $h->addPost();
?>

Source File

addPost() is located in content/hotaru.php which calls the post.php file from the LIBS folder.

Related