Smilie path currupted

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • aranthorn
    Senior Member
    • Aug 2004
    • 103
    • 3.5.x

    Smilie path currupted

    I used the impex system and it's imported everything very well, except for the smilies. I have a psychotic admin that has a ton of these things that she's added and well, that's beside the point. I have had to start editing all the paths by hand, I was wondering if someone could help out with a query to speed up the proccess. Any help would be greatly appreciated
    /begs

    imported as:
    /images/smilies/images/smilies/filename.gif

    What I'd like to change it to is the actual domain location:
    http://www.myforum.com/forum/images/smilies/filename.gif
    Call no man happy until he is dead - Voltaire
  • BassX
    Senior Member
    • Oct 2001
    • 124
    • 3.8.x

    #2
    Code:
    UPDATE posts SET post=REPLACE(post, "/images/smilies/images/smilies/", "http://www.myforum.com/forum/images/smilies/");
    Test before using on your production board. If you have a table prefix you'll have to adjust for that.

    Comment

    • aranthorn
      Senior Member
      • Aug 2004
      • 103
      • 3.5.x

      #3
      I appreciate the help, but wouldn't it be something like:
      Code:
      UPDATE smilie SET smiliepath=REPLACE(smilie, "/images/smilies/images/smilies/", "http://www.myforum.com/forum/images/smilies/");
      Call no man happy until he is dead - Voltaire

      Comment

      • BassX
        Senior Member
        • Oct 2001
        • 124
        • 3.8.x

        #4
        That should work - I've never done that before.

        All of my previous smilie problems have been with them being hardcoded into the posts themselves, so that's how I interpreted your problem.

        Comment

        • aranthorn
          Senior Member
          • Aug 2004
          • 103
          • 3.5.x

          #5
          Ah, I see, thanks for your help, it's very much appreciated.

          When I execute this:
          Code:
          UPDATE smilie SET smiliepath=REPLACE(smiliepath, "/images/smilies/images/smilies/", "http://www.myforum.com/forum/images/smilies/")
          It changes all the entires in the smiliepath column to smiliepath

          I'm in an experimental mood, so I re-imported all the smilies via Impex and exectuted this:
          Code:
          UPDATE smilie SET smiliepath=REPLACE(/images/smilies/images/smilies/*, "/images/smilies/images/smilies/", "http://www.myforum.com/forum/images/smilies/")
          Then it changed all the entires in the smiliepath column to /images/smilies/images/smilies/*

          So it seems that the first vlaue is replacing the second value but not keeping the rest of the data (the actual filename of the smilie). So I think I may be on the wrong track here.
          Call no man happy until he is dead - Voltaire

          Comment

          • aranthorn
            Senior Member
            • Aug 2004
            • 103
            • 3.5.x

            #6
            AH I GOT IT!
            Code:
            UPDATE smilie SET smiliepath=REPLACE(smiliepath, 'images/smilies/images/smilies/', 'http://www.myforum.com/forum/images/smilies/');
            That was absolutely the right direction to go in, I just had to change the " to ' and it worked great. Thanks a ton BassX, you just saved me a ton of work!
            Call no man happy until he is dead - Voltaire

            Comment

            Related Topics

            Collapse

            Working...