diff options
-rw-r--r-- | boot.php | 55 | ||||
-rw-r--r-- | database.sql | 3 | ||||
-rw-r--r-- | images/content-types.gif | bin | 0 -> 384 bytes | |||
-rw-r--r-- | images/icons.png | bin | 8426 -> 8875 bytes | |||
-rw-r--r-- | include/attach.php | 80 | ||||
-rw-r--r-- | include/conversation.php | 10 | ||||
-rw-r--r-- | include/template_processor.php | 2 | ||||
-rw-r--r-- | mod/attach.php | 73 | ||||
-rw-r--r-- | mod/dfrn_notify.php | 4 | ||||
-rw-r--r-- | mod/editpost.php | 1 | ||||
-rw-r--r-- | mod/item.php | 53 | ||||
-rw-r--r-- | mod/profile.php | 7 | ||||
-rw-r--r-- | mod/profiles.php | 18 | ||||
-rw-r--r-- | mod/wall_attach.php | 106 | ||||
-rw-r--r-- | mod/wall_upload.php | 2 | ||||
-rw-r--r-- | update.php | 12 | ||||
-rw-r--r-- | util/messages.po | 485 | ||||
-rw-r--r-- | view/jot-header.tpl | 12 | ||||
-rw-r--r-- | view/jot.tpl | 4 | ||||
-rw-r--r-- | view/profile-hide-wall.tpl | 16 | ||||
-rw-r--r-- | view/profile_edit.tpl | 2 | ||||
-rw-r--r-- | view/theme/dispy/style.css | 14 | ||||
-rw-r--r-- | view/theme/duepuntozero/style.css | 32 | ||||
-rw-r--r-- | view/theme/loozah/style.css | 24 |
24 files changed, 773 insertions, 242 deletions
@@ -4,9 +4,9 @@ set_time_limit(0); ini_set('pcre.backtrack_limit', 250000); -define ( 'FRIENDIKA_VERSION', '2.2.989' ); +define ( 'FRIENDIKA_VERSION', '2.2.990' ); define ( 'DFRN_PROTOCOL_VERSION', '2.21' ); -define ( 'DB_UPDATE_VERSION', 1055 ); +define ( 'DB_UPDATE_VERSION', 1058 ); define ( 'EOL', "<br />\r\n" ); define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' ); @@ -1983,15 +1983,15 @@ function get_tags($s) { $s = preg_replace('/\[code\](.*?)\[\/code\]/sm','',$s); if(preg_match_all('/([@#][^ \x0D\x0A,:?]+)([ \x0D\x0A,:?]|$)/',$s,$match)) { - foreach($match[1] as $match) { - if(strstr($match,"]")) { + foreach($match[1] as $mtch) { + if(strstr($mtch,"]")) { // we might be inside a bbcode color tag - leave it alone continue; } - if(substr($match,-1,1) === '.') - $ret[] = substr($match,0,-1); + if(substr($mtch,-1,1) === '.') + $ret[] = substr($mtch,0,-1); else - $ret[] = $match; + $ret[] = $mtch; } } @@ -2361,6 +2361,10 @@ function profile_sidebar($profile) { $homepage = ((x($profile,'homepage') == 1) ? '<div class="homepage"><span class="homepage-label">' . t('Homepage:') . ' </span><span class="homepage-url">' . linkify($profile['homepage']) . '</span></div><div class="profile-clear"></div>' : ''); + if($profile['hidewall'] && (! local_user()) && (! remote_user())) { + $location = $gender = $marital = $homepage = ''; + } + $tpl = get_markup_template('profile_vcard.tpl'); $o .= replace_macros($tpl, array( @@ -2536,8 +2540,41 @@ function link_compare($a,$b) { if(! function_exists('prepare_body')) { -function prepare_body($item) { - return prepare_text($item['body']); +function prepare_body($item,$attach = false) { + + $s = prepare_text($item['body']); + if(! $attach) + return $s; + + $arr = explode(',',$item['attach']); + $s .= '<div class="body-attach">'; + if(count($arr)) { + foreach($arr as $r) { + $matches = false; + $icon = ''; + $cnt = preg_match('|\[attach\]href=\"(.+?)\" size=\"(.+?)\" type=\"(.+?)\" title=\"(.+?)\"\[\/attach\]|',$r,$matches); + if($cnt) { + $icontype = strtolower(substr($matches[3],0,strpos($matches[3],'/'))); + switch($icontype) { + case 'video': + case 'audio': + case 'image': + case 'text': + $icon = '<div class="attachtype type-' . $icontype . '"></div>'; + break; + default: + $icon = '<div class="attachtype type-unkn"></div>'; + break; + } + $title = ((strlen(trim($matches[4]))) ? escape_tags(trim($matches[4])) : escape_tags($matches[1])); + $title .= ' ' . $matches[2] . ' ' . t('bytes'); + + $s .= '<a href="' . strip_tags($matches[1]) . '" title="' . $title . '" class="attachlink" target="external-link" >' . $icon . '</a>'; + } + } + } + $s .= '<div class="clear"></div></div>'; + return $s; }} if(! function_exists('prepare_text')) { diff --git a/database.sql b/database.sql index fdc08b7c8..008d00a0d 100644 --- a/database.sql +++ b/database.sql @@ -288,6 +288,7 @@ CREATE TABLE IF NOT EXISTS `profile` ( `profile-name` char(255) NOT NULL, `is-default` tinyint(1) NOT NULL DEFAULT '0', `hide-friends` tinyint(1) NOT NULL DEFAULT '0', + `hidewall` tinyint(1) NOT NULL DEFAULT '0', `name` char(255) NOT NULL, `pdesc` char(255) NOT NULL, `dob` char(32) NOT NULL DEFAULT '0000-00-00', @@ -526,6 +527,8 @@ CREATE TABLE IF NOT EXISTS `mailacct` ( CREATE TABLE IF NOT EXISTS `attach` ( `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY , `uid` INT NOT NULL , +`hash` CHAR(64) NOT NULL, +`filename` CHAR(255) NOT NULL, `filetype` CHAR( 64 ) NOT NULL , `filesize` INT NOT NULL , `data` LONGBLOB NOT NULL , diff --git a/images/content-types.gif b/images/content-types.gif Binary files differnew file mode 100644 index 000000000..2b8cc7fc3 --- /dev/null +++ b/images/content-types.gif diff --git a/images/icons.png b/images/icons.png Binary files differindex 734c75f73..6effd9aa2 100644 --- a/images/icons.png +++ b/images/icons.png diff --git a/include/attach.php b/include/attach.php new file mode 100644 index 000000000..ca53081d9 --- /dev/null +++ b/include/attach.php @@ -0,0 +1,80 @@ +<?php + +if(!function_exists('mime_content_type')) { +function mime_content_type($filename) { + + $mime_types = array( + + 'txt' => 'text/plain', + 'htm' => 'text/html', + 'html' => 'text/html', + 'php' => 'text/html', + 'css' => 'text/css', + 'js' => 'application/javascript', + 'json' => 'application/json', + 'xml' => 'application/xml', + 'swf' => 'application/x-shockwave-flash', + 'flv' => 'video/x-flv', + + // images + 'png' => 'image/png', + 'jpe' => 'image/jpeg', + 'jpeg' => 'image/jpeg', + 'jpg' => 'image/jpeg', + 'gif' => 'image/gif', + 'bmp' => 'image/bmp', + 'ico' => 'image/vnd.microsoft.icon', + 'tiff' => 'image/tiff', + 'tif' => 'image/tiff', + 'svg' => 'image/svg+xml', + 'svgz' => 'image/svg+xml', + + // archives + 'zip' => 'application/zip', + 'rar' => 'application/x-rar-compressed', + 'exe' => 'application/x-msdownload', + 'msi' => 'application/x-msdownload', + 'cab' => 'application/vnd.ms-cab-compressed', + + // audio/video + 'mp3' => 'audio/mpeg', + 'qt' => 'video/quicktime', + 'mov' => 'video/quicktime', + 'ogg' => 'application/ogg', + + // adobe + 'pdf' => 'application/pdf', + 'psd' => 'image/vnd.adobe.photoshop', + 'ai' => 'application/postscript', + 'eps' => 'application/postscript', + 'ps' => 'application/postscript', + + // ms office + 'doc' => 'application/msword', + 'rtf' => 'application/rtf', + 'xls' => 'application/vnd.ms-excel', + 'ppt' => 'application/vnd.ms-powerpoint', + + + // open office + 'odt' => 'application/vnd.oasis.opendocument.text', + 'ods' => 'application/vnd.oasis.opendocument.spreadsheet', + ); + + if(strpos($filename,'.') !== false) { + $ext = strtolower(array_pop(explode('.',$filename))); + if (array_key_exists($ext, $mime_types)) { + return $mime_types[$ext]; + } + } + elseif (function_exists('finfo_open')) { + $finfo = finfo_open(FILEINFO_MIME); + $mimetype = finfo_file($finfo, $filename); + finfo_close($finfo); + return $mimetype; + } + else { + return 'application/octet-stream'; + } +}} + diff --git a/include/conversation.php b/include/conversation.php index 4fa4b92ad..9ffcbe157 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -183,6 +183,8 @@ function conversation(&$a, $items, $mode, $update) { $drop = replace_macros($droptpl,array('$id' => $item['id'])); $lock = '<div class="wall-item-lock"></div>'; + + $body = prepare_body($item,true); $o .= replace_macros($tpl,array( '$id' => $item['item_id'], @@ -194,7 +196,7 @@ function conversation(&$a, $items, $mode, $update) { '$lock' => $lock, '$thumb' => $profile_avatar, '$title' => $item['title'], - '$body' => smilies(bbcode($item['body'])), + '$body' => $body, '$ago' => relative_date($item['created']), '$location' => $location, '$indent' => '', @@ -441,6 +443,9 @@ function conversation(&$a, $items, $mode, $update) { // Build the HTML + $body = prepare_body($item,true); + + $tmp_item = replace_macros($template,array( '$id' => $item['item_id'], '$linktitle' => sprintf( t('View %s\'s profile'), $profile_name), @@ -455,7 +460,7 @@ function conversation(&$a, $items, $mode, $update) { '$osparkle' => $osparkle, '$sparkle' => $sparkle, '$title' => $item['title'], - '$body' => smilies(bbcode($item['body'])), + '$body' => $body, '$ago' => relative_date($item['created']), '$lock' => $lock, '$location' => $location, @@ -725,6 +730,7 @@ function status_editor($a,$x, $notes_cid = 0) { '$action' => 'item', '$share' => (($x['button']) ? $x['button'] : t('Share')), '$upload' => t('Upload photo'), + '$attach' => t('Attach file'), '$weblink' => t('Insert web link'), '$youtube' => t('Insert YouTube video'), '$video' => t('Insert Vorbis [.ogg] video'), diff --git a/include/template_processor.php b/include/template_processor.php index efdfbaecb..d8dfbaedb 100644 --- a/include/template_processor.php +++ b/include/template_processor.php @@ -128,7 +128,7 @@ #$s = str_replace(array("\n","\r"),array("§n§","§r§"),$s); $s = $this->_build_nodes($s); $s = preg_replace_callback('/\|\|([0-9]+)\|\|/', array($this, "_replcb_node"), $s); - $s = str_replace($this->search,$this->replace, (string) $s); + $s = str_replace($this->search,$this->replace, $s); return $s; } diff --git a/mod/attach.php b/mod/attach.php new file mode 100644 index 000000000..3953d3aa1 --- /dev/null +++ b/mod/attach.php @@ -0,0 +1,73 @@ +<?php + +function attach_init(&$a) { + + if($a->argc != 2) { + notice( t('Item not available.') . EOL); + return; + } + + $item_id = intval($a->argv[1]); + + $r = q("SELECT * FROM `attach` WHERE `id` = %d LIMIT 1", + intval($item_id) + ); + if(! count($r)) { + notice( t('Item was not found.'). EOL); + return; + } + + $owner = $r[0]['uid']; + + $sql_extra = " AND `allow_cid` = '' AND `allow_gid` = '' AND `deny_cid` = '' AND `deny_gid` = '' "; + + if(local_user() && ($owner == $_SESSION['uid'])) { + + // Owner can always see his/her photos + $sql_extra = ''; + + } + elseif(remote_user()) { + + // authenticated visitor - here lie dragons + + $groups = init_groups_visitor($_SESSION['visitor_id']); + $gs = '<<>>'; // should be impossible to match + if(count($groups)) { + foreach($groups as $g) + $gs .= '|<' . intval($g) . '>'; + } + + $sql_extra = sprintf( + " AND ( `allow_cid` = '' OR `allow_cid` REGEXP '<%d>' ) + AND ( `deny_cid` = '' OR NOT `deny_cid` REGEXP '<%d>' ) + AND ( `allow_gid` = '' OR `allow_gid` REGEXP '%s' ) + AND ( `deny_gid` = '' OR NOT `deny_gid` REGEXP '%s') ", + + intval($_SESSION['visitor_id']), + intval($_SESSION['visitor_id']), + dbesc($gs), + dbesc($gs) + ); + } + + // Now we'll see if we can access the attachment + + $r = q("SELECT * FROM `attach` WHERE `id` = '%d' $sql_extra LIMIT 1", + dbesc($item_id) + ); + + if(count($r)) { + $data = $r[0]['data']; + } + else { + notice( t('Permission denied.') . EOL); + return; + } + + header('Content-type: ' . $r[0]['filetype']); + header('Content-disposition: attachment; filename=' . $r[0]['filename']); + echo $data; + killme(); + // NOTREACHED +}
\ No newline at end of file diff --git a/mod/dfrn_notify.php b/mod/dfrn_notify.php index 65fd29eb3..7aace856e 100644 --- a/mod/dfrn_notify.php +++ b/mod/dfrn_notify.php @@ -440,10 +440,10 @@ function dfrn_notify_post(&$a) { require_once("include/EmailNotification.php"); EmailNotification::sendTextHtmlEmail( $msg['notificationfromname'], - t("Administrator@") . $a->get_hostname(), + t("Administrator") . '@' . $a->get_hostname(), t("noreply") . '@' . $a->get_hostname(), $importer['email'], - $from . t(" commented on an item at ") . $a->config['sitename'], + sprintf( t('%s commented on an item at %s'), $from , $a->config['sitename']), $email_html_body_tpl, $email_text_body_tpl ); diff --git a/mod/editpost.php b/mod/editpost.php index d211074c9..cd0bbf223 100644 --- a/mod/editpost.php +++ b/mod/editpost.php @@ -87,6 +87,7 @@ function editpost_content(&$a) { '$action' => 'item', '$share' => t('Edit'), '$upload' => t('Upload photo'), + '$attach' => t('Attach file'), '$weblink' => t('Insert web link'), '$youtube' => t('Insert YouTube video'), '$video' => t('Insert Vorbis [.ogg] video'), diff --git a/mod/item.php b/mod/item.php index 1a7acadf3..6120b140b 100644 --- a/mod/item.php +++ b/mod/item.php @@ -218,6 +218,32 @@ function item_post(&$a) { } } + + $match = null; + + if(preg_match_all("/\[attachment\](.+?)\[\/attachment\]/",$body,$match)) { + $attaches = $match[1]; + if(count($attaches)) { + foreach($attaches as $attach) { + $r = q("SELECT * FROM `attach` WHERE `uid` = %d AND `id` = %d LIMIT 1", + intval($profile_uid), + intval($attaches) + ); + if(count($r)) { + $r = q("UPDATE `attach` SET `allow_cid` = '%s', `allow_gid` = '%s', `deny_cid` = '%s', `deny_gid` = '%s' + WHERE `uid` = %d AND `id` = %d LIMIT 1", + intval($profile_uid), + intval($attaches) + ); + } + } + } + } + + + + + /** * Fold multi-line [code] sequences */ @@ -322,6 +348,23 @@ function item_post(&$a) { } } + $attachments = ''; + + if(preg_match_all('/(\[attachment\]([0-9]+)\[\/attachment\])/',$body,$match)) { + foreach($match[2] as $mtch) { + $r = q("SELECT `id`,`filename`,`filesize`,`filetype` FROM `attach` WHERE `uid` = %d AND `id` = %d LIMIT 1", + intval($profile_uid), + intval($mtch) + ); + if(count($r)) { + if(strlen($attachments)) + $attachments .= ','; + $attachments .= '[attach]href="' . $a->get_baseurl() . '/attach/' . $r[0]['id'] . '" size="' . $r[0]['filesize'] . '" type="' . $r[0]['filetype'] . '" title="' . $r[0]['filename'] . '"[/attach]'; + } + $body = str_replace($match[1],'',$body); + } + } + $wall = 0; if($post_type === 'wall' || $post_type === 'wall-comment') @@ -365,6 +408,7 @@ function item_post(&$a) { $datarray['deny_gid'] = $str_group_deny; $datarray['private'] = $private; $datarray['pubmail'] = $pubmail_enable; + $datarray['attach'] = $attachments; /** * These fields are for the convenience of plugins... @@ -399,11 +443,11 @@ function item_post(&$a) { else $post_id = 0; - +dbg(1); $r = q("INSERT INTO `item` (`uid`,`type`,`wall`,`gravity`,`contact-id`,`owner-name`,`owner-link`,`owner-avatar`, `author-name`, `author-link`, `author-avatar`, `created`, `edited`, `changed`, `uri`, `title`, `body`, `location`, `coord`, - `tag`, `inform`, `verb`, `allow_cid`, `allow_gid`, `deny_cid`, `deny_gid`, `private`, `pubmail` ) - VALUES( %d, '%s', %d, %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d )", + `tag`, `inform`, `verb`, `allow_cid`, `allow_gid`, `deny_cid`, `deny_gid`, `private`, `pubmail`, `attach` ) + VALUES( %d, '%s', %d, %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, '%s' )", intval($datarray['uid']), dbesc($datarray['type']), intval($datarray['wall']), @@ -431,7 +475,8 @@ function item_post(&$a) { dbesc($datarray['deny_cid']), dbesc($datarray['deny_gid']), intval($datarray['private']), - intval($datarray['pubmail']) + intval($datarray['pubmail']), + dbesc($datarray['attach']) ); $r = q("SELECT `id` FROM `item` WHERE `uri` = '%s' LIMIT 1", diff --git a/mod/profile.php b/mod/profile.php index 634aec460..8d46d6c5b 100644 --- a/mod/profile.php +++ b/mod/profile.php @@ -51,11 +51,14 @@ function profile_init(&$a) { function profile_content(&$a, $update = 0) { - if((get_config('system','block_public')) && (! local_user()) && (! remote_user())) { + if(get_config('system','block_public') && (! local_user()) && (! remote_user())) { return login(); } - + if($a->profile['hidewall'] && (! local_user()) && (! remote_user())) { + notice( t('Access to this profile has been restricted.') . EOL); + return; + } require_once("include/bbcode.php"); require_once('include/security.php'); diff --git a/mod/profiles.php b/mod/profiles.php index 9c92d81ba..b64c1294e 100644 --- a/mod/profiles.php +++ b/mod/profiles.php @@ -129,6 +129,7 @@ function profiles_post(&$a) { $work = escape_tags(trim($_POST['work'])); $education = escape_tags(trim($_POST['education'])); $hide_friends = (($_POST['hide-friends'] == 1) ? 1: 0); + $hidewall = (($_POST['hidewall'] == 1) ? 1: 0); $r = q("UPDATE `profile` @@ -160,7 +161,8 @@ function profiles_post(&$a) { `romance` = '%s', `work` = '%s', `education` = '%s', - `hide-friends` = %d + `hide-friends` = %d, + `hidewall` = %d WHERE `id` = %d AND `uid` = %d LIMIT 1", dbesc($profile_name), dbesc($name), @@ -191,6 +193,7 @@ function profiles_post(&$a) { dbesc($work), dbesc($education), intval($hide_friends), + intval($hidewall), intval($a->argv[1]), intval($_SESSION['uid']) ); @@ -351,13 +354,23 @@ function profiles_content(&$a) { $opt_tpl = get_markup_template("profile-hide-friends.tpl"); $hide_friends = replace_macros($opt_tpl,array( - '$desc' => t('Hide my contact/friend list from viewers of this profile?'), + '$desc' => t('Hide your contact/friend list from viewers of this profile?'), '$yes_str' => t('Yes'), '$no_str' => t('No'), '$yes_selected' => (($r[0]['hide-friends']) ? " checked=\"checked\" " : ""), '$no_selected' => (($r[0]['hide-friends'] == 0) ? " checked=\"checked\" " : "") )); + $opt_tpl = get_markup_template("profile-hide-wall.tpl"); + $hide_wall = replace_macros($opt_tpl,array( + '$desc' => t('Hide your messages from unknown viewers of this profile?'), + '$yes_str' => t('Yes'), + '$no_str' => t('No'), + '$yes_selected' => (($r[0]['hidewall']) ? " checked=\"checked\" " : ""), + '$no_selected' => (($r[0]['hidewall'] == 0) ? " checked=\"checked\" " : "") + )); + + $a->page['htmlhead'] .= replace_macros($tpl, array('$baseurl' => $a->get_baseurl())); $a->page['htmlhead'] .= "<script type=\"text/javascript\" src=\"include/country.js\" ></script>"; @@ -413,6 +426,7 @@ function profiles_content(&$a) { '$pdesc' => $r[0]['pdesc'], '$dob' => dob($r[0]['dob']), '$hide_friends' => $hide_friends, + '$hide_wall' => $hide_wall, '$address' => $r[0]['address'], '$locality' => $r[0]['locality'], '$region' => $r[0]['region'], diff --git a/mod/wall_attach.php b/mod/wall_attach.php new file mode 100644 index 000000000..f18fd10b7 --- /dev/null +++ b/mod/wall_attach.php @@ -0,0 +1,106 @@ +<?php + +require_once('include/attach.php'); +require_once('include/datetime.php'); + +function wall_attach_post(&$a) { + + if($a->argc > 1) { + $nick = $a->argv[1]; + $r = q("SELECT * FROM `user` WHERE `nickname` = '%s' AND `blocked` = 0 LIMIT 1", + dbesc($nick) + ); + if(! count($r)) + return; + + } + else + return; + + $can_post = false; + $visitor = 0; + + $page_owner_uid = $r[0]['uid']; + $page_owner_nick = $r[0]['nickname']; + $community_page = (($r[0]['page-flags'] == PAGE_COMMUNITY) ? true : false); + + if((local_user()) && (local_user() == $page_owner_uid)) + $can_post = true; + else { + if($community_page && remote_user()) { + $r = q("SELECT `uid` FROM `contact` WHERE `blocked` = 0 AND `pending` = 0 AND `id` = %d AND `uid` = %d LIMIT 1", + intval(remote_user()), + intval($page_owner_uid) + ); + if(count($r)) { + $can_post = true; + $visitor = remote_user(); + } + } + } + + if(! $can_post) { + notice( t('Permission denied.') . EOL ); + killme(); + } + + if(! x($_FILES,'userfile')) + killme(); + + $src = $_FILES['userfile']['tmp_name']; + $filename = basename($_FILES['userfile']['name']); + $filesize = intval($_FILES['userfile']['size']); + + $maxfilesize = get_config('system','maxfilesize'); + + if(($maxfilesize) && ($filesize > $maxfilesize)) { + notice( sprintf(t('File exceeds size limit of %d'), $maxfilesize) . EOL); + @unlink($src); + return; + } + + $filedata = @file_get_contents($src); + + $mimetype = mime_content_type($src); + $hash = random_string(); + $created = datetime_convert(); + + $r = q("INSERT INTO `attach` ( `uid`, `hash`, `filename`, `filetype`, `filesize`, `data`, `created`, `edited`, `allow_cid`, `allow_gid`,`deny_cid`, `deny_gid` ) + VALUES ( %d, '%s', '%s', '%s', %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s' ) ", + intval($page_owner_uid), + dbesc($hash), + dbesc($filename), + dbesc($mimetype), + intval($filesize), + dbesc($filedata), + dbesc($created), + dbesc($created), + dbesc('<' . $page_owner_uid . '>'), + dbesc(''), + dbesc(''), + dbesc('') + ); + + @unlink($src); + + if(! $r) { + echo ( t('File upload failed.') . EOL); + killme(); + } + + $r = q("SELECT `id` FROM `attach` WHERE `uid` = %d AND `created` = '%s' AND `hash` = '%s' LIMIT 1", + intval($page_owner_uid), + dbesc($created), + dbesc($hash) + ); + + if(! count($r)) { + echo ( t('File upload failed.') . EOL); + killme(); + } + + echo '<br /><br />[attachment]' . $r[0]['id'] . '[/attachment]' . '<br />'; + + killme(); + // NOTREACHED +} diff --git a/mod/wall_upload.php b/mod/wall_upload.php index f7638b730..bd6b80562 100644 --- a/mod/wall_upload.php +++ b/mod/wall_upload.php @@ -53,7 +53,7 @@ function wall_upload_post(&$a) { $maximagesize = get_config('system','maximagesize'); if(($maximagesize) && ($filesize > $maximagesize)) { - notice( sprintf(t('Image exceeds size limit of %d'), $maximagesize) . EOL); + echo sprintf( t('Image exceeds size limit of %d'), $maximagesize) . EOL; @unlink($src); return; } diff --git a/update.php b/update.php index 488648791..30ebd66f2 100644 --- a/update.php +++ b/update.php @@ -483,3 +483,15 @@ function update_1053() { function update_1054() { q("ALTER TABLE `register` ADD `language` CHAR( 16 ) NOT NULL AFTER `password` "); } + +function update_1055() { + q("ALTER TABLE `profile` ADD `hidewall` TINYINT( 1 ) NOT NULL DEFAULT '0' AFTER `hide-friends` "); +} + +function update_1056() { + q("ALTER TABLE `attach` ADD `hash` CHAR( 64 ) NOT NULL AFTER `uid` "); +} + +function update_1057() { + q("ALTER TABLE `attach` ADD `filename` CHAR( 255 ) NOT NULL AFTER `hash` "); +} diff --git a/util/messages.po b/util/messages.po index 32d2e7770..90052cae9 100644 --- a/util/messages.po +++ b/util/messages.po @@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: 2.2.988\n" +"Project-Id-Version: 2.2.990\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-05-23 12:00+0200\n" +"POT-Creation-Date: 2011-05-25 12:07+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -18,33 +18,34 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" #"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" -#: ../../index.php:213 +#: ../../index.php:199 msgid "Not Found" msgstr "" -#: ../../index.php:214 +#: ../../index.php:200 msgid "Page not found." msgstr "" -#: ../../index.php:269 ../../mod/profperm.php:19 ../../mod/group.php:67 +#: ../../index.php:255 ../../mod/profperm.php:19 ../../mod/group.php:67 msgid "Permission denied" msgstr "" -#: ../../index.php:270 ../../mod/manage.php:75 ../../mod/wall_upload.php:42 +#: ../../index.php:256 ../../mod/manage.php:75 ../../mod/wall_upload.php:42 #: ../../mod/follow.php:8 ../../mod/profile_photo.php:19 #: ../../mod/profile_photo.php:133 ../../mod/profile_photo.php:144 -#: ../../mod/profile_photo.php:155 ../../mod/regmod.php:16 -#: ../../mod/profiles.php:7 ../../mod/profiles.php:227 +#: ../../mod/profile_photo.php:155 ../../mod/wall_attach.php:43 +#: ../../mod/regmod.php:18 ../../mod/profiles.php:7 ../../mod/profiles.php:230 #: ../../mod/settings.php:15 ../../mod/settings.php:20 #: ../../mod/settings.php:251 ../../mod/photos.php:89 ../../mod/photos.php:802 #: ../../mod/display.php:138 ../../mod/editpost.php:10 ../../mod/invite.php:13 #: ../../mod/invite.php:54 ../../mod/contacts.php:106 -#: ../../mod/register.php:25 ../../mod/install.php:93 ../../mod/network.php:6 +#: ../../mod/register.php:27 ../../mod/install.php:93 ../../mod/network.php:6 #: ../../mod/notifications.php:56 ../../mod/crepair.php:54 -#: ../../mod/notes.php:20 ../../mod/item.php:57 ../../mod/item.php:751 +#: ../../mod/notes.php:20 ../../mod/item.php:57 ../../mod/item.php:801 #: ../../mod/message.php:8 ../../mod/message.php:116 #: ../../mod/dfrn_confirm.php:53 ../../mod/viewcontacts.php:21 -#: ../../mod/group.php:19 ../../addon/facebook/facebook.php:242 +#: ../../mod/group.php:19 ../../mod/attach.php:64 +#: ../../addon/facebook/facebook.php:242 msgid "Permission denied." msgstr "" @@ -53,7 +54,7 @@ msgid "Delete this item?" msgstr "" #: ../../boot.php:386 ../../mod/photos.php:1134 ../../mod/photos.php:1173 -#: ../../mod/photos.php:1204 ../../include/conversation.php:380 +#: ../../mod/photos.php:1204 ../../include/conversation.php:382 msgid "Comment" msgstr "" @@ -61,7 +62,7 @@ msgstr "" msgid "Create a New Account" msgstr "" -#: ../../boot.php:835 ../../mod/register.php:471 ../../include/nav.php:59 +#: ../../boot.php:835 ../../mod/register.php:486 ../../include/nav.php:59 msgid "Register" msgstr "" @@ -160,103 +161,107 @@ msgstr "" msgid "Homepage:" msgstr "" -#: ../../boot.php:2453 +#: ../../boot.php:2457 msgid "Monday" msgstr "" -#: ../../boot.php:2453 +#: ../../boot.php:2457 msgid "Tuesday" msgstr "" -#: ../../boot.php:2453 +#: ../../boot.php:2457 msgid "Wednesday" msgstr "" -#: ../../boot.php:2453 +#: ../../boot.php:2457 msgid "Thursday" msgstr "" -#: ../../boot.php:2453 +#: ../../boot.php:2457 msgid "Friday" msgstr "" -#: ../../boot.php:2453 +#: ../../boot.php:2457 msgid "Saturday" msgstr "" -#: ../../boot.php:2453 +#: ../../boot.php:2457 msgid "Sunday" msgstr "" -#: ../../boot.php:2457 +#: ../../boot.php:2461 msgid "January" msgstr "" -#: ../../boot.php:2457 +#: ../../boot.php:2461 msgid "February" msgstr "" -#: ../../boot.php:2457 +#: ../../boot.php:2461 msgid "March" msgstr "" -#: ../../boot.php:2457 +#: ../../boot.php:2461 msgid "April" msgstr "" -#: ../../boot.php:2457 +#: ../../boot.php:2461 msgid "May" msgstr "" -#: ../../boot.php:2457 +#: ../../boot.php:2461 msgid "June" msgstr "" -#: ../../boot.php:2457 +#: ../../boot.php:2461 msgid "July" msgstr "" -#: ../../boot.php:2457 +#: ../../boot.php:2461 msgid "August" msgstr "" -#: ../../boot.php:2457 +#: ../../boot.php:2461 msgid "September" msgstr "" -#: ../../boot.php:2457 +#: ../../boot.php:2461 msgid "October" msgstr "" -#: ../../boot.php:2457 +#: ../../boot.php:2461 msgid "November" msgstr "" -#: ../../boot.php:2457 +#: ../../boot.php:2461 msgid "December" msgstr "" -#: ../../boot.php:2472 +#: ../../boot.php:2476 msgid "g A l F d" msgstr "" -#: ../../boot.php:2490 +#: ../../boot.php:2494 msgid "Birthday Reminders" msgstr "" -#: ../../boot.php:2491 +#: ../../boot.php:2495 msgid "Birthdays this week:" msgstr "" -#: ../../boot.php:2492 +#: ../../boot.php:2496 msgid "(Adjusted for local time)" msgstr "" -#: ../../boot.php:2503 +#: ../../boot.php:2507 msgid "[today]" msgstr "" -#: ../../boot.php:2707 +#: ../../boot.php:2570 +msgid "bytes" +msgstr "" + +#: ../../boot.php:2744 msgid "link to source" msgstr "" @@ -279,7 +284,7 @@ msgstr "" msgid "Select an identity to manage: " msgstr "" -#: ../../mod/manage.php:106 ../../mod/profiles.php:370 +#: ../../mod/manage.php:106 ../../mod/profiles.php:383 #: ../../mod/settings.php:426 ../../mod/photos.php:830 #: ../../mod/photos.php:887 ../../mod/photos.php:1095 #: ../../mod/photos.php:1135 ../../mod/photos.php:1174 @@ -291,9 +296,9 @@ msgstr "" #: ../../addon/statusnet/statusnet.php:230 #: ../../addon/statusnet/statusnet.php:256 #: ../../addon/statusnet/statusnet.php:263 -#: ../../addon/statusnet/statusnet.php:285 +#: ../../addon/statusnet/statusnet.php:285 ../../addon/oembed/oembed.php:49 #: ../../addon/facebook/facebook.php:289 -#: ../../addon/randplace/randplace.php:179 ../../include/conversation.php:381 +#: ../../addon/randplace/randplace.php:179 ../../include/conversation.php:383 msgid "Submit" msgstr "" @@ -318,50 +323,57 @@ msgstr "" msgid "Image upload failed." msgstr "" -#: ../../mod/dfrn_notify.php:189 ../../mod/regmod.php:94 -#: ../../mod/register.php:333 ../../mod/register.php:373 -#: ../../mod/dfrn_request.php:551 ../../mod/lostpass.php:40 -#: ../../mod/lostpass.php:102 ../../mod/dfrn_confirm.php:657 -#: ../../include/items.php:1449 +#: ../../mod/dfrn_notify.php:191 ../../mod/dfrn_notify.php:443 +#: ../../mod/regmod.php:98 ../../mod/register.php:335 +#: ../../mod/register.php:385 ../../mod/dfrn_request.php:551 +#: ../../mod/lostpass.php:40 ../../mod/lostpass.php:102 +#: ../../mod/dfrn_confirm.php:658 ../../include/items.php:1449 msgid "Administrator" msgstr "" -#: ../../mod/dfrn_notify.php:191 ../../mod/dfrn_notify.php:396 -#: ../../mod/dfrn_notify.php:439 ../../mod/dfrn_notify.php:523 -#: ../../mod/dfrn_notify.php:564 ../../mod/item.php:471 ../../mod/item.php:514 -#: ../../mod/item.php:534 ../../mod/item.php:575 +#: ../../mod/dfrn_notify.php:193 ../../mod/dfrn_notify.php:401 +#: ../../mod/dfrn_notify.php:444 ../../mod/dfrn_notify.php:530 +#: ../../mod/dfrn_notify.php:571 ../../mod/item.php:517 ../../mod/item.php:560 +#: ../../mod/item.php:583 ../../mod/item.php:624 msgid "noreply" msgstr "" -#: ../../mod/dfrn_notify.php:249 +#: ../../mod/dfrn_notify.php:251 msgid "New mail received at " msgstr "" -#: ../../mod/dfrn_notify.php:438 ../../mod/dfrn_notify.php:563 -#: ../../mod/item.php:513 ../../mod/item.php:574 +#: ../../mod/dfrn_notify.php:446 +#, php-format +msgid "%s commented on an item at %s" +msgstr "" + +#: ../../mod/dfrn_notify.php:570 ../../mod/item.php:559 ../../mod/item.php:623 msgid "Administrator@" msgstr "" -#: ../../mod/dfrn_notify.php:441 ../../mod/dfrn_notify.php:566 -#: ../../mod/item.php:516 ../../mod/item.php:577 +#: ../../mod/dfrn_notify.php:573 ../../mod/item.php:562 ../../mod/item.php:626 msgid " commented on an item at " msgstr "" -#: ../../mod/profile.php:112 +#: ../../mod/profile.php:59 +msgid "Access to this profile has been restricted." +msgstr "" + +#: ../../mod/profile.php:115 msgid "Status" msgstr "" -#: ../../mod/profile.php:113 ../../mod/profperm.php:94 +#: ../../mod/profile.php:116 ../../mod/profperm.php:94 #: ../../include/profile_advanced.php:7 msgid "Profile" msgstr "" -#: ../../mod/profile.php:114 +#: ../../mod/profile.php:117 msgid "Photos" msgstr "" -#: ../../mod/profile.php:262 ../../mod/display.php:147 -#: ../../mod/register.php:450 ../../mod/network.php:262 +#: ../../mod/profile.php:265 ../../mod/display.php:147 +#: ../../mod/register.php:465 ../../mod/network.php:262 msgid "" "Shared content is covered by the <a href=\"http://creativecommons.org/" "licenses/by/3.0/\">Creative Commons Attribution 3.0</a> license." @@ -409,8 +421,8 @@ msgstr "" #: ../../mod/profile_photo.php:72 ../../mod/profile_photo.php:160 #: ../../mod/profile_photo.php:236 ../../mod/profile_photo.php:245 #: ../../mod/photos.php:110 ../../mod/photos.php:535 ../../mod/photos.php:879 -#: ../../mod/photos.php:894 ../../mod/register.php:288 -#: ../../mod/register.php:295 ../../mod/register.php:302 +#: ../../mod/photos.php:894 ../../mod/register.php:290 +#: ../../mod/register.php:297 ../../mod/register.php:304 msgid "Profile Photos" msgstr "" @@ -469,26 +481,35 @@ msgstr "" msgid "Welcome to %s" msgstr "" -#: ../../mod/regmod.php:10 +#: ../../mod/wall_attach.php:57 +#, php-format +msgid "File exceeds size limit of %d" +msgstr "" + +#: ../../mod/wall_attach.php:87 ../../mod/wall_attach.php:98 +msgid "File upload failed." +msgstr "" + +#: ../../mod/regmod.php:12 msgid "Please login." msgstr "" -#: ../../mod/regmod.php:54 +#: ../../mod/regmod.php:56 #, php-format msgid "Registration revoked for %s" msgstr "" -#: ../../mod/regmod.php:92 ../../mod/register.php:331 +#: ../../mod/regmod.php:96 ../../mod/register.php:333 #, php-format msgid "Registration details for %s" msgstr "" -#: ../../mod/regmod.php:99 +#: ../../mod/regmod.php:105 msgid "Account approved." msgstr "" -#: ../../mod/profiles.php:21 ../../mod/profiles.php:237 -#: ../../mod/profiles.php:342 ../../mod/dfrn_confirm.php:62 +#: ../../mod/profiles.php:21 ../../mod/profiles.php:240 +#: ../../mod/profiles.php:345 ../../mod/dfrn_confirm.php:62 msgid "Profile not found." msgstr "" @@ -496,221 +517,225 @@ msgstr "" msgid "Profile Name is required." msgstr "" -#: ../../mod/profiles.php:199 +#: ../../mod/profiles.php:202 msgid "Profile updated." msgstr "" -#: ../../mod/profiles.php:254 +#: ../../mod/profiles.php:257 msgid "Profile deleted." msgstr "" -#: ../../mod/profiles.php:270 ../../mod/profiles.php:301 +#: ../../mod/profiles.php:273 ../../mod/profiles.php:304 msgid "Profile-" msgstr "" -#: ../../mod/profiles.php:289 ../../mod/profiles.php:328 +#: ../../mod/profiles.php:292 ../../mod/profiles.php:331 msgid "New profile created." msgstr "" -#: ../../mod/profiles.php:307 +#: ../../mod/profiles.php:310 msgid "Profile unavailable to clone." msgstr "" -#: ../../mod/profiles.php:354 -msgid "Hide my contact/friend list from viewers of this profile?" +#: ../../mod/profiles.php:357 +msgid "Hide your contact/friend list from viewers of this profile?" msgstr "" -#: ../../mod/profiles.php:355 ../../mod/settings.php:350 -#: ../../mod/settings.php:362 ../../mod/register.php:444 -#: ../../mod/dfrn_request.php:634 +#: ../../mod/profiles.php:358 ../../mod/profiles.php:367 +#: ../../mod/settings.php:350 ../../mod/settings.php:362 +#: ../../mod/register.php:459 ../../mod/dfrn_request.php:634 msgid "Yes" msgstr "" -#: ../../mod/profiles.php:356 ../../mod/settings.php:351 -#: ../../mod/settings.php:363 ../../mod/register.php:445 -#: ../../mod/dfrn_request.php:635 +#: ../../mod/profiles.php:359 ../../mod/profiles.php:368 +#: ../../mod/settings.php:351 ../../mod/settings.php:363 +#: ../../mod/register.php:460 ../../mod/dfrn_request.php:635 msgid "No" msgstr "" -#: ../../mod/profiles.php:369 +#: ../../mod/profiles.php:366 +msgid "Hide your messages from unknown viewers of this profile?" +msgstr "" + +#: ../../mod/profiles.php:382 msgid "Edit Profile Details" msgstr "" -#: ../../mod/profiles.php:371 +#: ../../mod/profiles.php:384 msgid "View this profile" msgstr "" -#: ../../mod/profiles.php:372 +#: ../../mod/profiles.php:385 msgid "Create a new profile using these settings" msgstr "" -#: ../../mod/profiles.php:373 +#: ../../mod/profiles.php:386 msgid "Clone this profile" msgstr "" -#: ../../mod/profiles.php:374 +#: ../../mod/profiles.php:387 msgid "Delete this profile" msgstr "" -#: ../../mod/profiles.php:375 +#: ../../mod/profiles.php:388 msgid "Profile Name:" msgstr "" -#: ../../mod/profiles.php:376 +#: ../../mod/profiles.php:389 msgid "Your Full Name:" msgstr "" -#: ../../mod/profiles.php:377 +#: ../../mod/profiles.php:390 msgid "Title/Description:" msgstr "" -#: ../../mod/profiles.php:378 +#: ../../mod/profiles.php:391 msgid "Your Gender:" msgstr "" -#: ../../mod/profiles.php:379 +#: ../../mod/profiles.php:392 msgid "Birthday (y/m/d):" msgstr "" -#: ../../mod/profiles.php:380 +#: ../../mod/profiles.php:393 msgid "Street Address:" msgstr "" -#: ../../mod/profiles.php:381 +#: ../../mod/profiles.php:394 msgid "Locality/City:" msgstr "" -#: ../../mod/profiles.php:382 +#: ../../mod/profiles.php:395 msgid "Postal/Zip Code:" msgstr "" -#: ../../mod/profiles.php:383 +#: ../../mod/profiles.php:396 msgid "Country:" msgstr "" -#: ../../mod/profiles.php:384 +#: ../../mod/profiles.php:397 msgid "Region/State:" msgstr "" -#: ../../mod/profiles.php:385 +#: ../../mod/profiles.php:398 msgid "<span class=\"heart\">♥</span> Marital Status:" msgstr "" -#: ../../mod/profiles.php:386 +#: ../../mod/profiles.php:399 msgid "Who: (if applicable)" msgstr "" -#: ../../mod/profiles.php:387 +#: ../../mod/profiles.php:400 msgid "Examples: cathy123, Cathy Williams, cathy@example.com" msgstr "" -#: ../../mod/profiles.php:388 ../../include/profile_advanced.php:90 +#: ../../mod/profiles.php:401 ../../include/profile_advanced.php:90 msgid "Sexual Preference:" msgstr "" -#: ../../mod/profiles.php:389 +#: ../../mod/profiles.php:402 msgid "Homepage URL:" msgstr "" -#: ../../mod/profiles.php:390 ../../include/profile_advanced.php:115 +#: ../../mod/profiles.php:403 ../../include/profile_advanced.php:115 msgid "Political Views:" msgstr "" -#: ../../mod/profiles.php:391 +#: ../../mod/profiles.php:404 msgid "Religious Views:" msgstr "" -#: ../../mod/profiles.php:392 +#: ../../mod/profiles.php:405 msgid "Public Keywords:" msgstr "" -#: ../../mod/profiles.php:393 +#: ../../mod/profiles.php:406 msgid "Private Keywords:" msgstr "" -#: ../../mod/profiles.php:394 +#: ../../mod/profiles.php:407 msgid "Example: fishing photography software" msgstr "" -#: ../../mod/profiles.php:395 +#: ../../mod/profiles.php:408 msgid "(Used for suggesting potential friends, can be seen by others)" msgstr "" -#: ../../mod/profiles.php:396 +#: ../../mod/profiles.php:409 msgid "(Used for searching profiles, never shown to others)" msgstr "" -#: ../../mod/profiles.php:397 +#: ../../mod/profiles.php:410 msgid "Tell us about yourself..." msgstr "" -#: ../../mod/profiles.php:398 +#: ../../mod/profiles.php:411 msgid "Hobbies/Interests" msgstr "" -#: ../../mod/profiles.php:399 +#: ../../mod/profiles.php:412 msgid "Contact information and Social Networks" msgstr "" -#: ../../mod/profiles.php:400 +#: ../../mod/profiles.php:413 msgid "Musical interests" msgstr "" -#: ../../mod/profiles.php:401 +#: ../../mod/profiles.php:414 msgid "Books, literature" msgstr "" -#: ../../mod/profiles.php:402 +#: ../../mod/profiles.php:415 msgid "Television" msgstr "" -#: ../../mod/profiles.php:403 +#: ../../mod/profiles.php:416 msgid "Film/dance/culture/entertainment" msgstr "" -#: ../../mod/profiles.php:404 +#: ../../mod/profiles.php:417 msgid "Love/romance" msgstr "" -#: ../../mod/profiles.php:405 +#: ../../mod/profiles.php:418 msgid "Work/employment" msgstr "" -#: ../../mod/profiles.php:406 +#: ../../mod/profiles.php:419 msgid "School/education" msgstr "" -#: ../../mod/profiles.php:411 +#: ../../mod/profiles.php:424 msgid "" "This is your <strong>public</strong> profile.<br />It <strong>may</strong> " "be visible to anybody using the internet." msgstr "" -#: ../../mod/profiles.php:421 ../../mod/directory.php:112 +#: ../../mod/profiles.php:435 ../../mod/directory.php:112 msgid "Age: " msgstr "" -#: ../../mod/profiles.php:456 ../../include/nav.php:108 +#: ../../mod/profiles.php:470 ../../include/nav.php:108 msgid "Profiles" msgstr "" -#: ../../mod/profiles.php:457 +#: ../../mod/profiles.php:471 msgid "Change profile photo" msgstr "" -#: ../../mod/profiles.php:458 +#: ../../mod/profiles.php:472 msgid "Create New Profile" msgstr "" -#: ../../mod/profiles.php:468 +#: ../../mod/profiles.php:482 msgid "Profile Image" msgstr "" -#: ../../mod/profiles.php:470 +#: ../../mod/profiles.php:484 msgid "Visible to everybody" msgstr "" -#: ../../mod/profiles.php:471 +#: ../../mod/profiles.php:485 msgid "Edit visibility" msgstr "" @@ -751,7 +776,7 @@ msgid "Settings updated." msgstr "" #: ../../mod/settings.php:256 ../../mod/settings.php:418 -#: ../../addon/widgets/widgets.php:120 +#: ../../addon/widgets/widgets.php:123 msgid "Plugin Settings" msgstr "" @@ -1069,7 +1094,7 @@ msgstr "" msgid "Use as profile photo" msgstr "" -#: ../../mod/photos.php:993 ../../include/conversation.php:314 +#: ../../mod/photos.php:993 ../../include/conversation.php:316 msgid "Private Message" msgstr "" @@ -1109,32 +1134,32 @@ msgstr "" msgid "Example: @bob, @Barbara_Jensen, @jim@example.com, #California, #camping" msgstr "" -#: ../../mod/photos.php:1113 ../../include/conversation.php:362 +#: ../../mod/photos.php:1113 ../../include/conversation.php:364 msgid "I like this (toggle)" msgstr "" -#: ../../mod/photos.php:1114 ../../include/conversation.php:363 +#: ../../mod/photos.php:1114 ../../include/conversation.php:365 msgid "I don't like this (toggle)" msgstr "" -#: ../../mod/photos.php:1115 ../../include/conversation.php:364 -#: ../../include/conversation.php:726 +#: ../../mod/photos.php:1115 ../../include/conversation.php:366 +#: ../../include/conversation.php:731 msgid "Share" msgstr "" -#: ../../mod/photos.php:1116 ../../mod/editpost.php:96 +#: ../../mod/photos.php:1116 ../../mod/editpost.php:97 #: ../../mod/message.php:190 ../../mod/message.php:324 -#: ../../include/conversation.php:365 ../../include/conversation.php:735 +#: ../../include/conversation.php:367 ../../include/conversation.php:741 msgid "Please wait" msgstr "" #: ../../mod/photos.php:1132 ../../mod/photos.php:1171 -#: ../../mod/photos.php:1202 ../../include/conversation.php:378 +#: ../../mod/photos.php:1202 ../../include/conversation.php:380 msgid "This is you" msgstr "" #: ../../mod/photos.php:1232 ../../mod/group.php:146 -#: ../../include/conversation.php:179 ../../include/conversation.php:391 +#: ../../include/conversation.php:179 ../../include/conversation.php:393 msgid "Delete" msgstr "" @@ -1150,7 +1175,7 @@ msgstr "" msgid "View Album" msgstr "" -#: ../../mod/display.php:25 ../../mod/display.php:142 ../../mod/item.php:680 +#: ../../mod/display.php:25 ../../mod/display.php:142 ../../mod/item.php:730 msgid "Item not found." msgstr "" @@ -1166,58 +1191,62 @@ msgstr "" msgid "Edit post" msgstr "" -#: ../../mod/editpost.php:75 ../../include/conversation.php:712 +#: ../../mod/editpost.php:75 ../../include/conversation.php:717 msgid "Post to Email" msgstr "" -#: ../../mod/editpost.php:88 ../../include/conversation.php:389 +#: ../../mod/editpost.php:88 ../../include/conversation.php:391 #: ../../include/group.php:169 msgid "Edit" msgstr "" #: ../../mod/editpost.php:89 ../../mod/message.php:188 -#: ../../mod/message.php:322 ../../include/conversation.php:727 +#: ../../mod/message.php:322 ../../include/conversation.php:732 msgid "Upload photo" msgstr "" -#: ../../mod/editpost.php:90 ../../mod/message.php:189 -#: ../../mod/message.php:323 ../../include/conversation.php:728 +#: ../../mod/editpost.php:90 ../../include/conversation.php:733 +msgid "Attach file" +msgstr "" + +#: ../../mod/editpost.php:91 ../../mod/message.php:189 +#: ../../mod/message.php:323 ../../include/conversation.php:734 msgid "Insert web link" msgstr "" -#: ../../mod/editpost.php:91 ../../include/conversation.php:729 +#: ../../mod/editpost.php:92 ../../include/conversation.php:735 msgid "Insert YouTube video" msgstr "" -#: ../../mod/editpost.php:92 ../../include/conversation.php:730 +#: ../../mod/editpost.php:93 ../../include/conversation.php:736 msgid "Insert Vorbis [.ogg] video" msgstr "" -#: ../../mod/editpost.php:93 ../../include/conversation.php:731 +#: ../../mod/editpost.php:94 ../../include/conversation.php:737 msgid "Insert Vorbis [.ogg] audio" msgstr "" -#: ../../mod/editpost.php:94 ../../include/conversation.php:732 +#: ../../mod/editpost.php:95 ../../include/conversation.php:738 msgid "Set your location" msgstr "" -#: ../../mod/editpost.php:95 ../../include/conversation.php:733 +#: ../../mod/editpost.php:96 ../../include/conversation.php:739 msgid "Clear browser location" msgstr "" -#: ../../mod/editpost.php:97 ../../include/conversation.php:736 +#: ../../mod/editpost.php:98 ../../include/conversation.php:742 msgid "Permission settings" msgstr "" -#: ../../mod/editpost.php:105 ../../include/conversation.php:744 +#: ../../mod/editpost.php:106 ../../include/conversation.php:750 msgid "CC: email addresses" msgstr "" -#: ../../mod/editpost.php:106 ../../include/conversation.php:745 +#: ../../mod/editpost.php:107 ../../include/conversation.php:751 msgid "Public post" msgstr "" -#: ../../mod/editpost.php:108 ../../include/conversation.php:747 +#: ../../mod/editpost.php:109 ../../include/conversation.php:753 msgid "Example: bob@example.com, mary@example.com" msgstr "" @@ -1500,7 +1529,7 @@ msgstr "" msgid "Visit $username's profile" msgstr "" -#: ../../mod/contacts.php:388 ../../include/conversation.php:592 +#: ../../mod/contacts.php:388 ../../include/conversation.php:597 msgid "Edit contact" msgstr "" @@ -1512,122 +1541,122 @@ msgstr "" msgid "Visible to:" msgstr "" -#: ../../mod/register.php:47 +#: ../../mod/register.php:49 msgid "Invalid OpenID url" msgstr "" -#: ../../mod/register.php:62 +#: ../../mod/register.php:64 msgid "Please enter the required information." msgstr "" -#: ../../mod/register.php:74 +#: ../../mod/register.php:76 msgid "Please use a shorter name." msgstr "" -#: ../../mod/register.php:76 +#: ../../mod/register.php:78 msgid "Name too short." msgstr "" -#: ../../mod/register.php:91 +#: ../../mod/register.php:93 msgid "That doesn't appear to be your full (First Last) name." msgstr "" -#: ../../mod/register.php:95 +#: ../../mod/register.php:97 msgid "Your email domain is not among those allowed on this site." msgstr "" -#: ../../mod/register.php:98 +#: ../../mod/register.php:100 msgid "Not a valid email address." msgstr "" -#: ../../mod/register.php:104 +#: ../../mod/register.php:106 msgid "Cannot use that email." msgstr "" -#: ../../mod/register.php:109 +#: ../../mod/register.php:111 msgid "" "Your \"nickname\" can only contain \"a-z\", \"0-9\", \"-\", and \"_\", and " "must also begin with a letter." msgstr "" -#: ../../mod/register.php:115 ../../mod/register.php:215 +#: ../../mod/register.php:117 ../../mod/register.php:217 msgid "Nickname is already registered. Please choose another." msgstr "" -#: ../../mod/register.php:134 +#: ../../mod/register.php:136 msgid "SERIOUS ERROR: Generation of security keys failed." msgstr "" -#: ../../mod/register.php:201 +#: ../../mod/register.php:203 msgid "An error occurred during registration. Please try again." msgstr "" -#: ../../mod/register.php:237 +#: ../../mod/register.php:239 msgid "An error occurred creating your default profile. Please try again." msgstr "" -#: ../../mod/register.php:339 +#: ../../mod/register.php:341 msgid "" "Registration successful. Please check your email for further instructions." msgstr "" -#: ../../mod/register.php:343 +#: ../../mod/register.php:345 msgid "Failed to send email message. Here is the message that failed." msgstr "" -#: ../../mod/register.php:348 +#: ../../mod/register.php:350 msgid "Your registration can not be processed." msgstr "" -#: ../../mod/register.php:371 +#: ../../mod/register.php:383 #, php-format msgid "Registration request at %s" msgstr "" -#: ../../mod/register.php:377 +#: ../../mod/register.php:392 msgid "Your registration is pending approval by the site owner." msgstr "" -#: ../../mod/register.php:425 +#: ../../mod/register.php:440 msgid "" "You may (optionally) fill in this form via OpenID by supplying your OpenID " "and clicking 'Register'." msgstr "" -#: ../../mod/register.php:426 +#: ../../mod/register.php:441 msgid "" "If you are not familiar with OpenID, please leave that field blank and fill " "in the rest of the items." msgstr "" -#: ../../mod/register.php:427 +#: ../../mod/register.php:442 msgid "Your OpenID (optional): " msgstr "" -#: ../../mod/register.php:441 +#: ../../mod/register.php:456 msgid "Include your profile in member directory?" msgstr "" -#: ../../mod/register.php:457 +#: ../../mod/register.php:472 msgid "Registration" msgstr "" -#: ../../mod/register.php:465 +#: ../../mod/register.php:480 msgid "Your Full Name (e.g. Joe Smith): " msgstr "" -#: ../../mod/register.php:466 +#: ../../mod/register.php:481 msgid "Your Email Address: " msgstr "" -#: ../../mod/register.php:467 +#: ../../mod/register.php:482 msgid "" "Choose a profile nickname. This must begin with a text character. Your " "profile address on this site will then be '<strong>nickname@$sitename</" "strong>'." msgstr "" -#: ../../mod/register.php:468 +#: ../../mod/register.php:483 msgid "Choose a nickname: " msgstr "" @@ -2346,28 +2375,28 @@ msgstr "" msgid "Empty post discarded." msgstr "" -#: ../../mod/item.php:605 +#: ../../mod/item.php:655 msgid "System error. Post not saved." msgstr "" -#: ../../mod/item.php:624 +#: ../../mod/item.php:674 #, php-format msgid "" "This message was sent to you by %s, a member of the Friendika social network." msgstr "" -#: ../../mod/item.php:626 +#: ../../mod/item.php:676 #, php-format msgid "You may visit them online at %s" msgstr "" -#: ../../mod/item.php:627 +#: ../../mod/item.php:677 msgid "" "Please contact the sender by replying to this post if you do not wish to " "receive these messages." msgstr "" -#: ../../mod/item.php:629 +#: ../../mod/item.php:679 #, php-format msgid "%s posted an update." msgstr "" @@ -2432,7 +2461,7 @@ msgstr "" msgid "Conversation removed." msgstr "" -#: ../../mod/message.php:172 ../../include/conversation.php:679 +#: ../../mod/message.php:172 ../../include/conversation.php:684 msgid "Please enter a link URL:" msgstr "" @@ -2537,12 +2566,12 @@ msgstr "" msgid "Unable to update your contact profile details on our system" msgstr "" -#: ../../mod/dfrn_confirm.php:655 +#: ../../mod/dfrn_confirm.php:656 #, php-format msgid "Connection accepted at %s" msgstr "" -#: ../../mod/openid.php:62 ../../mod/openid.php:118 ../../include/auth.php:114 +#: ../../mod/openid.php:62 ../../mod/openid.php:122 ../../include/auth.php:114 #: ../../include/auth.php:139 ../../include/auth.php:192 msgid "Login failed." msgstr "" @@ -2612,6 +2641,14 @@ msgstr "" msgid "All Contacts" msgstr "" +#: ../../mod/attach.php:6 +msgid "Item not available." +msgstr "" + +#: ../../mod/attach.php:16 +msgid "Item was not found." +msgstr "" + #: ../../mod/match.php:10 msgid "Profile Match" msgstr "" @@ -2769,6 +2806,18 @@ msgstr "" msgid "Send public postings to StatusNet by default" msgstr "" +#: ../../addon/oembed/oembed.php:29 +msgid "OEmbed settings updated" +msgstr "" + +#: ../../addon/oembed/oembed.php:42 +msgid "Use OEmbed for YouTube videos: " +msgstr "" + +#: ../../addon/oembed/oembed.php:76 +msgid "URL to embed:" +msgstr "" + #: ../../addon/tictac/tictac.php:14 msgid "Three Dimensional Tic-Tac-Toe" msgstr "" @@ -2886,11 +2935,11 @@ msgstr "" msgid "View on Friendika" msgstr "" -#: ../../addon/widgets/widgets.php:38 +#: ../../addon/widgets/widgets.php:41 msgid "Widgets key: " msgstr "" -#: ../../addon/widgets/widgets.php:42 +#: ../../addon/widgets/widgets.php:45 msgid "Generate new key" msgstr "" @@ -3386,121 +3435,121 @@ msgstr "" msgid "Settings" msgstr "" -#: ../../include/conversation.php:189 ../../include/conversation.php:446 -#: ../../include/conversation.php:447 +#: ../../include/conversation.php:191 ../../include/conversation.php:451 +#: ../../include/conversation.php:452 #, php-format msgid "View %s's profile" msgstr "" -#: ../../include/conversation.php:205 +#: ../../include/conversation.php:207 msgid "View in context" msgstr "" -#: ../../include/conversation.php:276 +#: ../../include/conversation.php:278 msgid "See more posts like this" msgstr "" -#: ../../include/conversation.php:301 +#: ../../include/conversation.php:303 #, php-format msgid "See all %d comments" msgstr "" -#: ../../include/conversation.php:448 +#: ../../include/conversation.php:453 msgid "to" msgstr "" -#: ../../include/conversation.php:449 +#: ../../include/conversation.php:454 msgid "Wall-to-Wall" msgstr "" -#: ../../include/conversation.php:450 +#: ../../include/conversation.php:455 msgid "via Wall-To-Wall:" msgstr "" -#: ../../include/conversation.php:588 +#: ../../include/conversation.php:593 msgid "View status" msgstr "" -#: ../../include/conversation.php:589 +#: ../../include/conversation.php:594 msgid "View profile" msgstr "" -#: ../../include/conversation.php:590 +#: ../../include/conversation.php:595 msgid "View photos" msgstr "" -#: ../../include/conversation.php:591 +#: ../../include/conversation.php:596 msgid "View recent" msgstr "" -#: ../../include/conversation.php:593 +#: ../../include/conversation.php:598 msgid "Send PM" msgstr "" -#: ../../include/conversation.php:643 +#: ../../include/conversation.php:648 #, php-format msgid "%s likes this." msgstr "" -#: ../../include/conversation.php:643 +#: ../../include/conversation.php:648 #, php-format msgid "%s doesn't like this." msgstr "" -#: ../../include/conversation.php:647 +#: ../../include/conversation.php:652 #, php-format msgid "<span %1$s>%2$d people</span> like this." msgstr "" -#: ../../include/conversation.php:649 +#: ../../include/conversation.php:654 #, php-format msgid "<span %1$s>%2$d people</span> don't like this." msgstr "" -#: ../../include/conversation.php:655 +#: ../../include/conversation.php:660 msgid "and" msgstr "" -#: ../../include/conversation.php:658 +#: ../../include/conversation.php:663 #, php-format msgid ", and %d other people" msgstr "" -#: ../../include/conversation.php:659 +#: ../../include/conversation.php:664 #, php-format msgid "%s like this." msgstr "" -#: ../../include/conversation.php:659 +#: ../../include/conversation.php:664 #, php-format msgid "%s don't like this." msgstr "" -#: ../../include/conversation.php:678 +#: ../../include/conversation.php:683 msgid "Visible to <strong>everybody</strong>" msgstr "" -#: ../../include/conversation.php:680 +#: ../../include/conversation.php:685 msgid "Please enter a YouTube link:" msgstr "" -#: ../../include/conversation.php:681 +#: ../../include/conversation.php:686 msgid "Please enter a video(.ogg) link/URL:" msgstr "" -#: ../../include/conversation.php:682 +#: ../../include/conversation.php:687 msgid "Please enter an audio(.ogg) link/URL:" msgstr "" -#: ../../include/conversation.php:683 +#: ../../include/conversation.php:688 msgid "Where are you right now?" msgstr "" -#: ../../include/conversation.php:684 +#: ../../include/conversation.php:689 msgid "Enter a title for this item" msgstr "" -#: ../../include/conversation.php:734 +#: ../../include/conversation.php:740 msgid "Set title" msgstr "" @@ -3521,6 +3570,6 @@ msgstr "" msgid "Everybody" msgstr "" -#: ../../include/oembed.php:57 +#: ../../include/oembed.php:95 msgid "Embedding disabled" msgstr "" diff --git a/view/jot-header.tpl b/view/jot-header.tpl index 3057618b2..77e5bc4bc 100644 --- a/view/jot-header.tpl +++ b/view/jot-header.tpl @@ -79,6 +79,18 @@ tinyMCE.init({ } } ); + var file_uploader = new window.AjaxUpload( + 'wall-file-upload', + { action: 'wall_attach/$nickname', + name: 'userfile', + onSubmit: function(file,ext) { $('#profile-rotator').show(); }, + onComplete: function(file,response) { + tinyMCE.execCommand('mceInsertRawHTML',false,response); + $('#profile-rotator').hide(); + } + } + ); + $('#contact_allow, #contact_deny, #group_allow, #group_deny').change(function() { var selstr; $('#contact_allow option:selected, #contact_deny option:selected, #group_allow option:selected, #group_deny option:selected').each( function() { diff --git a/view/jot.tpl b/view/jot.tpl index 0c9883b11..15fc460e1 100644 --- a/view/jot.tpl +++ b/view/jot.tpl @@ -23,6 +23,10 @@ <div id="profile-upload-wrapper" style="display: $visitor;" > <div id="wall-image-upload-div" ><a href="#" onclick="return false;" id="wall-image-upload" class="icon camera" title="$upload"></a></div> </div> + <div id="profile-attach-wrapper" style="display: $visitor;" > + <div id="wall-file-upload-div" ><a href="#" onclick="return false;" id="wall-file-upload" class="icon attach" title="$attach"></a></div> + </div> + <div id="profile-link-wrapper" style="display: $visitor;" ondragenter="linkdropper(event);" ondragover="linkdropper(event);" ondrop="linkdrop(event);" > <a id="profile-link" class="icon link" title="$weblink" ondragenter="return linkdropper(event);" ondragover="return linkdropper(event);" ondrop="linkdrop(event);" onclick="jotGetLink(); return false;"></a> </div> diff --git a/view/profile-hide-wall.tpl b/view/profile-hide-wall.tpl new file mode 100644 index 000000000..10185e243 --- /dev/null +++ b/view/profile-hide-wall.tpl @@ -0,0 +1,16 @@ +<p id="hide-wall-text"> +$desc +</p> + + <div id="hide-wall-yes-wrapper"> + <label id="hide-wall-yes-label" for="hide-wall-yes">$yes_str</label> + <input type="radio" name="hidewall" id="hide-wall-yes" $yes_selected value="1" /> + + <div id="hide-wall-break" ></div> + </div> + <div id="hide-wall-no-wrapper"> + <label id="hide-wall-no-label" for="hide-wall-no">$no_str</label> + <input type="radio" name="hidewall" id="hide-wall-no" $no_selected value="0" /> + + <div id="hide-wall-end"></div> + </div> diff --git a/view/profile_edit.tpl b/view/profile_edit.tpl index 053e19594..564746e6a 100644 --- a/view/profile_edit.tpl +++ b/view/profile_edit.tpl @@ -52,6 +52,8 @@ $dob $age $hide_friends +$hide_wall + <div class="profile-edit-submit-wrapper" > <input type="submit" name="submit" class="profile-edit-submit-button" value="$submit" /> </div> diff --git a/view/theme/dispy/style.css b/view/theme/dispy/style.css index 3f22e28f4..ea036f26a 100644 --- a/view/theme/dispy/style.css +++ b/view/theme/dispy/style.css @@ -811,6 +811,20 @@ section { margin: 10px 11% 0px 11%; font-size: 0.8em; padding-right: 230px;} .video { background-position: -110px -40px;} .youtube { background-position: -130px -40px;} + +.attachtype { + display: block; width: 20px; height: 23px; + background-image: url('../../../images/content-types.gif'); +} + +.type-video { background-position: 0px; 0px; } +.type-image { background-position: -20px; 0px; } +.type-audio { background-position: -40px; 0px; } +.type-text { background-position: -60px; 0px; } +.type-unkn { background-position: -80px; 0px; } + + + /** * footer */ diff --git a/view/theme/duepuntozero/style.css b/view/theme/duepuntozero/style.css index 61da54231..f44931a5f 100644 --- a/view/theme/duepuntozero/style.css +++ b/view/theme/duepuntozero/style.css @@ -226,8 +226,10 @@ div.wall-item-content-wrapper.shiny { #profile-link, #profile-title, #wall-image-upload, +#wall-file-upload, #profile-upload-wrapper, #wall-image-upload-div, +#wall-file-upload-div, .hover, .focus { cursor: pointer; } @@ -701,6 +703,8 @@ input#dfrn-url { #profile-in-dir-no, #profile-in-netdir-yes, #profile-in-netdir-no, +#hide-wall-yes, +#hide-wall-no, #hide-friends-yes, #hide-friends-no { float: left; @@ -718,6 +722,8 @@ input#dfrn-url { #profile-in-dir-no-label, #profile-in-netdir-yes-label, #profile-in-netdir-no-label, +#hide-wall-yes-label, +#hide-wall-no-label, #hide-friends-yes-label, #hide-friends-no-label { margin-left: 125px; @@ -801,6 +807,8 @@ input#dfrn-url { #profile-in-dir-end, #profile-in-netdir-break, #profile-in-netdir-end, +#hide-wall-break, +#hide-wall-end, #hide-friends-break, #hide-friends-end, #settings-normal-break, @@ -1130,7 +1138,10 @@ input#dfrn-url { float: left; margin-left: 30px; } - +#profile-attach-wrapper { + float: left; + margin-left: 30px; +} #profile-rotator { float: left; margin-left: 30px; @@ -2417,3 +2428,22 @@ a.mail-list-link { .unlock { background-position: -32px -32px;} .video { background-position: -48px -32px;} .youtube { background-position: -64px -32px;} +.attach { background-position: -80px -32px; } + + +.attachtype { + display: block; width: 20px; height: 23px; + float: left; + background-image: url('../../../images/content-types.gif'); +} + +.body-attach { + margin-top: 10px; +} + +.type-video { background-position: 0px; 0px; } +.type-image { background-position: -20px; 0px; } +.type-audio { background-position: -40px; 0px; } +.type-text { background-position: -60px; 0px; } +.type-unkn { background-position: -80px; 0px; } + diff --git a/view/theme/loozah/style.css b/view/theme/loozah/style.css index 92c2c20a7..370e5c61a 100644 --- a/view/theme/loozah/style.css +++ b/view/theme/loozah/style.css @@ -825,6 +825,8 @@ input#dfrn-url { #profile-in-dir-no, #profile-in-netdir-yes, #profile-in-netdir-no, +#hide-wall-yes, +#hide-wall-no, #hide-friends-yes, #hide-friends-no, #settings-normal, @@ -839,6 +841,8 @@ input#dfrn-url { #profile-in-dir-no-label, #profile-in-netdir-yes-label, #profile-in-netdir-no-label, +#hide-wall-yes-label, +#hide-wall-no-label, #hide-friends-yes-label, #hide-friends-no-label { margin-left: 125px; @@ -917,6 +921,8 @@ input#dfrn-url { #profile-in-dir-end, #profile-in-netdir-break, #profile-in-netdir-end, +#hide-wall-break, +#hide-wall-end, #hide-friends-break, #hide-friends-end, #settings-normal-break, @@ -2434,3 +2440,21 @@ a.mail-list-link { .unlock { background-position: -32px -32px;} .video { background-position: -48px -32px;} .youtube { background-position: -64px -32px;} +.attach { background-position: -80px -32px; } + +.attachtype { + display: block; width: 20px; height: 23px; + float: left; + background-image: url('../../../images/content-types.gif'); +} + +.body-attach { + margin-top: 10px; +} + +.type-video { background-position: 0px; 0px; } +.type-image { background-position: -20px; 0px; } +.type-audio { background-position: -40px; 0px; } +.type-text { background-position: -60px; 0px; } +.type-unkn { background-position: -80px; 0px; } + |