How to manually add post to a thread

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Saeed Fazlollahzadeh
    Member
    • Jul 2016
    • 72
    • 5.2.x

    How to manually add post to a thread

    Hello, we've written a Python bot to gather info from other sites and post it in our forum.
    As far as I know, I've told the programmer to create a thread in forum (not in phpmyadmin), so till now we have one thread+threadid, one post+postid.
    I told him to insert data in `post` table like this:

    INSERT INTO `post` (`postid`, `threadid`, `parentid`, `username`, `userid`, `title`, `dateline`, `pagetext`, `allowsmilie`, `showsignature`, `ipaddress`, `iconid`, `visible`, `attach`, `infraction`, `reportthreadid`, `htmlstate`) VALUES
    (4, 4, 0, 'Saeed', 1, 'First Thread', 1422947684, 'The Content of the First Post', 1, 0, '192.168.0.1', 0, 1, 0, 0, 0, 'on_nl2br');

    It adds the post, but I'm not sure whether to insert any more data in other tables like `datastore`, `setting`, etc.
    It seems to successfully add the post. I told him it's not necessary to increase user's post count in `user` table, because we do not need the bot's post count, and the forum in which the bot is replying and sending post is hidden from other users (only admin-level users can see the forum).

    Appreciations
  • dany_danay
    New Member
    • Mar 2010
    • 2
    • 4.0.0

    #2
    Im very interestd on this if someone can help

    Comment

    • LockedOnLaw
      Senior Member
      • Apr 2010
      • 2311
      • 6.X

      #3
      vBulletin should not answer this question as content scraping is usually illegal.

      Comment

      • Saeed Fazlollahzadeh
        Member
        • Jul 2016
        • 72
        • 5.2.x

        #4
        Originally posted by In Omnibus
        vBulletin should not answer this question as content scraping is usually illegal.

        http://blog.galkinlaw.com/weblaw-sco...-data-scraping
        That's mis-understanding, my friend.

        All of my sites are run in WordPress, and I want this bot to gather data from only my sites to add it in my forum.
        There's no scraping.

        Gathering data from my sites to insert into my site.

        Comment

        • Mark.B
          vBulletin Support
          • Feb 2004
          • 24288
          • 6.0.X

          #5
          The code you have posted LOOKS correct, but I am not a coder so cannot say 100%.

          This question is better asked on vbulletin.org...nothing to do with the scraping issue, it's because it is custom coding. We do not offer official support for custom coding (as the support team are not coders). vbulletin.org is the place for custom coding queries.
          MARK.B
          vBulletin Support
          ------------
          My Unofficial vBulletin 6.0.0 Demo: https://www.talknewsuk.com
          My Unofficial vBulletin Cloud Demo: https://www.adminammo.com

          Comment

          • Wayne Luke
            vBulletin Technical Support Lead
            • Aug 2000
            • 74161

            #6
            The easiest way to import posts from your wordpress site is to use vBulletin's RSS Feed Import tools. You can set this up under "RSS Feeds" in the AdminCP.
            Translations provided by Google.

            Wayne Luke
            The Rabid Badger - a vBulletin Cloud demonstration site.
            vBulletin 5 API

            Comment

            widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
            Working...