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

def zope-coreblog-1.0::COREBlog::COREBlog::newPostMW (   self,
  postid,
  username,
  password,
  content,
  publish,
  REQUEST = None 
)

post new entry (remapped from newPost) 

Definition at line 1809 of file COREBlog.py.

                                              :
        """ post new entry (remapped from newPost) """
        import xmlrpclib
        #get entry
        c = convert_charcode
        bc = self.get_blogclient_charcode()

        c_d = self.map_content(content)

      fmt = format_html
      if c_d['mt_convert_breaks'] == '1':
          fmt = format_plain
        new_id = self.manage_addEntry(author=username,
                             body=c(c_d['description'],self.get_charcode(),bc),
                             extend=c(c_d['mt_text_more'],self.get_charcode(),bc),
                             excerpt=c(c_d['mt_excerpt'],self.get_charcode(),bc),moderated=publish,
                             main_category=self.getProperty("blog_client_default_category"),
                             allow_comment=c_d['mt_allow_comments'],
                             receive_trackback=c_d['mt_allow_pings'],
                             title=c(c_d['title'],self.get_charcode(),bc),
                             subtitle='',format=fmt,
                             trackback_url=join(c_d['mt_tb_ping_urls'],'\n'),
                             sendnow=1)
        #sending trackbacks
        if len(c_d['mt_tb_ping_urls']) > 0:
            int_id = int(new_id)
            ent = self.getEntry(int_id)
            ent.sendTrackback()

        return str(new_id)



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


Generated by  Doxygen 1.6.0   Back to index