Not signed in (Sign In)

Categories

Vanilla 1.1.5 is a product of Lussumo. More Information: Documentation, Community Support.

Help keep Vanilla free:
Welcome Guest!
Want to take part in these discussions? If you have an account, sign in now.
If you don't have an account, apply for one now.
    • CommentAuthortamkun
    • CommentTimeJul 24th 2006
     # 1
    Hi all,

    Is it possible to modify discussion listing via extensions ?
    I am working on a simple extension and i want to add some information from my extention ...

    Thanks
    •  
      CommentAuthorMark
    • CommentTimeJul 24th 2006
     # 2
    Sure. You may need to have a delegate added, though. I can add them to the source and they will be available in the next minor upgrade.
    • CommentAuthortamkun
    • CommentTimeJul 24th 2006
     # 3
    That will be great.

    If we can extend vanilla as much as possible without changing core files, we won't have trouble in upgrade process.
    •  
      CommentAuthorMark
    • CommentTimeJul 25th 2006
     # 4
    Exactly.
    • CommentAuthortamkun
    • CommentTimeJul 25th 2006
     # 5
    Let me provide simple delegate for this;

    FILE ./themes/discussion.php;

    find

    $DiscussionList .= '</ul>
    </li>';
    ?>

    at the end of file and replace with;

    $this->DelegateParameters['Discussion'] = &$Discussion;
    $this->DelegateParameters['DiscussionList'] = &$DiscussionList;
    $DiscussionList .= $this->CallDelegate('PostDiscussionOptionsRender');
    $DiscussionList .= '</ul>
    </li>';
    ?>

    I hope you consider this.

    Thanks
    •  
      CommentAuthorMark
    • CommentTimeJul 25th 2006
     # 6
    Okay, I made that change with one minor difference. I just call the delegate, I don't append it to the DiscussionList variable. There is no need since you've made the discussionlist variable a delegate parameter that gets passed by reference.

    You can see the change in svn here:

    http://lussumo.com/svn/vanilla/trunk/themes/discussion.php
    • CommentAuthortamkun
    • CommentTimeJul 25th 2006
     # 7
    Thank you Mark,

    I hope i can contribute as much as possible to vanilla.
Add your comments
    Username Password
  • Format comments as