From 3b394ea43fd3bc011f98a9160a8b408283f97ebc Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 25 Oct 2012 18:42:42 -0700 Subject: comments sort of working again but now need to fix the threading which was ported when it was only half working --- boot.php | 2 +- done | 2 +- include/conversation.php | 18 +- mod/install.php | 2 +- mod/item.php | 12 +- mod/photos.php | 2 +- mod/register.php | 319 +++++++++++++--------------------- mod/zregister.php | 187 -------------------- version.inc | 2 +- view/css/mod_register.css | 33 ++++ view/css/mod_zregister.css | 33 ---- view/js/mod_register.js | 29 ++++ view/js/mod_zregister.js | 29 ---- view/php/mod_register.php | 3 + view/php/mod_zregister.php | 3 - view/theme/duepuntozero/css/style.css | 193 +++++++++++++++++--- view/tpl/register.tpl | 80 ++++----- view/tpl/wall_thread.tpl | 71 ++++---- view/tpl/zregister.tpl | 45 ----- 19 files changed, 447 insertions(+), 618 deletions(-) delete mode 100644 mod/zregister.php create mode 100644 view/css/mod_register.css delete mode 100644 view/css/mod_zregister.css create mode 100644 view/js/mod_register.js delete mode 100644 view/js/mod_zregister.js create mode 100644 view/php/mod_register.php delete mode 100644 view/php/mod_zregister.php delete mode 100644 view/tpl/zregister.tpl diff --git a/boot.php b/boot.php index 569193666..1d7c1803c 100644 --- a/boot.php +++ b/boot.php @@ -990,7 +990,7 @@ if(! function_exists('login')) { $reg = false; $reglink = get_config('system','register_link'); if(! strlen($reglink)) - $reglink = 'zregister'; + $reglink = 'register'; if ($register) { $reg = array( diff --git a/done b/done index e2eb825bc..036d1217a 100644 --- a/done +++ b/done @@ -182,4 +182,4 @@ mod/ + zchannel.php + zfinger.php ? zperms.php -+ zregister.php ++ register.php diff --git a/include/conversation.php b/include/conversation.php index 98e8c3694..ce6f017e1 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -398,7 +398,11 @@ function prepare_threads_body($a, $items, $cmnt_tpl, $page_writeable, $mode, $pr } } - $item_writeable = (($item['writable'] || $item['self']) ? true : false); + $channel = $a->get_channel(); + +// FIXME +// $item_writeable = (($item['writable'] || $item['self']) ? true : false); + $item_writeable = ((local_user() && $channel['channel_hash'] === $item['owner_xchan']) ? true : false); if($visiting && $mode == 'profile') $item_writeable = true; @@ -744,7 +748,9 @@ function conversation(&$a, $items, $mode, $update, $page_mode = 'traditional') { $page_dropping = ((local_user() && local_user() == $profile_owner) ? true : false); - + + $channel = $a->get_channel(); + $observer = $a->get_observer(); if($update) $return_url = $_SESSION['return_url']; @@ -988,8 +994,8 @@ function conversation(&$a, $items, $mode, $update, $page_mode = 'traditional') { // If there are more than two comments, squash all but the last 2. if($toplevelpost) { - - $item_writeable = (($item['writable'] || $item['self']) ? true : false); +// FIXME - base this on observer permissions + $item_writeable = ((local_user() && $channel['channel_hash'] === $item['owner_xchan']) ? true : false); $comments_seen = 0; $comments_collapsed = false; @@ -1116,9 +1122,9 @@ function conversation(&$a, $items, $mode, $update, $page_mode = 'traditional') { '$parent' => $item['parent'], '$qcomment' => $qcomment, '$profile_uid' => $profile_owner, - '$mylink' => $a->contact['url'], + '$mylink' => $observer['xchan_profile'], '$mytitle' => t('This is you'), - '$myphoto' => $a->contact['thumb'], + '$myphoto' => $observer['xchan_photo_s'], '$comment' => t('Comment'), '$submit' => t('Submit'), '$edbold' => t('Bold'), diff --git a/mod/install.php b/mod/install.php index e10533478..c71eaa49f 100755 --- a/mod/install.php +++ b/mod/install.php @@ -493,7 +493,7 @@ function what_next() { ."

".t('IMPORTANT: You will need to [manually] setup a scheduled task for the poller.') .t('Please see the file "install/INSTALL.txt".') ."

" - .t("Go to your new Friendica node registration page and register as new user. Remember to use the same email you have entered as administrator email. This will allow you to enter the site admin panel.") + .t("Go to your new Friendica node registration page and register as new user. Remember to use the same email you have entered as administrator email. This will allow you to enter the site admin panel.") ."

"; } diff --git a/mod/item.php b/mod/item.php index 181984d33..98541b570 100644 --- a/mod/item.php +++ b/mod/item.php @@ -564,7 +564,9 @@ function item_post(&$a) { $notify_type = (($parent) ? 'comment-new' : 'wall-new' ); $uri = item_message_id(); - + $parent_uri = $uri; + if($parent_item) + $parent_uri = $parent_item['uri']; // Fallback so that we alway have a thr_parent @@ -589,6 +591,7 @@ function item_post(&$a) { $datarray['received'] = datetime_convert(); $datarray['changed'] = datetime_convert(); $datarray['uri'] = $uri; + $datarray['parent_uri'] = $parent_uri; $datarray['title'] = $title; $datarray['body'] = $body; $datarray['app'] = $app; @@ -774,11 +777,10 @@ function item_post(&$a) { if(! $parent) $parent = $post_id; - $r = q("UPDATE `item` SET `parent` = %d, `parent_uri` = '%s', `plink` = '%s', `changed` = '%s', `visible` = 1 + $r = q("UPDATE `item` SET `parent` = %d, `parent_uri` = '%s', `changed` = '%s' WHERE `id` = %d LIMIT 1", intval($parent), dbesc(($parent == $post_id) ? $uri : $parent_item['uri']), - dbesc($a->get_baseurl() . '/display/' . $channel['channel_address'] . '/' . $post_id), dbesc(datetime_convert()), intval($post_id) ); @@ -787,7 +789,9 @@ function item_post(&$a) { // This way we don't see every picture in your new photo album posted to your wall at once. // They will show up as people comment on them. - if(! $parent_item['item_restrict'] & ITEM_HIDDEN) { +// fixme set item visible as well + + if($parent_item['item_restrict'] & ITEM_HIDDEN) { $r = q("UPDATE `item` SET `item_restrict` = %d WHERE `id` = %d LIMIT 1", intval($parent_item['item_restrict'] - ITEM_HIDDEN), intval($parent_item['id']) diff --git a/mod/photos.php b/mod/photos.php index f2504e690..c90793d8c 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -36,7 +36,7 @@ function photos_init(&$a) { // FIXME $o .= '
'; $o .= '
' . $a->data['channel']['channel_name'] . '
'; - $o .= '
' . $a->data['user']['username'] . '
'; + $o .= '
' . $a->data['channel']['channel_name'] . '
'; $o .= '
'; $albums_visible = ((intval($a->data['user']['hidewall']) && (! local_user()) && (! remote_user())) ? false : true); diff --git a/mod/register.php b/mod/register.php index 6fbdde3ab..6326c8238 100644 --- a/mod/register.php +++ b/mod/register.php @@ -1,189 +1,135 @@ 1) ? argv(1) : ''); + + switch($cmd) { + case 'invite_check.json': + $result = check_account_invite($_REQUEST['invite_code']); + break; + case 'email_check.json': + $result = check_account_email($_REQUEST['email']); + break; + case 'password_check.json': + $result = check_account_password($_REQUEST['password']); + break; + default: + break; + } + if($result) { + json_return_and_die($result); + } +} - $verified = 0; - $blocked = 1; - $arr = array('post' => $_POST); - call_hooks('register_post', $arr); +function register_post(&$a) { $max_dailies = intval(get_config('system','max_daily_registrations')); - if($max_dailes) { - $r = q("select count(*) as total from user where register_date > UTC_TIMESTAMP - INTERVAL 1 day"); + if($max_dailies) { + $r = q("select count(*) as total from account where account_created > UTC_TIMESTAMP - INTERVAL 1 day"); if($r && $r[0]['total'] >= $max_dailies) { + notice( t('Maximum daily site registrations exceeded. Please try again tomorrow.') . EOL); return; } } - switch($a->config['register_policy']) { - - - case REGISTER_OPEN: - $blocked = 0; - $verified = 1; - break; - - case REGISTER_APPROVE: - $blocked = 1; - $verified = 0; - break; - - default: - case REGISTER_CLOSED: - if((! x($_SESSION,'authenticated') && (! x($_SESSION,'administrator')))) { - notice( t('Permission denied.') . EOL ); - return; - } - $blocked = 1; - $verified = 0; - break; + if(! x($_POST,'tos')) { + notice( t('Please indicate acceptance of the Terms of Service. Registration failed.') . EOL); + return; } - require_once('include/user.php'); + $policy = get_config('system','register_policy'); - $arr = $_POST; + switch($policy) { - $arr['blocked'] = $blocked; - $arr['verified'] = $verified; + case REGISTER_OPEN: + $flags = ACCOUNT_UNVERIFIED; + break; - $result = create_user($arr); + case REGISTER_APPROVE: + $flags = ACCOUNT_UNVERIFIED | ACCOUNT_BLOCKED; + break; + + default: + case REGISTER_CLOSED: + if(! is_site_admin()) { + notice( t('Permission denied.') . EOL ); + return; + } + $flags = ACCOUNT_UNVERIFIED | ACCOUNT_BLOCKED; + break; + } + + $arr = $_POST; + $arr['account_flags'] = $flags; + + $result = create_account($arr); if(! $result['success']) { notice($result['message']); return; } + require_once('include/security.php'); - $user = $result['user']; - - if($netpublish && $a->config['register_policy'] != REGISTER_APPROVE) { - $url = $a->get_baseurl() . '/profile/' . $user['nickname']; - proc_run('php',"include/directory.php","$url"); - } - - $using_invites = get_config('system','invitation_only'); - $num_invites = get_config('system','number_invites'); - $invite_id = ((x($_POST,'invite_id')) ? notags(trim($_POST['invite_id'])) : ''); + $using_invites = intval(get_config('system','invitation_only')); + $num_invites = intval(get_config('system','number_invites')); + $invite_code = ((x($_POST,'invite_code')) ? notags(trim($_POST['invite_code'])) : ''); - if( $a->config['register_policy'] == REGISTER_OPEN ) { + if($using_invites && $invite_code) { + q("delete * from register where hash = '%s' limit 1", dbesc($invite_code)); + set_pconfig($result['account']['account_id'],'system','invites_remaining',$num_invites); + } - if($using_invites && $invite_id) { - q("delete * from register where hash = '%s' limit 1", dbesc($invite_id)); - set_pconfig($user['uid'],'system','invites_remaining',$num_invites); + if($policy == REGISTER_OPEN ) { + $res = send_verification_email($result['email'],$result['password']); + if($res) { + info( t('Registration successful. Please check your email for validation instructions.') . EOL ) ; } - - $email_tpl = get_intltext_template("register_open_eml.tpl"); - $email_tpl = replace_macros($email_tpl, array( - '$sitename' => $a->config['sitename'], - '$siteurl' => $a->get_baseurl(), - '$username' => $user['username'], - '$email' => $user['email'], - '$password' => $result['password'], - '$uid' => $user['uid'] )); - - $res = mail($user['email'], sprintf(t('Registration details for %s'), $a->config['sitename']), - $email_tpl, - 'From: ' . t('Administrator') . '@' . $_SERVER['SERVER_NAME'] . "\n" - . 'Content-type: text/plain; charset=UTF-8' . "\n" - . 'Content-transfer-encoding: 8bit' ); - - + } + elseif($policy == REGISTER_APPROVE) { + $res = send_reg_approval_email($result); if($res) { - info( t('Registration successful. Please check your email for further instructions.') . EOL ) ; - goaway(z_root()); + info( t('Your registration is pending approval by the site owner.') . EOL ) ; } else { - notice( t('Failed to send email message. Here is the message that failed.') . $email_tpl . EOL ); - } - } - elseif($a->config['register_policy'] == REGISTER_APPROVE) { - if(! strlen($a->config['admin_email'])) { notice( t('Your registration can not be processed.') . EOL); - goaway(z_root()); } + goaway(z_root()); + } - $hash = random_string(); - $r = q("INSERT INTO `register` ( `hash`, `created`, `uid`, `password`, `language` ) VALUES ( '%s', '%s', %d, '%s', '%s' ) ", - dbesc($hash), - dbesc(datetime_convert()), - intval($user['uid']), - dbesc($result['password']), - dbesc($lang) - ); - - $r = q("SELECT `language` FROM `user` WHERE `email` = '%s' LIMIT 1", - dbesc($a->config['admin_email']) - ); - if(count($r)) - push_lang($r[0]['language']); - else - push_lang('en'); - - if($using_invites && $invite_id) { - q("delete * from register where hash = '%s' limit 1", dbesc($invite_id)); - set_pconfig($user['uid'],'system','invites_remaining',$num_invites); - } + authenticate_success($result['account'],true,false,true); - $email_tpl = get_intltext_template("register_verify_eml.tpl"); - $email_tpl = replace_macros($email_tpl, array( - '$sitename' => $a->config['sitename'], - '$siteurl' => $a->get_baseurl(), - '$username' => $user['username'], - '$email' => $user['email'], - '$password' => $result['password'], - '$uid' => $user['uid'], - '$hash' => $hash - )); - - $res = mail($a->config['admin_email'], sprintf(t('Registration request at %s'), $a->config['sitename']), - $email_tpl, - 'From: ' . t('Administrator') . '@' . $_SERVER['SERVER_NAME'] . "\n" - . 'Content-type: text/plain; charset=UTF-8' . "\n" - . 'Content-transfer-encoding: 8bit' ); - - pop_lang(); + if(! strlen($next_page = get_config('system','workflow_register_next'))) + $next_page = 'zchannel'; - if($res) { - info( t('Your registration is pending approval by the site owner.') . EOL ) ; - goaway(z_root()); - } + $_SESSION['workflow'] = true; + + goaway(z_root() . '/' . $next_page); - } +} - return; -}} -if(! function_exists('register_content')) { function register_content(&$a) { - // logged in users can register others (people/pages/groups) - // even with closed registrations, unless specifically prohibited by site policy. - // 'block_extended_register' blocks all registrations, period. - - $block = get_config('system','block_extended_register'); - - if(local_user() && ($block)) { - notice("Permission denied." . EOL); - return; - } - if((! local_user()) && ($a->config['register_policy'] == REGISTER_CLOSED)) { + if(get_config('system','register_policy') == REGISTER_CLOSED) { notice("Permission denied." . EOL); return; } $max_dailies = intval(get_config('system','max_daily_registrations')); - if($max_dailes) { - $r = q("select count(*) as total from user where register_date > UTC_TIMESTAMP - INTERVAL 1 day"); + if($max_dailies) { + $r = q("select count(*) as total from account where account_created > UTC_TIMESTAMP - INTERVAL 1 day"); if($r && $r[0]['total'] >= $max_dailies) { logger('max daily registrations exceeded.'); notice( t('This site has exceeded the number of allowed daily account registrations. Please try again tomorrow.') . EOL); @@ -191,80 +137,51 @@ function register_content(&$a) { } } - if(x($_SESSION,'theme')) - unset($_SESSION['theme']); - if(x($_SESSION,'mobile-theme')) - unset($_SESSION['mobile-theme']); + // Configurable terms of service link + $tosurl = get_config('system','tos_url'); + if(! $tosurl) + $tosurl = $a->get_baseurl() . '/help/TermsOfService'; - $username = ((x($_POST,'username')) ? $_POST['username'] : ((x($_GET,'username')) ? $_GET['username'] : '')); - $email = ((x($_POST,'email')) ? $_POST['email'] : ((x($_GET,'email')) ? $_GET['email'] : '')); - $openid_url = ((x($_POST,'openid_url')) ? $_POST['openid_url'] : ((x($_GET,'openid_url')) ? $_GET['openid_url'] : '')); - $nickname = ((x($_POST,'nickname')) ? $_POST['nickname'] : ((x($_GET,'nickname')) ? $_GET['nickname'] : '')); - $photo = ((x($_POST,'photo')) ? $_POST['photo'] : ((x($_GET,'photo')) ? hex2bin($_GET['photo']) : '')); - $invite_id = ((x($_POST,'invite_id')) ? $_POST['invite_id'] : ((x($_GET,'invite_id')) ? $_GET['invite_id'] : '')); + $toslink = '' . t('Terms of Service') . ''; + // Configurable whether to restrict age or not - default is based on international legal requirements + // This can be relaxed if you are on a restricted server that does not share with public servers - $oidhtml = ''; - $fillwith = ''; - $fillext = ''; - $oidlabel = ''; + if(get_config('system','no_age_restriction')) + $label_tos = sprintf( t('I accept the %s for this website'), $toslink); + else + $label_tos = sprintf( t('I am over 13 years of age and accept the %s for this website'), $toslink); - $realpeople = ''; + $enable_tos = 1 - intval(get_config('system','no_termsofservice')); + + $email = ((x($_REQUEST,'email')) ? strip_tags(trim($_REQUEST['email'])) : "" ); + $password = ((x($_REQUEST,'password')) ? trim($_REQUEST['password']) : "" ); + $password2 = ((x($_REQUEST,'password2')) ? trim($_REQUEST['password2']) : "" ); + $invite_code = ((x($_REQUEST,'invite_code')) ? strip_tags(trim($_REQUEST['invite_code'])) : "" ); - if(get_config('system','publish_all')) { - $profile_publish_reg = ''; - } - else { - $publish_tpl = get_markup_template("profile_publish.tpl"); - $profile_publish = replace_macros($publish_tpl,array( - '$instance' => 'reg', - '$pubdesc' => t('Include your profile in member directory?'), - '$yes_selected' => ' checked="checked" ', - '$no_selected' => '', - '$str_yes' => t('Yes'), - '$str_no' => t('No') - )); - } + $o = replace_macros(get_markup_template('register.tpl'), array( - $license = ''; - - $o = get_markup_template("register.tpl"); - - $arr = array('template' => $o); - - call_hooks('register_form',$arr); - - $o = replace_macros($o, array( - '$oidhtml' => $oidhtml, - '$invitations' => get_config('system','invitation_only'), - '$invite_desc' => t('Membership on this site is by invitation only.'), - '$invite_label' => t('Your invitation ID: '), - '$invite_id' => $invite_id, - '$realpeople' => $realpeople, - '$regtitle' => t('Registration'), - '$registertext' =>((x($a->config,'register_text')) - ? '
' . $a->config['register_text'] . '
' - : "" ), - '$fillwith' => $fillwith, - '$fillext' => $fillext, - '$oidlabel' => $oidlabel, - '$openid' => $openid_url, - '$namelabel' => t('Your Full Name ' . "\x28" . 'e.g. Joe Smith' . "\x29" . ': '), - '$addrlabel' => t('Your Email Address: '), - '$nickdesc' => t('Choose a profile nickname. This must begin with a text character. Your profile address on this site will then be \'nickname@$sitename\'.'), - '$nicklabel' => t('Choose a nickname: '), - '$photo' => $photo, - '$publish' => $profile_publish, - '$regbutt' => t('Register'), - '$username' => $username, - '$email' => $email, - '$nickname' => $nickname, - '$license' => $license, - '$sitename' => $a->get_hostname() + '$title' => t('Registration'), + '$registertext' => get_config('system','register_text'), + '$invitations' => get_config('system','invitation_only'), + '$invite_desc' => t('Membership on this site is by invitation only.'), + '$label_invite' => t('Please enter your invitation code'), + '$invite_code' => $invite_code, + + '$label_email' => t('Your email address'), + '$label_pass1' => t('Choose a password'), + '$label_pass2' => t('Please re-enter your password'), + '$label_tos' => $label_tos, + '$enable_tos' => $enable_tos, + '$email' => $email, + '$pass1' => $password, + '$pass2' => $password2, + '$submit' => t('Register') )); + return $o; -}} +} diff --git a/mod/zregister.php b/mod/zregister.php deleted file mode 100644 index a83f42bd0..000000000 --- a/mod/zregister.php +++ /dev/null @@ -1,187 +0,0 @@ - 1) ? argv(1) : ''); - - switch($cmd) { - case 'invite_check.json': - $result = check_account_invite($_REQUEST['invite_code']); - break; - case 'email_check.json': - $result = check_account_email($_REQUEST['email']); - break; - case 'password_check.json': - $result = check_account_password($_REQUEST['password']); - break; - default: - break; - } - if($result) { - json_return_and_die($result); - } -} - - -function zregister_post(&$a) { - - $max_dailies = intval(get_config('system','max_daily_registrations')); - if($max_dailies) { - $r = q("select count(*) as total from account where account_created > UTC_TIMESTAMP - INTERVAL 1 day"); - if($r && $r[0]['total'] >= $max_dailies) { - notice( t('Maximum daily site registrations exceeded. Please try again tomorrow.') . EOL); - return; - } - } - - if(! x($_POST,'tos')) { - notice( t('Please indicate acceptance of the Terms of Service. Registration failed.') . EOL); - return; - } - - $policy = get_config('system','register_policy'); - - switch($policy) { - - case REGISTER_OPEN: - $flags = ACCOUNT_UNVERIFIED; - break; - - case REGISTER_APPROVE: - $flags = ACCOUNT_UNVERIFIED | ACCOUNT_BLOCKED; - break; - - default: - case REGISTER_CLOSED: - if(! is_site_admin()) { - notice( t('Permission denied.') . EOL ); - return; - } - $flags = ACCOUNT_UNVERIFIED | ACCOUNT_BLOCKED; - break; - } - - $arr = $_POST; - $arr['account_flags'] = $flags; - - $result = create_account($arr); - - if(! $result['success']) { - notice($result['message']); - return; - } - require_once('include/security.php'); - - - $using_invites = intval(get_config('system','invitation_only')); - $num_invites = intval(get_config('system','number_invites')); - $invite_code = ((x($_POST,'invite_code')) ? notags(trim($_POST['invite_code'])) : ''); - - if($using_invites && $invite_code) { - q("delete * from register where hash = '%s' limit 1", dbesc($invite_code)); - set_pconfig($result['account']['account_id'],'system','invites_remaining',$num_invites); - } - - if($policy == REGISTER_OPEN ) { - $res = send_verification_email($result['email'],$result['password']); - if($res) { - info( t('Registration successful. Please check your email for validation instructions.') . EOL ) ; - } - } - elseif($policy == REGISTER_APPROVE) { - $res = send_reg_approval_email($result); - if($res) { - info( t('Your registration is pending approval by the site owner.') . EOL ) ; - } - else { - notice( t('Your registration can not be processed.') . EOL); - } - goaway(z_root()); - } - - authenticate_success($result['account'],true,false,true); - - if(! strlen($next_page = get_config('system','workflow_register_next'))) - $next_page = 'zchannel'; - - $_SESSION['workflow'] = true; - - goaway(z_root() . '/' . $next_page); - -} - - - - - - - -function zregister_content(&$a) { - - - if(get_config('system','register_policy') == REGISTER_CLOSED) { - notice("Permission denied." . EOL); - return; - } - - $max_dailies = intval(get_config('system','max_daily_registrations')); - if($max_dailies) { - $r = q("select count(*) as total from account where account_created > UTC_TIMESTAMP - INTERVAL 1 day"); - if($r && $r[0]['total'] >= $max_dailies) { - logger('max daily registrations exceeded.'); - notice( t('This site has exceeded the number of allowed daily account registrations. Please try again tomorrow.') . EOL); - return; - } - } - - // Configurable terms of service link - - $tosurl = get_config('system','tos_url'); - if(! $tosurl) - $tosurl = $a->get_baseurl() . '/help/TermsOfService'; - - $toslink = '' . t('Terms of Service') . ''; - - // Configurable whether to restrict age or not - default is based on international legal requirements - // This can be relaxed if you are on a restricted server that does not share with public servers - - if(get_config('system','no_age_restriction')) - $label_tos = sprintf( t('I accept the %s for this website'), $toslink); - else - $label_tos = sprintf( t('I am over 13 years of age and accept the %s for this website'), $toslink); - - $enable_tos = 1 - intval(get_config('system','no_termsofservice')); - - $email = ((x($_REQUEST,'email')) ? strip_tags(trim($_REQUEST['email'])) : "" ); - $password = ((x($_REQUEST,'password')) ? trim($_REQUEST['password']) : "" ); - $password2 = ((x($_REQUEST,'password2')) ? trim($_REQUEST['password2']) : "" ); - $invite_code = ((x($_REQUEST,'invite_code')) ? strip_tags(trim($_REQUEST['invite_code'])) : "" ); - - - $o = replace_macros(get_markup_template('zregister.tpl'), array( - - '$title' => t('Registration'), - '$registertext' => get_config('system','register_text'), - '$invitations' => get_config('system','invitation_only'), - '$invite_desc' => t('Membership on this site is by invitation only.'), - '$label_invite' => t('Please enter your invitation code'), - '$invite_code' => $invite_code, - - '$label_email' => t('Your email address'), - '$label_pass1' => t('Choose a password'), - '$label_pass2' => t('Please re-enter your password'), - '$label_tos' => $label_tos, - '$enable_tos' => $enable_tos, - '$email' => $email, - '$pass1' => $password, - '$pass2' => $password2, - '$submit' => t('Register') - )); - - return $o; - -} - diff --git a/version.inc b/version.inc index c99f6bc96..08fd19399 100644 --- a/version.inc +++ b/version.inc @@ -1 +1 @@ -2012-10-24.117 +2012-10-25.118 diff --git a/view/css/mod_register.css b/view/css/mod_register.css new file mode 100644 index 000000000..581dee1a0 --- /dev/null +++ b/view/css/mod_register.css @@ -0,0 +1,33 @@ + +h2 { + margin-left: 15%; + margin-top: 15%; +} + +#register-form { + font-size: 1.4em; + margin-left: 15%; + margin-top: 5%; +} + +.register-label { + float: left; + width: 275px; +} + +.register-input { + float: left; + width: 275px; + padding: 5px; +} + +.register-feedback { + float: left; + margin-left: 45px; +} + +.register-field-end { + clear: both; + margin-bottom: 20px; +} + diff --git a/view/css/mod_zregister.css b/view/css/mod_zregister.css deleted file mode 100644 index a5bd9a5cf..000000000 --- a/view/css/mod_zregister.css +++ /dev/null @@ -1,33 +0,0 @@ - -h2 { - margin-left: 15%; - margin-top: 15%; -} - -#zregister-form { - font-size: 1.4em; - margin-left: 15%; - margin-top: 5%; -} - -.zregister-label { - float: left; - width: 275px; -} - -.zregister-input { - float: left; - width: 275px; - padding: 5px; -} - -.zregister-feedback { - float: left; - margin-left: 45px; -} - -.zregister-field-end { - clear: both; - margin-bottom: 20px; -} - diff --git a/view/js/mod_register.js b/view/js/mod_register.js new file mode 100644 index 000000000..839c91911 --- /dev/null +++ b/view/js/mod_register.js @@ -0,0 +1,29 @@ + $(document).ready(function() { + $("#register-email").blur(function() { + var zreg_email = $("#register-email").val(); + $.get("register/email_check.json?f=&email=" + encodeURIComponent(zreg_email),function(data) { + $("#register-email-feedback").html(data.message); + zFormError("#register-email-feedback",data.error); + }); + }); + $("#register-password").blur(function() { + if(($("#register-password").val()).length < 6 ) { + $("#register-password-feedback").html(aStr['pwshort']); + zFormError("#register-password-feedback",true); + } + else { + $("#register-password-feedback").html(""); + zFormError("#register-password-feedback",false); + } + }); + $("#register-password2").blur(function() { + if($("#register-password").val() != $("#register-password2").val()) { + $("#register-password2-feedback").html(aStr['pwnomatch']); + zFormError("#register-password2-feedback",true); + } + else { + $("#register-password2-feedback").html(""); + zFormError("#register-password2-feedback",false); + } + }); + }); diff --git a/view/js/mod_zregister.js b/view/js/mod_zregister.js deleted file mode 100644 index 6dcb4058c..000000000 --- a/view/js/mod_zregister.js +++ /dev/null @@ -1,29 +0,0 @@ - $(document).ready(function() { - $("#zregister-email").blur(function() { - var zreg_email = $("#zregister-email").val(); - $.get("zregister/email_check.json?f=&email=" + encodeURIComponent(zreg_email),function(data) { - $("#zregister-email-feedback").html(data.message); - zFormError("#zregister-email-feedback",data.error); - }); - }); - $("#zregister-password").blur(function() { - if(($("#zregister-password").val()).length < 6 ) { - $("#zregister-password-feedback").html(aStr['pwshort']); - zFormError("#zregister-password-feedback",true); - } - else { - $("#zregister-password-feedback").html(""); - zFormError("#zregister-password-feedback",false); - } - }); - $("#zregister-password2").blur(function() { - if($("#zregister-password").val() != $("#zregister-password2").val()) { - $("#zregister-password2-feedback").html(aStr['pwnomatch']); - zFormError("#zregister-password2-feedback",true); - } - else { - $("#zregister-password2-feedback").html(""); - zFormError("#zregister-password2-feedback",false); - } - }); - }); diff --git a/view/php/mod_register.php b/view/php/mod_register.php new file mode 100644 index 000000000..e7709cbd8 --- /dev/null +++ b/view/php/mod_register.php @@ -0,0 +1,3 @@ +page['template'] = 'full'; diff --git a/view/php/mod_zregister.php b/view/php/mod_zregister.php deleted file mode 100644 index e7709cbd8..000000000 --- a/view/php/mod_zregister.php +++ /dev/null @@ -1,3 +0,0 @@ -page['template'] = 'full'; diff --git a/view/theme/duepuntozero/css/style.css b/view/theme/duepuntozero/css/style.css index 0c051487e..94092bbf0 100644 --- a/view/theme/duepuntozero/css/style.css +++ b/view/theme/duepuntozero/css/style.css @@ -964,10 +964,8 @@ input#dfrn-url { .wall-item-content-wrapper { margin-top: 10px; - border: 1px solid #CCC; + border-left: 1px solid #e0e0e0; position: relative; - -moz-border-radius: 3px; - border-radius: 3px; } .tread-wrapper .tread-wrapper { @@ -975,8 +973,9 @@ input#dfrn-url { } .wall-item-content-wrapper.comment { -# margin-left: 50px; - background: #EEEEEE; + background: #ffffff; + border-left: 1px solid #e0e0e0; + margin-left: 50px; } .wall-item-like.comment, .wall-item-dislike.comment { @@ -1210,12 +1209,12 @@ input#dfrn-url { .comment-edit-wrapper { margin-top: 15px; - background: #f3f3f3; + background: #ffffff; margin-left: 50px; } .comment-wwedit-wrapper { - background: #f3f3f3; + background: #ffffff; } .comment-edit-photo { @@ -1235,11 +1234,30 @@ input#dfrn-url { .comment-edit-text-empty, .comment-edit-text-full { float: left; margin-top: 10px; - -moz-border-radius: 3px; - border-radius: 3px; - border: 1px solid #cccccc; + border-left: 1px solid #e0e0e0; padding: 3px 1px 1px 3px; } + +.comment-edit-text-empty { + color: gray; + height: 1.5em; + width: 175px; + overflow: auto; + margin-bottom: 10px; +} + +.comment-wwedit-wrapper.threaded > .comment-edit-form > .comment-edit-text-empty { + height: 1.5em; +} + +.comment-edit-text-full { + color: black; + height: 150px; + width: 350px; + overflow: auto; +} + + .comment-edit-text-end { clear: both; } @@ -1678,6 +1696,12 @@ input#dfrn-url { width: 587px; } +#profile-jot-text_parent, .mceLayout { + border-radius: 3px; + -moz-border-radius: 3px; + box-shadow: 4px 4px 3px 0 #444444; +} + #profile-jot-text { height: 20px; color:#cccccc; @@ -1686,6 +1710,137 @@ input#dfrn-url { -moz-border-radius: 3px; border-radius: 3px; } +#profile-jot-text:hover { + color: #000000; +} + +.wall-item-photo, .photo, .contact-block-img, .my-comment-photo { + border-radius: 3px; + -moz-border-radius: 3px; + box-shadow: 4px 4px 3px 0 #444444; +} + + +#datebrowse-sidebar select { + margin-left: 25px; + border-radius: 3px; + -moz-border-radius: 3px; + opacity: 0.3; + filter:alpha(opacity=30); +} + +#datebrowse-sidebar select:hover { + opacity: 1.0; + filter:alpha(opacity=100); +} + +#posted-date-selector { + margin-left: 30px !important; + margin-top: 5px !important; + margin-right: 0px !important; + margin-bottom: 0px !important; +} + +#posted-date-selector:hover { + box-shadow: 4px 4px 3px 0 #444444; + margin-left: 25px !important; + margin-top: 0px !important; + margin-right: 5px !important; + margin-bottom: 5px !important; + +} + +#side-bar-photos-albums { + margin-top: 15px; +} + +#side-bar-photos-albums ul { + list-style: none; +} + +.contact-entry-photo img, .profile-match-photo img, #photo-photo img, .directory-photo-img, .photo-album-photo, .photo-top-photo, .profile-jot-text, .group-selected, .nets-selected, .fileas-selected, #profile-jot-submit, .categories-selected { + border-radius: 3px; + -moz-border-radius: 3px; + box-shadow: 4px 4px 3px 0 #444444; +} +.settings-widget .selected { + border-radius: 3px; + -moz-border-radius: 3px; + box-shadow: 4px 4px 3px 0 #444444; +} + +#sidebar-page-list .label { + margin-left: 5px; +} + + +.photo { + border: 1px solid #AAAAAA; +} + +.photo-top-photo, .photo-album-photo { + padding: 10px; + max-width: 300px; + border: 1px solid #888888; +} + +.rotleft1 { +-webkit-transform: rotate(-1deg); +-moz-transform: rotate(-1deg); +-ms-transform: rotate(-1deg); +-o-transform: rotate(-1deg); +} + +.rotleft2 { +-webkit-transform: rotate(-2deg); +-moz-transform: rotate(-2deg); +-ms-transform: rotate(-2deg); +-o-transform: rotate(-2deg); +} + +.rotleft3 { +-webkit-transform: rotate(-3deg); +-moz-transform: rotate(-3deg); +-ms-transform: rotate(-3deg); +-o-transform: rotate(-3deg); +} + +.rotleft4 { +-webkit-transform: rotate(-4deg); +-moz-transform: rotate(-4deg); +-ms-transform: rotate(-4deg); +-o-transform: rotate(-4deg); +} + + +.rotright1 { +-webkit-transform: rotate(1deg); +-moz-transform: rotate(1deg); +-ms-transform: rotate(1deg); +-o-transform: rotate(1deg); +} + +.rotright2 { +-webkit-transform: rotate(2deg); +-moz-transform: rotate(2deg); +-ms-transform: rotate(2deg); +-o-transform: rotate(2deg); +} + +.rotright3 { +-webkit-transform: rotate(3deg); +-moz-transform: rotate(3deg); +-ms-transform: rotate(3deg); +-o-transform: rotate(3deg); +} + +.rotright4 { +-webkit-transform: rotate(4deg); +-moz-transform: rotate(4deg); +-ms-transform: rotate(4deg); +-o-transform: rotate(4deg); +} + /** acl **/ @@ -1793,24 +1948,6 @@ input#dfrn-url { /** /acl **/ -.comment-edit-text-empty { - color: gray; - height: 5em; - width: 175px; - overflow: auto; - margin-bottom: 10px; -} - -.comment-wwedit-wrapper.threaded > .comment-edit-form > .comment-edit-text-empty { - height: 1.5em; -} - -.comment-edit-text-full { - color: black; - height: 150px; - width: 350px; - overflow: auto; -} #group-new-submit-wrapper { margin-top: 30px; diff --git a/view/tpl/register.tpl b/view/tpl/register.tpl index 244762c4b..4b565718d 100644 --- a/view/tpl/register.tpl +++ b/view/tpl/register.tpl @@ -1,57 +1,45 @@ -

$regtitle

+

$title

- - - $registertext - -

$realpeople

- -

$fillwith

-

$fillext

+{{ if $registertext }} +
$registertext
+{{ endif }} {{ if $invitations }} -

$invite_desc

-
- - -
-
+ + +
+
{{ endif }} + + +
+
+ + + +
+
+ + + +
+
+ + {{ if $enable_tos }} + + +
+
+ {{ else }} + + {{ endif }} + + +
-
- - -
-
- - -
- - -
-
- -

$nickdesc

- -
- -
@$sitename
-
-
- - $publish - -
- -
-
- -$license - - diff --git a/view/tpl/wall_thread.tpl b/view/tpl/wall_thread.tpl index ade8264fa..a67334e33 100644 --- a/view/tpl/wall_thread.tpl +++ b/view/tpl/wall_thread.tpl @@ -6,38 +6,40 @@ {{endif}}
-{{ if $item.threaded }} -
-{{ else }} -
-{{ endif }} +
-
-
- - $item.name - +
+ {{ if $item.owner_url }} +
+ + $item.owner_name +
+
$item.wall
+ {{ endif }} +
+ + $item.name menu -
-
    - $item.item_photo_menu -
-
+
+
    + $item.item_photo_menu +
+
+
{{ if $item.lock }}
$item.lock
{{ else }}
{{ endif }} -
$item.location
+
$item.location
- $item.name -
$item.ago
- -
+ $item.name{{ if $item.owner_url }} $item.to $item.owner_name $item.vwall{{ endif }}
+
$item.ago
+
$item.title
@@ -47,6 +49,15 @@ $tag {{ endfor }}
+ {{ if $item.has_cats }} +
$item.txt_cats {{ for $item.categories as $cat }}$cat.name [$remove] {{ if $cat.last }}{{ else }}, {{ endif }}{{ endfor }} +
+ {{ endif }} + + {{ if $item.has_folders }} +
$item.txt_folders {{ for $item.folders as $cat }}$cat.name [$remove] {{ if $cat.last }}{{ else }}, {{ endif }}{{ endfor }} +
+ {{ endif }}
@@ -59,7 +70,7 @@
{{ endif }} {{ if $item.plink }} - + {{ endif }} {{ if $item.edpost }} @@ -71,39 +82,37 @@ {{ endif }} {{ if $item.filer }} - {{ endif }} + {{ endif }} +
{{ if $item.drop.dropping }}{{ endif }}
- {{ if $item.drop.dropping }}{{ endif }} + {{ if $item.drop.pagedrop }}{{ endif }}
-
+
$item.dislike
{{ if $item.threaded }} {{ if $item.comment }} -
+
$item.comment
{{ endif }} {{ endif }} -
+
{{ for $item.children as $item }} {{ inc $item.template }}{{ endinc }} {{ endfor }} -{{ if $item.comment }} {{ if $item.flatten }}
$item.comment
{{ endif }} -{{ endif }}
{{if $item.comment_lastcollapsed}}{{endif}} - diff --git a/view/tpl/zregister.tpl b/view/tpl/zregister.tpl deleted file mode 100644 index 3a2c38a13..000000000 --- a/view/tpl/zregister.tpl +++ /dev/null @@ -1,45 +0,0 @@ -

$title

- -
- -{{ if $registertext }} -
$registertext
-{{ endif }} - -{{ if $invitations }} -

$invite_desc

- - - -
-
-{{ endif }} - - - -
-
- - - -
-
- - - -
-
- - {{ if $enable_tos }} - - -
-
- {{ else }} - - {{ endif }} - - -
- -
-- cgit v1.2.3