Announcement

Collapse
No announcement yet.

vB 4.0: Template Merging and 3-Way Comparison

Collapse
X
Collapse
  •  

  • vB 4.0: Template Merging and 3-Way Comparison

    One of the most common complaints about vBulletin's upgrade process is applying the template changes. While the template history feature helped a little bit, it didn't go far enough. vBulletin 4.0 will introduce a feature to make applying template changes much easier: automatic merging and 3-way comparison.

    Whenever you upgrade, we will automatically look for templates that have changed and see if you customized those templates. If you have, we will automatically try to merge the changes in. If this succeeds, you won't have anything else to do (in most cases). If it fails, your customized template won't be updated--like in vBulletin 3--and you'll have to apply the changes yourself. However, that process is improved as well. More on that later.

    Roughly, the merging process goes like this:
    • Find the differences between the old default and the new default. ("old-new")
    • Find the differences between the old default and your customized version. ("old-custom")
    • Start walking through the template. If we find a changed spot in old-new but it's not changed in old-custom, use the old-new version. If we find a change in old-custom but not old-new, use the old-custom version. If neither changed, use either. If both changed, that's a conflict and we can't do the merge.

    If you're interested in more technical details, check out this page or this university paper.

    Most of this happens behind the scenes. However, you'll see some changes to the "Find Update Templates" screen:



    The "View Highlighted Changes" link will take you to this page:



    This lets you view the 3-way merge results visually. The yellow lines indicate areas changed by merging, while the red blocks indicate conflicts. The conflicting areas show you the values in all 3 versions of the template (old, new, customized) to let you choose how to resolve it.

    Of course, trying to do the edit from this page would be a challenge, so if you click the "Edit Merged Text" link, you'll be taken to a normal looking template editor:



    However, the text that you're editing is slightly different from the norm. Any unchanged or merged areas are as you'd expect, but the output from a conflict is very different. All 3 possible values for a conflict will be shown, so you can resolve it correct. And don't worry, if you try to save it while there's still a conflict, it will warn you.

    I should note that the automatic merging is pretty conservative. "Adjacent updates" (when a customized version adds a line immediately after a line that was changed) will trigger a conflict. In some cases, it'd be ok for this merge to go through, but there are other situations where things would break if the change were applied. Regardless, the new conflict management system should allow you to resolve the problem more quickly.

    Hopefully this feature will make upgrading a customized vBulletin easier!
    Attached Files

    • Abdulla Ashoor
      #1
      Abdulla Ashoor commented
      Editing a comment
      This is great, I just have one tiny point about merging. It should not be applied unless the user accept it. This is because some users can handle the merging by themselves and some other may want to see the changes before being merged. For me, I prefer all customized templates been updated by vbulletin to be shown as conflict. I'm doing the old-new manually using 'Araxis Merge' and then apply the necessary updates.
      Last edited by Abdulla Ashoor; Thu 17th May '12, 5:12am.

    • Riasat
      #2
      Riasat commented
      Editing a comment
      During upgrade, there is a option to disable auto merge.

    • Abdulla Ashoor
      #3
      Abdulla Ashoor commented
      Editing a comment
      yes, actually there is option to disable the entire comparison. I still need to know which template has been updated, so I will never disable this.
      + I think the option you are talking about is removed, I checked the upgrade script for 4.2.0 Alpha 1 this morning and I didn't notice it.
    Posting comments is disabled.

About the Author

Collapse

Mike Sullivan Find out more about Mike Sullivan

Article Tags

Collapse

advanced (5) android (2) api (29) array (17) attachment options (1) beginner (17) blog (4) calendar (2) center (1) cms (2) forum (3) forums (4) Intermediate (7) iphone (3) mapi (30) methods (10) mobile (34) post (1) security (2) ssl (1) style (2) threads (4) tutorial (1) vb5howto (5) vBulletin (5)

Latest Articles

Collapse

  • Managing CMS Section and Content
    by Don Kuramura
    Here's a quick Visual Guide on how Manage Sections in the new CMS.

    1. Editing a Section: If you have permissions to manage a Section, as you hover over the Section title, a pencil icon will display.

    After clicking the pencil icon, you will be taken to the Section Edit page. Here's what you will see:

    2. Section Name:
    Enter the Section Name
    3. SEO URL Alias: This is the SEO Friendly URL. By default, if this is blank, the system will automatically copy the section title.
    4. Section Layout: For each section you can define an individual section layout.
    ...
    Tue 11th Mar '14, 2:04pm
  • How to Create a New Article
    by Don Kuramura
    Here's a quick visual guide on how to create a new article with the CMS.

    1. Create New Article Button: Navigate to the section you want the article to be published in. Click on the “Create a New Article” button. This will open an article form.


    2. Article Title: In the "Add/Edit Article" screen, enter the title of your article in the “Title” textbox.
    ...
    Tue 11th Mar '14, 2:04pm
  • Promoting Articles from the Forums
    by Don Kuramura
    One of the innovative new features on vBulletin 4.0 Publishing Suite is the cross-publishing "Promote to Article" functionality. In the spirit of promoting content discovery, we wanted to create features that will allow content to flow between Forums, Blogs, and Articles. For example, there might be a really popular post in the forums, but unfortunately it is buried inside page 13 of a thread. We will now have an option (if you have permissions) to “promote” a forum (or blog) post as a new artic...
    Tue 11th Mar '14, 2:04pm
  • Welcome to the new CMS. Read me first.
    by Don Kuramura
    Welcome to the new CMS. Here's a quick guide of the different areas of this page.

    1. Section Navigation Widget. This widget allows you to go to different sections. The "plus icon" means that this section has sub-sections. Clicking on the "plus icon" will display the sub-sections. ...
    Tue 11th Mar '14, 2:04pm
  • Recovering a hacked vBulletin Site
    by TheLastSuperman
    Symptoms

    Having your site hacked is something no owner wants to experience due to the fact it takes quite a bit of effort to fix, often times requiring payment to a experienced third-party when a owner feels inundated by the sheer amount of work required to troubleshoot and remedy the situation.
    • Site has been defaced - This is the most blatant form of hacking where your sites pages have been replaced with a very disruptive and sometimes rude message from the hacker themselves.
    ...
    Tue 12th Jun '12, 1:37am
  • Issues After Upgrading
    by TheLastSuperman
    If your running a completely default forum upgrading is a very simple process. Many sites however run third-party add-ons and even use a custom style therefor when things change between older and newer
    Thu 24th May '12, 12:02pm
Working...
X