From: David Thompson Date: Fri, 31 Oct 2014 17:02:43 +0000 (-0400) Subject: benefits: Display proper XMPP username and elaborate on other benefits. X-Git-Tag: v0.1~37 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=9cf8ce758a7a72ce4f93105566c70dc81c92958d;p=org.fsf.memberdashboard.git benefits: Display proper XMPP username and elaborate on other benefits. --- diff --git a/CRM/Memberdashboard/Page/Benefits.php b/CRM/Memberdashboard/Page/Benefits.php index bd27285..91f3f91 100644 --- a/CRM/Memberdashboard/Page/Benefits.php +++ b/CRM/Memberdashboard/Page/Benefits.php @@ -3,10 +3,19 @@ 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(); } diff --git a/templates/CRM/Memberdashboard/Page/Benefits.tpl b/templates/CRM/Memberdashboard/Page/Benefits.tpl index b7f47b8..1d09a1f 100644 --- a/templates/CRM/Memberdashboard/Page/Benefits.tpl +++ b/templates/CRM/Memberdashboard/Page/Benefits.tpl @@ -1,7 +1,3 @@ -
Jabber/XMPP
- -Your Jabber/XMPP account is: writeme@member.fsf.org -
Shop Discount

@@ -12,19 +8,70 @@ Your Jabber/XMPP account is: writeme@member.fsf.org

LibrePlanet
+ + LibrePlanet + + +

+ Associate members get gratis admission to + LibrePlanet, + the FSF's annual conference. +

+

- Associate members get gratis admission to LibrePlanet, the FSF's - annual conference. + Use your FSF account to join a + + local free software group at LibrePlanet. + +

+ +
Jabber/XMPP
+ +

+ Your Jabber/XMPP account is: {$user->name}@member.fsf.org +

+ +

Instructions

+ +

+ 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 + sysadmin@gnu.org.)

Email Forwarding

- 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. +

+ +

+ 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". +

+ +

+ Please note that it may take up to a half hour for new forwards to + take effect. +

+ +

+ mail forwarding form goes here

Member Forums

- TODO + Post and participate in our + + Members-Only Forums +