Announcement

Collapse
No announcement yet.

Custom attachments in bbV2

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Custom attachments in bbV2

    I have been using Impex to convert our existing bbv2 message board to vb3. Apparently the design of the attachments that Impex has for bbv2 does not match the attacment table on our message board.

    Our message board has the following for the attachments table:
    Code:
    -- phpMyAdmin SQL Dump
    -- version 2.7.0-pl2
    -- http://www.phpmyadmin.net
    -- 
    -- Host: localhost
    -- Generation Time: Jun 04, 2008 at 09:17 AM
    -- Server version: 4.1.22
    -- PHP Version: 5.2.1
    -- 
    -- Database: `may20bbv2`
    -- 
    -- --------------------------------------------------------
    -- 
    -- Table structure for table `attachments`
    -- 
    CREATE TABLE `attachments` (
      `numrates` int(5) default NULL,
      `attachid` int(5) NOT NULL default '0',
      `whorated` varchar(255) default NULL,
      `gpid` int(5) default NULL,
      `rating` varchar(4) default NULL,
      `filename` varchar(255) default NULL,
      `pmid` int(5) default NULL,
      `cont` longblob,
      `blurb` varchar(255) default NULL,
      PRIMARY KEY  (`attachid`)
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
    I tried looking at the Impex code to see what it was looking for, but I am not sure how the table definitions are managed. What I could find and understand looked like a different table design.

    When I try to run the attachment import from Impex, it reports invalid object for all of the attachments.

    If I knew what Impex was looking for I could run a query against the source table to generate the expected table.

    All of the source attachments are held in files with a sequence number (the attachment id) prefixed to the uploaded file name. i.e. "457 - my very strange clock.jpg."

    I would welcome any suggestions on how to proceed. This has me stymied.
    Tom McIntyre
    http://mb.nawcc.org - My vBulletin site
    http://awco.org - My home

  • #2
    Does it report what it is invalid on ?
    I wrote ImpEx.

    Blog | Me

    Comment


    • #3
      All 14,900+ attachments return the same error string:
      Invalid attachment object, skipping file.data
      The Impexerror table is empty.
      Tom McIntyre
      http://mb.nawcc.org - My vBulletin site
      http://awco.org - My home

      Comment


      • #4
        ImpEx currently expects the data to be in the "cont" value of the database opposed to a local file system.

        Can you move the attachment data in the source to the database before the import ?
        I wrote ImpEx.

        Blog | Me

        Comment


        • #5
          There is no supplied tool to do that and I don't think it can be done with the sql string inside of phpAdmin.

          With quite a bit of effort I might be able to do it using php and MySQL directly. However, I have not done much coding in the last 15 years and I am not currently familiar with Linux and the MySQL command environment.

          I had hoped that since the attachments could be in files with vBulletin I would be able to use the files that are there. There are almost a Gbyte of files so moving them around is a pain.
          Tom McIntyre
          http://mb.nawcc.org - My vBulletin site
          http://awco.org - My home

          Comment


          • #6
            There is nothing in bbV2 to do that ? Once you've installed the board and set it up you can move back and forth ?
            I wrote ImpEx.

            Blog | Me

            Comment


            • #7
              I do not think the capability to move them exists but I do not know the code inside bbv2.

              This particular message board is set up as though there were a remote picture server using ftp to transfer the pictures. Here are the settings from the admin control panel.
              Code:
              If you want attached files to be sent (by FTP) to another server, enter the 
              FTP details of the server you wish to send them to below. Important: Make 
              sure the directory that you specify is set up not to run CGI scripts! 
              Attachments will work fine without this option.
               
               FTP Hostname nawcc-mb.com
               
               FTP Path /var/www/html/pictures
               
               FTP Username nawcc-mb
               
               FTP Password ********
               
               URL to attachments http://www.nawcc-mb.com/pictures
              There is nothing equivalent to the vb3 dialog to move the attachments between database and file storage. I am guessing that if the ftp facility were not set up, they would have been stored in the database.

              I will try to read the bbv2 documentation on this.
              Last edited by tommythejoat; Wed 4th Jun '08, 4:19pm. Reason: garbled stuff in form image.
              Tom McIntyre
              http://mb.nawcc.org - My vBulletin site
              http://awco.org - My home

              Comment


              • #8
                I think the only thing I could do is alter ImpEx to check the cont value, and if it is null, look for the file name in a user entered directory, as some of the other systems work.
                I wrote ImpEx.

                Blog | Me

                Comment


                • #9
                  I looked at the bbv2 documentation and the only management for attachments is a feature to delete them.

                  I would really appreciate it if a modified Impex could be produced. The filename in the directory is the attachment id concatenated with a hyphen (actually " - ") and the original file name.

                  I think that this strange structure was a result of converting the board originally from Infopop to bbv2.

                  Thank you very much for your help.
                  Tom McIntyre
                  http://mb.nawcc.org - My vBulletin site
                  http://awco.org - My home

                  Comment


                  • #10
                    Ah so it is more of a hack opposed to a setting within bbV2, as I couldn't find anything about it.
                    I wrote ImpEx.

                    Blog | Me

                    Comment


                    • #11
                      I think it is probably a hack, but I do not know. The documentation on bbv2 is pretty sparse anyway. The people who did the work are no longer communicating.

                      I have copied the files to a directory on the new system where vb3 will be. Since vb3 can manage the files either in the database or a directory, would it be simpler to just convert the file names from the old database to the new one?

                      The performance of the bbv2 board is so poor that it is affecting the community, which is pretty highly motivated. I really would like to get it moved to vb3.
                      Tom McIntyre
                      http://mb.nawcc.org - My vBulletin site
                      http://awco.org - My home

                      Comment


                      • #12
                        ImpEx will have to be involved with the import of the attachments, so the database is updated correctly with the id's and path etc.

                        If you start a support ticket and ask for me and link to this thread I'll see what I can do.
                        I wrote ImpEx.

                        Blog | Me

                        Comment

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