require_once 'CRM/Memberdashboard/Page.php';
class CRM_Memberdashboard_Page_Benefits extends CRM_Memberdashboard_Page {
+ // FIXME: Assumes CiviCRM is running on Drupal.
+ function loadUser() {
+ $match = civicrm_api3('uf_match', 'getsingle', array(
+ 'contact_id' => $this->contactId()
+ ));
+
+ return user_load($match['uf_id']);
+ }
+
function run() {
CRM_Utils_System::setTitle(ts('Benefits'));
- $this->assign('contact', $this->contact);
+ $this->assign('user', $this->loadUser());
parent::run();
}
-<div class="header-dark">Jabber/XMPP</div>
-
-Your Jabber/XMPP account is: <strong>writeme@member.fsf.org</strong>
-
<div class="header-dark">Shop Discount</div>
<p>
<div class="header-dark">LibrePlanet</div>
+<a href="http://libreplanet.org">
+ <img src="https://static.fsf.org/nosvn/big-logo.png" alt="LibrePlanet" />
+</a>
+
+<p>
+ Associate members get gratis admission to
+ <a href="http://libreplanet.org">LibrePlanet</a>,
+ the FSF's annual conference.
+</p>
+
<p>
- Associate members get gratis admission to LibrePlanet, the FSF's
- annual conference.
+ Use your FSF account to join a
+ <a href="http://libreplanet.org/">
+ local free software group at LibrePlanet.
+ </a>
+</p>
+
+<div class="header-dark">Jabber/XMPP</div>
+
+<p>
+ Your Jabber/XMPP account is: <strong>{$user->name}@member.fsf.org</strong>
+</p>
+
+<h3>Instructions</h3>
+
+<p>
+ Use your FSF username as the jabber username, and member.fsf.org as
+ the domain if your XMPP client supports server discovery via a DNS
+ SRV record lookup. Most XMPP clients support this. If your client
+ does not, you can use jabber.member.fsf.org as the server name. Make
+ sure to enable encryption: we support TLS on port 5222 only. Your
+ password is the same as your FSF member password. (Please report
+ any problems you might encounter to
+ <a href="mailto:sysadmin@gnu.org">sysadmin@gnu.org</a>.)
</p>
<div class="header-dark">Email Forwarding</div>
<p>
- TODO
+ You may maintain up to five email aliases. Each localpart name
+ exists in the member.fsf.org domain name and can forward to one
+ email address. The localpart you request might not be available.
+</p>
+
+<p>
+ For example, a localpart of "yyz" with a forward to value of
+ "xyzzy@example.com" would cause mail sent to "yyz@member.fsf.org" to
+ be forwarded to "xyzzy@example.com".
+</p>
+
+<p>
+ Please note that it may take up to a half hour for new forwards to
+ take effect.
+</p>
+
+<p>
+ mail forwarding form goes here
</p>
<div class="header-dark">Member Forums</div>
<p>
- TODO
+ Post and participate in our
+ <a href="https://my.fsf.org/associate/forum">
+ Members-Only Forums
+ </a>
</p>