diff --git a/boot.php b/boot.php index 683daf401..c2690f6ef 100755 --- a/boot.php +++ b/boot.php @@ -9,7 +9,7 @@ require_once('include/nav.php'); require_once('include/cache.php'); define ( 'FRIENDICA_PLATFORM', 'Friendica'); -define ( 'FRIENDICA_VERSION', '2.3.1298' ); +define ( 'FRIENDICA_VERSION', '2.3.1299' ); define ( 'DFRN_PROTOCOL_VERSION', '2.23' ); define ( 'DB_UPDATE_VERSION', 1134 ); @@ -293,6 +293,8 @@ class App { public $nav_sel; + public $category; + private $scheme; private $hostname; private $baseurl; @@ -377,6 +379,9 @@ class App { $this->argc = count($this->argv); if((array_key_exists('0',$this->argv)) && strlen($this->argv[0])) { $this->module = str_replace(".", "_", $this->argv[0]); + if(array_key_exists('2',$this->argv)) { + $this->category = $this->argv[2]; + } } else { $this->argc = 1; diff --git a/doc/Home.md b/doc/Home.md index 56abe8075..30efc93f7 100755 --- a/doc/Home.md +++ b/doc/Home.md @@ -5,6 +5,7 @@ Friendica Documentation and Resources **Contents** * [Account Basics](help/Account-Basics) +* [New User Quick Start](help/guide) * [Profiles](help/Profiles) * [Connectors](help/Connectors) * [Making Friends](help/Making-Friends) diff --git a/doc/andfinally.md b/doc/andfinally.md new file mode 100644 index 000000000..cd8a6994b --- /dev/null +++ b/doc/andfinally.md @@ -0,0 +1,24 @@ +And that brings the Quick Start to an end. + +Here are some more things to help get you started: + +**Groups** + + +- New Here - a group for people new to Friendica + +- Friendica Support - problems? This is the place to ask. + +- Public Stream - a place to talk about anything to anyone. + +- Let's Talk a group for finding people and groups who share similar interests. + +- Local Friendica a page for local Friendica groups + + +**Documentation** + +- Connecting to more networks +- Help Index + + diff --git a/doc/groupsandpages.md b/doc/groupsandpages.md new file mode 100644 index 000000000..418e682c8 --- /dev/null +++ b/doc/groupsandpages.md @@ -0,0 +1,11 @@ +This is the global directory. If you get lost, you can click this link to bring yourself back here. + +On this page, you'll find a collection of groups, forums and celebrity pages. Groups are not real people. Connecting to them is similar to "liking" something on Facebook, or signing up for a new forum. You don't have to feel awkward about introducing yourself to a new person, because they're not people! + +When you connect to a group, all messages to that group will start appearing in your network tab. You can comment on these posts, or post to the group yourself without ever having to add any of the groups members. This is a great way to make friends dynamically - you'll find people you like and add each other naturally instead of adding random strangers. Simply find a group you're interested in, and connect to it the same way you did with people in the last section. There are a lot of groups, and you're likely to get lost. Remember the link at the top of this page will bring you back here. + +Once you've added some groups, move on to the next section. + + + + diff --git a/doc/guide.md b/doc/guide.md new file mode 100644 index 000000000..178170c4e --- /dev/null +++ b/doc/guide.md @@ -0,0 +1,13 @@ +First things first, let's make sure you're logged in to your account. If you're not already logged in, do so in the frame below. + +Once you've logged in (or if you are already logged in), you'll now be looking at your profile page. + +This is a bit like your Facebook wall. It's where all your status messgages are kept, and where your friends come to post on your wall. To write your status, simply click in the box that says "share". When you do this, the box will expand. You can see some formatting options at the top such as Bold, Italics and Underline, as well as ways to add links and pictures. At the bottom you'll find some more links. You can use these to upload pictures and files from your computer, share websites with a bit of preview text, or embed video and audio files from elsewhere on the web. You can also set your post location here. + +Once you've finished writing your post, click on the padlock icon to select who can see it. If you do not use the padlock icon, your post will be public. This means it will appear to anybody who views your profile, and in the community tab if your site has it enabled, as well as in the network tab of any of your contacts. + +Play around with this a bit, then when you're ready to move on, we'll take a look at the Network Tab + + + + diff --git a/doc/makingnewfriends.md b/doc/makingnewfriends.md new file mode 100644 index 000000000..35befaa36 --- /dev/null +++ b/doc/makingnewfriends.md @@ -0,0 +1,11 @@ +This is your Suggested Friends page. If you get lost, you can click this link to bring yourself back here. + +This is a bit like the Friend Suggestions page of Facebook. Everybody on this list has agreed that they may be suggested as a friend. This means they're unlikely to refuse an introduction you send, and they want to meet new people too! + +See somebody you like the look of? Click the connect button beneath their photograph. This will bring you to the introductions page. Fill in the form as instructed, and add a small note (optional). Now, wait a bit and they'll accept your request - note that these are real people, and it might take a while. Now you've added one, you're probably lost. Click the link at the top of this page to go back to the suggested friends list and add some more. + +Feel uncomfortable adding people you don't know? Don't worry - that's where Groups and Pages come in! + + + + diff --git a/doc/network.md b/doc/network.md new file mode 100644 index 000000000..f445b0055 --- /dev/null +++ b/doc/network.md @@ -0,0 +1,9 @@ +This is your Network Tab. If you get lost, you can click this link to bring yourself back here. + +This is a bit like the Newsfeed at Facebook or the Stream at Diaspora. It's where all the posts from your contacts, groups, and feeds will appear. If you're new, you won't see anything in this page, unless you posted your status in the last step. If you've already added a few friends, you'll be able to see their posts. Here, you can comment, like, or dislike posts, or click on somebody's name to visit their profile page where you can write on their wall. + +Now we need to fill it up, the first step, is to add people you already know from Facebook. + + + + diff --git a/doc/peopleyouknow.md b/doc/peopleyouknow.md new file mode 100644 index 000000000..143c49217 --- /dev/null +++ b/doc/peopleyouknow.md @@ -0,0 +1,13 @@ +This is your connector settings page. If you get lost, you can click this link to bring yourself back here. + +This is the bit that makes Friendica unique. You can connect to anybody on the internet from your Friendica account using this page! The available connectors varies depending on which plugins you have installed, but for now, we'll walk you through Facebook. Note that not all servers have the Facebook connector installed. If you can't find it in the list below, don't worry, we'll look at ways of connecting to more people in the following pages. + +The biggest of all social networks is Facebook. Fortunately, this connector is really easy. Scroll down the page, and click Facebook Connector Settings. Enter your Facebook user name and password and let the application (the connector) do everything the options suggest. You can fine tune this or experiment with the other connectors too. If you need help, you can always ask at Friendica Support or see the instructions here. + +When you're ready, we can move on to making new friends. + + + + + + diff --git a/include/contact_widgets.php b/include/contact_widgets.php index 7346b95af..e0f37f078 100755 --- a/include/contact_widgets.php +++ b/include/contact_widgets.php @@ -103,3 +103,31 @@ function fileas_widget($baseurl,$selected = '') { )); } +function categories_widget($baseurl,$selected = '') { + $a = get_app(); + + $saved = get_pconfig($a->profile['profile_uid'],'system','filetags'); + if(! strlen($saved)) + return; + + $matches = false; + $terms = array(); + $cnt = preg_match_all('/<(.*?)>/',$saved,$matches,PREG_SET_ORDER); + if($cnt) { + foreach($matches as $mtch) { + $unescaped = xmlify(file_tag_decode($mtch[1])); + $terms[] = array('name' => $unescaped,'selected' => (($selected == $unescaped) ? 'selected' : '')); + } + } + + return replace_macros(get_markup_template('categories_widget.tpl'),array( + '$title' => t('Categories'), + '$desc' => '', + '$sel_all' => (($selected == '') ? 'selected' : ''), + '$all' => t('Everything'), + '$terms' => $terms, + '$base' => $baseurl, + + )); +} + diff --git a/include/conversation.php b/include/conversation.php index 5a922b2b5..df92a40ed 100755 --- a/include/conversation.php +++ b/include/conversation.php @@ -974,6 +974,8 @@ function status_editor($a,$x, $notes_cid = 0, $popup=false) { '$shortnoloc' => t('clear location'), '$title' => "", '$placeholdertitle' => t('Set title'), + '$category' => "", + '$placeholdercategory' => t('Categories (comma-separated list)'), '$wait' => t('Please wait'), '$permset' => t('Permission settings'), '$shortpermset' => t('permissions'), diff --git a/include/diaspora.php b/include/diaspora.php index 104ccadf2..04238f17c 100755 --- a/include/diaspora.php +++ b/include/diaspora.php @@ -1920,6 +1920,7 @@ function diaspora_send_status($item,$owner,$contact,$public_batch = false) { $images = array(); + $title = $item['title']; $body = $item['body']; /* @@ -1944,9 +1945,12 @@ function diaspora_send_status($item,$owner,$contact,$public_batch = false) { } } */ - $body = xmlify(html_entity_decode(bb2diaspora($body))); + if(strlen($title)) + $body = xmlify('**' . html_entity_decode($title) . '**' . "\n") . $body; + + if($item['attach']) { $cnt = preg_match_all('/href=\"(.*?)\"(.*?)title=\"(.*?)\"/ism',$item['attach'],$matches,PREG_SET_ORDER); if(cnt) { diff --git a/include/items.php b/include/items.php index e09b888ca..ee6960534 100755 --- a/include/items.php +++ b/include/items.php @@ -435,8 +435,15 @@ function get_atom_elements($feed,$item) { $res['body'] = @html2bbcode($res['body']); } - else + elseif(! $have_real_body) { + + // it's not one of our messages and it has no tags + // so it's probably just text. We'll escape it just to be safe. + $res['body'] = escape_tags($res['body']); + } + + // this tag is obsolete but we keep it for really old sites $allow = $item->get_item_tags(NAMESPACE_DFRN,'comment-allow'); if($allow && $allow[0]['data'] == 1) diff --git a/include/text.php b/include/text.php index 191f4fca8..5456b5ad3 100644 --- a/include/text.php +++ b/include/text.php @@ -225,6 +225,9 @@ if(! function_exists('paginate')) { function paginate(&$a) { $o = ''; $stripped = preg_replace('/(&page=[0-9]*)/','',$a->query_string); + +// $stripped = preg_replace('/&zrl=(.*?)([\?&]|$)/ism','',$stripped); + $stripped = str_replace('q=','',$stripped); $stripped = trim($stripped,'/'); $pagenum = $a->pager['page']; @@ -725,6 +728,8 @@ function smilies($s, $sample = false) { '\\o/', 'o.O', 'O.o', + 'o_O', + 'O_o', ":'(", ":-!", ":-/", @@ -759,6 +764,8 @@ function smilies($s, $sample = false) { '\\o/', 'o.O', 'O.o', + 'o_O', + 'O_o', ':\'(', ':-!', ':-/', @@ -1314,6 +1321,118 @@ function file_tag_file_query($table,$s,$type = 'file') { return " AND " . (($table) ? dbesc($table) . '.' : '') . "file regexp '" . dbesc($str) . "' "; } +// ex. given music,video return