css.php error in ACP

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Ken Iovino
    Senior Member
    • Jan 2003
    • 463
    • 3.7.x

    css.php error in ACP

    I tried to change some settings in the acp for my style. When i went to save it said this

    Warning: implode(): Bad arguments. in /admincp/css.php on line 94
    There seems to have been a slight problem with the vBHackers.com database.
    Please try again by pressing the refresh button in your browser.
    An E-Mail has been dispatched to our Technical Staff, who you can also contact if the problem persists.

    We apologise for any inconvenience.

    Code:
    Database error in vBulletin 3.0.7:
    
    Invalid SQL: 
    			SELECT templateid, title, template, template_un, styleid, templatetype
    			FROM template
    			WHERE templateid IN()
    			AND (templatetype <> 'template' OR title IN ('header', 'footer', 'headinclude', 'phpinclude_start', 'phpinclude_end', 'editor_jsoptions_font', 'editor_jsoptions_size', 'editor_styles_button_normal', 'editor_styles_button_hover', 'editor_styles_button_down', 'editor_styles_button_selected', 'editor_styles_menu_normal', 'editor_styles_menu_hover', 'editor_styles_menu_down', 'editor_styles_popup_down'))
    		
    mysql error: 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 ')
    			AND (templatetype <> 'template' OR title IN ('header', 'fo
    
    mysql error number: 1064
    
    Date: Thursday 12th of May 2005 09:30:39 PM
    Script: http://www.vbhackers.com/forum/admincp/css.php
    Referer: forum/admincp/css.php?s=&do=edit&dowhat=all&group=&dostyleid=5
    Username: LiveWire
    IP Address: xxxxxxxxxx
    I know i didn't hack that file so i just uploaded the css.php file again and it still happens. Any idea?


    Here is whats in the file.



    Code:
    Line 93                $style = $DB_site->query_first("SELECT * FROM " . TABLE_PREFIX . "style WHERE styleid = $dostyleid");
    Line 94                $templateids = implode(',', unserialize($style['templatelist']));
    Line 95                $templates = $DB_site->query("
    Line 96                        SELECT templateid, title, template, template_un, styleid, templatetype
    Line 97                        FROM " . TABLE_PREFIX . "template
    Line 98                        WHERE templateid IN($templateids)
    Line 99                        AND (templatetype <> 'template' OR title IN ('" . implode("', '", $_query_common_templates) . "', '" . implode("', '", $_query_special_templates) . "'))
    Line 100                ");
    Last edited by Ken Iovino; Thu 12 May '05, 8:37pm.
    Ken Iovino
    Full Time PHP, Ruby and iOS Developer
  • Steve Machol
    Former Customer Support Manager
    • Jul 2000
    • 154488

    #2
    Try this. Create a new style and choose no parent style. This will force it to use the default templates. Then change to this style and view your forums with it. Do you have the same problem?

    On second thought, that won't work. Which versions of PHP and MySQL are you running?
    Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
    Change CKEditor Colors to Match Style (for 4.1.4 and above)

    Steve Machol Photography


    Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


    Comment

    • Ken Iovino
      Senior Member
      • Jan 2003
      • 463
      • 3.7.x

      #3
      Ya i tried that befor posing...

      Apache v1.3.33
      PHP 4.3.11
      MySQL 4.0.24-standard
      Ken Iovino
      Full Time PHP, Ruby and iOS Developer

      Comment

      • Steve Machol
        Former Customer Support Manager
        • Jul 2000
        • 154488

        #4
        Have you installed any hacks at all?
        Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
        Change CKEditor Colors to Match Style (for 4.1.4 and above)

        Steve Machol Photography


        Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


        Comment

        • Ken Iovino
          Senior Member
          • Jan 2003
          • 463
          • 3.7.x

          #5
          Yes i have, but none touch the css.php file. Going to localhost and install fresh copy to try. brb
          Ken Iovino
          Full Time PHP, Ruby and iOS Developer

          Comment

          • Steve Machol
            Former Customer Support Manager
            • Jul 2000
            • 154488

            #6
            Yeah, I was next going to suggest installing a fresh unhacked copy of the ssame server to see if you gett the same error. If you do, then it's server-related. If not, then it's either hack or db related.
            Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
            Change CKEditor Colors to Match Style (for 4.1.4 and above)

            Steve Machol Photography


            Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


            Comment

            • Marco van Herwaarden
              Senior Member
              • Nov 2004
              • 6999
              • 3.8.x

              #7
              What is it exactly that you are doing when you get this error?

              Could it be that you got some "ghost" style that don't contain any templates?
              Want to take your board beyond the standard vBulletin features?
              Visit the official Member to Member support site for vBulletin Modifications: www.vbulletin.org

              Comment

              • Ken Iovino
                Senior Member
                • Jan 2003
                • 463
                • 3.7.x

                #8
                I figured it out, the reason it was doing this was cause i accidentally added some javascript code in the extra css field. What this did was it added my code that i placed in the field and the rest of the HTML code that is in the PHP file.

                So if you add <script>blah</script> it will also insert the Forum Jump Menu table, the Additional CSS Definitions table, the Text Editor Control Styles table, the Toolbar Menu Options table, the Replacement Variables table, the submit row, and the vBulletin copyright into the database.
                Ken Iovino
                Full Time PHP, Ruby and iOS Developer

                Comment

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