]> git.mxchange.org Git - friendica.git/commitdiff
Merge pull request #1619 from rabuzarus/block-local-dir
authorfabrixxm <fabrix.xm@gmail.com>
Tue, 2 Jun 2015 15:53:19 +0000 (17:53 +0200)
committerfabrixxm <fabrix.xm@gmail.com>
Tue, 2 Jun 2015 15:53:19 +0000 (17:53 +0200)
block local directory for public access

34 files changed:
doc/Plugins.md
doc/de/Plugins.md
include/bbcode.php
include/diaspora.php
include/items.php
include/nav.php
include/notifier.php
include/ostatus_conversation.php
include/profile_advanced.php
include/pubsubpublish.php [new file with mode: 0644]
include/queue.php
include/text.php
mod/allfriends.php
mod/common.php
mod/content.php
mod/crepair.php
mod/dirfind.php
mod/editpost.php
mod/follow.php
mod/item.php
mod/match.php
mod/network.php
mod/photos.php
mod/search.php
mod/suggest.php
mod/videos.php
view/de/messages.po
view/de/strings.php
view/global.css
view/templates/photo_albums.tpl [new file with mode: 0644]
view/templates/section_title.tpl [new file with mode: 0644]
view/templates/vcard-widget.tpl
view/theme/duepuntozero/style.css
view/theme/frost/style.css

index 8369e9fadc7dab61ebe36d587f8defe5fc219566..cf236d422a0912ac77c6dff089b261deec2bc3bc 100644 (file)
@@ -268,6 +268,10 @@ $b is an array, params to mail()
     'body'
     'headers'
 
+###'nav_info'
+is called after the navigational menu is build in include/nav.php.
+$b is an array containing $nav from nav.php.
+
 Complete list of hook callbacks
 ---
 
index 448eee39bc4a244af7f0bce891de6e55b0fd2904..dcff41a4b64968f6753bc29dbaab3210f0b4c425 100644 (file)
@@ -176,6 +176,9 @@ Du kannst ebenso plugin_name_init(&$a) nutzen, was oft frühzeitig aufgerufen wi
         'email' => Email-Adresse, um nach dem Avatar zu suchen
         'url' => generierte URL (String) des Avatars
 
+**'nav_info'**
+ - wird aufgerufen nachdem in include/nav,php der Inhalt des Navigations Menüs erzeugt wurde.
+ - $b ist ein Array, das $nav wiederspiegelt.
 
 Eine komplette Liste aller Hook-Callbacks mit den zugehörigen Dateien (am 14-Feb-2012 generiert): Bitte schau in die Quellcodes für Details zu Hooks, die oben nicht dokumentiert sind.
 
index b47a514320d638e3a5a649fdd74ad4d49b2e3580..01a141956797c17b53d45c6a7f0133d67da3d56c 100644 (file)
@@ -828,7 +828,6 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true, $simplehtml = fal
 
        $ev = bbtoevent($Text);
 
-
        // Replace any html brackets with HTML Entities to prevent executing HTML or script
        // Don't use strip_tags here because it breaks [url] search by replacing & with amp
 
@@ -885,8 +884,13 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true, $simplehtml = fal
        $MAILSearchString = $URLSearchString;
 
        // Remove all hashtag addresses
-       if (!$tryoembed OR $simplehtml)
+       if ((!$tryoembed OR $simplehtml) AND ($simplehtml != 7))
                $Text = preg_replace("/([#@])\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism", '$1$3', $Text);
+       elseif ($simplehtml == 7)
+               $Text = preg_replace("/([@])\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism",
+                       '$1<span class="vcard"><a href="$2" class="url" title="$3"><span class="fn nickname mention">$3</span></a></span>',
+                       $Text);
+
 
        // Bookmarks in red - will be converted to bookmarks in friendica
        $Text = preg_replace("/#\^\[url\]([$URLSearchString]*)\[\/url\]/ism", '[bookmark=$1]$1[/bookmark]', $Text);
@@ -937,13 +941,13 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true, $simplehtml = fal
        // we may need to restrict this further if it picks up too many strays
        // link acct:user@host to a webfinger profile redirector
 
-       $Text = preg_replace('/acct:(.*?)@(.*?)([ ,])/', '<a href="' . $a->get_baseurl() . '/acctlink?addr=' . "$1@$2" 
+       $Text = preg_replace('/acct:(.*?)@(.*?)([ ,])/', '<a href="' . $a->get_baseurl() . '/acctlink?addr=' . "$1@$2"
                . '" target="extlink" >acct:' . "$1@$2$3" . '</a>',$Text);
 
        // Perform MAIL Search
        $Text = preg_replace("/\[mail\]([$MAILSearchString]*)\[\/mail\]/", '<a href="mailto:$1">$1</a>', $Text);
        $Text = preg_replace("/\[mail\=([$MAILSearchString]*)\](.*?)\[\/mail\]/", '<a href="mailto:$1">$2</a>', $Text);
-       
+
        // leave open the posibility of [map=something]
        // this is replaced in prepare_body() which has knowledge of the item location
 
@@ -955,8 +959,8 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true, $simplehtml = fal
        }
        if (strpos($Text,'[map]') !== false) {
                $Text = preg_replace("/\[map\]/", '<div class="map"></div>', $Text);
-       }       
-       
+       }
+
        // Check for headers
        $Text = preg_replace("(\[h1\](.*?)\[\/h1\])ism",'<h1>$1</h1>',$Text);
        $Text = preg_replace("(\[h2\](.*?)\[\/h2\])ism",'<h2>$1</h2>',$Text);
@@ -1004,8 +1008,8 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true, $simplehtml = fal
        $endlessloop = 0;
 
        while ((((strpos($Text, "[/list]") !== false) && (strpos($Text, "[list") !== false)) ||
-              ((strpos($Text, "[/ol]") !== false) && (strpos($Text, "[ol]") !== false)) || 
-              ((strpos($Text, "[/ul]") !== false) && (strpos($Text, "[ul]") !== false)) || 
+              ((strpos($Text, "[/ol]") !== false) && (strpos($Text, "[ol]") !== false)) ||
+              ((strpos($Text, "[/ul]") !== false) && (strpos($Text, "[ul]") !== false)) ||
               ((strpos($Text, "[/li]") !== false) && (strpos($Text, "[li]") !== false))) && (++$endlessloop < 20)) {
                $Text = preg_replace("/\[list\](.*?)\[\/list\]/ism", '<ul class="listbullet" style="list-style-type: circle;">$1</ul>' ,$Text);
                $Text = preg_replace("/\[list=\](.*?)\[\/list\]/ism", '<ul class="listnone" style="list-style-type: none;">$1</ul>' ,$Text);
@@ -1149,7 +1153,7 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true, $simplehtml = fal
                $Text = preg_replace_callback("/\[vimeo\](https?:\/\/vimeo.com\/[0-9]+).*?\[\/vimeo\]/ism",'tryoembed',$Text);
        }
 
-       $Text = preg_replace("/\[vimeo\]https?:\/\/player.vimeo.com\/video\/([0-9]+)(.*?)\[\/vimeo\]/ism",'[vimeo]$1[/vimeo]',$Text); 
+       $Text = preg_replace("/\[vimeo\]https?:\/\/player.vimeo.com\/video\/([0-9]+)(.*?)\[\/vimeo\]/ism",'[vimeo]$1[/vimeo]',$Text);
        $Text = preg_replace("/\[vimeo\]https?:\/\/vimeo.com\/([0-9]+)(.*?)\[\/vimeo\]/ism",'[vimeo]$1[/vimeo]',$Text);
 
        if ($tryoembed)
