Logo Search packages:      
Sourcecode: zope-coreblog version File versions

def zope-coreblog-1.0::COREBlog::COREBlog::newPost (   self,
  appkey,
  blogid,
  username,
  password,
  content,
  publish,
  REQUEST = None 
)

post new entry

Definition at line 1673 of file COREBlog.py.

                                              :
        """ post new entry"""
        #get entry
        c = convert_charcode
        bc = self.get_blogclient_charcode()
        title,cats,body = parse_blogger_post(content)
        cl = self.name2category_id(cats)
        if not cl:
            cl = [self.getProperty("blog_client_default_category")]

        comment_status = comment_open
        trackback_status = trackback_open
        if not self.getProperty("allow_comment_moblog"):
            comment_status = comment_none
        if not self.getProperty("allow_trackback_moblog"): 
            trackback_status = trackback_none

        #Post for MT compatibles
        new_id = self.manage_addEntry(author=username,
                             body=c(body,self.get_charcode(),bc),
                             extend='',
                             excerpt='',moderated=publish,
                             main_category=cl[0],sub_category=cl[1:],
                             title=c(title,self.get_charcode(),bc),
                             subtitle='',format=format_html,
                             allow_comment=comment_status,
                             receive_trackback=trackback_status,
                             sendnow=1)

        return str(new_id)


    security.declareProtected(ManageCOREBlog, 'editPost')
    def editPost(self,appkey,postid,username,password,


Generated by  Doxygen 1.6.0   Back to index