Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Try Vanilla Forums Cloud product

Ready to contribute?

Amazing! Sign our contributors' agreement and then join us on GitHub.

Vanilla 2.3 fully supports PHP 7. Get it now!

VanillaPorter 2.3 Help | Porting IP.Board 3.3.0

This discussion is related to the Vanilla Porter addon.

Hello everyone, Thanks ahead of time to anyone who can help me out.

I'm trying to port over forums/users from IP.Board 3.3.0, I stuck the Vanilla2export.php in my main IP.Board directory and gave it 0777 permissions to run.

After navigating to host/forums/vanilla2export.php and providing it with the mysql host, ibf_ prefix, login/pass with Export Type "All supported data" with Avatars and Files unchecked, then clicking "Begin Export" I'm getting the following error:

select TagID, '0' as CategoryID, tag_meta_id as DiscussionID, t.tag_added
from ibf_core_tags t
left join z_tag zt on t.tag_text = zt.FullName;Illegal mix of collations (utf8_unicode_ci,IMPLICIT) and (utf8_general_ci,IMPLICIT) for operation '='

Error in forums/vanilla2export.php line 1203: (1024) Illegal mix of collations (utf8_unicode_ci,IMPLICIT) and (utf8_general_ci,IMPLICIT) for operation '='

  • How can I get past this? I'm not that good with mysql nor do I understand this error fully.
«1

