Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

VanillaPorter 2.3 Help | Porting IP.Board 3.3.0

2»

Comments

  • EchelonEchelon New
    edited April 2017

    @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 Admin

    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 Admin

    No, that will not be enough...

  • R_JR_J Admin

    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 2017

    @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 Admin

    @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 &#38; 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&#39;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 2017
    • #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 2017

    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">&middot;</span> <span class="User-Title">USERTITLEHERE</span></span></h1>
    

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

  • R_JR_J Admin

    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:

  • @R_J Thanks for the advice!

    I'm not entirely through my list, I wish I could go back and edit my posts / strike through or update what is done as it's been a lot of little items so far!

    Here's what I haven't figured out yet:

    • Some characters displaying raw vs " & and ' " like so, but only in certain areas:
    &#38; 
    and 
    &#39;
    

    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 &#38; 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&#39;s awesome
    

    should be:
    Username - person's awesome

    • Still need to work on the [font] [/font] BBCode custom plugin being able to handle it. If it comes out okay I'll try to re-contribute!

    Past that, this is looking pretty great and I'm sure I can move onto a safety test / dry run of the conversion one more time of the entire process to make sure nothing else jumps out.

    Thanks

  • R_JR_J Admin

    I can explain that, but not really advice a "best" solution.

    Problem Vanilla: Vanilla displays raw text instead of processed html at some places because someone has decided once ago where html formatted text would be a distraction.

    Problem IPB: IPB converts some characters to their html entities before they are saved to the db: I don't know which characters and I'm not 100% sure why, but maybe they want to avoid problems with the character encoding of the database. This is, by the way, bad practice. User input should be saved exactly as it has been made to the database. You now know a reason why...

    As I've said, I don't know what could be done best. What I would do, is trying to find out what characters have been replaced and try to revert that. Do something like

    SELECT UserID, Title
    FROM GDN_User
    WHERE Title LIKE '%&%'
    

    to get an overview of how many user titles need to be handled.

  • R_JR_J Admin

    @Echelon: guess what I've just found: https://github.com/vanilla/addons/blob/master/plugins/IPBFormatter/class.ipbformatter.plugin.php

    I should have known that there is already a solution to your problem =)

Sign In or Register to comment.