Nudge feature
darcs-hash:20081116022735-eefa4-366f6deb85942f859ebd532e477b57737bcafbf8.gz
This commit is contained in:
21
lib/util.php
21
lib/util.php
@@ -978,6 +978,8 @@ function common_fancy_url($action, $args=NULL) {
|
||||
} else {
|
||||
return common_path('main/remote');
|
||||
}
|
||||
case 'nudge':
|
||||
return common_path($args['nickname'].'/nudge');
|
||||
case 'openidlogin':
|
||||
return common_path('main/openid');
|
||||
case 'profilesettings':
|
||||
@@ -1861,6 +1863,25 @@ function common_favor_form($notice) {
|
||||
common_element_end('form');
|
||||
}
|
||||
|
||||
function common_nudge_form($profile) {
|
||||
common_element_start('form', array('id' => 'nudge', 'method' => 'post',
|
||||
'action' => common_local_url('nudge', array('nickname' => $profile->nickname))));
|
||||
common_hidden('token', common_session_token()); //Is this necessary?
|
||||
// common_element('input', array('id' => 'nudge_nickname',
|
||||
// 'name' => 'nudge_nickname',
|
||||
// 'type' => 'hidden',
|
||||
// 'value' => $profile->nickname));
|
||||
common_element('input', array('type' => 'submit',
|
||||
'class' => 'submit',
|
||||
'value' => _('Send a nudge')));
|
||||
common_element_end('form');
|
||||
}
|
||||
|
||||
function common_nudge_response() {
|
||||
common_element('p', array('id' => 'nudge_response'), _('Nudge sent!'));
|
||||
}
|
||||
|
||||
|
||||
function common_cache_key($extra) {
|
||||
return 'laconica:' . common_keyize(common_config('site', 'name')) . ':' . $extra;
|
||||
}
|
||||
|
Reference in New Issue
Block a user