Comments

  • K17K17 Français / FRENCH - http://forums.kraftgame.eu/ Nouvelle Aquitaine / La Rochelle ✭✭

    I didn't have experience in IP.B (just moderation) but I will try to help.
    First of all, make a backups of your database.
    Next, I think that your database contrains table encodés in utf8_unicode_ci and Vanilla need it to utf8_general_ci.
    This is what I understand.

  • Hey, Thanks. I converted the database to utf8_general_ci and the exporter was able to proceed!

    There's one more remaining problem, I get a:
    " Error in forums/vanilla2export.php line 8252: (1024) Source avatar folder '' does not exist. Even though there is an avatar folder?

    Is there a way to configure or set that folder?

    Thanks!

  • EchelonEchelon New
    edited April 18

    Hm, Odd. In a lot of posts I am seeing both double usernames and HTML
    tags visible as well and not taken into account. is there any way to fix that?

    if I make a new post with a line break
    , it works fine. But old converted posts just display it in plain text.

  • K17K17 Français / FRENCH - http://forums.kraftgame.eu/ Nouvelle Aquitaine / La Rochelle ✭✭

    Oh. Can you tell us:

    • Wich editor do you use
    • With wich Input formatter

    Please ^^

  • @Echelon said:
    Hm, Odd. In a lot of posts I am seeing both double usernames and HTML
    tags visible as well and not taken into account. is there any way to fix that?

    if I make a new post with a line break
    , it works fine. But old converted posts just display it in plain text.

    I also did a migration from IP Board 3 to Vanilla and am facing the issue with HTML Tags in posts being visible.
    Could someone give a solution to this?

  • I seem to have it fixed for me. I noticed that my private messages where showing up correctly.
    In case you experience the same (messed up Posts/Threads, working Private Messages) you might want to try what I did:

    1. Open the Vanilla Database
    2. Check your ConversationMessages Table
    3. The Column you are looking for is Format, since I did an IP Board import mine was set to IPB
    4. Check your Discussions and Comments Table, here my Format was set to BBCode
    5. Run an Update Query on the Discussion and Comments Table updating the Format Fields to IPB and your HTML should be rendered correctly in your existing Posts and Discussions.

    This made it work for me, hope it helps you too!

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    @JDBArtist said:
    5. Run an Update Query on the Discussion and Comments Table updating the Format Fields to IPB and your HTML should be rendered correctly in your existing Posts and Discussions.

    This made it work for me, hope it helps you too!

    It works, but just because "IPB" is not a valid format and so it defaults to Html ;)

    Valid possibilities for format are:
    BBCode
    Html
    Wysiwyg
    Markdown
    Text

    So just in case the default may change at one time in the future, I would suggest that you change format to "Html"

  • JDBArtistJDBArtist New
    edited April 24

    Thanks for the Update. I figured since it was automatically assigned after the import, it would be a valid format. I updated it to Html just in case. Thank you

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    BBCode is valid, but it doesn't "allow" HTML tags, they are just echoed as they are. How has that been in your forum? Did your forum had BBCode mixed with HTML?

  • EchelonEchelon New
    edited April 26

    @K17

    • HeidiSQL Editor
    • Input Formatter? Unsure

    @JDBArtist and @R_J
    I ran both:
    update GDN_Discussion set Format = 'Html';
    and
    update GDN_Comment set Format = 'Html';
    ^^ But this resulted in BB Code being displayed in posts but HTML working fine.

    1) It does seem I have mixed HTML and BBCode in posts?

    Now I'll see things like: [u][b]Text here![/b][/u] but I won't see
    html tags.
    If I switch back to BBCode Format, I'll see the html tags again but not BBCode.

    • I tried using the NBBC plugin, with the format set to Html, but it didn't seem to help.

    2) Usernames appear "doubled" at times, where some users names will show twice in posts / threads. Odd.

    Thanks for all the help so far!

  • Double displayed names like this:

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    I have seen that "doubled" user names before. I guess it happens when the users avatar cannot be displayed for whatever reason (company firewall?)

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    Concerning the BBCode/HTML problem: it looks as if IPB allows a mixture of HTML and BBCode, which is not allowed in Vanilla. That's why you get either one or the other which looks quite poor.

    But now you are dealing with Vanilla, you will soon find out that Vanilla is the king of customization! Please create the file /conf/bootstrap.before.php and paste the following lines into that file

    <?php
    
    /**
     * Converts posts with BBCode and HTML to HTML for display.
     *
     * Will only work if there is a custom BBCode formatter which allows
     * preserving HTML code.
     */
    if (!function_exists('gdn_formatter_IPB')) {
        function gdn_formatter_IPB($mixed) {
            // Get custom BBCode formatter.
            $BBCodeFormatter = Gdn::factory('BBCodeFormatter');
            if (is_object($BBCodeFormatter)) {
                // Tell the formatter not to touch HTML!
                $BBCodeFormatter->nbbc()->setEscapeContent(false);
                // Convert BBCode.
                $mixed = $BBCodeFormatter->format($mixed);
            }
            // Do the normal HTML conversion.
            return Gdn_Format::to($mixed, 'Html');
        }
    }
    

    If the file already existed, you can skip the first line.

    The last thing to do is to change the Format column to IPB, which is now a known custom format. Isn't that sweet? =)

  • LincLinc Vanilla's Bard (and Lead Developer) Detroit Vanilla Staff

    Yeah, that's the avatars showing their alt text. Possibly you didn't bring them over / modify their paths. Not all the Porter packages can do that.

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator
    edited April 26

    @Echelon & @JDBArtist
    And would you please be so kind and report back if that solved those BBCode/HTML markup problems?

  • EchelonEchelon New
    edited April 26

    Thanks again for everyone's help so far, wanted to say that first before continuing:

    @R_J and @Linc

    • 1) [Double names / Avatar Issues]

    That's exactly what happened, for some reason when I ported over the DB, in renamed the filenames to peoples avatars for some reason, say for my avatar, it was "av3.jpg" but it inserted a "p" infront like "pav3.jpg" , unsure why the porter did that.

    To test, I renamed the actual .jpg from av3.jpg to pav3.jpg, I still saw a double name of my user account.

    **Fixed it by going to Edit Profile --> Edit my Thumbnail and defining my thumbnail. This removed the double name so I suppose every user once I fully port over the forums will need to do that, unless somehow I can set a "default" thumbnail for users until they set their own, to prevent double names.

    • 2) [BBCode/HTML Markup issues]

    I tried your fix @R_J, It worked great with one issue which I think is my converted DB's fault after using your custom php and defining format to IPB! As far as not showing BBCode OR showing HTML now, it's great! Really neat that Vanilla is so open to customization.

    The issue is that a ton of user comments in the forum will look like this:

    Hello!<br />
    <br />
    Wordswordswords<br />
    <br />
    Foofoofoofoo<br />
    <br /> 
    

    (They'll have double html line breaks for some reason? 2x "br /" tags)

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    Not sure if I am able to help with that. Could you give an example from out of your database which gets this doubled line breaks? Enclose what you post with three tildes like that so that it doesn't get converted:

    ~~~
    bla bla
    ~~~

  • LincLinc Vanilla's Bard (and Lead Developer) Detroit Vanilla Staff

    I edited the post to add a code block.

  • EchelonEchelon New
    edited April 26

    @Linc @R_J

    Here's another example:
    (These are forums for a non-profit/free/Independent game. Which is why Vanilla is especially a good option due to having 0 revenue and prior forum solutions costing out of pocket money, Which is also why our IPB Version is so old and vulnerable to many exploits and attacks!
    Don't worry I won't post which game as to not advertise etc.)

    Hi everyone,<br />
    <br />
    We'll be holding a meeting<br />
    <br />
    Let's make the meeting Sunday<br />
    <br />
    We need to provide more feedback on pressing matters like rulesets, etc. and discuss whether we have the resources and time to get X Feature out the door<br />
    As well as:<br />
    - item 1<br />
    - item 2<br />
    - item 3<br />
    - item 4<br />
    - item 5
    

    I looked at a pre-converted forums DB from IPB, and it has the same kind of formatting. (From the same forum and IPB 3.3.0 version)

    • In the original IPB 3.3.0 forums as displayed by a web browser it looks like the below, which is weird since those line breaks are there in the database even for the items 1-4:

    Hi everyone,

    We'll be holding a meeting

    Let's make the meeting Sunday

    We need to provide more feedback on pressing matters like rulesets, etc. and discuss whether we have the resources and time to get X Feature out the door
    As well as:

    • item 1
    • item 2
    • item 3
    • item 4
    • item 5
  • *The items 1-5 on the original forums are not bulleted or spaced like that sorry, they have just a text "-" in front of them. It's more like the below with no space under As well as and item 1:

    As well as:
    item 1
    item 2
    item 3
    item 4
    item 5

  • EchelonEchelon New
    edited April 26

    @Linc I've been staring at things too long, sorry. Those do not have double breaks. Bad example. Please delete my past two posts and this one to clean up the flow of the conversation.

    The first example I gave was the best one.

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    Try the effect of adding $Configuration['Garden']['Format']['ReplaceNewlines'] = false; to the end of your config. But please test it also with "new" discussions (created with Vanilla).

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    No, that will not be enough...

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    Please delete those lines bootstrap.before.php or the complete file if there is no other content in there. I decided to do this in a plugin. That looks a little more complex but it is cleaner.
    Please try that plugin and report back - thanks! If this plugin does it's job, I will upload it here. But before I do not have feedback, I have to treat it as being beta.

  • EchelonEchelon New
    edited April 27

    @R_J

    Amazing! It took care of both the additional un-needed line breaks in old posts formatted as "IPB" and bbcode / html issues mostly.

    I tried making a new post on my test forum that I'm using for safe conversion sandboxing and it does not prevent me from doing double line breaks as expected as a new post doesn't get formatted as "IPB" which is great.

    1) In some posts I'm seeing BBCode font formatting not being taken into account, but even the NBBC plugin doesn't affect it:

    Ex the following won't get formatted and just display the raw font bbcode:
    [font=helvetica, arial, sans-serif]Text here [/font]
    [font=helvetica, arial, sans-serif]Text here | Text here[/font]

    2) I don't seem to be able to disable the plugin via the plugin menu, but I was able to enable it. If I hit the "Disable" button, nothing happens. Not that I'd want to disable it! Just decided to test the function.
    (I installed the plugin into the Vanilla 2 plugin folder "ipbformat")

    3) Unrelated to @R_J 's awesome IPBformat plugin, In Search for some post titles and member titles I am seeing certain characters not displaying properly:

    Example, in search it'd display a post title as:

    Feature Changes & Feedback
    

    But if you click on the post and look at the post title at the top, it then displays correctly as: " Feature Changes & Feedback "

    This also happens with some converted forum user "member titles" such as:

    Username - person's awesome
    

    should be:
    Username - person's awesome

    Thanks so much for everyone's help so far, Completely moving over to Vanilla is becoming more and more a reality now.

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    @Echelon said:
    2) I don't seem to be able to disable the plugin via the plugin menu, but I was able to enable it. If I hit the "Disable" button, nothing happens. Not that I'd want to disable it! Just decided to test the function.
    (I installed the plugin into the Vanilla 2 plugin folder "ipbformat")

    And that's the problem: a plugin folder must be exactly named like the key in the plugin info array. So you have to rename the folder to "IPBFormat". Then it could be deactivated.

    @Echelon said:
    1) In some posts I'm seeing BBCode font formatting not being taken into account, but even the NBBC plugin doesn't affect it:

    Ex the following won't get formatted and just display the raw font bbcode:
    [font=helvetica, arial, sans-serif]Text here [/font]
    [font=helvetica, arial, sans-serif]Text here | Text here[/font]

    Vanilla uses the nbbc parser which allows creating custom BBCodes. Only recently I wrote a plugin as an example on how to add a custom format (save it as /plugins/customBBCode/class.custombbcode.plugin.php):

    <?php
    
    $PluginInfo['customBBCode'] = [
        'Name' => 'Custom BBCode',
        'Description' => 'Adds some custom BBCode tags.',
        'Version' => '0.1',
        'Author' => 'You ;-)',
        'RequiredApplications' => ['Vanilla' => '>=2.3'],
        'MobileFriendly' => true,
        'License' => 'MIT'
    ];
    
    class CustomBBCodePlugin extends Gdn_Plugin {
        public function bbcode_afterBBCodeSetup_handler($sender, $args) {
            $nbbc = &$args['BBCode'];
            $nbbc->addRule(
                'bgbox',
                [
                    'mode' => $nbbc::BBCODE_MODE_ENHANCED,
                    'template' => '<span class="BGBox" style="background-color:{$color}">{$_content}</span>',
                    'allow' => ['color' => '/[a-zA-Z]+/'],
                    'default' => ['color' => 'yellow'],
                    'class' => 'inline',
                    'allow_in' => ['listitem', 'block', 'columns', 'inline', 'link']
                ]
            );
        }
    }
    

    You would have to do some research to find out how that works. This might be helpful: http://nbbc.sourceforge.net/readme.php?page=usage_enh
    Maybe you can find the sourcecode for the font code that is mentioned here: http://nbbc.sourceforge.net/readme.php?page=bbc_text

  • Thanks @R_J

    -- IPBFormat plugin, Renaming the folder to the appropriate "IPBFormat" led to being able to disable / enable properly

    -- NBBC Plugin and creating custom BBCodes

    I seemed to have missed the docs, that's really appreciated it and I'll look into it.

    I really really appreciate your help!

    Remaining items of note

    1) In Search for some post titles and member titles I am seeing certain characters not displaying properly:

    Example, in search it'd display a post title as:

     Feature Changes & Feedback
    

    But if you click on the post and look at the post title at the top, it then displays correctly as: " Feature Changes & Feedback "

    This also happens with some converted forum user "member titles" such as:

    Username - person's awesome
    

    should be:
    Username - person's awesome

    2) Avatars

    *Perhaps I did something wrong during the vanilla 2 install steps when you choose avatar images for porting, I'll need to re-read the docs and try again on another test install as I saw the following issue:
    (I had to manually move avatar pics as I was getting an error : " Error in forums/vanilla2export.php line 8252: (1024) Source avatar folder originally)

    Manually Moving avatar images over into the vanilla2/uploads/ipb location ends up showing a user's profile picture as expected, but no thumbnail is generated so having double user names still occurs. To get around this a user at the moment would have to manually define a thumbnail but that then results in the thumbnail showing but not the User's profile picture.

    It seems after thumbnail generation Vanilla 2 makes a numerical directory like: vanilla2/uploads/userpics/587 with a random series of numbers and letters like "nFTWTAPPH8SGW.png" for the thumbnail image, but then it changes where its looking for the profile picture and the profile pic name without generating a new profile picture and moving it to where its looking like:
    Old: vanilla2/uploads/ipb/pav587.png
    New: vanilla2/uploads/userpics/587/pFTWTAPPH8SGW.png

    Thanks everyone again

    3) Can I donate to the Vanilla open source project and plugin creators?
    (ex: such as @R_J for his plugin help)

  • EchelonEchelon New
    edited April 28
    • #2 Avatar importing // Fixed / Figured out //

    This one was odd and I didn't see this clearly in the Vanillaporter instructions I read here:
    http://docs.vanillaforums.com/developer/importing/porter/
    (Perhaps a document improvement opportunity?)

    The only thing I found was:
    "File attachments and avatars may be stored in the file system or as binary blobs in the database depending on your platform and configuration. If they are stored in the file system (most common), copy the entire folder directly into Vanilla’s uploads folder." Then a bit about vBulletin binary blobs, but I was not using vBulletin.

    I was mistakenly under the impression that you had to configure the avatar image path within the actual script but couldn't find anywhere besides possibly line #8219 in the vanilla2export script but that seemed wrong.

    • Solution I ended up having to put ?avatars=1&avatarpath=/path/to/uploads after the script in the url like so:
      host.com/vanilla2/uploads/vanilla2export.php?avatars=1&avatarpath=/path/to/uploads

    This is also in line 8210 of the vanilla2port script, but it does not say directly /where/ to provide it, in the URL or in the Script
    "To export avatars, provide ?avatars=1&avatarpath=/path/to/avatars"

    This resulted in all avatars being ported over for users with already generated thumbnails and no more double names being displayed.

  • EchelonEchelon New
    edited April 28

    4) Member Titles // Fixed / Figured out //

    • Solution: Enable the Profile Extender plugin, go to Users --> Profile Fields in the Dashboard. Add a "Title" Label as Textbox Type, set In Profiles to yes and users can edit their User Title!

    These seem to have carried over fine from IPB 3.3.x but I do not see any way to edit your own profile and change an old defined member title, I looked through the dashboard as well. // Fixed / Figured out!

    Example: "Username - titlehere" is displayed fine in posts after converting but I can't find anywhere to change it in Vanilla 2.3

    Looking at a user's page source on an actual displayed forum post:

       <h1 class="H">USERNAME<span class="Gloss"> <span class="Bullet">·</span> <span class="User-Title">USERTITLEHERE</span></span></h1>
    

    It seems IPB's "Member Title" became "User-Title"

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    Looks like your through with your list, correct? Or is there any question left concerning the titles? Which kind of titles are there in IPB: only "Member Title"? Then I would guess it became "User Title".

    But if there are other titles in IPB, too, you would have to explain some more on that.

    @Echelon said:
    3) Can I donate to (...) plugin creators?

    Sure, some developers have added a paypal link to the settings screen of their plugins. If you use such a plugin, use the paypal link, too!

    For me writing code is just a hobby, so I'm totally happy as long as I can swagger... ;)

    @Echelon said:
    3) Can I donate to the Vanilla open source project...

    The only way to sponsor by money is becoming a paying customer, I'd say.

    But you can donate your time, knowledge and enthusiasm!

    If you come here more often, you will find that there are some questions which are asked quite often - just do a search for "blank screen". You don't need to be an experienced Vanilla user to answer that question. And there are other questions as well, which you might be able to answer - maybe not today but surely after you have used Vanilla for a while.

    Will you change that CustomBBCode plugin to be able to a handle the font code? Clean it up a little bit and publish it! That's a great way to contribute =)

    By now there is a beta Version of Vanilla 2.4 available. Test beta versions and give feedback.

    Sometimes people report errors here. It is better to create an issue on GitHub. If you have some experience with GitHub or simply are curious, get an account and a) look up if that is a known issue and b) if it is unknown, create a new issue describing the problem as detailed as possible.

    I guess you already made the first step: you found something which could be improved in the documentation. The documentation is on GitHub, so you could either create an issue or - if you have the knowledge - create a pull request so that it could be changed easily.

    And last but not least: tell the world how great Vanilla is :mrgreen:

«1
Sign In or Register to comment.