Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Module Forum 0.1.2 needs MYSQL5

Our old forums are still available as a read-only archive.

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

Page: 1
Go to End
Author Topic: 2170 Views
  • zyko
    Avatar
    Community Member
    66 Posts

    Module Forum 0.1.2 needs MYSQL5 Link to this post

    I did an Update from Forum 0.1.1 to the newer version.
    I get Errors on MYSQL 4.1.22
    that tell something abot 'invalid GROUP statements'.

    The requiremnets for Silverstripe say MYSQL 4.1
    so there should be no MYSQL5 specific code i think...

    I didn't look at the details much more, am a novice in silverstripe.
    maybe someone can check this?

    BTW: would be fine to have seperate forums to discuss about things concerning
    modules or themes.
    Try to find something with a query about 'forum', and you see what i mean

    *g
    Helmut

  • Ingo
    Avatar
    Forum Moderator
    801 Posts

    Re: Module Forum 0.1.2 needs MYSQL5 Link to this post

    modules don't necessarily need to have matching requirements to the core, in the end its just a missing "minimum requirements" note for the forum module.

    good point with your search for a "forum" keyword, this would be more efficient when limited to a specific "modules" forum - although we're trying to avoid a too fragmented forum structure. what do other people think?

  • mage
    Avatar
    Community Member
    10 Posts

    Re: Module Forum 0.1.2 needs MYSQL5 Link to this post

    I think sections would be a lot easier to search as well. So hard to find information at the moment.

  • zyko
    Avatar
    Community Member
    66 Posts

    Re: Module Forum 0.1.2 needs MYSQL5 Link to this post

    YEAH, to find something in Silverstripe forums
    is sometimes hard.
    Would be fine if there was only ONE result shown for a 'thread' if one post of the thread meets the query. and not any post of the thread, that meets the search criteria...

    BTW: if anyone is interested:
    I did a replacement of Forum.php function Topics()
    with 'the old version' of this function and things are ok for now.

       function Topics() {
          if(Member::currentUser()==$this->Moderator()) {
             return DataObject::get("Post", "ForumID = $this->ID and ParentID = 0 and (Status = 'Moderated' or Status = 'Awaiting')");
          }
          return DataObject::get("Post", "ForumID = $this->ID and ParentID = 0 and Status = 'Moderated'");
       }


    the new function

       function Topics() {
          if(Member::currentUser()==$this->Moderator() && is_numeric($this->ID)) {
             $statusFilter = "(`Post`.Status IN ('Moderated', 'Awaiting')";
          } else {
             $statusFilter = "`Post`.Status = 'Moderated'";
          }
          
          if(isset($_GET['start']) && is_numeric($_GET['start'])) $limit = Convert::raw2sql($_GET['start']) . ", 30";
          else $limit = 30;
             
          return DataObject::get("Post", "`Post`.ForumID = $this->ID and `Post`.ParentID = 0 and $statusFilter", "max(PostList.Created) DESC",
             "INNER JOIN `Post` AS PostList ON PostList.TopicID = `Post`.TopicID", $limit
          );
       }


    seems to be better in showing the latest reply on articles in front of the thread, but it worked without this in former versions.
    And maybe someone can do this correct for older my-sql versions in future versions...

  • Ingo
    Avatar
    Forum Moderator
    801 Posts

    Re: Module Forum 0.1.2 needs MYSQL5 Link to this post

    hey zyko - great to hear you made this functionality mysql4 compatible - can you provide your changes as a patch? http://open.silverstripe.com/#Submittingpatches
    cheers

  • zyko
    Avatar
    Community Member
    66 Posts

    Re: Module Forum 0.1.2 needs MYSQL5 Link to this post

    Hi Ingo,
    Sorry to say, i only did a 'switch-back' to old functionality.
    this is no 'patch'.
    this means, patching with this code, would lead to
    loosing the new abilitys, the new forum version has...

    g
    Helmut

    2170 Views
Page: 1
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.