What is the best way to handle this?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lowlight
    Senior Member
    • Mar 2001
    • 175

    What is the best way to handle this?

    I would like to have all posts made prior to Jan 1, 2008 have their own template, or only made visible as Vbulletin's archive/sitemap/print-only mode.

    What is the best way to do this? Use the Move Thread function in the CP? Or seek out a modification that automatically applies a template to threads based on date?

    Any ideas would be greatly appreciated

    Thanks!
  • Trevor Hannant
    vBulletin Support
    • Aug 2002
    • 24359
    • 5.7.X

    #2
    You would need to move them all to a set of sub-forums and set the style specifically for those forums.
    Vote for:

    - Admin Settable Paid Subscription Reminder Timeframe (vB6)
    - Add Admin ability to auto-subscribe users to specific channel(s) (vB6)

    Comment

    • lowlight
      Senior Member
      • Mar 2001
      • 175

      #3
      Thanks. That is what I thought.

      I had an issue come up during this though. Whenever I try to add a child style, it uses id=0, and any changes made to it do not come through (it just displays the parent style).

      I cannot delete it now (it says id=0 does not exist) and I cannot add a new child (it says id=0 is a duplicate)

      Any ideas?

      I have 4 total styles right now, id=12, id=13, id=14, and id=-2 (mobile API). I deleted all the rest, including the default.

      Comment

      • Trevor Hannant
        vBulletin Support
        • Aug 2002
        • 24359
        • 5.7.X

        #4
        To troubleshoot this, first reupload all the original vB non-image files (except install.php). Make sure you upload these in ASCII format and overwrite the ones on the server. Also be sure to upload the admincp files to whichever directory you have set in your config.php file. Then run 'Suspect File Versions' in Diagnostics to make sure you have all the original files for your version and that none show 'File does not contain expected contents':

        Admin CP -> Maintenance -> Diagnostics -> Suspect File Versions

        [Note: In some cases you may also need to remove any of the listed .xml files in the includes/xml directory.]

        Next, disable all plugins.Note: To temporarily disable the plugin system, edit config.php and add this line right under <?php:

        define('DISABLE_HOOKS', true);

        Then if you still have this problem, create a new style and choose no parent style. This will force it to use the default templates. Finally empty your browser cache, close all browser windows then try again. Make sure you change to the new style and view your forums with it.

        Do you have the same problem?
        Vote for:

        - Admin Settable Paid Subscription Reminder Timeframe (vB6)
        - Add Admin ability to auto-subscribe users to specific channel(s) (vB6)

        Comment

        • lowlight
          Senior Member
          • Mar 2001
          • 175

          #5
          I'm getting "File does not contain expected contents" for some plugin files not related to the main VB core files. I am going to continue with the rest of your instructions now

          Comment

          • lowlight
            Senior Member
            • Mar 2001
            • 175

            #6
            I still cannot add a style, even with no parent. It gives the MySQL error:

            Database error in vBulletin 3.8.7:

            Invalid SQL:

            INSERT INTO style
            (title)
            VALUES
            ('test');

            MySQL Error : Duplicate entry '0' for key 1
            Error Number : 1062
            Request Date : Monday, June 20th 2011 @ 06:16:49 AM
            Error Date : Monday, June 20th 2011 @ 06:16:49 AM
            Script : http://xxx/forums/admincp/template.php?do=insertstyle
            Referrer : http://xxx/forums/admincp/template.php?do=addstyle
            IP Address :
            Username :
            Classname : vB_Database
            MySQL Version : 5.0.77

            Comment

            • lowlight
              Senior Member
              • Mar 2001
              • 175

              #7
              I found this solution

              It worked by only using the line I needed. However, when I tried to run the whole thing, it gave this error:

              An error occurred while attempting to execute your query. The following information was returned.
              error number: 1064
              error desc: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ALTER TABLE `adminmessage` CHANGE `adminmessageid` `adminmessageid` INT(10) UNSI' at line 2

              It appears to be chopping off the queries...

              Comment

              • Trevor Hannant
                vBulletin Support
                • Aug 2002
                • 24359
                • 5.7.X

                #8
                In AdminCP, go to Maintenance > Update Counters > Rebuild Styles and run that. If that doesn't fix this, run the following from:

                AdminCP > Maintenance > Execute SQL Query

                Make sure that your userid is able to run queries by editing the following section of the config.php file:

                Code:
                 // ****** USERS WITH QUERY RUNNING PERMISSIONS ******
                 // The users specified here will be allowed to run queries from the control panel.
                 // See the above entries for more information on the format.
                 // Please note that the ability to run queries is quite powerful. You may wish
                 // to remove all user IDs from this list for security reasons.
                $config['SpecialUsers']['canrunqueries'] = 'x';
                where 'x' is your userid:

                Code:
                ALTER TABLE `style` CHANGE `styleid` `styleid` SMALLINT( 5 ) UNSIGNED NOT NULL AUTO_INCREMENT;
                Vote for:

                - Admin Settable Paid Subscription Reminder Timeframe (vB6)
                - Add Admin ability to auto-subscribe users to specific channel(s) (vB6)

                Comment

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