custom attags

This commit is contained in:
Friendika 2011-09-04 22:40:36 -07:00
parent 82f7f33cf5
commit 7e8100d2cd
4 changed files with 19 additions and 7 deletions

View file

@ -18,15 +18,16 @@ function crepair_post(&$a) {
$contact = $r[0]; $contact = $r[0];
$nick = ((x($_POST,'nick')) ? $_POST['nick'] : null); $nick = ((x($_POST,'nick')) ? $_POST['nick'] : '');
$url = ((x($_POST,'url')) ? $_POST['url'] : null); $url = ((x($_POST,'url')) ? $_POST['url'] : '');
$request = ((x($_POST,'request')) ? $_POST['request'] : null); $request = ((x($_POST,'request')) ? $_POST['request'] : '');
$confirm = ((x($_POST,'confirm')) ? $_POST['confirm'] : null); $confirm = ((x($_POST,'confirm')) ? $_POST['confirm'] : '');
$notify = ((x($_POST,'notify')) ? $_POST['notify'] : null); $notify = ((x($_POST,'notify')) ? $_POST['notify'] : '');
$poll = ((x($_POST,'poll')) ? $_POST['poll'] : null); $poll = ((x($_POST,'poll')) ? $_POST['poll'] : '');
$attag = ((x($_POST,'attag')) ? $_POST['attag'] : '');
$r = q("UPDATE `contact` SET `nick` = '%s', `url` = '%s', `request` = '%s', `confirm` = '%s', `notify` = '%s', `poll` = '%s' $r = q("UPDATE `contact` SET `nick` = '%s', `url` = '%s', `request` = '%s', `confirm` = '%s', `notify` = '%s', `poll` = '%s', `attag` = '%s'
WHERE `id` = %d AND `uid` = %d LIMIT 1", WHERE `id` = %d AND `uid` = %d LIMIT 1",
dbesc($nick), dbesc($nick),
dbesc($url), dbesc($url),
@ -34,6 +35,7 @@ function crepair_post(&$a) {
dbesc($confirm), dbesc($confirm),
dbesc($notify), dbesc($notify),
dbesc($poll), dbesc($poll),
dbesc($attag),
intval($contact['id']), intval($contact['id']),
local_user() local_user()
); );
@ -84,6 +86,7 @@ function crepair_content(&$a) {
$o .= replace_macros($tpl, array( $o .= replace_macros($tpl, array(
'$label_name' => t('Name'), '$label_name' => t('Name'),
'$label_nick' => t('Account Nickname'), '$label_nick' => t('Account Nickname'),
'$label_attag' => t('@Tagname - overrides Name/Nickname'),
'$label_url' => t('Account URL'), '$label_url' => t('Account URL'),
'$label_request' => t('Friend Request URL'), '$label_request' => t('Friend Request URL'),
'$label_confirm' => t('Friend Confirm URL'), '$label_confirm' => t('Friend Confirm URL'),
@ -97,6 +100,7 @@ function crepair_content(&$a) {
'$confirm' => $contact['confirm'], '$confirm' => $contact['confirm'],
'$notify' => $contact['notify'], '$notify' => $contact['notify'],
'$poll' => $contact['poll'], '$poll' => $contact['poll'],
'$contact_attag' => $contact['attag'],
'$lbl_submit' => t('Submit') '$lbl_submit' => t('Submit')
)); ));

View file

@ -7,6 +7,10 @@
<input type="text" id="crepair-nick" name="nick" value="$contact_nick" /> <input type="text" id="crepair-nick" name="nick" value="$contact_nick" />
<div class="clear"></div> <div class="clear"></div>
<label id="crepair-attag-label" for="crepair-attag">$label_attag</label>
<input type="text" id="crepair-attag" name="attag" value="$contact_attag" />
<div class="clear"></div>
<label id="crepair-url-label" for="crepair-url">$label_url</label> <label id="crepair-url-label" for="crepair-url">$label_url</label>
<input type="text" id="crepair-url" name="url" value="$contact_url" /> <input type="text" id="crepair-url" name="url" value="$contact_url" />
<div class="clear"></div> <div class="clear"></div>

View file

@ -2435,6 +2435,7 @@ a.mail-list-link {
} }
#crepair-nick-label, #crepair-nick-label,
#crepair-attag-label,
#crepair-url-label, #crepair-url-label,
#crepair-request-label, #crepair-request-label,
#crepair-confirm-label, #crepair-confirm-label,
@ -2446,6 +2447,7 @@ a.mail-list-link {
} }
#crepair-nick, #crepair-nick,
#crepair-attag,
#crepair-url, #crepair-url,
#crepair-request, #crepair-request,
#crepair-confirm, #crepair-confirm,

View file

@ -2403,6 +2403,7 @@ a.mail-list-link {
} }
#crepair-nick-label, #crepair-nick-label,
#crepair-attag-label,
#crepair-url-label, #crepair-url-label,
#crepair-request-label, #crepair-request-label,
#crepair-confirm-label, #crepair-confirm-label,
@ -2414,6 +2415,7 @@ a.mail-list-link {
} }
#crepair-nick, #crepair-nick,
#crepair-attag,
#crepair-url, #crepair-url,
#crepair-request, #crepair-request,
#crepair-confirm, #crepair-confirm,