remotesubscribe form
darcs-hash:20080530174310-84dde-1e05966eb48573ced8e73acf3f3b59e7bc4f1170.gz
This commit is contained in:
parent
f8a070394f
commit
bf5ae8e69a
|
@ -41,12 +41,14 @@ class RemotesubscribeAction extends Action {
|
|||
}
|
||||
|
||||
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');
|
||||
|
|
|
@ -88,12 +88,16 @@ class ShowstreamAction extends StreamAction {
|
|||
|
||||
$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);
|
||||
|
@ -146,6 +150,15 @@ class ShowstreamAction extends StreamAction {
|
|||
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')));
|
||||
|
|
14
doc/TODO
14
doc/TODO
|
@ -60,8 +60,8 @@
|
|||
- 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
|
||||
|
@ -83,10 +83,12 @@
|
|||
+ 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
|
||||
|
@ -98,6 +100,8 @@
|
|||
- 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
|
||||
|
@ -114,7 +118,6 @@
|
|||
- RDFa for stream pages
|
||||
- RDFa for subscriber pages
|
||||
- RDFa for subscribed pages
|
||||
- @ messages
|
||||
- # tags
|
||||
- L: location
|
||||
- hreviews
|
||||
|
@ -134,6 +137,7 @@
|
|||
- 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)
|
||||
|
|
|
@ -17,8 +17,6 @@
|
|||
* 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);
|
||||
|
|
|
@ -238,6 +238,13 @@ function common_input($id, $label, $value=NULL) {
|
|||
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);
|
||||
|
|
Loading…
Reference in New Issue
Block a user