Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID Sign In with Twitter

Categories

In this Discussion

Who's Online 9

SpencerMcericgillettezachs422 +5 guests

UnreadDiscussion

This discussion is related to the UnreadDiscussion addon.
UnreadDiscussion

Comments

  • lucluc
    Posts: 1,015
    Created to learn how to write some php/js and addon for vanilla2.

    I had no specific knowledge for all that prior to trying to create the addon. So bear with the possible errors, even though it works fine for me.
  • SS
    Posts: 458
    Some comment about coding.
    In DiscussionsController_DiscussionOptions_Handler() need add Session->IsValid() before adding new option in $Sender->Options
  • lucluc
    Posts: 1,015
    @S: the reason being?

    I thought the reason was to not have the link activated if you're not signed in, but if you're not, it is already not available.
    Maybe I'm just missing the reason :).

    I guess it's working because the event is already behind an $Session->IsValid() in vanilla/views/discussions/helper_functions.php hence it's not needed.
  • SS
    Posts: 458
    I guess it's working because the event is already behind an $Session->IsValid()
    Oh, I see. Indeed, in this case no need checking for valid user.
  • SS
    Posts: 458
    I see now -)
  • lucluc
    Posts: 1,015
    It was missing, not because I saw it was already tested before the FireEvent, but because I didn't think of that.

    So your comment allowed to make sure it was all and proper. Thanks.
  • Posts: 819
    Only just got round to checking this out, but very nice and very useful.
  • lucluc
    Posts: 1,015
    Updated to v1.0
    I was off vanilla2 for a while and I didn't had time to test it.
    Reinstalled it on my v2.0.17.8 install and it wasn't working anymore, fixed it and improved a bit.

    If you have an older installation and that it works too, let me know, so I'll change the requirement.
Sign In or Register to comment.