index 04588dffe6bee58661a06e19f57bf79210cbcaf7..b70cffdc39efebd8cf0073887301a8891653a387 100755 (executable)
@@ -785,12 +785,21 @@ function diaspora_is_redmatrix($url) {
 }
 
 function diaspora_plink($addr, $guid) {
-       $r = q("SELECT `url`, `nick` FROM `fcontact` WHERE `addr`='%s' LIMIT 1", $addr);
+       $r = q("SELECT `url`, `nick`, `network` FROM `fcontact` WHERE `addr`='%s' LIMIT 1", $addr);
 
        // Fallback
        if (!$r)
                return 'https://'.substr($addr,strpos($addr,'@')+1).'/posts/'.$guid;
 
+       // Friendica contacts are often detected as Diaspora contacts in the "fcontact" table
+       // So we try another way as well.
+       $s = q("SELECT `network` FROM `gcontact` WHERE `nurl`='%s' LIMIT 1", dbesc(normalise_link($r[0]["url"])));
+       if ($s)
+               $r[0]["network"] = $s[0]["network"];
+
+       if ($r[0]["network"] == NETWORK_DFRN)
+               return(str_replace("/profile/".$r[0]["nick"]."/", "/display/".$guid, $r[0]["url"]."/"));
+
        if (diaspora_is_redmatrix($r[0]["url"]))
                return $r[0]["url"]."/?f=&mid=".$guid;
 
@@ -833,12 +842,19 @@ function diaspora_post($importer,$xml,$msg) {
 
        $body = diaspora2bb($xml->raw_message);
 
-       // Add OEmbed and other information to the body
-       if (!diaspora_is_redmatrix($contact['url']))
-               $body = add_page_info_to_body($body, false, true);
-
        $datarray = array();
 
+       $datarray["object"] = json_encode($xml);
+
+       if($xml->photo->remote_photo_path AND $xml->photo->remote_photo_name)
+               $datarray["object-type"] = ACTIVITY_OBJ_PHOTO;
+       else {
+               $datarray['object-type'] = ACTIVITY_OBJ_NOTE;
+               // Add OEmbed and other information to the body
+               if (!diaspora_is_redmatrix($contact['url']))
+                       $body = add_page_info_to_body($body, false, true);
+       }
+
        $str_tags = '';
 
        $cnt = preg_match_all('/@\[url=(.*?)\[\/url\]/ism',$body,$matches,PREG_SET_ORDER);
@@ -872,7 +888,10 @@ function diaspora_post($importer,$xml,$msg) {
        $datarray['author-avatar'] = $contact['thumb'];
        $datarray['body'] = $body;
        $datarray['tag'] = $str_tags;
-       $datarray['app']  = 'Diaspora';
+       if ($xml->provider_display_name)
+                $datarray["app"] = unxmlify($xml->provider_display_name);
+       else
+               $datarray['app']  = 'Diaspora';
 
        // if empty content it might be a photo that hasn't arrived yet. If a photo arrives, we'll make it visible.
 
@@ -921,6 +940,8 @@ function diaspora_store_by_guid($guid, $server, $uid = 0) {
        $author = $item["author"];
        $guid = $item["guid"];
        $private = $item["private"];
+       $object = $item["object"];
+       $objecttype = $item["object-type"];
 
        $message_id = $author.':'.$guid;
        $r = q("SELECT `id` FROM `item` WHERE `uid` = %d AND `uri` = '%s' AND `guid` = '%s' LIMIT 1",
@@ -954,6 +975,8 @@ function diaspora_store_by_guid($guid, $server, $uid = 0) {
        $datarray['tag'] = $str_tags;
        $datarray['app']  = $app;
        $datarray['visible'] = ((strlen($body)) ? 1 : 0);
+       $datarray['object'] = $object;
+       $datarray['object-type'] = $objecttype;
 
        if ($datarray['contact-id'] == 0)
                return false;
@@ -1001,11 +1024,14 @@ function diaspora_fetch_message($guid, $server, $level = 0) {
                $item["guid"] = unxmlify($source_xml->post->status_message->guid);
 
        $item["private"] = (unxmlify($source_xml->post->status_message->public) == 'false');
+       $item["object"] = json_encode($source_xml->post);
 
        if(strlen($source_xml->post->asphoto->objectId) && ($source_xml->post->asphoto->objectId != 0) && ($source_xml->post->asphoto->image_url)) {
+               $item["object-type"] = ACTIVITY_OBJ_PHOTO;
                $body = '[url=' . notags(unxmlify($source_xml->post->asphoto->image_url)) . '][img]' . notags(unxmlify($source_xml->post->asphoto->objectId)) . '[/img][/url]' . "\n";
                $body = scale_external_images($body,false);
        } elseif($source_xml->post->asphoto->image_url) {
+               $item["object-type"] = ACTIVITY_OBJ_PHOTO;
                $body = '[img]' . notags(unxmlify($source_xml->post->asphoto->image_url)) . '[/img]' . "\n";
                $body = scale_external_images($body);
        } elseif($source_xml->post->status_message) {
@@ -1015,18 +1041,25 @@ function diaspora_fetch_message($guid, $server, $level = 0) {
                if($source_xml->post->status_message->photo->remote_photo_path AND
                        $source_xml->post->status_message->photo->remote_photo_name) {
 
+                       $item["object-type"] = ACTIVITY_OBJ_PHOTO;
+
                        $remote_photo_path = notags(unxmlify($source_xml->post->status_message->photo->remote_photo_path));
                        $remote_photo_name = notags(unxmlify($source_xml->post->status_message->photo->remote_photo_name));
 
                        $body = '[img]'.$remote_photo_path.$remote_photo_name.'[/img]'."\n".$body;
 
                        logger('embedded picture link found: '.$body, LOGGER_DEBUG);
-               }
+               } else
+                       $item["object-type"] = ACTIVITY_OBJ_NOTE;
 
                $body = scale_external_images($body);
 
                // Add OEmbed and other information to the body
-               $body = add_page_info_to_body($body, false, true);
+               // To-Do: It could be a repeated redmatrix item
+               // Then we shouldn't add further data to it
+               if ($item["object-type"] == ACTIVITY_OBJ_NOTE)
+                       $body = add_page_info_to_body($body, false, true);
+
        } elseif($source_xml->post->reshare) {
                // Reshare of a reshare
                return diaspora_fetch_message($source_xml->post->reshare->root_guid, $server, ++$level);
@@ -1081,16 +1114,17 @@ function diaspora_reshare($importer,$xml,$msg) {
 
        $orig_author = notags(unxmlify($xml->root_diaspora_id));
        $orig_guid = notags(unxmlify($xml->root_guid));
+       $orig_url = $a->get_baseurl()."/display/".$orig_guid;
 
        $create_original_post = false;
 
        // Do we already have this item?
-       $r = q("SELECT `body`, `tag`, `app`, `created`, `author-link`, `plink` FROM `item` WHERE `guid` = '%s' AND `visible` AND NOT `deleted` AND `body` != '' LIMIT 1",
+       $r = q("SELECT `body`, `tag`, `app`, `created`, `plink`, `object`, `object-type`, `uri` FROM `item` WHERE `guid` = '%s' AND `visible` AND NOT `deleted` AND `body` != '' LIMIT 1",
                dbesc($orig_guid),
                dbesc(NETWORK_DIASPORA)
        );
        if(count($r)) {
-               logger('reshared message '.$orig_guid." reshared by ".$guid.' already exists on system: '.$orig_url);
+               logger('reshared message '.$orig_guid." reshared by ".$guid.' already exists on system.');
 
                // Maybe it is already a reshared item?
                // Then refetch the content, since there can be many side effects with reshared posts from other networks or reshares from reshares
@@ -1102,9 +1136,10 @@ function diaspora_reshare($importer,$xml,$msg) {
                        $str_tags = $r[0]["tag"];
                        $app = $r[0]["app"];
                        $orig_created = $r[0]["created"];
-                       $orig_author = $r[0]["author-link"];
-                       $create_original_post = ($body != "");
-                       $orig_url = $a->get_baseurl()."/display/".$orig_guid;
+                       $orig_plink = $r[0]["plink"];
+                       $orig_uri = $r[0]["uri"];
+                       $object = $r[0]["object"];
+                       $objecttype = $r[0]["object-type"];
                }
        }
 
@@ -1113,8 +1148,6 @@ function diaspora_reshare($importer,$xml,$msg) {
                $str_tags = "";
                $app = "";
 
-               $orig_url = 'https://'.substr($orig_author,strpos($orig_author,'@')+1).'/posts/'.$orig_guid;
-
                $server = 'https://'.substr($orig_author,strpos($orig_author,'@')+1);
                logger('1st try: reshared message '.$orig_guid." reshared by ".$guid.' will be fetched from original server: '.$server);
                $item = diaspora_fetch_message($orig_guid, $server);
@@ -1142,11 +1175,16 @@ function diaspora_reshare($importer,$xml,$msg) {
                        $orig_created = $item["created"];
                        $orig_author = $item["author"];
                        $orig_guid = $item["guid"];
+                       $orig_plink = diaspora_plink($orig_author, $orig_guid);
+                       $orig_uri = $orig_author.':'.$orig_guid;
                        $create_original_post = ($body != "");
-                       $orig_url = $a->get_baseurl()."/display/".$orig_guid;
+                       $object = $item["object"];
+                       $objecttype = $item["object-type"];
                }
        }
 
+       $plink = diaspora_plink($diaspora_handle, $guid);
+
        $person = find_diaspora_person_by_handle($orig_author);
 
        $created = unxmlify($xml->created_at);
@@ -1154,8 +1192,6 @@ function diaspora_reshare($importer,$xml,$msg) {
 
        $datarray = array();
 
-       $plink = diaspora_plink($diaspora_handle, $guid);
-
        $datarray['uid'] = $importer['uid'];
        $datarray['contact-id'] = $contact['id'];
        $datarray['wall'] = 0;
@@ -1184,6 +1220,9 @@ function diaspora_reshare($importer,$xml,$msg) {
                $datarray['body'] = $body;
        }
 
+       $datarray["object"] = json_encode($xml);
+       $datarray['object-type'] = $objecttype;
+
        $datarray['tag'] = $str_tags;
        $datarray['app']  = $app;
 
@@ -1199,9 +1238,10 @@ function diaspora_reshare($importer,$xml,$msg) {
                $datarray2['uid'] = 0;
                $datarray2['contact-id'] = get_contact($person['url'], 0);
                $datarray2['guid'] = $orig_guid;
-               $datarray2['uri'] = $datarray2['parent-uri'] = $orig_author.':'.$orig_guid;
+               $datarray2['uri'] = $datarray2['parent-uri'] = $orig_uri;
                $datarray2['changed'] = $datarray2['created'] = $datarray2['edited'] = $datarray2['commented'] = $datarray2['received'] = datetime_convert('UTC','UTC',$orig_created);
-               $datarray2['plink'] = diaspora_plink($orig_author, $orig_guid);
+               $datarray2['parent'] = 0;
+               $datarray2['plink'] = $orig_plink;
 
                $datarray2['author-name'] = $person['name'];
                $datarray2['author-link'] = $person['url'];
@@ -1210,6 +1250,7 @@ function diaspora_reshare($importer,$xml,$msg) {
                $datarray2['owner-link'] = $datarray2['author-link'];
                $datarray2['owner-avatar'] = $datarray2['author-avatar'];
                $datarray2['body'] = $body;
+               $datarray2["object"] = $object;
 
                DiasporaFetchGuid($datarray2);
                $message_id = item_store($datarray2);
@@ -1295,6 +1336,8 @@ function diaspora_asphoto($importer,$xml,$msg) {
        $datarray['author-link'] = $contact['url'];
        $datarray['author-avatar'] = $contact['thumb'];
        $datarray['body'] = $body;
+       $datarray["object"] = json_encode($xml);
+       $datarray['object-type'] = ACTIVITY_OBJ_PHOTO;
 
        $datarray['app']  = 'Diaspora/Cubbi.es';
 
@@ -1464,6 +1507,8 @@ function diaspora_comment($importer,$xml,$msg) {
        $datarray['author-link'] = $person['url'];
        $datarray['author-avatar'] = ((x($person,'thumb')) ? $person['thumb'] : $person['photo']);
        $datarray['body'] = $body;
+       $datarray["object"] = json_encode($xml);
+       $datarray["object-type"] = ACTIVITY_OBJ_COMMENT;
 
        // We can't be certain what the original app is if the message is relayed.
        if(($parent_item['origin']) && (! $parent_author_signature))
@@ -1790,7 +1835,7 @@ function diaspora_message($importer,$xml,$msg) {
                dbesc($person['name']),
                dbesc($person['photo']),
                dbesc($person['url']),
-               intval($contact['id']),  
+               intval($contact['id']),
                dbesc($conversation['subject']),
                dbesc($body),
                0,
@@ -2059,7 +2104,7 @@ function diaspora_like($importer,$xml,$msg) {
 
        $activity = ACTIVITY_LIKE;
        $post_type = (($parent_item['resource-id']) ? t('photo') : t('status'));
-       $objtype = (($parent_item['resource-id']) ? ACTIVITY_OBJ_PHOTO : ACTIVITY_OBJ_NOTE ); 
+       $objtype = (($parent_item['resource-id']) ? ACTIVITY_OBJ_PHOTO : ACTIVITY_OBJ_NOTE );
        $link = xmlify('<link rel="alternate" type="text/html" href="' . $a->get_baseurl() . '/display/' . $importer['nickname'] . '/' . $parent_item['id'] . '" />' . "\n") ;
        $body = $parent_item['body'];
 
@@ -2878,7 +2923,7 @@ function diaspora_send_retraction($item,$owner,$contact,$public_batch = false) {
                $target_type = (($item['verb'] === ACTIVITY_LIKE) ? 'Like' : 'Comment');
        }
        else {
-               
+
                $tpl = get_markup_template('diaspora_signed_retract.tpl');
                $target_type = 'StatusMessage';
        }
@@ -2924,7 +2969,7 @@ function diaspora_send_mail($item,$owner,$contact) {
 
        $body = bb2diaspora($item['body']);
        $created = datetime_convert('UTC','UTC',$item['created'],'Y-m-d H:i:s \U\T\C');
+
        $signed_text =  $item['guid'] . ';' . $cnv['guid'] . ';' . $body .  ';' 
                . $created . ';' . $myaddr . ';' . $cnv['guid'];
 
index 66307573d964a5fb5a672bed33ec37590c13f5e9..87a7daea0b42407a0dc1af8918c0ee1661ddcbd7 100644 (file)
@@ -14,7 +14,7 @@ require_once('include/threads.php');
 require_once('include/socgraph.php');
 require_once('mod/share.php');
 
-function get_feed_for(&$a, $dfrn_id, $owner_nick, $last_update, $direction = 0) {
+function get_feed_for(&$a, $dfrn_id, $owner_nick, $last_update, $direction = 0, $forpubsub = false) {
 
 
        $sitefeed    = ((strlen($owner_nick)) ? false : true); // not yet implemented, need to rewrite huge chunks of following logic
@@ -55,6 +55,7 @@ function get_feed_for(&$a, $dfrn_id, $owner_nick, $last_update, $direction = 0)
        $birthday = feed_birthday($owner_id,$owner['timezone']);
 
        $sql_post_table = "";
+       $visibility = "";
 
        if(! $public_feed) {
 
@@ -114,6 +115,18 @@ function get_feed_for(&$a, $dfrn_id, $owner_nick, $last_update, $direction = 0)
        else
                $sort = 'ASC';
 
+       // Include answers to status.net posts in pubsub feeds
+       if($forpubsub) {
+               $sql_post_table = "INNER JOIN `thread` ON `thread`.`iid` = `item`.`parent` ";
+               $visibility = sprintf("OR (`item`.`network` = '%s' AND `thread`.`network`='%s')",
+                                       dbesc(NETWORK_DFRN), dbesc(NETWORK_OSTATUS));
+               $date_field = "`received`";
+               $sql_order = "`item`.`received` DESC";
+       } else {
+               $date_field = "`changed`";
+               $sql_order = "`item`.`parent` ".$sort.", `item`.`created` ASC";
+       }
+
        if(! strlen($last_update))
                $last_update = 'now -30 days';
 
@@ -133,7 +146,7 @@ function get_feed_for(&$a, $dfrn_id, $owner_nick, $last_update, $direction = 0)
        //      AND ( `item`.`edited` > '%s' OR `item`.`changed` > '%s' )
        //      dbesc($check_date),
 
-       $r = q("SELECT `item`.*, `item`.`id` AS `item_id`,
+       $r = q("SELECT STRAIGHT_JOIN `item`.*, `item`.`id` AS `item_id`,
                `contact`.`name`, `contact`.`network`, `contact`.`photo`, `contact`.`url`,
                `contact`.`name-date`, `contact`.`uri-date`, `contact`.`avatar-date`,
                `contact`.`thumb`, `contact`.`dfrn-id`, `contact`.`self`,
@@ -144,9 +157,9 @@ function get_feed_for(&$a, $dfrn_id, $owner_nick, $last_update, $direction = 0)
                AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0
                LEFT JOIN `sign` ON `sign`.`iid` = `item`.`id`
                WHERE `item`.`uid` = %d AND `item`.`visible` = 1 and `item`.`moderated` = 0 AND `item`.`parent` != 0
-               AND `item`.`wall` = 1 AND `item`.`changed` > '%s'
+               AND ((`item`.`wall` = 1) $visibility) AND `item`.$date_field > '%s'
                $sql_extra
-               ORDER BY `parent` %s, `created` ASC LIMIT 0, 300",
+               ORDER BY $sql_order LIMIT 0, 300",
                intval($owner_id),
                dbesc($check_date),
                dbesc($sort)
@@ -464,12 +477,27 @@ function get_atom_elements($feed, $item, $contact = array()) {
 
        // look for a photo. We should check media size and find the best one,
        // but for now let's just find any author photo
+       // Additionally we look for an alternate author link. On OStatus this one is the one we want.
+
+       // Search for ostatus conversation url
+       $authorlinks = $item->feed->data["child"][SIMPLEPIE_NAMESPACE_ATOM_10]["feed"][0]["child"][SIMPLEPIE_NAMESPACE_ATOM_10]["author"][0]["child"]["http://www.w3.org/2005/Atom"]["link"];
+       if (is_array($authorlinks)) {
+               foreach ($authorlinks as $link) {
+                       $linkdata = array_shift($link["attribs"]);
+
+                       if ($linkdata["rel"] == "alternate")
+                               $res["author-link"] = $linkdata["href"];
+               };
+       }
 
        $rawauthor = $item->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_10,'author');
 
        if($rawauthor && $rawauthor[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['link']) {
                $base = $rawauthor[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['link'];
                foreach($base as $link) {
+                       if($link['attribs']['']['rel'] === 'alternate')
+                               $res['author-link'] = unxmlify($link['attribs']['']['href']);
+
                        if(!x($res, 'author-avatar') || !$res['author-avatar']) {
                                if($link['attribs']['']['rel'] === 'photo' || $link['attribs']['']['rel'] === 'avatar')
                                        $res['author-avatar'] = unxmlify($link['attribs']['']['href']);
@@ -828,7 +856,7 @@ function get_atom_elements($feed, $item, $contact = array()) {
                logger('get_atom_elements: Looking for status.net repeated message');
 
                $message = $child["http://activitystrea.ms/spec/1.0/"]["object"][0]["child"][SIMPLEPIE_NAMESPACE_ATOM_10]["content"][0]["data"];
-               $orig_uri = $child["http://activitystrea.ms/spec/1.0/"]["object"][0]["child"][SIMPLEPIE_NAMESPACE_ATOM_10]["id"][0]["data"];
+               $orig_id = ostatus_convert_href($child["http://activitystrea.ms/spec/1.0/"]["object"][0]["child"][SIMPLEPIE_NAMESPACE_ATOM_10]["id"][0]["data"]);
                $author = $child[SIMPLEPIE_NAMESPACE_ATOM_10]["author"][0]["child"][SIMPLEPIE_NAMESPACE_ATOM_10];
                $uri = $author["uri"][0]["data"];
                $name = $author["name"][0]["data"];
@@ -836,10 +864,10 @@ function get_atom_elements($feed, $item, $contact = array()) {
                $avatar = $avatar["href"];
 
                if (($name != "") and ($uri != "") and ($avatar != "") and ($message != "")) {
-                       logger('get_atom_elements: fixing sender of repeated message.');
+                       logger('get_atom_elements: fixing sender of repeated message. '.$orig_id, LOGGER_DEBUG);
 
                        if (!intval(get_config('system','wall-to-wall_share'))) {
-                               $prefix = share_header($name, $uri, $avatar, "", "", $orig_uri);
+                               $prefix = share_header($name, $uri, $avatar, "", "", $orig_link);
 
                                $res["body"] = $prefix.html2bbcode($message)."[/share]";
                        } else {
@@ -864,8 +892,11 @@ function get_atom_elements($feed, $item, $contact = array()) {
                        $conversation = array_shift($link["attribs"]);
 
                        if ($conversation["rel"] == "ostatus:conversation") {
-                               $res["ostatus_conversation"] = $conversation["href"];
+                               $res["ostatus_conversation"] = ostatus_convert_href($conversation["href"]);
                                logger('get_atom_elements: found conversation url '.$res["ostatus_conversation"]);
+                       } elseif ($conversation["rel"] == "alternate") {
+                               $res["plink"] = $conversation["href"];
+                               logger('get_atom_elements: found plink '.$res["plink"]);
                        }
                };
        }
@@ -1090,6 +1121,14 @@ function item_store($arr,$force_parent = false, $notify = false, $dontcache = fa
                unset($arr['dsprsig']);
        }
 
+       // Converting the plink
+       if ($arr['network'] == NETWORK_OSTATUS) {
+               if (isset($arr['plink']))
+                       $arr['plink'] = ostatus_convert_href($arr['plink']);
+               elseif (isset($arr['uri']))
+                       $arr['plink'] = ostatus_convert_href($arr['uri']);
+       }
+
        // if an OStatus conversation url was passed in, it is stored and then
        // removed from the array.
        $ostatus_conversation = null;
@@ -1115,7 +1154,7 @@ function item_store($arr,$force_parent = false, $notify = false, $dontcache = fa
 
        /* check for create  date and expire time */
        $uid = intval($arr['uid']);
-       $r = q("SELECT expire FROM user WHERE uid = %d", $uid);
+       $r = q("SELECT expire FROM user WHERE uid = %d", intval($uid));
        if(count($r)) {
                $expire_interval = $r[0]['expire'];
                if ($expire_interval>0) {
@@ -1141,6 +1180,19 @@ function item_store($arr,$force_parent = false, $notify = false, $dontcache = fa
                }
        }
 
+       // If there is no guid then take the same guid that was taken before for the same plink
+       if ((trim($arr['guid']) == "") AND (trim($arr['plink']) != "")) {
+               logger('item_store: checking for an existing guid for plink '.$arr['plink'], LOGGER_DEBUG);
+               $r = q("SELECT `guid` FROM `item` WHERE `plink` = '%s' AND `guid` != '' LIMIT 1",
+                       dbesc(trim($arr['plink']))
+               );
+
+               if(count($r)) {
+                       $arr['guid'] = $r[0]["guid"];
+                       logger('item_store: found guid '.$arr['guid'].' for plink '.$arr['plink'], LOGGER_DEBUG);
+               }
+       }
+
        // Shouldn't happen but we want to make absolutely sure it doesn't leak from a plugin.
        // Deactivated, since the bbcode parser can handle with it - and it destroys posts with some smileys that contain "<"
        //if((strpos($arr['body'],'<') !== false) || (strpos($arr['body'],'>') !== false))
@@ -1347,12 +1399,36 @@ function item_store($arr,$force_parent = false, $notify = false, $dontcache = fa
                }
        }
 
-       $r = q("SELECT `id` FROM `item` WHERE `uri` = '%s' AND `uid` = %d LIMIT 1",
+       $r = q("SELECT `id` FROM `item` WHERE `uri` = '%s' AND `network` = '%s' AND `uid` = %d LIMIT 1",
                dbesc($arr['uri']),
+               dbesc($arr['network']),
+               intval($arr['uid'])
+       );
+       if($r && count($r)) {
+               logger('duplicated item with the same uri found. ' . print_r($arr,true));
+               return 0;
+       }
+
+       $r = q("SELECT `id` FROM `item` WHERE `plink` = '%s' AND `network` = '%s' AND `uid` = %d LIMIT 1",
+               dbesc($arr['plink']),
+               dbesc($arr['network']),
                intval($arr['uid'])
        );
        if($r && count($r)) {
-               logger('item-store: duplicate item ignored. ' . print_r($arr,true));
+               logger('duplicated item with the same plink found. ' . print_r($arr,true));
+               return 0;
+       }
+
+       // Check for an existing post with the same content. There seems to be a problem with OStatus.
+       $r = q("SELECT `id` FROM `item` WHERE `body` = '%s' AND `network` = '%s' AND `created` = '%s' AND `contact-id` = %d AND `uid` = %d LIMIT 1",
+               dbesc($arr['body']),
+               dbesc($arr['network']),
+               dbesc($arr['created']),
+               intval($arr['contact-id']),
+               intval($arr['uid'])
+       );
+       if($r && count($r)) {
+               logger('duplicated item with the same body found. ' . print_r($arr,true));
                return 0;
        }
 
@@ -2167,6 +2243,12 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $pass = 0)
                return;
        }
 
+       // Test - remove before flight
+//     if ($contact['network'] === NETWORK_OSTATUS) {
+//             $tempfile = tempnam(get_temppath(), "ostatus");
+//             file_put_contents($tempfile, $xml);
+//     }
+
        $feed = new SimplePie();
        $feed->set_raw_data($xml);
        if($datedir)
index df5e00394e07b61319227c2bdbc5a28d80565194..3d27be13be819bf8e1c4dd66a1da260501200f50 100644 (file)
@@ -200,6 +200,8 @@ function nav_info(&$a) {
        if($banner === false) 
                $banner .= '<a href="http://friendica.com"><img id="logo-img" src="images/friendica-32.png" alt="logo" /></a><span id="logo-text"><a href="http://friendica.com">Friendica</a></span>';
 
+       call_hooks('nav_info', $nav);
+
 
        return array(
                'sitelocation' => $sitelocation,
index 067251b4294e094e6c9b753aed19ef2aad9c78c1..dc4e1a2394e7aab5ee5f1e42a6b4865288735ee3 100644 (file)
@@ -114,7 +114,7 @@ function notifier_run(&$argv, &$argc){
        elseif($cmd === 'expire') {
                $normal_mode = false;
                $expire = true;
-               $items = q("SELECT * FROM `item` WHERE `uid` = %d AND `wall` = 1 
+               $items = q("SELECT * FROM `item` WHERE `uid` = %d AND `wall` = 1
                        AND `deleted` = 1 AND `changed` > UTC_TIMESTAMP() - INTERVAL 10 MINUTE",
                        intval($item_id)
                );
@@ -178,7 +178,7 @@ function notifier_run(&$argv, &$argc){
                if(! $parent_id)
                        return;
 
-               $items = q("SELECT `item`.*, `sign`.`signed_text`,`sign`.`signature`,`sign`.`signer` 
+               $items = q("SELECT `item`.*, `sign`.`signed_text`,`sign`.`signature`,`sign`.`signer`
                        FROM `item` LEFT JOIN `sign` ON `sign`.`iid` = `item`.`id` WHERE `parent` = %d and visible = 1 and moderated = 0 ORDER BY `id` ASC",
                        intval($parent_id)
                );
@@ -221,6 +221,9 @@ function notifier_run(&$argv, &$argc){
        // If this is a public conversation, notify the feed hub
        $public_message = true;
 
+       // Do a PuSH
+       $push_notify = false;
+
        // fill this in with a single salmon slap if applicable
        $slap = '';
 
@@ -284,8 +287,6 @@ function notifier_run(&$argv, &$argc){
                if($parent['origin'])
                        $relay_to_owner = false;
 
-
-
                if($relay_to_owner) {
                        logger('notifier: followup', LOGGER_DEBUG);
                        // local followup to remote post
@@ -294,9 +295,18 @@ function notifier_run(&$argv, &$argc){
                        $conversant_str = dbesc($parent['contact-id']);
                        $recipients = array($parent['contact-id']);
 
+                       if (!$item['private'] AND $item['wall'] AND
+                               (strlen($item['allow_cid'].$item['allow_gid'].
+                                       $item['deny_cid'].$item['deny_gid']) == 0))
+                               $push_notify = true;
+
                        if ($parent['network'] == NETWORK_OSTATUS) {
+                               logger('Parent is OStatus', LOGGER_DEBUG);
 
-                               // Check if the recipient isn't in your contact list
+                               $push_notify = true;
+
+                               // Check if the recipient isn't in your contact list, try to slap it
+                               // Not sure if it is working or not.
                                $r = q("SELECT `url` FROM `contact` WHERE `id` = %d", $parent['contact-id']);
                                if (count($r)) {
                                        $url_recipients = array();
@@ -608,6 +618,8 @@ function notifier_run(&$argv, &$argc){
                        if($contact['self'])
                                continue;
 
+                       logger("Deliver to ".$contact['url'], LOGGER_DEBUG);
+
                        // potentially more than one recipient. Start a new process and space them out a bit.
                        // we will deliver single recipient types of message and email recipients here.
 
@@ -713,7 +725,7 @@ function notifier_run(&$argv, &$argc){
                                                break;
 
                                        if($followup && $contact['notify']) {
-                                               logger('notifier: slapdelivery: ' . $contact['name']);
+                                               logger('slapdelivery followup item '.$item_id.' to ' . $contact['name']);
                                                $deliver_status = slapper($owner,$contact['notify'],$slap);
 
                                                if($deliver_status == (-1)) {
@@ -726,7 +738,7 @@ function notifier_run(&$argv, &$argc){
                                                // a public hub, it's ok to send a salmon
 
                                                if((count($slaps)) && ($public_message) && (! $expire)) {
-                                                       logger('notifier: slapdelivery: ' . $contact['name']);
+                                                       logger('slapdelivery item '.$item_id.' to ' . $contact['name']);
                                                        foreach($slaps as $slappy) {
                                                                if($contact['notify']) {
                                                                        $deliver_status = slapper($owner,$contact['notify'],$slappy);
@@ -966,32 +978,40 @@ function notifier_run(&$argv, &$argc){
                        }
                }
 
+               $push_notify = true;
+
+       }
 
-               if(strlen($hub)) {
-                       $hubs = explode(',', $hub);
-                       if(count($hubs)) {
-                               foreach($hubs as $h) {
-                                       $h = trim($h);
-                                       if(! strlen($h))
-                                               continue;
 
-                                       if ($h === '[internal]') {
-                                               // Set push flag for PuSH subscribers to this topic,
-                                               // they will be notified in queue.php
-                                               q("UPDATE `push_subscriber` SET `push` = 1 " .
-                                                 "WHERE `nickname` = '%s'", dbesc($owner['nickname']));
-                                       } else {
+       if($push_notify AND strlen($hub)) {
+               $hubs = explode(',', $hub);
+               if(count($hubs)) {
+                       foreach($hubs as $h) {
+                               $h = trim($h);
+                               if(! strlen($h))
+                                       continue;
 
-                                               $params = 'hub.mode=publish&hub.url=' . urlencode( $a->get_baseurl() . '/dfrn_poll/' . $owner['nickname'] );
-                                               post_url($h,$params);
-                                               logger('pubsub: publish: ' . $h . ' ' . $params . ' returned ' . $a->get_curl_code());
-                                       }
-                                       if(count($hubs) > 1)
-                                               sleep(7);                               // try and avoid multiple hubs responding at precisely the same time
+                               if ($h === '[internal]') {
+                                       // Set push flag for PuSH subscribers to this topic,
+                                       // they will be notified in queue.php
+                                       q("UPDATE `push_subscriber` SET `push` = 1 " .
+                                         "WHERE `nickname` = '%s'", dbesc($owner['nickname']));
+
+                                       logger('Activating internal PuSH for item '.$item_id, LOGGER_DEBUG);
+
+                               } else {
+
+                                       $params = 'hub.mode=publish&hub.url=' . urlencode( $a->get_baseurl() . '/dfrn_poll/' . $owner['nickname'] );
+                                       post_url($h,$params);
+                                       logger('publish for item '.$item_id.' ' . $h . ' ' . $params . ' returned ' . $a->get_curl_code());
                                }
+                               if(count($hubs) > 1)
+                                       sleep(7);                               // try and avoid multiple hubs responding at precisely the same time
                        }
                }
 
+               // Handling the pubsubhubbub requests
+               proc_run('php','include/pubsubpublish.php');
        }
 
        // If the item was deleted, clean up the `sign` table
index 667f7dde427bdfd4d0c81a7c7bcf241fbdc36617..f40c4827b94759b8e416ce7181c9a6ce8a19b159 100644 (file)
@@ -1,8 +1,33 @@
 <?php
+require_once("include/Contact.php");
+
 define('OSTATUS_DEFAULT_POLL_INTERVAL', 30); // given in minutes
 define('OSTATUS_DEFAULT_POLL_TIMEFRAME', 1440); // given in minutes
 
-function check_conversations() {
+function ostatus_convert_href($href) {
+       $elements = explode(":",$href);
+
+       if ((count($elements) <= 2) OR ($elements[0] != "tag"))
+               return $href;
+
+       $server = explode(",", $elements[1]);
+       $conversation = explode("=", $elements[2]);
+
+       if ((count($elements) == 4) AND ($elements[2] == "post"))
+               return "http://".$server[0]."/notice/".$elements[3];
+
+       if ((count($conversation) != 2) OR ($conversation[1] ==""))
+               return $href;
+
+       if ($elements[3] == "objectType=thread")
+               return "http://".$server[0]."/conversation/".$conversation[1];
+       else
+               return "http://".$server[0]."/notice/".$conversation[1];
+
+       return $href;
+}
+
+function check_conversations($override = false) {
         $last = get_config('system','ostatus_last_poll');
 
         $poll_interval = intval(get_config('system','ostatus_poll_interval'));
@@ -10,16 +35,16 @@ function check_conversations() {
                 $poll_interval = OSTATUS_DEFAULT_POLL_INTERVAL;
 
        // Don't poll if the interval is set negative
-       if ($poll_interval < 0)
+       if (($poll_interval < 0) AND !$override)
                return;
 
         $poll_timeframe = intval(get_config('system','ostatus_poll_timeframe'));
-        if(! $poll_timeframe)
+        if (!$poll_timeframe)
                 $poll_timeframe = OSTATUS_DEFAULT_POLL_TIMEFRAME;
 
-        if($last) {
+        if ($last AND !$override) {
                 $next = $last + ($poll_interval * 60);
-                if($next > time()) {
+                if ($next > time()) {
                         logger('poll interval not reached');
                         return;
                 }
@@ -36,7 +61,7 @@ function check_conversations() {
                 complete_conversation($id, $url);
         }
 
-        logger(' cron_end');
+        logger('cron_end');
 
         set_config('system','ostatus_last_poll', time());
 }
@@ -44,6 +69,8 @@ function check_conversations() {
 function complete_conversation($itemid, $conversation_url, $only_add_conversation = false) {
        global $a;
 
+       $conversation_url = ostatus_convert_href($conversation_url);
+
        if (intval(get_config('system','ostatus_poll_interval')) == -2)
                return;
 
@@ -107,12 +134,16 @@ function complete_conversation($itemid, $conversation_url, $only_add_conversatio
        $items = array_reverse($items);
 
        foreach ($items as $single_conv) {
-               // status.net changed the format of the activity streams. This is a quick fix.
-               if (@is_string($single_conv->object->id))
+               if (isset($single_conv->object->id))
                        $single_conv->id = $single_conv->object->id;
 
-               if (@!$single_conv->id AND $single_conv->provider->url AND $single_conv->statusnet_notice_info->local_id)
-                       $single_conv->id = $single_conv->provider->url."notice/".$single_conv->statusnet_notice_info->local_id;
+               logger("Got id ".$single_conv->id, LOGGER_DEBUG);
+
+               $plink = ostatus_convert_href($single_conv->id);
+               if (isset($single_conv->object->url))
+                       $plink = ostatus_convert_href($single_conv->object->url);
+
+               logger("Got url ".$plink, LOGGER_DEBUG);
 
                if (@!$single_conv->id)
                        continue;
@@ -120,8 +151,9 @@ function complete_conversation($itemid, $conversation_url, $only_add_conversatio
                if ($first_id == "") {
                        $first_id = $single_conv->id;
 
-                       $new_parents = q("SELECT `id`, `uri`, `contact-id`, `type`, `verb`, `visible` FROM `item` WHERE `uid` = %d AND `uri` = '%s' LIMIT 1",
-                               intval($message["uid"]), dbesc($first_id));
+                       $new_parents = q("SELECT `id`, `uri`, `contact-id`, `type`, `verb`, `visible` FROM `item` WHERE `uid` = %d AND `uri` = '%s' AND `network` IN ('%s','%s') LIMIT 1",
+                               intval($message["uid"]), dbesc($first_id),
+                               dbesc(NETWORK_OSTATUS), dbesc(NETWORK_DFRN));
                        if ($new_parents) {
                                $parent = $new_parents[0];
                                logger('adopting new parent '.$parent["id"].' for '.$itemid);
@@ -136,12 +168,21 @@ function complete_conversation($itemid, $conversation_url, $only_add_conversatio
                else
                        $parent_uri = $parent["uri"];
 
-               $message_exists = q("SELECT `id` FROM `item` WHERE `uid` = %d AND `uri` = '%s' LIMIT 1",
-                                                       intval($message["uid"]), dbesc($single_conv->id));
+               $message_exists = q("SELECT `id` FROM `item` WHERE `uid` = %d AND `plink` = '%s' AND `network` IN ('%s','%s') LIMIT 1",
+                                                       intval($message["uid"]), dbesc($plink),
+                                                       dbesc(NETWORK_OSTATUS), dbesc(NETWORK_DFRN));
+
+               if (!$message_exists)
+                       $message_exists = q("SELECT `id` FROM `item` WHERE `uid` = %d AND `uri` = '%s' AND `network` IN ('%s','%s') LIMIT 1",
+                                                       intval($message["uid"]), dbesc($single_conv->id),
+                                                       dbesc(NETWORK_OSTATUS), dbesc(NETWORK_DFRN));
+
                if ($message_exists) {
                        if ($parent["id"] != 0) {
                                $existing_message = $message_exists[0];
 
+                               logger('updating id '.$existing_message["id"].' to parent '.$parent["id"].' uri '.$parent["uri"].' thread '.$parent_uri, LOGGER_DEBUG);
+
                                // This is partly bad, since the entry in the thread table isn't updated
                                $r = q("UPDATE `item` SET `parent` = %d, `parent-uri` = '%s', `thr-parent` = '%s' WHERE `id` = %d",
                                        intval($parent["id"]),
@@ -152,21 +193,32 @@ function complete_conversation($itemid, $conversation_url, $only_add_conversatio
                        continue;
                }
 
+               $actor = $single_conv->actor->id;
+               if (isset($single_conv->actor->url))
+                       $actor = $single_conv->actor->url;
+
                $contact = q("SELECT `id` FROM `contact` WHERE `uid` = %d AND `nurl` = '%s' AND `network` != '%s'",
-                               $message["uid"], normalise_link($single_conv->actor->id), NETWORK_STATUSNET);
+                               $message["uid"], normalise_link($actor), NETWORK_STATUSNET);
 
                if (count($contact)) {
-                       logger("Found contact for url ".$single_conv->actor->id, LOGGER_DEBUG);
+                       logger("Found contact for url ".$actor, LOGGER_DEBUG);
                        $contact_id = $contact[0]["id"];
                } else {
-                       logger("No contact found for url ".$single_conv->actor->id, LOGGER_DEBUG);
+                       logger("No contact found for url ".$actor, LOGGER_DEBUG);
+
+                       // Adding a global contact
+                       // To-Do: Use this data for the post
+                       $global_contact_id = get_contact($actor, 0);
+
+                       logger("Global contact ".$global_contact_id." found for url ".$actor, LOGGER_DEBUG);
+
                        $contact_id = $parent["contact-id"];
                }
 
                $arr = array();
                $arr["network"] = NETWORK_OSTATUS;
                $arr["uri"] = $single_conv->id;
-               $arr["plink"] = $single_conv->id;
+               $arr["plink"] = $plink;
                $arr["uid"] = $message["uid"];
                $arr["contact-id"] = $contact_id;
                if ($parent["id"] != 0)
@@ -182,17 +234,26 @@ function complete_conversation($itemid, $conversation_url, $only_add_conversatio
                if ($arr["owner-name"] == '')
                        $arr["owner-name"] =  $single_conv->actor->displayName;
 
-               $arr["owner-link"] = $single_conv->actor->id;
+               $arr["owner-link"] = $actor;
                $arr["owner-avatar"] = $single_conv->actor->image->url;
                //$arr["author-name"] = $single_conv->actor->contact->displayName;
                //$arr["author-name"] = $single_conv->actor->contact->preferredUsername;
                $arr["author-name"] = $arr["owner-name"];
-               $arr["author-link"] = $single_conv->actor->id;
+               $arr["author-link"] = $actor;
                $arr["author-avatar"] = $single_conv->actor->image->url;
                $arr["body"] = html2bbcode($single_conv->content);
-               $arr["app"] = strip_tags($single_conv->statusnet_notice_info->source);
-               if ($arr["app"] == "")
+
+               if (isset($single_conv->status_net->notice_info->source))
+                       $arr["app"] = strip_tags($single_conv->status_net->notice_info->source);
+               elseif (isset($single_conv->statusnet->notice_info->source))
+                       $arr["app"] = strip_tags($single_conv->statusnet->notice_info->source);
+               elseif (isset($single_conv->statusnet_notice_info->source))
+                       $arr["app"] = strip_tags($single_conv->statusnet_notice_info->source);
+               elseif (isset($single_conv->provider->displayName))
                        $arr["app"] = $single_conv->provider->displayName;
+               else
+                       $arr["app"] = "OStatus";
+
                $arr["verb"] = $parent["verb"];
                $arr["visible"] = $parent["visible"];
                $arr["location"] = $single_conv->location->displayName;
@@ -206,6 +267,8 @@ function complete_conversation($itemid, $conversation_url, $only_add_conversatio
 
                $newitem = item_store($arr);
 
+               logger('Stored new item '.$plink.' under id '.$newitem, LOGGER_DEBUG);
+
                // Add the conversation entry (but don't fetch the whole conversation)
                complete_conversation($newitem, $conversation_url, true);
 
index 05fd56d023f9d7a8b06df2f44f779cf042e17ca6..1db959093f3f29e9d64670ccff8fa2dac4b41f63 100644 (file)
@@ -4,7 +4,9 @@ function advanced_profile(&$a) {
 
        $o = '';
 
-       $o .= '<h2>' . t('Profile') . '</h2>';
+       $o .= replace_macros(get_markup_template("section_title.tpl"),array(
+               '$title' => t('Profile')
+       ));
 
        if($a->profile['name']) {
 
@@ -81,13 +83,13 @@ function advanced_profile(&$a) {
                if($txt = prepare_text($a->profile['education'])) $profile['education'] = array( t('School/education:'), $txt );
                
                if ($a->profile['uid'] == local_user())
-      $profile['edit'] = array($a->get_baseurl(). '/profiles/'.$a->profile['id'], t('Edit profile'),"", t('Edit profile'));
+                       $profile['edit'] = array($a->get_baseurl(). '/profiles/'.$a->profile['id'], t('Edit profile'),"", t('Edit profile'));
                
-        return replace_macros($tpl, array(
-          '$title' => t('Profile'),
-          '$profile' => $profile
-        ));
-    }
+               return replace_macros($tpl, array(
+                       '$title' => t('Profile'),
+                       '$profile' => $profile
+               ));
+       }
 
        return '';
 }
diff --git a/include/pubsubpublish.php b/include/pubsubpublish.php
new file mode 100644 (file)
index 0000000..bc81fd7
--- /dev/null
@@ -0,0 +1,113 @@
+<?php
+require_once("boot.php");
+
+function handle_pubsubhubbub() {
+       global $a, $db;
+
+       logger('start');
+
+       // We'll push to each subscriber that has push > 0,
+       // i.e. there has been an update (set in notifier.php).
+
+       $r = q("SELECT * FROM `push_subscriber` WHERE `push` > 0");
+
+       foreach($r as $rr) {
+               $params = get_feed_for($a, '', $rr['nickname'], $rr['last_update'], 0, true);
+               $hmac_sig = hash_hmac("sha1", $params, $rr['secret']);
+
+               $headers = array("Content-type: application/atom+xml",
+                                               sprintf("Link: <%s>;rel=hub," .
+                                                               "<%s>;rel=self",
+                                                               $a->get_baseurl() . '/pubsubhubbub',
+                                                               $rr['topic']),
+                                               "X-Hub-Signature: sha1=" . $hmac_sig);
+
+               logger('POST '. print_r($headers, true)."\n".$params, LOGGER_DEBUG);
+
+               post_url($rr['callback_url'], $params, $headers);
+               $ret = $a->get_curl_code();
+
+               if ($ret >= 200 && $ret <= 299) {
+                       logger('successfully pushed to '.$rr['callback_url']);
+
+                       // set last_update to "now", and reset push=0
+                       $date_now = datetime_convert('UTC','UTC','now','Y-m-d H:i:s');
+                       q("UPDATE `push_subscriber` SET `push` = 0, last_update = '%s' WHERE id = %d",
+                               dbesc($date_now),
+                               intval($rr['id']));
+
+               } else {
+                       logger('error when pushing to '.$rr['callback_url'].' HTTP: '.$ret);
+
+                       // we use the push variable also as a counter, if we failed we
+                       // increment this until some upper limit where we give up
+                       $new_push = intval($rr['push']) + 1;
+
+                       if ($new_push > 30) // OK, let's give up
+                               $new_push = 0;
+
+                       q("UPDATE `push_subscriber` SET `push` = %d WHERE id = %d",
+                               $new_push,
+                               intval($rr['id']));
+               }
+       }
+
+       logger('done');
+}
+
+
+function pubsubpublish_run(&$argv, &$argc){
+       global $a, $db;
+
+       if(is_null($a)){
+               $a = new App;
+       }
+
+       if(is_null($db)){
+               @include(".htconfig.php");
+               require_once("include/dba.php");
+               $db = new dba($db_host, $db_user, $db_pass, $db_data);
+               unset($db_host, $db_user, $db_pass, $db_data);
+       };
+
+       require_once('include/items.php');
+       require_once('include/pidfile.php');
+
+       load_config('config');
+       load_config('system');
+
+       $lockpath = get_lockpath();
+       if ($lockpath != '') {
+               $pidfile = new pidfile($lockpath, 'pubsubpublish');
+               if($pidfile->is_already_running()) {
+                       logger("Already running");
+                       if ($pidfile->running_time() > 9*60) {
+                               $pidfile->kill();
+                               logger("killed stale process");
+                               // Calling a new instance
+                               proc_run('php',"include/pubsubpublish.php");
+                       }
+                       return;
+               }
+       }
+
+       $a->set_baseurl(get_config('system','url'));
+
+       load_hooks();
+
+       if($argc > 1)
+               $pubsubpublish_id = intval($argv[1]);
+       else
+               $pubsubpublish_id = 0;
+
+       handle_pubsubhubbub();
+
+       return;
+
+}
+
+if (array_search(__file__,get_included_files())===0){
+  pubsubpublish_run($_SERVER["argv"],$_SERVER["argc"]);
+  killme();
+}
+
index 128dfcba57dd25dc18e8d339468680f5aa03551a..0edd64fdb1bec08558c233e670e9a5f08a182c73 100644 (file)
@@ -2,64 +2,6 @@
 require_once("boot.php");
 require_once('include/queue_fn.php');
 
-function handle_pubsubhubbub() {
-       global $a, $db;
-
-       logger('queue [pubsubhubbub]: start');
-
-       // We'll push to each subscriber that has push > 0,
-       // i.e. there has been an update (set in notifier.php).
-
-       $r = q("SELECT * FROM `push_subscriber` WHERE `push` > 0");
-
-       foreach($r as $rr) {
-               $params = get_feed_for($a, '', $rr['nickname'], $rr['last_update']);
-               $hmac_sig = hash_hmac("sha1", $params, $rr['secret']);
-
-               $headers = array("Content-type: application/atom+xml",
-                                                sprintf("Link: <%s>;rel=hub," .
-                                                                "<%s>;rel=self",
-                                                                $a->get_baseurl() . '/pubsubhubbub',
-                                                                $rr['topic']),
-                                                "X-Hub-Signature: sha1=" . $hmac_sig);
-
-               logger('queue [pubsubhubbub]: POST', $headers);
-
-               post_url($rr['callback_url'], $params, $headers);
-               $ret = $a->get_curl_code();
-
-               if ($ret >= 200 && $ret <= 299) {
-                       logger('queue [pubsubhubbub]: successfully pushed to ' .
-                                  $rr['callback_url']);
-
-                       // set last_update to "now", and reset push=0
-                       $date_now = datetime_convert('UTC','UTC','now','Y-m-d H:i:s');
-                       q("UPDATE `push_subscriber` SET `push` = 0, last_update = '%s' " .
-                         "WHERE id = %d",
-                         dbesc($date_now),
-                         intval($rr['id']));
-
-               } else {
-                       logger('queue [pubsubhubbub]: error when pushing to ' .
-                                  $rr['callback_url'] . 'HTTP: ', $ret);
-
-                       // we use the push variable also as a counter, if we failed we
-                       // increment this until some upper limit where we give up
-                       $new_push = intval($rr['push']) + 1;
-
-                       if ($new_push > 30) // OK, let's give up
-                               $new_push = 0;
-
-                       q("UPDATE `push_subscriber` SET `push` = %d, last_update = '%s' " .
-                         "WHERE id = %d",
-                         $new_push,
-                         dbesc($date_now),
-                         intval($rr['id']));
-               }
-       }
-}
-
-
 function queue_run(&$argv, &$argc){
        global $a, $db;
 
@@ -112,7 +54,8 @@ function queue_run(&$argv, &$argc){
 
        logger('queue: start');
 
-       handle_pubsubhubbub();
+       // Handling the pubsubhubbub requests
+       proc_run('php','include/pubsubpublish.php');
 
        $interval = ((get_config('system','delivery_interval') === false) ? 2 : intval(get_config('system','delivery_interval')));
 
@@ -126,8 +69,8 @@ function queue_run(&$argv, &$argc){
                }
        }
 
-       $r = q("SELECT `queue`.*, `contact`.`name`, `contact`.`uid` FROM `queue` 
-               INNER JOIN `contact` ON `queue`.`cid` = `contact`.`id` 
+       $r = q("SELECT `queue`.*, `contact`.`name`, `contact`.`uid` FROM `queue`
+               INNER JOIN `contact` ON `queue`.`cid` = `contact`.`id`
                WHERE `queue`.`created` < UTC_TIMESTAMP() - INTERVAL 3 DAY");
        if($r) {
                foreach($r as $rr) {
index 0f6c83234b2852df1f4256e2ae603aa1acd621ba..f8bbfcee2436ee224694e65e24d247367419a1b8 100644 (file)
@@ -835,10 +835,16 @@ function get_mentions($item) {
        foreach($arr as $x) {
                $matches = null;
                if(preg_match('/@\[url=([^\]]*)\]/',$x,$matches)) {
-                       $o .= "\t\t" . '<link rel="mentioned" href="' . $matches[1] . '" />' . "\r\n";
                        $o .= "\t\t" . '<link rel="ostatus:attention" href="' . $matches[1] . '" />' . "\r\n";
+                       $o .= "\t\t" . '<link rel="mentioned" href="' . $matches[1] . '" />' . "\r\n";
                }
        }
+
+       if (!$item['private']) {
+                       $o .= "\t\t".'<link rel="ostatus:attention" href="http://activityschema.org/collection/public"/>'."\r\n";
+                       $o .= "\t\t".'<link rel="mentioned" href="http://activityschema.org/collection/public"/>'."\r\n";
+       }
+
        return $o;
 }}
 
index f675b8e29ca1b4080a8f583e821ba6ac34954be1..1a45775fb2908fb715d87c2c162864231f6d0249 100644 (file)
@@ -20,18 +20,22 @@ function allfriends_content(&$a) {
                intval(local_user())
        );
 
-       $a->page['aside'] .= '<div class="vcard">' 
-               . '<div class="fn label">' . $c[0]['name'] . '</div>' 
-               . '<div id="profile-photo-wrapper">'
-               . '<a href="/contacts/' . $cid . '"><img class="photo" width="175" height="175" 
-               src="' . $c[0]['photo'] . '" alt="' . $c[0]['name'] . '" /></div>'
-               . '</div>';
-       
+       $vcard_widget .= replace_macros(get_markup_template("vcard-widget.tpl"),array(
+               '$name'  => $c[0]['name'],
+               '$photo' => $c[0]['photo'],
+               'url'    => z_root() . '/contacts/' . $cid
+       ));
+
+       if(! x($a->page,'aside'))
+               $a->page['aside'] = '';
+       $a->page['aside'] .= $vcard_widget;
 
        if(! count($c))
                return;
 
-       $o .= '<h2>' . sprintf( t('Friends of %s'), $c[0]['name']) . '</h2>';
+       $o .= replace_macros(get_markup_template("section_title.tpl"),array(
+               '$title' => sprintf( t('Friends of %s'), $c[0]['name'])
+       ));
 
 
        $r = all_friends(local_user(),$cid);
index 617b5b670a17eddc1db76b356d3f9d71f6e54f1b..3118d124790938116b8fb4dc4ffce06d5b55e8c0 100644 (file)
@@ -28,18 +28,22 @@ function common_content(&$a) {
                );
        }       
 
-       $a->page['aside'] .= '<div class="vcard">' 
-               . '<div class="fn label">' . $c[0]['name'] . '</div>' 
-               . '<div id="profile-photo-wrapper">'
-               . '<img class="photo" width="175" height="175" 
-               src="' . $c[0]['photo'] . '" alt="' . $c[0]['name'] . '" /></div>'
-               . '</div>';
-       
+       $vcard_widget .= replace_macros(get_markup_template("vcard-widget.tpl"),array(
+               '$name' => $c[0]['name'],
+               '$photo' => $c[0]['photo'],
+               'url' => z_root() . '/contacts/' . $cid
+       ));
+
+       if(! x($a->page,'aside'))
+               $a->page['aside'] = '';
+       $a->page['aside'] .= $vcard_widget;
 
        if(! count($c))
                return;
 
-       $o .= '<h2>' . t('Common Friends') . '</h2>';
+       $o .= replace_macros(get_markup_template("section_title.tpl"),array(
+               '$title' => t('Common Friends')
+       ));
 
 
        if(! $cid) {
index 1e44bf160c508e2e13f6e3078c7fa2d53eaa03a5..e20345307d9b9b74644485e7bc5d5df3dbcbef8f 100644 (file)
@@ -131,7 +131,9 @@ function content_content(&$a, $update = 0) {
                }
 
                $sql_extra = " AND `item`.`parent` IN ( SELECT DISTINCT(`parent`) FROM `item` WHERE 1 $sql_options AND ( `contact-id` IN ( $contact_str ) OR `allow_gid` like '" . protect_sprintf('%<' . intval($group) . '>%') . "' ) and deleted = 0 ) ";
-               $o = '<h2>' . t('Group: ') . $r[0]['name'] . '</h2>' . $o;
+               $o = replace_macros(get_markup_template("section_title.tpl"),array(
+                       '$title' => sprintf( t('Group: %s'), $r[0]['name'])
+               )) . $o;
        }
        elseif($cid) {
 
index 55231faf7dd1e0cb77344080ef366969fd548435..457a06685db35df037ebfd41c2796b961caf0195 100644 (file)
@@ -22,11 +22,12 @@ function crepair_init(&$a) {
 
        if($contact_id) {
                        $a->data['contact'] = $r[0];
-                       $o .= '<div class="vcard">';
-                       $o .= '<div class="fn">' . $a->data['contact']['name'] . '</div>';
-                       $o .= '<div id="profile-photo-wrapper"><img class="photo" style="width: 175px; height: 175px;" src="' . $a->data['contact']['photo'] . '" alt="' . $a->data['contact']['name'] . '" /></div>';
-                       $o .= '</div>';
-                       $a->page['aside'] .= $o;
+                        $tpl = get_markup_template("vcard-widget.tpl");
+                        $vcard_widget .= replace_macros($tpl, array(
+                                '$name' => $a->data['contact']['name'],
+                                '$photo' => $a->data['contact']['photo']
+                        ));
+                       $a->page['aside'] .= $vcard_widget;
 
        }
 }
index 5c5d0e933ac5856444811e4479409f4cdcbbd93e..0c6d79480f5fc17ac120451b8c84ef64849885dc 100644 (file)
@@ -23,8 +23,10 @@ function dirfind_content(&$a) {
        
        $o = '';
 
-       $o .= '<h2>' . t('People Search') . ' - ' . $search . '</h2>';
-       
+       $o .= replace_macros(get_markup_template("section_title.tpl"),array(
+               '$title' => sprintf( t('People Search - %s'), $search)
+       ));
+
        if($search) {
 
                $p = (($a->pager['page'] != 1) ? '&p=' . $a->pager['page'] : '');
index 3b8c1128193b2e4ddc195efd4eabfdc1ba61ba6b..0319f200b3f9168628189f726e07fb5f39c41ef7 100644 (file)
@@ -36,12 +36,14 @@ function editpost_content(&$a) {
                $plaintext = false;
 
 
-       $o .= '<h2>' . t('Edit post') . '</h2>';
+       $o .= replace_macros(get_markup_template("section_title.tpl"),array(
+               '$title' => t('Edit post')
+       ));
 
        $tpl = get_markup_template('jot-header.tpl');
        $a->page['htmlhead'] .= replace_macros($tpl, array(
                '$baseurl' => $a->get_baseurl(),
-               '$editselect' =>  (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
+               '$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
                '$ispublic' => '&nbsp;', // t('Visible to <strong>everybody</strong>'),
                '$geotag' => $geotag,
                '$nickname' => $a->user['nickname']
index b9401ee82541cfaea8d2e86194967f424e73b8cb..95f95d024f728754ebcd5fbb5c174c1b3279d7ad 100755 (executable)
@@ -14,8 +14,11 @@ function follow_content(&$a) {
        $uid = local_user();
        $url = notags(trim($_REQUEST['url']));
 
-       $r = q("SELECT `url` FROM `contact` WHERE `uid` = %d AND (`nurl` = '%s' OR `alias` = '%s' OR `alias` = '%s') LIMIT 1",
-               intval(local_user()), dbesc(normalise_link($url)), dbesc(normalise_link($url)), dbesc($url));
+       $r = q("SELECT `url` FROM `contact` WHERE `uid` = %d AND
+               (`nurl` = '%s' OR `alias` = '%s' OR `alias` = '%s') AND
+               `network` != '%s' LIMIT 1",
+               intval(local_user()), dbesc(normalise_link($url)),
+               dbesc(normalise_link($url)), dbesc($url), dbesc(NETWORK_STATUSNET));
 
        if ($r) {
                notice(t('You already added this contact.').EOL);
index ec6f81f6bf92fe2de1ac269f5dcb3941ca6c107a..27bd5108d2df7dfe95c08c7089428b96b798aaa8 100644 (file)
@@ -144,6 +144,7 @@ function item_post(&$a) {
                                                $parent_contact["nurl"] = normalise_link($probed_contact["url"]);
                                                $parent_contact["thumb"] = $probed_contact["photo"];
                                                $parent_contact["micro"] = $probed_contact["photo"];
+                                               $parent_contact["addr"] = $probed_contact["addr"];
                                        }
                                        logger('parent contact: '.print_r($parent_contact, true), LOGGER_DEBUG);
                                } else
@@ -569,10 +570,32 @@ function item_post(&$a) {
         * and we are replying, and there isn't one already
         */
 
-       if(($parent_contact) && ($parent_contact['network'] === NETWORK_OSTATUS)
-               && ($parent_contact['nick']) && (! in_array('@' . $parent_contact['nick'],$tags))) {
-               $body = '@' . $parent_contact['nick'] . ' ' . $body;
-               $tags[] = '@' . $parent_contact['nick'];
+       if ($parent_contact['id'] != "")
+               $contact = '@'.$parent_contact['nick'].'+'.$parent_contact['id'];
+       //elseif ($parent_contact['addr'] != "")
+       //      $contact = '@'.$parent_contact['addr'];
+       else
+               $contact = '@[url='.$parent_contact['url'].']'.$parent_contact['nick'].'[/url]';
+
+       if ($parent_contact && ($parent_contact['network'] === NETWORK_OSTATUS)) {
+               if (($parent_contact['nick']) && (!in_array($contact,$tags))) {
+                       $body = $contact.' '.$body;
+                       $tags[] = $contact;
+               }
+
+               $toplevel_contact = "";
+               $toplevel_parent = q("SELECT `contact`.* FROM `contact` INNER JOIN `item` ON `item`.`contact-id` = `contact`.`id`
+                                       WHERE `item`.`id` = `item`.`parent` AND `item`.`parent` = %d", intval($parent));
+               if ($toplevel_parent)
+                       $toplevel_contact = '@'.$toplevel_parent[0]['nick'].'+'.$toplevel_parent[0]['id'];
+               else {
+                       $toplevel_parent = q("SELECT `author-link`, `author-name` FROM `item` WHERE `id` = `parent` AND `parent` = %d", intval($parent));
+                       $toplevel_contact = '@[url='.$toplevel_parent[0]['author-link'].']'.$toplevel_parent[0]['author-name'].'[/url]';
+               }
+
+               if ($toplevel_contact != "")
+                       if (!in_array($toplevel_contact,$tags))
+                               $tags[] = $toplevel_contact;
        }
 
        $tagged = array();
index aa0a69fc954441e12ad4322b569672e95b5c6901..7773636420658cc015c2db7a4076d5ad9e40b589 100644 (file)
@@ -9,7 +9,9 @@ function match_content(&$a) {
 
        $_SESSION['return_url'] = $a->get_baseurl() . '/' . $a->cmd;
 
-       $o .= '<h2>' . t('Profile Match') . '</h2>';
+       $o .= replace_macros(get_markup_template("section_title.tpl"),array(
+               '$title' => t('Profile Match')
+       ));
 
        $r = q("SELECT `pub_keywords`, `prv_keywords` FROM `profile` WHERE `is-default` = 1 AND `uid` = %d LIMIT 1",
                intval(local_user())
index fafee97c072f9c5cf90b42326afb461ede0c1c30..7b3c92e249eede43583f728bb7f8db026f357e61 100644 (file)
@@ -55,19 +55,19 @@ function network_init(&$a) {
                                '',             //all
                                '',             //postord
                                '',             //conv
-                               '/new', //new
+                               '/new',         //new
                                '',             //starred
                                '',             //bookmarked
                                '',             //spam
                        );
                        $tab_args = array(
                                'f=&order=comment',     //all
-                               'f=&order=post',                //postord
-                               'f=&conv=1',                    //conv
-                               '',                                     //new
-                               'f=&star=1',                    //starred
-                               'f=&bmark=1',                   //bookmarked
-                               'f=&spam=1',                    //spam
+                               'f=&order=post',        //postord
+                               'f=&conv=1',            //conv
+                               '',                     //new
+                               'f=&star=1',            //starred
+                               'f=&bmark=1',           //bookmarked
+                               'f=&spam=1',            //spam
                        );
 
                        $k = array_search('active', $last_sel_tabs);
@@ -139,7 +139,9 @@ function network_init(&$a) {
 
        // search terms header
        if(x($_GET,'search')) {
-               $a->page['content'] .= '<h2>' . t('Search Results For:') . ' '  . $search . '</h2>';
+               $a->page['content'] .= replace_macros(get_markup_template("section_title.tpl"),array(
+                       '$title' => sprintf( t('Search Results For: %s'), $search)
+               ));
        }
 
        $a->page['aside'] .= (feature_enabled(local_user(),'groups') ? group_side('network/0','network',true,$group_id) : '');
@@ -179,11 +181,11 @@ function saved_searches($search) {
        if(count($r)) {
                foreach($r as $rr) {
                        $saved[] = array(
-                               'id'            => $rr['id'],
-                               'term'                  => $rr['term'],
+                               'id'            => $rr['id'],
+                               'term'          => $rr['term'],
                                'encodedterm'   => urlencode($rr['term']),
-                               'delete'                => t('Remove term'),
-                               'selected'              => ($search==$rr['term']),
+                               'delete'        => t('Remove term'),
+                               'selected'      => ($search==$rr['term']),
                        );
                }
        }
@@ -191,10 +193,10 @@ function saved_searches($search) {
 
        $tpl = get_markup_template("saved_searches_aside.tpl");
        $o = replace_macros($tpl, array(
-               '$title'         => t('Saved Searches'),
-               '$add'           => t('add'),
-               '$searchbox' => search($search,'netsearch-box',$srchurl,true),
-               '$saved'         => $saved,
+               '$title'        => t('Saved Searches'),
+               '$add'          => t('add'),
+               '$searchbox'    => search($search,'netsearch-box',$srchurl,true),
+               '$saved'        => $saved,
        ));
 
        return $o;
@@ -479,10 +481,12 @@ function network_content(&$a, $update = 0) {
                        'allow_location' => $a->user['allow_location'],
                        'default_location' => $a->user['default-location'],
                        'nickname' => $a->user['nickname'],
-                       'lockstate' => ((($group) || ($cid) || ($nets) || (is_array($a->user) && ((strlen($a->user['allow_cid'])) || (strlen($a->user['allow_gid'])) || (strlen($a->user['deny_cid'])) || (strlen($a->user['deny_gid']))))) ? 'lock' : 'unlock'),
-                       'default_perms' => get_acl_permissions($a->user),
-                       'acl' => populate_acl((($group || $cid || $nets) ? $def_acl : $a->user), $celeb),
-                       'bang' => (($group || $cid || $nets) ? '!' : ''),
+                       'lockstate'=> ((($group) || ($cid) || ($nets) || (is_array($a->user) && 
+                                       ((strlen($a->user['allow_cid'])) || (strlen($a->user['allow_gid'])) || 
+                                       (strlen($a->user['deny_cid'])) || (strlen($a->user['deny_gid']))))) ? 'lock' : 'unlock'),
+                       'default_perms' => get_acl_permissions($a->user),
+                       'acl'   => populate_acl((($group || $cid || $nets) ? $def_acl : $a->user), $celeb),
+                       'bang'  => (($group || $cid || $nets) ? '!' : ''),
                        'visitor' => 'block',
                        'profile_uid' => local_user(),
                        'acl_data' => construct_acl_data($a, $a->user), // For non-Javascript ACL selector
@@ -537,25 +541,39 @@ function network_content(&$a, $update = 0) {
                                $contact_str_self = ",".$self[0]["id"];
                }
                else {
-                               $contact_str = ' 0 ';
-                               info( t('Group is empty'));
+                       $contact_str = ' 0 ';
+                       info( t('Group is empty'));
                }
 
                //$sql_post_table = " INNER JOIN (SELECT DISTINCT(`parent`) FROM `item` WHERE (`contact-id` IN ($contact_str) OR `allow_gid` like '".protect_sprintf('%<'.intval($group).'>%')."') and deleted = 0 ORDER BY `created` DESC) AS `temp1` ON $sql_table.$sql_parent = `temp1`.`parent` ";
 
                $sql_extra3 .= " AND `contact-id` IN ($contact_str$contact_str_self) ";
-               $sql_extra3 .= " AND EXISTS (SELECT id FROM `item` WHERE (`contact-id` IN ($contact_str)  OR `allow_gid` like '".protect_sprintf('%<'.intval($group).'>%')."') and deleted = 0 AND parent = $sql_table.$sql_parent) ";
-               $o = '<h2>' . t('Group: ') . $r[0]['name'] . '</h2>' . $o;
-       } elseif($cid) {
+               $sql_extra3 .= " AND EXISTS (SELECT id FROM `item` WHERE (`contact-id` IN ($contact_str) 
+                               OR `allow_gid` like '".protect_sprintf('%<'.intval($group).'>%')."') and deleted = 0 
+                               AND parent = $sql_table.$sql_parent) ";
+
+               $o = replace_macros(get_markup_template("section_title.tpl"),array(
+                       '$title' => sprintf( t('Group: %s'), $r[0]['name'])
+               )) . $o;
+
+       }
+       elseif($cid) {
 
                $r = q("SELECT `id`,`name`,`network`,`writable`,`nurl` FROM `contact` WHERE `id` = %d
                                AND `blocked` = 0 AND `pending` = 0 LIMIT 1",
                        intval($cid)
                );
                if(count($r)) {
-                       $sql_post_table = " INNER JOIN (SELECT DISTINCT(`parent`) FROM `item` WHERE 1 $sql_options AND `contact-id` = ".intval($cid)." and deleted = 0 ORDER BY `item`.`received` DESC) AS `temp1` ON $sql_table.$sql_parent = `temp1`.`parent` ";
+                       $sql_post_table = " INNER JOIN (SELECT DISTINCT(`parent`) FROM `item` 
+                                           WHERE 1 $sql_options AND `contact-id` = ".intval($cid)." and deleted = 0 
+                                           ORDER BY `item`.`received` DESC) AS `temp1` 
+                                           ON $sql_table.$sql_parent = `temp1`.`parent` ";
                        $sql_extra = "";
-                       $o = '<h2>' . t('Contact: ') . $r[0]['name'] . '</h2>' . $o;
+
+                       $o = replace_macros(get_markup_template("section_title.tpl"),array(
+                               '$title' => sprintf( t('Contact: %s'), $r[0]['name'])
+                       )) . $o;
+
                        if($r[0]['network'] === NETWORK_OSTATUS && $r[0]['writable'] && (! get_pconfig(local_user(),'system','nowarn_insecure'))) {
                                notice( t('Private messages to this person are at risk of public disclosure.') . EOL);
                        }
index f8bba01b00cd0de593986470127ed752e86c681d..02ae0e76d24181233f1e955024fe4b2c4772cc78 100644 (file)
@@ -30,49 +30,70 @@ function photos_init(&$a) {
 
                $a->data['user'] = $r[0];
 
-               $o .= '<div class="vcard">';
-               $o .= '<div class="fn">' . $a->data['user']['username'] . '</div>';
-               $o .= '<div id="profile-photo-wrapper"><img class="photo" style="width: 175px; height: 175px;" src="' . $a->get_cached_avatar_image($a->get_baseurl() . '/photo/profile/' . $a->data['user']['uid'] . '.jpg') . '" alt="' . $a->data['user']['username'] . '" /></div>';
-               $o .= '</div>';
+                $profilephoto = $a->get_cached_avatar_image($a->get_baseurl() . '/photo/profile/' . $a->data['user']['uid'] . '.jpg');
 
+                $tpl = get_markup_template("vcard-widget.tpl");
 
-               $sql_extra = permissions_sql($a->data['user']['uid']);
-
-               $albums = q("SELECT distinct(`album`) AS `album` FROM `photo` WHERE `uid` = %d $sql_extra order by created desc",
-                       intval($a->data['user']['uid'])
-               );
+               $vcard_widget .= replace_macros($tpl, array(
+                        '$name' => $a->data['user']['username'],
+                        '$photo' => $profilephoto
+                ));
 
-               if(count($albums)) {
-                       $a->data['albums'] = $albums;
 
-                       $albums_visible = ((intval($a->data['user']['hidewall']) && (! local_user()) && (! remote_user())) ? false : true);     
-
-                       if($albums_visible) {
-                               $o .= '<div id="side-bar-photos-albums" class="widget">';
-                               $o .= '<h3>' . '<a href="' . $a->get_baseurl() . '/photos/' . $a->data['user']['nickname'] . '">' . t('Photo Albums') . '</a></h3>';
-
-                               $o .= '<ul>';
-                               foreach($albums as $album) {
+               $sql_extra = permissions_sql($a->data['user']['uid']);
 
-                                       // don't show contact photos. We once translated this name, but then you could still access it under
-                                       // a different language setting. Now we store the name in English and check in English (and translated for legacy albums).
+               $albums = q("SELECT count(distinct `resource-id`) AS `total`, `album` FROM `photo` WHERE `uid` = %d  AND `album` != '%s' AND `album` != '%s' 
+                        $sql_extra group by album order by created desc",
+                       intval($a->data['user']['uid']),
+                        dbesc('Contact Photos'),
+                        dbesc( t('Contact Photos'))
+               );
 
-                                       if((! strlen($album['album'])) || ($album['album'] === 'Contact Photos') || ($album['album'] === t('Contact Photos')))
-                                               continue;
-                                       $o .= '<li>' . '<a href="photos/' . $a->argv[1] . '/album/' . bin2hex($album['album']) . '" >' . $album['album'] . '</a></li>'; 
-                               }
-                               $o .= '</ul>';
-                       }
-                       if(local_user() && $a->data['user']['uid'] == local_user()) {
-                               $o .= '<div id="photo-albums-upload-link"><a href="' . $a->get_baseurl() . '/photos/' . $a->data['user']['nickname'] . '/upload" >' .t('Upload New Photos') . '</a></div>';
-                       }
+                $albums_visible = ((intval($a->data['user']['hidewall']) && (! local_user()) && (! remote_user())) ? false : true);
+
+                // add various encodings to the array so we can just loop through and pick them out in a template
+                $ret = array('success' => false);
+
+                if($albums) {
+                        $a->data['albums'] = $albums;
+                        if ($albums_visible)
+                                $ret['success'] = true;
+
+                        $ret['albums'] = array();
+                        foreach($albums as $k => $album) {
+                                $entry = array(
+                                        'text'      => $album['album'],
+                                        'total'     => $album['total'],
+                                        'url'       => z_root() . '/photos/' . $a->data['user']['nickname'] . '/album/' . bin2hex($album['album']),
+                                        'urlencode' => urlencode($album['album']),
+                                        'bin2hex'   => bin2hex($album['album'])
+                                );
+                                $ret['albums'][] = $entry;
+                        }
+                }
+
+                $albums = $ret;
+
+                if(local_user() && $a->data['user']['uid'] == local_user())
+                        $can_post = true;
+
+                if($albums['success']) {
+                        $photo_albums_widget = replace_macros(get_markup_template('photo_albums.tpl'),array(
+                                '$nick'     => $a->data['user']['nickname'],
+                                '$title'    => t('Photo Albums'),
+                                'recent'    => t('Recent Photos'),
+                                '$albums'   => $albums['albums'],
+                                '$baseurl'  => z_root(),
+                                '$upload'   => array( t('Upload New Photos'), $a->get_baseurl() . '/photos/' . $a->data['user']['nickname'] . '/upload'),
+                                '$can_post' => $can_post
+                        ));
+                }
 
-                       $o .= '</div>';
-               }
 
                if(! x($a->page,'aside'))
                        $a->page['aside'] = '';
-               $a->page['aside'] .= $o;
+                $a->page['aside'] .= $vcard_widget;
+                $a->page['aside'] .= $photo_albums_widget;
 
 
                $tpl = get_markup_template("photos_head.tpl");
index 5fc96178501f557c73329779bca13aa95aa427e7..339efc92db5750a075851e428424615aea91686e 100644 (file)
@@ -15,11 +15,11 @@ function search_saved_searches() {
                $saved = array();
                foreach($r as $rr) {
                        $saved[] = array(
-                               'id'            => $rr['id'],
-                               'term'                  => $rr['term'],
-                               'encodedterm'   => urlencode($rr['term']),
-                               'delete'                => t('Remove term'),
-                               'selected'              => ($search==$rr['term']),
+                               'id'            => $rr['id'],
+                               'term'          => $rr['term'],
+                               'encodedterm'   => urlencode($rr['term']),
+                               'delete'        => t('Remove term'),
+                               'selected'      => ($search==$rr['term']),
                        );
                }
 
@@ -27,10 +27,10 @@ function search_saved_searches() {
                $tpl = get_markup_template("saved_searches_aside.tpl");
 
                $o .= replace_macros($tpl, array(
-                       '$title'         => t('Saved Searches'),
-                       '$add'           => '',
-                       '$searchbox' => '',
-                       '$saved'         => $saved,
+                       '$title'        => t('Saved Searches'),
+                       '$add'          => '',
+                       '$searchbox'    => '',
+                       '$saved'        => $saved,
                ));
        }
 
@@ -177,9 +177,13 @@ function search_content(&$a) {
 
 
        if($tag)
-               $o .= '<h2>' . sprintf( t('Items tagged with: %s'), $search) . '</h2>';
+               $title = sprintf( t('Items tagged with: %s'), $search);
        else
-               $o .= '<h2>' . sprintf( t('Search results for: %s'), $search) . '</h2>';
+               $title = sprintf( t('Search results for: %s'), $search);
+
+       $o .= replace_macros(get_markup_template("section_title.tpl"),array(
+               '$title' => $title
+       ));
 
        logger("Start Conversation for '".$search."'", LOGGER_DEBUG);
        $o .= conversation($a,$r,'search',false);
index af16197a04d827a938a8f656cbd8a890ed8a198a..e07e9331146cd1ec8efa4840de23eeb3763d37dd 100644 (file)
@@ -65,7 +65,9 @@ function suggest_content(&$a) {
        $a->page['aside'] .= findpeople_widget();
 
 
-       $o .= '<h2>' . t('Friend Suggestions') . '</h2>';
+       $o .= replace_macros(get_markup_template("section_title.tpl"),array(
+               '$title' => t('Friend Suggestions')
+       ));
 
 
        $r = suggestion_query(local_user());
index 607c900eb5cbccadf7a2be326a9105e884f5d0b2..943a9d09f2bf7ca07cc935022d5e2c329b6706cc 100644 (file)
@@ -28,10 +28,14 @@ function videos_init(&$a) {
 
                $a->data['user'] = $r[0];
 
-               $o .= '<div class="vcard">';
-               $o .= '<div class="fn">' . $a->data['user']['username'] . '</div>';
-               $o .= '<div id="profile-photo-wrapper"><img class="photo" style="width: 175px; height: 175px;" src="' . $a->get_cached_avatar_image($a->get_baseurl() . '/photo/profile/' . $a->data['user']['uid'] . '.jpg') . '" alt="' . $a->data['user']['username'] . '" /></div>';
-               $o .= '</div>';
+                $profilephoto = $a->get_cached_avatar_image($a->get_baseurl() . '/photo/profile/' . $a->data['user']['uid'] . '.jpg');
+
+                $tpl = get_markup_template("vcard-widget.tpl");
+
+               $vcard_widget = replace_macros($tpl, array(
+                        '$name' => $a->data['user']['username'],
+                        '$photo' => $profilephoto
+                ));
 
 
                /*$sql_extra = permissions_sql($a->data['user']['uid']);
@@ -70,7 +74,7 @@ function videos_init(&$a) {
 
                if(! x($a->page,'aside'))
                        $a->page['aside'] = '';
-               $a->page['aside'] .= $o;
+               $a->page['aside'] .= $vcard_widget;
 
 
                $tpl = get_markup_template("videos_head.tpl");
index 45a754c5d3797bb46ddb49eecc3192b4b8dd862f..ca4b4cbb19357659cc59969261d396b0829a9d03 100644 (file)
@@ -30,8 +30,8 @@ msgid ""
 msgstr ""
 "Project-Id-Version: friendica\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-05-21 10:43+0200\n"
-"PO-Revision-Date: 2015-05-22 14:55+0000\n"
+"POT-Creation-Date: 2015-05-24 10:38+0200\n"
+"PO-Revision-Date: 2015-05-29 06:44+0000\n"
 "Last-Translator: bavatar <tobias.diekershoff@gmx.net>\n"
 "Language-Team: German (http://www.transifex.com/projects/p/friendica/language/de/)\n"
 "MIME-Version: 1.0\n"
@@ -51,9 +51,9 @@ msgstr ""
 #: ../../mod/photos.php:1084 ../../mod/photos.php:1203
 #: ../../mod/photos.php:1514 ../../mod/photos.php:1565
 #: ../../mod/photos.php:1609 ../../mod/photos.php:1697
-#: ../../mod/invite.php:140 ../../mod/events.php:491 ../../mod/mood.php:137
+#: ../../mod/invite.php:140 ../../mod/events.php:500 ../../mod/mood.php:137
 #: ../../mod/message.php:335 ../../mod/message.php:564
-#: ../../mod/profiles.php:686 ../../mod/install.php:248
+#: ../../mod/profiles.php:682 ../../mod/install.php:248
 #: ../../mod/install.php:286 ../../mod/crepair.php:190
 #: ../../mod/content.php:710 ../../mod/poke.php:199 ../../mod/localtime.php:45
 msgid "Submit"
@@ -255,7 +255,7 @@ msgid "Your photos"
 msgstr "Deine Fotos"
 
 #: ../../view/theme/diabook/theme.php:127 ../../boot.php:2156
-#: ../../include/nav.php:80 ../../mod/events.php:382
+#: ../../include/nav.php:80 ../../mod/events.php:385
 msgid "Events"
 msgstr "Veranstaltungen"
 
@@ -282,7 +282,7 @@ msgid "event"
 msgstr "Veranstaltung"
 
 #: ../../view/theme/diabook/theme.php:466
-#: ../../view/theme/diabook/theme.php:475 ../../include/diaspora.php:2060
+#: ../../view/theme/diabook/theme.php:475 ../../include/diaspora.php:2061
 #: ../../include/conversation.php:121 ../../include/conversation.php:130
 #: ../../include/conversation.php:248 ../../include/conversation.php:257
 #: ../../mod/like.php:149 ../../mod/like.php:319 ../../mod/subthread.php:87
@@ -290,14 +290,14 @@ msgstr "Veranstaltung"
 msgid "status"
 msgstr "Status"
 
-#: ../../view/theme/diabook/theme.php:471 ../../include/diaspora.php:2060
+#: ../../view/theme/diabook/theme.php:471 ../../include/diaspora.php:2061
 #: ../../include/conversation.php:126 ../../include/conversation.php:253
 #: ../../include/text.php:1995 ../../mod/like.php:149
 #: ../../mod/subthread.php:87 ../../mod/tagger.php:62
 msgid "photo"
 msgstr "Foto"
 
-#: ../../view/theme/diabook/theme.php:480 ../../include/diaspora.php:2076
+#: ../../view/theme/diabook/theme.php:480 ../../include/diaspora.php:2077
 #: ../../include/conversation.php:137 ../../mod/like.php:166
 #, php-format
 msgid "%1$s likes %2$s's %3$s"
@@ -397,7 +397,7 @@ msgstr "Seite nicht gefunden."
 msgid "Permission denied"
 msgstr "Zugriff verweigert"
 
-#: ../../index.php:382 ../../include/items.php:4838 ../../mod/attach.php:33
+#: ../../index.php:382 ../../include/items.php:4851 ../../mod/attach.php:33
 #: ../../mod/wallmessage.php:9 ../../mod/wallmessage.php:33
 #: ../../mod/wallmessage.php:79 ../../mod/wallmessage.php:103
 #: ../../mod/group.php:19 ../../mod/delegate.php:12
@@ -411,9 +411,9 @@ msgstr "Zugriff verweigert"
 #: ../../mod/notes.php:20 ../../mod/network.php:4 ../../mod/photos.php:134
 #: ../../mod/photos.php:1050 ../../mod/follow.php:9 ../../mod/follow.php:39
 #: ../../mod/follow.php:78 ../../mod/uimport.php:23 ../../mod/invite.php:15
-#: ../../mod/invite.php:101 ../../mod/events.php:152 ../../mod/mood.php:114
+#: ../../mod/invite.php:101 ../../mod/events.php:155 ../../mod/mood.php:114
 #: ../../mod/message.php:38 ../../mod/message.php:174
-#: ../../mod/profiles.php:165 ../../mod/profiles.php:618
+#: ../../mod/profiles.php:165 ../../mod/profiles.php:614
 #: ../../mod/install.php:151 ../../mod/crepair.php:119 ../../mod/poke.php:135
 #: ../../mod/display.php:501 ../../mod/dfrn_confirm.php:55
 #: ../../mod/item.php:169 ../../mod/item.php:185
@@ -437,8 +437,9 @@ msgstr "Diesen Beitrag löschen?"
 msgid "Comment"
 msgstr "Kommentar"
 
-#: ../../boot.php:751 ../../include/contact_widgets.php:205
-#: ../../object/Item.php:393 ../../mod/content.php:606
+#: ../../boot.php:751 ../../include/items.php:4962
+#: ../../include/contact_widgets.php:205 ../../object/Item.php:393
+#: ../../mod/content.php:606
 msgid "show more"
 msgstr "mehr anzeigen"
 
@@ -537,28 +538,28 @@ msgstr "Profile"
 msgid "Manage/edit profiles"
 msgstr "Profile verwalten/editieren"
 
-#: ../../boot.php:1600 ../../boot.php:1626 ../../mod/profiles.php:804
+#: ../../boot.php:1600 ../../boot.php:1626 ../../mod/profiles.php:800
 msgid "Change profile photo"
 msgstr "Profilbild ändern"
 
-#: ../../boot.php:1601 ../../mod/profiles.php:805
+#: ../../boot.php:1601 ../../mod/profiles.php:801
 msgid "Create New Profile"
 msgstr "Neues Profil anlegen"
 
-#: ../../boot.php:1611 ../../mod/profiles.php:816
+#: ../../boot.php:1611 ../../mod/profiles.php:812
 msgid "Profile Image"
 msgstr "Profilbild"
 
-#: ../../boot.php:1614 ../../mod/profiles.php:818
+#: ../../boot.php:1614 ../../mod/profiles.php:814
 msgid "visible to everybody"
 msgstr "sichtbar für jeden"
 
-#: ../../boot.php:1615 ../../mod/profiles.php:819
+#: ../../boot.php:1615 ../../mod/profiles.php:815
 msgid "Edit visibility"
 msgstr "Sichtbarkeit bearbeiten"
 
 #: ../../boot.php:1637 ../../include/event.php:42
-#: ../../include/bb2diaspora.php:155 ../../mod/events.php:483
+#: ../../include/bb2diaspora.php:155 ../../mod/events.php:492
 #: ../../mod/directory.php:136
 msgid "Location:"
 msgstr "Ort:"
@@ -825,12 +826,12 @@ msgstr "Benachrichtigungen für Beiträge Stumm schalten"
 msgid "Ability to mute notifications for a thread"
 msgstr "Möglichkeit Benachrichtigungen für einen Thread abbestellen zu können"
 
-#: ../../include/items.php:2330 ../../include/datetime.php:477
+#: ../../include/items.php:2330 ../../include/datetime.php:457
 #, php-format
 msgid "%s's birthday"
 msgstr "%ss Geburtstag"
 
-#: ../../include/items.php:2331 ../../include/datetime.php:478
+#: ../../include/items.php:2331 ../../include/datetime.php:458
 #, php-format
 msgid "Happy Birthday %s"
 msgstr "Herzlichen Glückwunsch %s"
@@ -861,21 +862,22 @@ msgstr "Möchtest Du wirklich dieses Item löschen?"
 #: ../../mod/contacts.php:411 ../../mod/register.php:233
 #: ../../mod/dfrn_request.php:845 ../../mod/api.php:105
 #: ../../mod/suggest.php:29 ../../mod/follow.php:54 ../../mod/message.php:209
-#: ../../mod/profiles.php:661 ../../mod/profiles.php:664
+#: ../../mod/profiles.php:657 ../../mod/profiles.php:660
 msgid "Yes"
 msgstr "Ja"
 
 #: ../../include/items.php:4686 ../../include/conversation.php:1128
 #: ../../mod/settings.php:622 ../../mod/settings.php:648
-#: ../../mod/contacts.php:414 ../../mod/editpost.php:148
-#: ../../mod/dfrn_request.php:859 ../../mod/fbrowser.php:81
-#: ../../mod/fbrowser.php:116 ../../mod/suggest.php:32
-#: ../../mod/photos.php:203 ../../mod/photos.php:292 ../../mod/follow.php:65
-#: ../../mod/tagrm.php:11 ../../mod/tagrm.php:94 ../../mod/message.php:212
+#: ../../mod/contacts.php:414 ../../mod/videos.php:116
+#: ../../mod/editpost.php:148 ../../mod/dfrn_request.php:859
+#: ../../mod/fbrowser.php:81 ../../mod/fbrowser.php:116
+#: ../../mod/suggest.php:32 ../../mod/photos.php:203 ../../mod/photos.php:292
+#: ../../mod/follow.php:65 ../../mod/tagrm.php:11 ../../mod/tagrm.php:94
+#: ../../mod/message.php:212
 msgid "Cancel"
 msgstr "Abbrechen"
 
-#: ../../include/items.php:4904
+#: ../../include/items.php:4956
 msgid "Archives"
 msgstr "Archiv"
 
@@ -1371,11 +1373,11 @@ msgstr "Alter:"
 msgid "for %1$d %2$s"
 msgstr "für %1$d %2$s"
 
-#: ../../include/profile_advanced.php:46 ../../mod/profiles.php:714
+#: ../../include/profile_advanced.php:46 ../../mod/profiles.php:710
 msgid "Sexual Preference:"
 msgstr "Sexuelle Vorlieben:"
 
-#: ../../include/profile_advanced.php:50 ../../mod/profiles.php:716
+#: ../../include/profile_advanced.php:50 ../../mod/profiles.php:712
 msgid "Hometown:"
 msgstr "Heimatort:"
 
@@ -1383,7 +1385,7 @@ msgstr "Heimatort:"
 msgid "Tags:"
 msgstr "Tags"
 
-#: ../../include/profile_advanced.php:54 ../../mod/profiles.php:717
+#: ../../include/profile_advanced.php:54 ../../mod/profiles.php:713
 msgid "Political Views:"
 msgstr "Politische Ansichten:"
 
@@ -1395,11 +1397,11 @@ msgstr "Religion:"
 msgid "Hobbies/Interests:"
 msgstr "Hobbies/Interessen:"
 
-#: ../../include/profile_advanced.php:62 ../../mod/profiles.php:721
+#: ../../include/profile_advanced.php:62 ../../mod/profiles.php:717
 msgid "Likes:"
 msgstr "Likes:"
 
-#: ../../include/profile_advanced.php:64 ../../mod/profiles.php:722
+#: ../../include/profile_advanced.php:64 ../../mod/profiles.php:718
 msgid "Dislikes:"
 msgstr "Dislikes:"
 
@@ -1804,71 +1806,75 @@ msgstr "Es sind Fehler beim Bearbeiten der Datenbank aufgetreten."
 msgid "Miscellaneous"
 msgstr "Verschiedenes"
 
-#: ../../include/datetime.php:153 ../../include/datetime.php:290
-msgid "year"
-msgstr "Jahr"
-
-#: ../../include/datetime.php:158 ../../include/datetime.php:291
-msgid "month"
-msgstr "Monat"
-
-#: ../../include/datetime.php:163 ../../include/datetime.php:293
-msgid "day"
-msgstr "Tag"
+#: ../../include/datetime.php:141
+msgid "YYYY-MM-DD or MM-DD"
+msgstr "YYYY-MM-DD oder MM-DD"
 
-#: ../../include/datetime.php:276
+#: ../../include/datetime.php:256
 msgid "never"
 msgstr "nie"
 
-#: ../../include/datetime.php:282
+#: ../../include/datetime.php:262
 msgid "less than a second ago"
 msgstr "vor weniger als einer Sekunde"
 
-#: ../../include/datetime.php:290
+#: ../../include/datetime.php:270
+msgid "year"
+msgstr "Jahr"
+
+#: ../../include/datetime.php:270
 msgid "years"
 msgstr "Jahre"
 
-#: ../../include/datetime.php:291
+#: ../../include/datetime.php:271
+msgid "month"
+msgstr "Monat"
+
+#: ../../include/datetime.php:271
 msgid "months"
 msgstr "Monate"
 
-#: ../../include/datetime.php:292
+#: ../../include/datetime.php:272
 msgid "week"
 msgstr "Woche"
 
-#: ../../include/datetime.php:292
+#: ../../include/datetime.php:272
 msgid "weeks"
 msgstr "Wochen"
 
-#: ../../include/datetime.php:293
+#: ../../include/datetime.php:273
+msgid "day"
+msgstr "Tag"
+
+#: ../../include/datetime.php:273
 msgid "days"
 msgstr "Tage"
 
-#: ../../include/datetime.php:294
+#: ../../include/datetime.php:274
 msgid "hour"
 msgstr "Stunde"
 
-#: ../../include/datetime.php:294
+#: ../../include/datetime.php:274
 msgid "hours"
 msgstr "Stunden"
 
-#: ../../include/datetime.php:295
+#: ../../include/datetime.php:275
 msgid "minute"
 msgstr "Minute"
 
-#: ../../include/datetime.php:295
+#: ../../include/datetime.php:275
 msgid "minutes"
 msgstr "Minuten"
 
-#: ../../include/datetime.php:296
+#: ../../include/datetime.php:276
 msgid "second"
 msgstr "Sekunde"
 
-#: ../../include/datetime.php:296
+#: ../../include/datetime.php:276
 msgid "seconds"
 msgstr "Sekunden"
 
-#: ../../include/datetime.php:305
+#: ../../include/datetime.php:285
 #, php-format
 msgid "%1$d %2$s ago"
 msgstr "%1$d %2$s her"
@@ -2007,7 +2013,7 @@ msgstr "%1$s ist nun mit %2$s befreundet"
 msgid "Sharing notification from Diaspora network"
 msgstr "Freigabe-Benachrichtigung von Diaspora"
 
-#: ../../include/diaspora.php:2493
+#: ../../include/diaspora.php:2494
 msgid "Attachments:"
 msgstr "Anhänge:"
 
@@ -2282,7 +2288,7 @@ msgstr "Z.B.: bob@example.com, mary@example.com"
 #: ../../include/conversation.php:1125 ../../object/Item.php:690
 #: ../../mod/editpost.php:145 ../../mod/photos.php:1566
 #: ../../mod/photos.php:1610 ../../mod/photos.php:1698
-#: ../../mod/events.php:489 ../../mod/content.php:719
+#: ../../mod/events.php:498 ../../mod/content.php:719
 msgid "Preview"
 msgstr "Vorschau"
 
@@ -2554,7 +2560,7 @@ msgstr "November"
 msgid "December"
 msgstr "Dezember"
 
-#: ../../include/text.php:1424 ../../mod/videos.php:301
+#: ../../include/text.php:1424 ../../mod/videos.php:368
 msgid "View Video"
 msgstr "Video ansehen"
 
@@ -2567,7 +2573,7 @@ msgid "Click to open/close"
 msgstr "Zum öffnen/schließen klicken"
 
 #: ../../include/text.php:1674 ../../include/text.php:1684
-#: ../../mod/events.php:347
+#: ../../mod/events.php:350
 msgid "link to source"
 msgstr "Link zum Originalbeitrag"
 
@@ -3885,8 +3891,8 @@ msgstr "Darf Dein Standardprofil im Verzeichnis dieses Servers veröffentlicht w
 #: ../../mod/settings.php:1108 ../../mod/settings.php:1109
 #: ../../mod/settings.php:1110 ../../mod/register.php:234
 #: ../../mod/dfrn_request.php:845 ../../mod/api.php:106
-#: ../../mod/follow.php:54 ../../mod/profiles.php:661
-#: ../../mod/profiles.php:665
+#: ../../mod/follow.php:54 ../../mod/profiles.php:657
+#: ../../mod/profiles.php:661
 msgid "No"
 msgstr "Nein"
 
@@ -4661,30 +4667,38 @@ msgstr "Der Zugriff zu diesem Profil wurde eingeschränkt."
 msgid "Tips for New Members"
 msgstr "Tipps für neue Nutzer"
 
-#: ../../mod/videos.php:115 ../../mod/dfrn_request.php:777
+#: ../../mod/videos.php:108
+msgid "Do you really want to delete this video?"
+msgstr "Möchtest Du dieses Video wirklich löschen?"
+
+#: ../../mod/videos.php:113
+msgid "Delete Video"
+msgstr "Video Löschen"
+
+#: ../../mod/videos.php:182 ../../mod/dfrn_request.php:777
 #: ../../mod/viewcontacts.php:19 ../../mod/photos.php:920
 #: ../../mod/search.php:89 ../../mod/community.php:18
 #: ../../mod/display.php:214 ../../mod/directory.php:33
 msgid "Public access denied."
 msgstr "Öffentlicher Zugriff verweigert."
 
-#: ../../mod/videos.php:125
+#: ../../mod/videos.php:192
 msgid "No videos selected"
 msgstr "Keine Videos  ausgewählt"
 
-#: ../../mod/videos.php:226 ../../mod/photos.php:1031
+#: ../../mod/videos.php:293 ../../mod/photos.php:1031
 msgid "Access to this item is restricted."
 msgstr "Zugriff zu diesem Eintrag wurde eingeschränkt."
 
-#: ../../mod/videos.php:308 ../../mod/photos.php:1808
+#: ../../mod/videos.php:375 ../../mod/photos.php:1808
 msgid "View Album"
 msgstr "Album betrachten"
 
-#: ../../mod/videos.php:317
+#: ../../mod/videos.php:384
 msgid "Recent Videos"
 msgstr "Neueste Videos"
 
-#: ../../mod/videos.php:319
+#: ../../mod/videos.php:386
 msgid "Upload New Videos"
 msgstr "Neues Video hochladen"
 
@@ -6653,72 +6667,67 @@ msgstr "Keine Schlüsselwörter zum Abgleichen gefunden. Bitte füge einige Schl
 msgid "is interested in:"
 msgstr "ist interessiert an:"
 
-#: ../../mod/events.php:68 ../../mod/events.php:70
+#: ../../mod/events.php:71 ../../mod/events.php:73
 msgid "Event title and start time are required."
 msgstr "Der Veranstaltungstitel und die Anfangszeit müssen angegeben werden."
 
-#: ../../mod/events.php:303
+#: ../../mod/events.php:306
 msgid "l, F j"
 msgstr "l, F j"
 
-#: ../../mod/events.php:325
+#: ../../mod/events.php:328
 msgid "Edit event"
 msgstr "Veranstaltung bearbeiten"
 
-#: ../../mod/events.php:383
+#: ../../mod/events.php:386
 msgid "Create New Event"
 msgstr "Neue Veranstaltung erstellen"
 
-#: ../../mod/events.php:384
+#: ../../mod/events.php:387
 msgid "Previous"
 msgstr "Vorherige"
 
-#: ../../mod/events.php:385 ../../mod/install.php:207
+#: ../../mod/events.php:388 ../../mod/install.php:207
 msgid "Next"
 msgstr "Nächste"
 
-#: ../../mod/events.php:458
-msgid "hour:minute"
-msgstr "Stunde:Minute"
-
-#: ../../mod/events.php:468
+#: ../../mod/events.php:480
 msgid "Event details"
 msgstr "Veranstaltungsdetails"
 
-#: ../../mod/events.php:469
-#, php-format
-msgid "Format is %s %s. Starting date and Title are required."
-msgstr "Das Format ist %s %s. Beginnzeitpunkt und Titel werden benötigt."
+#: ../../mod/events.php:481
+msgid "Starting date and Title are required."
+msgstr "Anfangszeitpunkt und Titel werden benötigt"
 
-#: ../../mod/events.php:471
+#: ../../mod/events.php:482
 msgid "Event Starts:"
 msgstr "Veranstaltungsbeginn:"
 
-#: ../../mod/events.php:471 ../../mod/events.php:485
+#: ../../mod/events.php:482 ../../mod/events.php:494
 msgid "Required"
 msgstr "Benötigt"
 
-#: ../../mod/events.php:474
+#: ../../mod/events.php:484
 msgid "Finish date/time is not known or not relevant"
 msgstr "Enddatum/-zeit ist nicht bekannt oder nicht relevant"
 
-#: ../../mod/events.php:476
+#: ../../mod/events.php:486
 msgid "Event Finishes:"
 msgstr "Veranstaltungsende:"
 
-#: ../../mod/events.php:479
+#: ../../mod/events.php:488
 msgid "Adjust for viewer timezone"
 msgstr "An Zeitzone des Betrachters anpassen"
 
-#: ../../mod/events.php:481
+#: ../../mod/events.php:490
 msgid "Description:"
 msgstr "Beschreibung"
 
-#: ../../mod/events.php:485
+#: ../../mod/events.php:494
 msgid "Title:"
 msgstr "Titel:"
 
-#: ../../mod/events.php:487
+#: ../../mod/events.php:496
 msgid "Share this event"
 msgstr "Veranstaltung teilen"
 
@@ -6853,7 +6862,7 @@ msgid "Not available."
 msgstr "Nicht verfügbar."
 
 #: ../../mod/profiles.php:18 ../../mod/profiles.php:133
-#: ../../mod/profiles.php:179 ../../mod/profiles.php:630
+#: ../../mod/profiles.php:179 ../../mod/profiles.php:626
 #: ../../mod/dfrn_confirm.php:64
 msgid "Profile not found."
 msgstr "Profil nicht gefunden."
@@ -6878,278 +6887,277 @@ msgstr "Profil nicht zum Duplizieren verfügbar."
 msgid "Profile Name is required."
 msgstr "Profilname ist erforderlich."
 
-#: ../../mod/profiles.php:340
+#: ../../mod/profiles.php:336
 msgid "Marital Status"
 msgstr "Familienstand"
 
-#: ../../mod/profiles.php:344
+#: ../../mod/profiles.php:340
 msgid "Romantic Partner"
 msgstr "Romanze"
 
-#: ../../mod/profiles.php:348
+#: ../../mod/profiles.php:344
 msgid "Likes"
 msgstr "Likes"
 
-#: ../../mod/profiles.php:352
+#: ../../mod/profiles.php:348
 msgid "Dislikes"
 msgstr "Dislikes"
 
-#: ../../mod/profiles.php:356
+#: ../../mod/profiles.php:352
 msgid "Work/Employment"
 msgstr "Arbeit / Beschäftigung"
 
-#: ../../mod/profiles.php:359
+#: ../../mod/profiles.php:355
 msgid "Religion"
 msgstr "Religion"
 
-#: ../../mod/profiles.php:363
+#: ../../mod/profiles.php:359
 msgid "Political Views"
 msgstr "Politische Ansichten"
 
-#: ../../mod/profiles.php:367
+#: ../../mod/profiles.php:363
 msgid "Gender"
 msgstr "Geschlecht"
 
-#: ../../mod/profiles.php:371
+#: ../../mod/profiles.php:367
 msgid "Sexual Preference"
 msgstr "Sexuelle Vorlieben"
 
-#: ../../mod/profiles.php:375
+#: ../../mod/profiles.php:371
 msgid "Homepage"
 msgstr "Webseite"
 
-#: ../../mod/profiles.php:379 ../../mod/profiles.php:698
+#: ../../mod/profiles.php:375 ../../mod/profiles.php:694
 msgid "Interests"
 msgstr "Interessen"
 
-#: ../../mod/profiles.php:383
+#: ../../mod/profiles.php:379
 msgid "Address"
 msgstr "Adresse"
 
-#: ../../mod/profiles.php:390 ../../mod/profiles.php:694
+#: ../../mod/profiles.php:386 ../../mod/profiles.php:690
 msgid "Location"
 msgstr "Wohnort"
 
-#: ../../mod/profiles.php:473
+#: ../../mod/profiles.php:469
 msgid "Profile updated."
 msgstr "Profil aktualisiert."
 
-#: ../../mod/profiles.php:568
+#: ../../mod/profiles.php:564
 msgid " and "
 msgstr " und "
 
-#: ../../mod/profiles.php:576
+#: ../../mod/profiles.php:572
 msgid "public profile"
 msgstr "öffentliches Profil"
 
-#: ../../mod/profiles.php:579
+#: ../../mod/profiles.php:575
 #, php-format
 msgid "%1$s changed %2$s to &ldquo;%3$s&rdquo;"
 msgstr "%1$s hat %2$s geändert auf &ldquo;%3$s&rdquo;"
 
-#: ../../mod/profiles.php:580
+#: ../../mod/profiles.php:576
 #, php-format
 msgid " - Visit %1$s's %2$s"
 msgstr " – %1$ss %2$s besuchen"
 
-#: ../../mod/profiles.php:583
+#: ../../mod/profiles.php:579
 #, php-format
 msgid "%1$s has an updated %2$s, changing %3$s."
 msgstr "%1$s hat folgendes aktualisiert %2$s, verändert wurde %3$s."
 
-#: ../../mod/profiles.php:658
+#: ../../mod/profiles.php:654
 msgid "Hide contacts and friends:"
 msgstr "Kontakte und Freunde verbergen"
 
-#: ../../mod/profiles.php:663
+#: ../../mod/profiles.php:659
 msgid "Hide your contact/friend list from viewers of this profile?"
 msgstr "Liste der Kontakte vor Betrachtern dieses Profils verbergen?"
 
-#: ../../mod/profiles.php:685
+#: ../../mod/profiles.php:681
 msgid "Edit Profile Details"
 msgstr "Profil bearbeiten"
 
-#: ../../mod/profiles.php:687
+#: ../../mod/profiles.php:683
 msgid "Change Profile Photo"
 msgstr "Profilbild ändern"
 
-#: ../../mod/profiles.php:688
+#: ../../mod/profiles.php:684
 msgid "View this profile"
 msgstr "Dieses Profil anzeigen"
 
-#: ../../mod/profiles.php:689
+#: ../../mod/profiles.php:685
 msgid "Create a new profile using these settings"
 msgstr "Neues Profil anlegen und diese Einstellungen verwenden"
 
-#: ../../mod/profiles.php:690
+#: ../../mod/profiles.php:686
 msgid "Clone this profile"
 msgstr "Dieses Profil duplizieren"
 
-#: ../../mod/profiles.php:691
+#: ../../mod/profiles.php:687
 msgid "Delete this profile"
 msgstr "Dieses Profil löschen"
 
-#: ../../mod/profiles.php:692
+#: ../../mod/profiles.php:688
 msgid "Basic information"
 msgstr "Grundinformationen"
 
-#: ../../mod/profiles.php:693
+#: ../../mod/profiles.php:689
 msgid "Profile picture"
 msgstr "Profilbild"
 
-#: ../../mod/profiles.php:695
+#: ../../mod/profiles.php:691
 msgid "Preferences"
 msgstr "Vorlieben"
 
-#: ../../mod/profiles.php:696
+#: ../../mod/profiles.php:692
 msgid "Status information"
 msgstr "Status Informationen"
 
-#: ../../mod/profiles.php:697
+#: ../../mod/profiles.php:693
 msgid "Additional information"
 msgstr "Zusätzliche Informationen"
 
-#: ../../mod/profiles.php:699 ../../mod/newmember.php:36
+#: ../../mod/profiles.php:695 ../../mod/newmember.php:36
 #: ../../mod/profile_photo.php:244
 msgid "Upload Profile Photo"
 msgstr "Profilbild hochladen"
 
-#: ../../mod/profiles.php:700
+#: ../../mod/profiles.php:696
 msgid "Profile Name:"
 msgstr "Profilname:"
 
-#: ../../mod/profiles.php:701
+#: ../../mod/profiles.php:697
 msgid "Your Full Name:"
 msgstr "Dein kompletter Name:"
 
-#: ../../mod/profiles.php:702
+#: ../../mod/profiles.php:698
 msgid "Title/Description:"
 msgstr "Titel/Beschreibung:"
 
-#: ../../mod/profiles.php:703
+#: ../../mod/profiles.php:699
 msgid "Your Gender:"
 msgstr "Dein Geschlecht:"
 
-#: ../../mod/profiles.php:704
-#, php-format
-msgid "Birthday (%s):"
-msgstr "Geburtstag (%s):"
+#: ../../mod/profiles.php:700
+msgid "Birthday :"
+msgstr "Geburtstag :"
 
-#: ../../mod/profiles.php:705
+#: ../../mod/profiles.php:701
 msgid "Street Address:"
 msgstr "Adresse:"
 
-#: ../../mod/profiles.php:706
+#: ../../mod/profiles.php:702
 msgid "Locality/City:"
 msgstr "Wohnort:"
 
-#: ../../mod/profiles.php:707
+#: ../../mod/profiles.php:703
 msgid "Postal/Zip Code:"
 msgstr "Postleitzahl:"
 
-#: ../../mod/profiles.php:708
+#: ../../mod/profiles.php:704
 msgid "Country:"
 msgstr "Land:"
 
-#: ../../mod/profiles.php:709
+#: ../../mod/profiles.php:705
 msgid "Region/State:"
 msgstr "Region/Bundesstaat:"
 
-#: ../../mod/profiles.php:710
+#: ../../mod/profiles.php:706
 msgid "<span class=\"heart\">&hearts;</span> Marital Status:"
 msgstr "<span class=\"heart\">&hearts;</span> Beziehungsstatus:"
 
-#: ../../mod/profiles.php:711
+#: ../../mod/profiles.php:707
 msgid "Who: (if applicable)"
 msgstr "Wer: (falls anwendbar)"
 
-#: ../../mod/profiles.php:712
+#: ../../mod/profiles.php:708
 msgid "Examples: cathy123, Cathy Williams, cathy@example.com"
 msgstr "Beispiele: cathy123, Cathy Williams, cathy@example.com"
 
-#: ../../mod/profiles.php:713
+#: ../../mod/profiles.php:709
 msgid "Since [date]:"
 msgstr "Seit [Datum]:"
 
-#: ../../mod/profiles.php:715
+#: ../../mod/profiles.php:711
 msgid "Homepage URL:"
 msgstr "Adresse der Homepage:"
 
-#: ../../mod/profiles.php:718
+#: ../../mod/profiles.php:714
 msgid "Religious Views:"
 msgstr "Religiöse Ansichten:"
 
-#: ../../mod/profiles.php:719
+#: ../../mod/profiles.php:715
 msgid "Public Keywords:"
 msgstr "Öffentliche Schlüsselwörter:"
 
-#: ../../mod/profiles.php:720
+#: ../../mod/profiles.php:716
 msgid "Private Keywords:"
 msgstr "Private Schlüsselwörter:"
 
-#: ../../mod/profiles.php:723
+#: ../../mod/profiles.php:719
 msgid "Example: fishing photography software"
 msgstr "Beispiel: Fischen Fotografie Software"
 
-#: ../../mod/profiles.php:724
+#: ../../mod/profiles.php:720
 msgid "(Used for suggesting potential friends, can be seen by others)"
 msgstr "(Wird verwendet, um potentielle Freunde zu finden, kann von Fremden eingesehen werden)"
 
-#: ../../mod/profiles.php:725
+#: ../../mod/profiles.php:721
 msgid "(Used for searching profiles, never shown to others)"
 msgstr "(Wird für die Suche nach Profilen verwendet und niemals veröffentlicht)"
 
-#: ../../mod/profiles.php:726
+#: ../../mod/profiles.php:722
 msgid "Tell us about yourself..."
 msgstr "Erzähle uns ein bisschen von Dir …"
 
-#: ../../mod/profiles.php:727
+#: ../../mod/profiles.php:723
 msgid "Hobbies/Interests"
 msgstr "Hobbies/Interessen"
 
-#: ../../mod/profiles.php:728
+#: ../../mod/profiles.php:724
 msgid "Contact information and Social Networks"
 msgstr "Kontaktinformationen und Soziale Netzwerke"
 
-#: ../../mod/profiles.php:729
+#: ../../mod/profiles.php:725
 msgid "Musical interests"
 msgstr "Musikalische Interessen"
 
-#: ../../mod/profiles.php:730
+#: ../../mod/profiles.php:726
 msgid "Books, literature"
 msgstr "Bücher, Literatur"
 
-#: ../../mod/profiles.php:731
+#: ../../mod/profiles.php:727
 msgid "Television"
 msgstr "Fernsehen"
 
-#: ../../mod/profiles.php:732
+#: ../../mod/profiles.php:728
 msgid "Film/dance/culture/entertainment"
 msgstr "Filme/Tänze/Kultur/Unterhaltung"
 
-#: ../../mod/profiles.php:733
+#: ../../mod/profiles.php:729
 msgid "Love/romance"
 msgstr "Liebe/Romantik"
 
-#: ../../mod/profiles.php:734
+#: ../../mod/profiles.php:730
 msgid "Work/employment"
 msgstr "Arbeit/Anstellung"
 
-#: ../../mod/profiles.php:735
+#: ../../mod/profiles.php:731
 msgid "School/education"
 msgstr "Schule/Ausbildung"
 
-#: ../../mod/profiles.php:740
+#: ../../mod/profiles.php:736
 msgid ""
 "This is your <strong>public</strong> profile.<br />It <strong>may</strong> "
 "be visible to anybody using the internet."
 msgstr "Dies ist Dein <strong>öffentliches</strong> Profil.<br />Es <strong>könnte</strong> für jeden Nutzer des Internets sichtbar sein."
 
-#: ../../mod/profiles.php:750 ../../mod/directory.php:113
+#: ../../mod/profiles.php:746 ../../mod/directory.php:113
 msgid "Age: "
 msgstr "Alter: "
 
-#: ../../mod/profiles.php:803
+#: ../../mod/profiles.php:799
 msgid "Edit/Manage Profiles"
 msgstr "Bearbeite/Verwalte Profile"
 
index c243ff56698d90eb34cdbb3f6cdbc64090fb5fbd..e0f1a9f89c96e9a5c8f8961b174c37a35e514b86 100644 (file)
@@ -394,15 +394,16 @@ $a->strings["The error message is\n[pre]%s[/pre]"] = "Die Fehlermeldung lautet\n
 $a->strings["Errors encountered creating database tables."] = "Fehler aufgetreten während der Erzeugung der Datenbanktabellen.";
 $a->strings["Errors encountered performing database changes."] = "Es sind Fehler beim Bearbeiten der Datenbank aufgetreten.";
 $a->strings["Miscellaneous"] = "Verschiedenes";
-$a->strings["year"] = "Jahr";
-$a->strings["month"] = "Monat";
-$a->strings["day"] = "Tag";
+$a->strings["YYYY-MM-DD or MM-DD"] = "YYYY-MM-DD oder MM-DD";
 $a->strings["never"] = "nie";
 $a->strings["less than a second ago"] = "vor weniger als einer Sekunde";
+$a->strings["year"] = "Jahr";
 $a->strings["years"] = "Jahre";
+$a->strings["month"] = "Monat";
 $a->strings["months"] = "Monate";
 $a->strings["week"] = "Woche";
 $a->strings["weeks"] = "Wochen";
+$a->strings["day"] = "Tag";
 $a->strings["days"] = "Tage";
 $a->strings["hour"] = "Stunde";
 $a->strings["hours"] = "Stunden";
@@ -1067,6 +1068,8 @@ $a->strings["Post successful."] = "Beitrag erfolgreich veröffentlicht.";
 $a->strings["System down for maintenance"] = "System zur Wartung abgeschaltet";
 $a->strings["Access to this profile has been restricted."] = "Der Zugriff zu diesem Profil wurde eingeschränkt.";
 $a->strings["Tips for New Members"] = "Tipps für neue Nutzer";
+$a->strings["Do you really want to delete this video?"] = "Möchtest Du dieses Video wirklich löschen?";
+$a->strings["Delete Video"] = "Video Löschen";
 $a->strings["Public access denied."] = "Öffentlicher Zugriff verweigert.";
 $a->strings["No videos selected"] = "Keine Videos  ausgewählt";
 $a->strings["Access to this item is restricted."] = "Zugriff zu diesem Eintrag wurde eingeschränkt.";
@@ -1521,9 +1524,8 @@ $a->strings["Edit event"] = "Veranstaltung bearbeiten";
 $a->strings["Create New Event"] = "Neue Veranstaltung erstellen";
 $a->strings["Previous"] = "Vorherige";
 $a->strings["Next"] = "Nächste";
-$a->strings["hour:minute"] = "Stunde:Minute";
 $a->strings["Event details"] = "Veranstaltungsdetails";
-$a->strings["Format is %s %s. Starting date and Title are required."] = "Das Format ist %s %s. Beginnzeitpunkt und Titel werden benötigt.";
+$a->strings["Starting date and Title are required."] = "Anfangszeitpunkt und Titel werden benötigt";
 $a->strings["Event Starts:"] = "Veranstaltungsbeginn:";
 $a->strings["Required"] = "Benötigt";
 $a->strings["Finish date/time is not known or not relevant"] = "Enddatum/-zeit ist nicht bekannt oder nicht relevant";
@@ -1607,7 +1609,7 @@ $a->strings["Profile Name:"] = "Profilname:";
 $a->strings["Your Full Name:"] = "Dein kompletter Name:";
 $a->strings["Title/Description:"] = "Titel/Beschreibung:";
 $a->strings["Your Gender:"] = "Dein Geschlecht:";
-$a->strings["Birthday (%s):"] = "Geburtstag (%s):";
+$a->strings["Birthday :"] = "Geburtstag :";
 $a->strings["Street Address:"] = "Adresse:";
 $a->strings["Locality/City:"] = "Wohnort:";
 $a->strings["Postal/Zip Code:"] = "Postleitzahl:";
index 628bac7cfc3b3cf61736ba8f4d19544b7158f9c2..0ce3855c58d481f793cf691b924b31abf96e6f3b 100644 (file)
@@ -1,3 +1,6 @@
+/* General style rules .*/
+.pull-right { float: right }
+
 /* List of social Networks */
 img.connector, img.connector-disabled {
   height: 40px;
diff --git a/view/templates/photo_albums.tpl b/view/templates/photo_albums.tpl
new file mode 100644 (file)
index 0000000..02b4392
--- /dev/null
@@ -0,0 +1,17 @@
+<div id="side-bar-photos-albums" class="widget">
+       <h3>{{$title}}</h3>
+       <ul>
+               <li><a href="{{$baseurl}}/photos/{{$nick}}" title="{{$title}}" >{{$recent}}</a></li>
+               {{if $albums}}
+               {{foreach $albums as $al}}
+               {{if $al.text}}
+               <li><a href="{{$baseurl}}/photos/{{$nick}}/album/{{$al.bin2hex}}"><span class="badge pull-right">{{$al.total}}</span>{{$al.text}}</a></li>
+               {{/if}}
+               {{/foreach}}
+               {{/if}}
+       </ul>
+
+        {{if $can_post}}
+        <div class="photos-upload-link" ><a href="{{$upload.1}}">{{$upload.0}}</a></div>
+        {{/if}}
+</div>
diff --git a/view/templates/section_title.tpl b/view/templates/section_title.tpl
new file mode 100644 (file)
index 0000000..8614fb8
--- /dev/null
@@ -0,0 +1,4 @@
+<div class="section-title-wrapper">
+       <h2>{{$title}}</h2>
+       <div class="clear"></div>
+</div>
index bc1a571bea5adb619b39f8ff97a24dda3ecf1bb3..04e26607a1daf67b26e4ed115c23a75979ed3859 100644 (file)
@@ -1,6 +1,9 @@
 
-       <div class="vcard">
-               <div class="fn"><a href="{{$url}}">{{$name}}</a></div>
-               <div id="profile-photo-wrapper"><a href="{{$url}}"><img class="photo" style="width: 175px; height: 175px;" src="{{$photo}}" alt="{{$name}}" /></a></div>
-       </div>
-
+<div class="vcard">
+        <div class="fn">{{$name}}</div>
+        {{if $url}}
+        <div id="profile-photo-wrapper"><a href="{{$url}}"><img class="vcard-photo photo" style="width: 175px; height: 175px;" src="{{$photo}}" alt="{{$name}}" /></a></div>
+        {{else}}
+        <div id="profile-photo-wrapper"><img class="vcard-photo photo" style="width: 175px; height: 175px;" src="{{$photo}}" alt="{{$name}}" /></div>
+        {{/if}}
+</div>
index 34d7f1c25c6b335958bbc51e2977760a63d1845e..5b1e8392db953f1f5534296aae57ae7c1fe4ad7b 100644 (file)
@@ -3367,7 +3367,7 @@ ul.menu-popup {
 #recip {
 
 }
-.autocomplete-w1 { background: #ffffff; no-repeat bottom right; position:absolute; top:0px; left:0px; margin:6px 0 0 6px; /* IE6 fix: */ _background:none; _margin:1px 0 0 0; }
+.autocomplete-w1 { background: #ffffff no-repeat bottom right; position:absolute; top:0px; left:0px; margin:6px 0 0 6px; /* IE6 fix: */ _background:none; _margin:1px 0 0 0; }
 .autocomplete { color:#000; border:1px solid #999; background:#FFF; cursor:default; text-align:left; max-height:350px; overflow:auto; margin:-6px 6px 6px -6px; /* IE6 specific: */ _height:350px;  _margin:0; _overflow-x:hidden; }
 .autocomplete .selected { background:#F0F0F0; }
 .autocomplete div { padding:2px 5px; white-space:nowrap; overflow:hidden; }
@@ -3443,7 +3443,7 @@ ul.menu-popup {
        .nav-ajax-left {margin-left: -1em; margin-top: 0px;     }
        nav #site-location,
        nav #banner { position: relative; clear:both; }
-       ul.menu-popup { left: 0px; top 20px; }
+       ul.menu-popup { left: 0px; top: 20px; }
 
 }
 
index 74ae6c90aa710f0a52639d217ba797b803be91cc..8b87c3bd42549e5f9a40350b04ce96fa1b69a2e4 100644 (file)
@@ -21,7 +21,7 @@ body {
 
 div.container {
        display: block;
-       width: 785 px;
+       width: 785px;
        margin-top: 0px;
        margin-bottom: 0px;
        margin-left: auto;
@@ -111,6 +111,8 @@ blockquote {
        margin-right: 5px;
 }
 
+.pull-right { float: right }
+
 
 
 /* nav */
@@ -4094,7 +4096,7 @@ ul.notifications-menu-popup {
 #recip {
        
 }
-.autocomplete-w1 { background: #ffffff; no-repeat bottom right; position:absolute; top:0px; left:0px; margin:6px 0 0 6px; /* IE6 fix: */ _background:none; _margin:1px 0 0 0; }
+.autocomplete-w1 { background: #ffffff no-repeat bottom right; position:absolute; top:0px; left:0px; margin:6px 0 0 6px; /* IE6 fix: */ _background:none; _margin:1px 0 0 0; }
 .autocomplete { color:#000; border:1px solid #999; background:#FFF; cursor:default; text-align:left; max-height:350px; overflow:auto; margin:-6px 6px 6px -6px; /* IE6 specific: */ _height:350px;  _margin:0; _overflow-x:hidden; }
 .autocomplete .selected { background:#F0F0F0; }
 .autocomplete div { padding:2px 5px; white-space:nowrap; overflow:hidden; }