CodeForPhilly / laddr

http://codeforphilly.github.io/laddr/
MIT License
61 stars 34 forks source link

Enable chat button for non-SSO Slack/chat #156

Closed schlos closed 7 years ago

schlos commented 7 years ago

enabling button strings for translations adding button for non-SSO Slack chat (pointing to /chat?channel=XXX, a chat defined in chat.php)

themightychris commented 7 years ago

@schlos I hadn't realized this at first when I first responded to you, but the intended way to link to Slack was to configure Laddr::$chatLinker via php-config/Laddr.config.d/chat.php. I've configured this file on your staging site to generate links to Code for Croatia's Slack organization, and made a release with #159 that includes an example file mirroring the one you have now.

This release also adds a default implementation of site-root/chat.php which redirects using the URL returned by Laddr::$chatLinker. I've deleted your override of this file as the default implementation will redirect correctly. The buttons on your project pages will link directly to Slack now without this template override, the /chat route just serves as a convenient shortcut for getting people there verbally.

I published a wiki guide on enabling SSO to Slack on the Laddr forum, which illustrates the advanced case where you'd want to implement an interactive /chat route and point Laddr::$chatLinker to that: http://forum.laddr.us/t/providing-single-sign-on-to-slack/32