Announcement

Collapse
No announcement yet.

Can't get back into the import system...

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

  • #16
    Yes, but it did not remove the \ character that had been added to signatures. I don't know if that was fault of the cleaner.php OR the fault of the "rebuild post cache" not running like it orignally had. One way or another the "\" characters added to signatures during import are still there.

    Comment


    • #17
      Sorry, I don't understand what you are saying. Hopefully Jerry will be able to answer this for you.
      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


      • #18
        Is there any particular character that is slashed in the signatures ? Quotes ?
        I wrote ImpEx.

        Blog | Me

        Comment


        • #19
          Here is an example of a signature.

          \'My love was science- specifically biology and, more specifically, when placed in a common jar, which of two organisms would devour the other.\'

          See You Space Cowboy

          Atlanta, Georgia
          http://www.saveafrog.org/
          So, you see it adds a few sets of them. (in the URL and in the text above) but yes, it seems to be to the left of quotes (single and double)
          Last edited by adnedarn; Wed 24 Jan '07, 10:33am.

          Comment


          • #20
            Try this :

            PHP Code:
            $replacer = array(
                        
            "\'"    => "'",
                        
            '\"'    => '"'
            ); 
            I wrote ImpEx.

            Blog | Me

            Comment


            • #21
              Hi Jerry. When I run that (yes, I started with a new copy of cleaner.php) I get

              "Signature done -> 6199
              Warning: array_keys()[function.array-keys]: The first argument should be an array in /***/**/****/*****/***/****/impex/tools/cleaner.php on line 108"
              Since it did say it was done, (with the error) so I did try to run the rebuild post cache tool, and after doing the sitting and flashing thing for a while that I described later... It finally showed it was "working" and went back to the admin CP but the signatures are still the same.

              Thanks!
              Andrew
              Last edited by adnedarn; Wed 24 Jan '07, 8:30pm.

              Comment


              • #22
                Have you :

                admincp > Maintenance > Update Counters > Empty Signature Cache

                ?
                I wrote ImpEx.

                Blog | Me

                Comment


                • #23
                  Yes sir, I have.

                  Comment


                  • #24
                    If what you quoted is the only output from cleaner, then it only matched one signature, is that the case ?
                    I wrote ImpEx.

                    Blog | Me

                    Comment


                    • #25
                      That was the last line. So 1 - 6199 signatures. Each showed the same message. but a different signature number

                      Comment


                      • #26
                        Well that error would come from the array $replacer being renamed or deleted because its this line that does the changing that is causing the error :

                        PHP Code:
                        $text str_replace(array_keys($replacer), $replacer$user['signature']); 
                        I wrote ImpEx.

                        Blog | Me

                        Comment


                        • #27
                          That seems to be correct in my file already:

                          Code:
                          $Db_target->select_db($targetdatabase);
                          // BACK UP YOUR DATABASE
                          
                          # Posts
                          if($do_posts)
                          {
                              $posts = $Db_target->query("SELECT postid, pagetext, title FROM " . $targettableprefix . "post");
                          
                              while ($post = $Db_target->fetch_array($posts))
                              {
                                  $text = str_replace(array_keys($replacer), $replacer, $post['pagetext']);
                                  $title_text = str_replace(array_keys($replacer), $replacer, $post['title']);
                                  #$text = preg_replace('##siU', '', $text);
                                  #$title_text = preg_replace('##siU', '', $text);
                                  $Db_target->query("UPDATE " . $targettableprefix . "post SET pagetext='" . addslashes($text) . "', title='" . addslashes($title_text) . "' WHERE postid='" . $post['postid'] . "'");
                                  echo "<br /><b>Post done -></b><i> " . $post['postid'] . "</i>";
                              }
                          }
                          
                          # Signatures
                          if($do_sigs)
                          {
                              $users = $Db_target->query("SELECT userid, signature FROM " . $targettableprefix . "usertextfield");
                          
                              while ($user = $Db_target->fetch_array($users))
                              {
                                  $text = str_replace(array_keys($replacer), $replacer, $user['signature']);
                                  #$text = preg_replace('##siU', '', $text);
                                  $Db_target->query("UPDATE " . $targettableprefix . "usertextfield SET signature='" . addslashes($text) . "' WHERE userid='" . $user['userid'] . "'");
                                  echo "<br /><b>Signature done -></b><i> " . $user['userid'] . "</i>";
                              }
                          }
                          
                          # Thread titles
                          if($do_thread_titles)
                          {
                              $users = $Db_target->query("SELECT threadid, title FROM " . $targettableprefix . "thread");
                          
                              while ($user = $Db_target->fetch_array($users))
                              {
                                  $text = str_replace(array_keys($replacer), $replacer, $user['title']);
                                  #$text = preg_replace('##siU', '', $text);
                                  $Db_target->query("UPDATE " . $targettableprefix . "thread SET title='" . addslashes($text) . "' WHERE threadid='" . $user['threadid'] . "'");
                                  echo "<br /><b>Thread done -></b><i> " . $user['threadid'] . "</i> :: <b>{$text}</b>";
                              }
                          }
                          
                          # PM text
                          if($do_pm_text)
                          {
                              $pms = $Db_target->query("SELECT pmtextid, message, title FROM " . $targettableprefix . "pmtext");
                          
                              while ($pm = $Db_target->fetch_array($pms))
                              {
                                  $text = str_replace(array_keys($replacer), $replacer, $pm['message']);
                                  $title = str_replace(array_keys($replacer), $replacer, $pm['title']);
                                  #$text = preg_replace('##siU', '', $text);
                                  $Db_target->query("UPDATE " . $targettableprefix . "pmtext SET message='" . addslashes($text) . "', title='" . addslashes($title) . "' WHERE pmtextid='" . $pm['pmtextid'] . "'");
                                  echo "<br /><b>Pm done -></b><i> " . $pm['pmtextid'] . "</i> :: <b>{$text}</b>";
                              }
                          }
                          
                          // BACK UP YOUR DATABASE
                          // You shouldn't be reading down here !!
                          ?>

                          Comment


                          • #28
                            Then $replacer must not be an array.
                            I wrote ImpEx.

                            Blog | Me

                            Comment

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