}
function show_form($err=NULL) {
+ $nickname = $this->trimmed('nickname');
common_show_header(_t('Remote subscribe'));
if ($err) {
common_element('div', 'error', $err);
}
common_element_start('form', array('id' => 'remotesubscribe', 'method' => 'POST',
'action' => common_local_url('remotesubscribe')));
+ common_input('nickname', _t('User nickname'), $nickname);
common_input('profile', _t('Profile URL'));
common_submit('submit', _t('Subscribe'));
common_element_end('form');
$cur = common_current_user();
- if ($cur && $cur->id != $profile->id) {
- if ($cur->isSubscribed($profile)) {
- $this->show_unsubscribe_form($profile);
- } else {
- $this->show_subscribe_form($profile);
+ if ($cur) {
+ if ($cur->id != $profile->id) {
+ if ($cur->isSubscribed($profile)) {
+ $this->show_unsubscribe_form($profile);
+ } else {
+ $this->show_subscribe_form($profile);
+ }
}
+ } else {
+ $this->show_remote_subscribe_form($profile);
}
$this->show_statistics($profile);
common_element_end('form');
}
+ function show_remote_subscribe_form($profile) {
+ common_element_start('form', array('id' => 'remotesubscribe', 'method' => 'POST',
+ 'action' => common_local_url('remotesubscribe')));
+ common_hidden('nickname', $profile->nickname);
+ common_input('profile', _t('Profile'));
+ common_submit('submit',_t('Subscribe'));
+ common_element_end('form');
+ }
+
function show_unsubscribe_form($profile) {
common_element_start('form', array('id' => 'unsubscribe', 'method' => 'POST',
'action' => common_local_url('unsubscribe')));
- server side of user authorization
- server side of request token
- server side of access token
-- OAuth store
-- log of consumers who ask for access
++ OAuth store
++ log of consumers who ask for access
- receive remote notice
- send remote notice
- subscribe form for not-logged-in users on showstream
+ add a next page link to all
- AGPL notification
- Check licenses of all libraries for compatibility
-- gettext
++ @ messages
++ Automatically linkify URLs in notices
- release 0.3
+- email notification on subscriptions
+- gettext
- license per notice
-- Automatically linkify URLs in notices
- tinyurl-ification of URLs
- use only canonical email addresses
- allow mixed-case usernames
- theme per site
- theme per profile
- email confirmation for registration
+- email options
+- email newsletter
- change cookie handling for anon users to be more cache-friendly
- jQuery for as much as possible
- content negotiation for interface language
- RDFa for stream pages
- RDFa for subscriber pages
- RDFa for subscribed pages
-- @ messages
- # tags
- L: location
- hreviews
- receive notices from mobile phone
- machine tags
- release 0.6
+- OAuth for third-party tools (desktop, other sites)
- Twitter-compatible API
- Pownce-compatible API
- include twitter subscriptions (push and pull)
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/* XXX: break up into separate modules (HTTP, HTML, user, files) */
-
if (!defined('LACONICA')) { exit(1); }
define('AVATAR_PROFILE_SIZE', 96);
common_element_end('p');
}
+function common_hidden($id, $value) {
+ common_element('input', array('name' => $id,
+ 'type' => 'hidden',
+ 'id' => $id,
+ 'value' => $value));
+}
+
function common_password($id, $label) {
common_element_start('p');
common_element('label', array('for' => $id), $label);