Smilies After UBB Import

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • DVD Plaza
    Senior Member
    • Sep 2000
    • 697
    • 3.0.1

    Smilies After UBB Import

    After importing posts from UBB, smilies the old posts end up as bb code IMG tags instead of actual smilies - causing headaches as I'm disabling the IMG tag at the moment.

    Smilies inserted into new posts via vBulletin are fine.
  • Mike Sullivan
    Former vBulletin Developer
    • Apr 2000
    • 13327
    • 3.6.x

    #2
    My guess is that the smilie <img> tag was in a different format than what the importer expected. Unfortunately, this is often a pain to get around. You could write a script that changes the [img] tags to smilies. Shouldn't be too hard, but I need to see what's inside the [ img] ... [/ img] tag before I can help.

    Comment

    • DVD Plaza
      Senior Member
      • Sep 2000
      • 697
      • 3.0.1

      #3
      No worries, here's one of them:

      [ img ]http://www.dvdplaza.com.au/dcafe/smile.gif[ /img ]

      (Have inserted the spaces so that you can see the code)

      Thanks Ed

      Comment

      • opus
        New Member
        • Jun 2001
        • 22

        #4
        wouldn't the smiles just turn into ; )

        Comment

        • DVD Plaza
          Senior Member
          • Sep 2000
          • 697
          • 3.0.1

          #5
          Nah UBB converts smilies into HTML before saving the message, and converts it back to a smilie if you edit the post. vBulletin on the other hand keeps it as a smilie - and replaces it with the equivalent graphic "on the fly" when you display the post.

          Comment

          • DVD Plaza
            Senior Member
            • Sep 2000
            • 697
            • 3.0.1

            #6
            bump

            Comment

            • Mike Sullivan
              Former vBulletin Developer
              • Apr 2000
              • 13327
              • 3.6.x

              #7
              100% untested. Note that there are lines you have to duplicate for it to work correctly (in one pass).

              Comment

              • DVD Plaza
                Senior Member
                • Sep 2000
                • 697
                • 3.0.1

                #8
                Excellent, that looks like exactly what I need - thanks Ed I'll let you know how I go

                Comment

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

                  #9
                  Did this work? I have the same problem with all my imported UBB posts and would like to correct it.
                  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

                  • DVD Plaza
                    Senior Member
                    • Sep 2000
                    • 697
                    • 3.0.1

                    #10
                    Whoops, sorry for not following that back up - yes it did, go for it!

                    Comment

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

                      #11
                      Question, it looks like I need to duplicate this line for each smilie (of course using my own URL):

                      Code:
                      $text = str_replace('[ img]http://www.dvdplaza.com.au/dcafe/smile.gif[/img]', ':)', $text);
                      Does each line still start with '$text =' or do I need to give each one a different variable name, i.e., $text2, $text3, etc.?
                      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

                      • Mike Sullivan
                        Former vBulletin Developer
                        • Apr 2000
                        • 13327
                        • 3.6.x

                        #12
                        They all start with $text -- you just change the URL and the smilie code.

                        Comment

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

                          #13
                          Thanks Ed! Sorry for being dense, but do I add all of these at once and then run the script, or do I add one at a time?
                          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

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

                            #14
                            One other question. I have some broken message icons as well. Would this line fix these (minus the space after '<' of course):

                            Code:
                            $text = str_replace('< img src="" alt="" border="0">', ' ', $text);
                            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

                            • Mike Sullivan
                              Former vBulletin Developer
                              • Apr 2000
                              • 13327
                              • 3.6.x

                              #15
                              You can either add them all at once and run the script just once, or keep replacing that one line and run it for each smilie. I'd recommend the former.

                              As for message icons, how'd they get into the message?

                              Comment

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