Jump to:

1016 Posts in 567 Topics by 309 members

Forum Module

SilverStripe Forums » Forum Module » Forum Trunk API Changes

Discuss the Forum Module.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1 2 3
Go to End
Author Topic: 4418 Views
  • Willr
    Avatar
    Forum Moderator
    5462 Posts

    Forum Trunk API Changes Link to this post

    Hey,

    Just commited a rather large refactoring of the forum module - http://open.silverstripe.com/changeset/98901. This work covers the
    major changes required for a couple of tickets (#4944 #4024).

    The major changes are:
    * Posts now have a parent 'Thread' object rather than pointing to the head post. This has the benefit of tidying up the datamodel and removing some of the thread data (like views) from individual posts and into a much nicer structure.

    * Forum no longer uses its strange CheckForumPermissions() function and instead follows the SilverStripe conventional canView(), canEdit(), canCreate() etc etc to handle permissions within the forum which makes the permissions system much more portable.

    Because of the changes required in the templates for both of these changes your customized forum themes will not work with trunk currently. If you've been running on forum trunk (for getting it to work on 2.4) then you can switch safely to branches/0.3 for forum.

    I've got a couple bugfixes for branches/0.3 then we'll release an official 0.3 release for 2.4. You can download branches/0.3 from http://open.silverstripe.com/changeset/latest/modules/forum/branches/...

    If you have any other projects just starting out or still using the default forum templates then I would love for you to download trunk rather than 0.3 and have a play around with these changes. There is a data migration script for posts, threads and subscriptions which you can run so your data can be upgraded without too much hassle. Its just the templates which are a pain!. Migrating the ssorg forum to the new format took roughly 4mins for the 9000 threads I ran it on so give the migration script a bit of room to run.

    The full upgrade notes are available in the forum download in the /docs/ folder. Would love to hear your thoughts / questions / comments.

    Cheers.

  • Juanitou
    Avatar
    Community Member
    322 Posts

    Re: Forum Trunk API Changes Link to this post

    Hi Will and thank you!

    I’m certainly being blunt, but what version (trunk or branches) must I use for SS 2.3.6?

    Also, I have slightly modified some of the forum files in order to make it fully i18n-able. How could I submit these files? I have installed TortoiseSVN and I could generate a diff file… somehow!

    Thanks in advance,
    Juan

  • Willr
    Avatar
    Forum Moderator
    5462 Posts

    Re: Forum Trunk API Changes Link to this post

    For 2.3 Compatibility use the 0.2 branch.

    For 2.4 you can use either 0.3 branch or trunk.

    If you have translated missing strings please submit patches against trunk. As part of this refactoring work I went through and translated a whole bunch of new strings so hopefully trunk will be much better in terms of i18n. Feel free to submit patches against trunk (if the issue is still not fixed) See this page as an example for making diff files in tortoise - http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-dug-patch.html

  • Juanitou
    Avatar
    Community Member
    322 Posts

    Re: Forum Trunk API Changes Link to this post

    Thank you very much for your time!

    If I understand well, and on the basis of a quick comparison of the code between trunk, 0.3 and 0.2, I can’t use the new features of Forum (mainly Threads and re-factored permissions) in 2.3.6. That’s not a problem at all, since the forums I had devised are really simple (and are unused by customers). I’ll update the sites to 2.4 when everything gets stable. Could you please confirm?

    I’m going to check the trunk and send, if necessary, patches for i18n.

    Best regards,
    Juan

  • Juanitou
    Avatar
    Community Member
    322 Posts

    Re: Forum Trunk API Changes Link to this post

    Revised i18n patch: http://open.silverstripe.org/ticket/5092

    Corrects some forgotten strings and the use of genitive in User Profile.

    It’s my first patch, I hope I did it well, please excuse my ignorance if it is not the case.

    Best regards,
    Juan

  • pcbender
    Avatar
    Community Member
    20 Posts

    Re: Forum Trunk API Changes Link to this post

    Thank you for your work. I just changed over to the 0.3 branch on a new installation. There seem to be some issues with the requireDefaultRecords() methods for the Forum and ForumHolder classes. You are using double quotes to identify mysql object names: "Group"."Code" should be `Group`.Code . Since these errors only occur on a new installation, you probably didn't catch them.

    All the best,

    PC

  • Willr
    Avatar
    Forum Moderator
    5462 Posts

    Re: Forum Trunk API Changes Link to this post

    @pcbender - Using backticks is the old, 2.3 method (for which you need to stick to 0.2).

    Double quotes is the way to escape columns, tables as of 2.4.

  • pcbender
    Avatar
    Community Member
    20 Posts

    Re: Forum Trunk API Changes Link to this post

    My apologies. I thought I was on 2.4. Thank you for your response.

    PC

    4418 Views
Page: 1 2 3
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.