Merge branch 'master', remote-tracking branch 'remotes/upstream/master'

* remotes/upstream/master:
  add title to D* posts
  allow users to set categories on their posts
  Modified peopleyouknow to handle sites without Facebook better
  diabook-themes: add link to global dir in "find friends" at right_aside
  modified:   mod/newmember.php
  New user quick start.
  check for style.php existence before inclusion
  Moved Diaspora notes away from top, per user request

* master:
This commit is contained in:
Simon L'nu 2012-04-01 23:56:13 -04:00
commit 5eca42975c
34 changed files with 340 additions and 35 deletions

View File

@ -293,6 +293,8 @@ class App {
public $nav_sel; public $nav_sel;
public $category;
private $scheme; private $scheme;
private $hostname; private $hostname;
private $baseurl; private $baseurl;
@ -377,6 +379,9 @@ class App {
$this->argc = count($this->argv); $this->argc = count($this->argv);
if((array_key_exists('0',$this->argv)) && strlen($this->argv[0])) { if((array_key_exists('0',$this->argv)) && strlen($this->argv[0])) {
$this->module = str_replace(".", "_", $this->argv[0]); $this->module = str_replace(".", "_", $this->argv[0]);
if(array_key_exists('2',$this->argv)) {
$this->category = $this->argv[2];
}
} }
else { else {
$this->argc = 1; $this->argc = 1;

View File

@ -5,6 +5,7 @@ Friendica Documentation and Resources
**Contents** **Contents**
* [Account Basics](help/Account-Basics) * [Account Basics](help/Account-Basics)
* [New User Quick Start](help/guide)
* [Profiles](help/Profiles) * [Profiles](help/Profiles)
* [Connectors](help/Connectors) * [Connectors](help/Connectors)
* [Making Friends](help/Making-Friends) * [Making Friends](help/Making-Friends)

24
doc/andfinally.md Normal file
View File

@ -0,0 +1,24 @@
And that brings the Quick Start to an end.
Here are some more things to help get you started:
**Groups**
- <a href = "https://kakste.com/profile/newhere">New Here</a> - a group for people new to Friendica
- <a href = "http://helpers.pyxis.uberspace.de/profile/helpers">Friendica Support</a> - problems? This is the place to ask.
- <a href = "https://kakste.com/profile/public_stream">Public Stream</a> - a place to talk about anything to anyone.
- <a href = "https://letstalk.pyxis.uberspace.de/profile/letstalk">Let's Talk</a> a group for finding people and groups who share similar interests.
- <a href = "http://newzot.hydra.uberspace.de/profile/newzot">Local Friendica</a> a page for local Friendica groups</a>
**Documentation**
- <a href = "/help/Connectors">Connecting to more networks</a>
- <a href = "/help">Help Index</a>

11
doc/groupsandpages.md Normal file
View File

@ -0,0 +1,11 @@
This is the global directory. If you get lost, you can <a href = "/help/groupsandpages">click this link</a> 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, <a href = "/help/andfinally">move on to the next section</a>.
<iframe src="http://dir.friendica.com/directory/forum" width="950" height = "600"></iframe>

13
doc/guide.md Normal file
View File

@ -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 <a href = "/help/network">Network Tab</a>
<iframe src="/login" width="950" height = "600"></iframe>

11
doc/makingnewfriends.md Normal file
View File

@ -0,0 +1,11 @@
This is your Suggested Friends page. If you get lost, you can <a href = "/help/makenewfriends">click this link</a> 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 <a href = "/help/groupsandpages">Groups and Pages</a> come in!
<iframe src="/suggest" width="950" height = "600"></iframe>

9
doc/network.md Normal file
View File

@ -0,0 +1,9 @@
This is your Network Tab. If you get lost, you can <a href = "/help/network">click this link</a> 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 <a href = "/help/peopleyouknow"> add people you already know from Facebook</a>.
<iframe src="/network" width="950" height = "600"></iframe>

13
doc/peopleyouknow.md Normal file
View File

@ -0,0 +1,13 @@
This is your connector settings page. If you get lost, you can <a href = "/help/network">click this link</a> to bring yourself back here.
This is the bit that makes Friendica unique. You can connect to <i>anybody on the internet</i> 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 <a href = "https://github.com/friendica/friendica/wiki/How-to:-Friendica%E2%80%99s-Facebook-connector" target="new">fine tune this</a> or experiment with the other connectors too. If you need help, you can always ask at <a href = "http://helpers.pyxis.uberspace.de/profile/helpers" target="new">Friendica Support</a> or <a href = "/help/Connectors" target="new">see the instructions here</a>.
When you're ready, we can move on to <a href = "/help/makingnewfriends">making new friends</a>.
<iframe src="/settings/connectors" width="950" height = "600"></iframe>

View File

@ -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,
));
}

View File

@ -974,6 +974,8 @@ function status_editor($a,$x, $notes_cid = 0, $popup=false) {
'$shortnoloc' => t('clear location'), '$shortnoloc' => t('clear location'),
'$title' => "", '$title' => "",
'$placeholdertitle' => t('Set title'), '$placeholdertitle' => t('Set title'),
'$category' => "",
'$placeholdercategory' => t('Categories (comma-separated list)'),
'$wait' => t('Please wait'), '$wait' => t('Please wait'),
'$permset' => t('Permission settings'), '$permset' => t('Permission settings'),
'$shortpermset' => t('permissions'), '$shortpermset' => t('permissions'),

View File

@ -1920,6 +1920,7 @@ function diaspora_send_status($item,$owner,$contact,$public_batch = false) {
$images = array(); $images = array();
$title = $item['title'];
$body = $item['body']; $body = $item['body'];
/* /*
@ -1944,9 +1945,12 @@ function diaspora_send_status($item,$owner,$contact,$public_batch = false) {
} }
} }
*/ */
$body = xmlify(html_entity_decode(bb2diaspora($body))); $body = xmlify(html_entity_decode(bb2diaspora($body)));
if(strlen($title))
$body = xmlify('**' . html_entity_decode($title) . '**' . "\n") . $body;
if($item['attach']) { if($item['attach']) {
$cnt = preg_match_all('/href=\"(.*?)\"(.*?)title=\"(.*?)\"/ism',$item['attach'],$matches,PREG_SET_ORDER); $cnt = preg_match_all('/href=\"(.*?)\"(.*?)title=\"(.*?)\"/ism',$item['attach'],$matches,PREG_SET_ORDER);
if(cnt) { if(cnt) {

View File

@ -1314,6 +1314,118 @@ function file_tag_file_query($table,$s,$type = 'file') {
return " AND " . (($table) ? dbesc($table) . '.' : '') . "file regexp '" . dbesc($str) . "' "; return " AND " . (($table) ? dbesc($table) . '.' : '') . "file regexp '" . dbesc($str) . "' ";
} }
// ex. given music,video return <music><video> or [music][video]
function file_tag_list_to_file($list,$type = 'file') {
$tag_list = '';
if(strlen($list)) {
$list_array = explode(",",$list);
if($type == 'file') {
$lbracket = '[';
$rbracket = ']';
}
else {
$lbracket = '<';
$rbracket = '>';
}
foreach($list_array as $item) {
if(strlen($item)) {
$tag_list .= $lbracket . file_tag_encode(trim($item)) . $rbracket;
}
}
}
return $tag_list;
}
// ex. given <music><video>[friends], return music,video or friends
function file_tag_file_to_list($file,$type = 'file') {
$matches = false;
$list = '';
if($type == 'file') {
$cnt = preg_match_all('/\[(.*?)\]/',$file,$matches,PREG_SET_ORDER);
}
else {
$cnt = preg_match_all('/<(.*?)>/',$file,$matches,PREG_SET_ORDER);
}
if($cnt) {
foreach($matches as $mtch) {
if(strlen($list))
$list .= ',';
$list .= file_tag_decode($mtch[1]);
}
}
return $list;
}
function file_tag_update_pconfig($uid,$file_old,$file_new,$type = 'file') {
// $file_old - categories previously associated with an item
// $file_new - new list of categories for an item
if(! intval($uid))
return false;
if($file_old == $file_new)
return true;
$saved = get_pconfig($uid,'system','filetags');
if(strlen($saved)) {
if($type == 'file') {
$lbracket = '[';
$rbracket = ']';
}
else {
$lbracket = '<';
$rbracket = '>';
}
$filetags_updated = $saved;
// check for new tags to be added as filetags in pconfig
$new_tags = array();
$check_new_tags = explode(",",file_tag_file_to_list($file_new,$type));
foreach($check_new_tags as $tag) {
if(! stristr($saved,$lbracket . file_tag_encode($tag) . $rbracket))
$new_tags[] = $tag;
}
$filetags_updated .= file_tag_list_to_file(implode(",",$new_tags),$type);
// check for deleted tags to be removed from filetags in pconfig
$deleted_tags = array();
$check_deleted_tags = explode(",",file_tag_file_to_list($file_old,$type));
foreach($check_deleted_tags as $tag) {
if(! stristr($file_new,$lbracket . file_tag_encode($tag) . $rbracket))
$deleted_tags[] = $tag;
}
foreach($deleted_tags as $key => $tag) {
$r = q("select file from item where uid = %d " . file_tag_file_query('item',$tag,$type),
intval($uid)
);
if(count($r)) {
unset($deleted_tags[$key]);
}
else {
$filetags_updated = str_replace($lbracket . file_tag_encode($tag) . $rbracket,'',$filetags_updated);
}
}
if($saved != $filetags_updated) {
set_pconfig($uid,'system','filetags', $filetags_updated);
}
return true;
}
else
if(strlen($file_new)) {
set_pconfig($uid,'system','filetags', $file_new);
}
return true;
}
function file_tag_save_file($uid,$item,$file) { function file_tag_save_file($uid,$item,$file) {
$result = false; $result = false;
if(! intval($uid)) if(! intval($uid))

View File

@ -664,8 +664,8 @@ function dfrn_request_content(&$a) {
else else
$tpl = get_markup_template('auto_request.tpl'); $tpl = get_markup_template('auto_request.tpl');
$page_desc = sprintf( t('Diaspora members: Please do not use this form. Instead, enter "%s" into your Diaspora search bar.'), # $page_desc = sprintf( t('Diaspora members: Please do not use this form. Instead, enter "%s" into your Diaspora search bar.'),
$target_addr) . EOL . EOL; # $target_addr) . EOL . EOL;
$page_desc .= t("Please enter your 'Identity Address' from one of the following supported communications networks:"); $page_desc .= t("Please enter your 'Identity Address' from one of the following supported communications networks:");
@ -699,7 +699,7 @@ function dfrn_request_content(&$a) {
'$friendica' => t('Friendica'), '$friendica' => t('Friendica'),
'$statusnet' => t('StatusNet/Federated Social Web'), '$statusnet' => t('StatusNet/Federated Social Web'),
'$diaspora' => t('Diaspora'), '$diaspora' => t('Diaspora'),
'$diasnote' => t('- please share from your own site as noted above'), '$diasnote' => sprintf (t(' - please do not use this form. Instead, enter %s into your Diaspora search bar.'),$target_addr),
'$your_address' => t('Your Identity Address:'), '$your_address' => t('Your Identity Address:'),
'$invite_desc' => $invite_desc, '$invite_desc' => $invite_desc,
'$emailnet' => $emailnet, '$emailnet' => $emailnet,

View File

@ -115,6 +115,8 @@ function editpost_content(&$a) {
'$jotnets' => $jotnets, '$jotnets' => $jotnets,
'$title' => $itm[0]['title'], '$title' => $itm[0]['title'],
'$placeholdertitle' => t('Set title'), '$placeholdertitle' => t('Set title'),
'$category' => file_tag_file_to_list($itm[0]['file'], 'category'),
'$placeholdercategory' => t('Categories (comma-separated list)'),
'$emtitle' => t('Example: bob@example.com, mary@example.com'), '$emtitle' => t('Example: bob@example.com, mary@example.com'),
'$lockstate' => $lockstate, '$lockstate' => $lockstate,
'$acl' => '', // populate_acl((($group) ? $group_acl : $a->user), $celeb), '$acl' => '', // populate_acl((($group) ? $group_acl : $a->user), $celeb),

View File

@ -216,8 +216,6 @@ function item_post(&$a) {
$emailcc = notags(trim($_REQUEST['emailcc'])); $emailcc = notags(trim($_REQUEST['emailcc']));
$body = escape_tags(trim($_REQUEST['body'])); $body = escape_tags(trim($_REQUEST['body']));
// $categories = TODO
$private = ((strlen($str_group_allow) || strlen($str_contact_allow) || strlen($str_group_deny) || strlen($str_contact_deny)) ? 1 : 0); $private = ((strlen($str_group_allow) || strlen($str_contact_allow) || strlen($str_group_deny) || strlen($str_contact_deny)) ? 1 : 0);
if(($parent_item) && if(($parent_item) &&
@ -255,6 +253,19 @@ function item_post(&$a) {
} }
} }
if(strlen($categories)) {
// get the "fileas" tags for this post
$filedas = file_tag_file_to_list($categories, 'file');
}
// save old and new categories, so we can determine what needs to be deleted from pconfig
$categories_old = $categories;
$categories = file_tag_list_to_file(trim($_REQUEST['category']), 'category');
$categories_new = $categories;
if(strlen($filedas)) {
// append the fileas stuff to the new categories list
$categories .= file_tag_list_to_file($filedas, 'file');
}
// Work around doubled linefeeds in Tinymce 3.5b2 // Work around doubled linefeeds in Tinymce 3.5b2
// First figure out if it's a status post that would've been // First figure out if it's a status post that would've been
// created using tinymce. Otherwise leave it alone. // created using tinymce. Otherwise leave it alone.
@ -572,6 +583,9 @@ function item_post(&$a) {
intval($profile_uid) intval($profile_uid)
); );
// update filetags in pconfig
file_tag_update_pconfig($uid,$categories_old,$categories_new,'category');
proc_run('php', "include/notifier.php", 'edit_post', "$post_id"); proc_run('php', "include/notifier.php", 'edit_post', "$post_id");
if((x($_REQUEST,'return')) && strlen($return_path)) { if((x($_REQUEST,'return')) && strlen($return_path)) {
logger('return: ' . $return_path); logger('return: ' . $return_path);
@ -585,8 +599,8 @@ function item_post(&$a) {
$r = q("INSERT INTO `item` (`guid`, `uid`,`type`,`wall`,`gravity`,`contact-id`,`owner-name`,`owner-link`,`owner-avatar`, $r = q("INSERT INTO `item` (`guid`, `uid`,`type`,`wall`,`gravity`,`contact-id`,`owner-name`,`owner-link`,`owner-avatar`,
`author-name`, `author-link`, `author-avatar`, `created`, `edited`, `commented`, `received`, `changed`, `uri`, `thr-parent`, `title`, `body`, `app`, `location`, `coord`, `author-name`, `author-link`, `author-avatar`, `created`, `edited`, `commented`, `received`, `changed`, `uri`, `thr-parent`, `title`, `body`, `app`, `location`, `coord`,
`tag`, `inform`, `verb`, `postopts`, `allow_cid`, `allow_gid`, `deny_cid`, `deny_gid`, `private`, `pubmail`, `attach`, `bookmark`,`origin`, `moderated` ) `tag`, `inform`, `verb`, `postopts`, `allow_cid`, `allow_gid`, `deny_cid`, `deny_gid`, `private`, `pubmail`, `attach`, `bookmark`,`origin`, `moderated`, `file` )
VALUES( '%s', %d, '%s', %d, %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, '%s', %d, %d, %d )", VALUES( '%s', %d, '%s', %d, %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, '%s', %d, %d, %d, '%s' )",
dbesc($datarray['guid']), dbesc($datarray['guid']),
intval($datarray['uid']), intval($datarray['uid']),
dbesc($datarray['type']), dbesc($datarray['type']),
@ -624,8 +638,9 @@ function item_post(&$a) {
dbesc($datarray['attach']), dbesc($datarray['attach']),
intval($datarray['bookmark']), intval($datarray['bookmark']),
intval($datarray['origin']), intval($datarray['origin']),
intval($datarray['moderated']) intval($datarray['moderated']),
); dbesc($datarray['file'])
);
$r = q("SELECT `id` FROM `item` WHERE `uri` = '%s' LIMIT 1", $r = q("SELECT `id` FROM `item` WHERE `uri` = '%s' LIMIT 1",
dbesc($datarray['uri'])); dbesc($datarray['uri']));
@ -633,6 +648,9 @@ function item_post(&$a) {
$post_id = $r[0]['id']; $post_id = $r[0]['id'];
logger('mod_item: saved item ' . $post_id); logger('mod_item: saved item ' . $post_id);
// update filetags in pconfig
file_tag_update_pconfig($uid,$categories_old,$categories_new,'category');
if($parent) { if($parent) {
// This item is the last leaf and gets the comment box, clear any ancestors // This item is the last leaf and gets the comment box, clear any ancestors

View File

@ -13,6 +13,8 @@ function newmember_content(&$a) {
$o .= '<ul>'; $o .= '<ul>';
$o .= '<li>' . '<a target="newmember" href="/help/guide">' . t('On your <em>Quick Start</em> page - find a brief introduction to your profile and network tabs, connect to Facebook, make some new connections, and find some groups to join.') . '</a></li>' . EOL;
$o .= '<li>' . '<a target="newmember" href="settings">' . t('On your <em>Settings</em> page - change your initial password. Also make a note of your Identity Address. This looks just like an email address - and will be useful in making friends on the free social web.') . '</a></li>' . EOL; $o .= '<li>' . '<a target="newmember" href="settings">' . t('On your <em>Settings</em> page - change your initial password. Also make a note of your Identity Address. This looks just like an email address - and will be useful in making friends on the free social web.') . '</a></li>' . EOL;
$o .= '<li>' . '<a target="newmember" href="settings">' . t('Review the other settings, particularly the privacy settings. An unpublished directory listing is like having an unlisted phone number. In general, you should probably publish your listing - unless all of your friends and potential friends know exactly how to find you.') . '</a></li>' . EOL; $o .= '<li>' . '<a target="newmember" href="settings">' . t('Review the other settings, particularly the privacy settings. An unpublished directory listing is like having an unlisted phone number. In general, you should probably publish your listing - unless all of your friends and potential friends know exactly how to find you.') . '</a></li>' . EOL;

View File

@ -2,6 +2,11 @@
function profile_init(&$a) { function profile_init(&$a) {
require_once('include/contact_widgets.php');
if(! x($a->page,'aside'))
$a->page['aside'] = '';
$blocked = (((get_config('system','block_public')) && (! local_user()) && (! remote_user())) ? true : false); $blocked = (((get_config('system','block_public')) && (! local_user()) && (! remote_user())) ? true : false);
if($a->argc > 1) if($a->argc > 1)
@ -59,6 +64,13 @@ function profile_init(&$a) {
function profile_content(&$a, $update = 0) { function profile_content(&$a, $update = 0) {
if (x($a->category)) {
$category = $a->category;
}
else {
$category = ((x($_GET,'category')) ? $_GET['category'] : '');
}
if(get_config('system','block_public') && (! local_user()) && (! remote_user())) { if(get_config('system','block_public') && (! local_user()) && (! remote_user())) {
return login(); return login();
} }
@ -112,6 +124,7 @@ function profile_content(&$a, $update = 0) {
return; return;
} }
$a->page['aside'] .= categories_widget($a->get_baseurl(true) . '/profile/' . $a->profile['nickname'],(x($category) ? xmlify($category) : ''));
if(! $update) { if(! $update) {
if(x($_GET,'tab')) if(x($_GET,'tab'))
@ -135,6 +148,7 @@ function profile_content(&$a, $update = 0) {
$celeb = ((($a->profile['page-flags'] == PAGE_SOAPBOX) || ($a->profile['page-flags'] == PAGE_COMMUNITY)) ? true : false); $celeb = ((($a->profile['page-flags'] == PAGE_SOAPBOX) || ($a->profile['page-flags'] == PAGE_COMMUNITY)) ? true : false);
if(can_write_wall($a,$a->profile['profile_uid'])) { if(can_write_wall($a,$a->profile['profile_uid'])) {
$x = array( $x = array(
@ -178,6 +192,10 @@ function profile_content(&$a, $update = 0) {
} }
else { else {
if(x($category)) {
$sql_extra .= file_tag_file_query('item',$category,'category');
}
$r = q("SELECT COUNT(*) AS `total` $r = q("SELECT COUNT(*) AS `total`
FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id` FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id`
WHERE `item`.`uid` = %d AND `item`.`visible` = 1 AND `item`.`deleted` = 0 WHERE `item`.`uid` = %d AND `item`.`visible` = 1 AND `item`.`deleted` = 0
@ -204,6 +222,7 @@ function profile_content(&$a, $update = 0) {
intval($a->profile['profile_uid']) intval($a->profile['profile_uid'])
); );
} }
$parents_arr = array(); $parents_arr = array();

View File

@ -9,7 +9,8 @@ function view_init($a){
if ($a->argc == 4){ if ($a->argc == 4){
$theme = $a->argv[2]; $theme = $a->argv[2];
$THEMEPATH = "view/theme/$theme"; $THEMEPATH = "view/theme/$theme";
require_once("view/theme/$theme/style.php"); if(file_exists("view/theme/$theme/style.php"))
require_once("view/theme/$theme/style.php");
} }
killme(); killme();

13
view/categories_widget.tpl Executable file
View File

@ -0,0 +1,13 @@
<div class="clear"></div>
<div id="categories-sidebar" class="widget">
<h3>$title</h3>
<div id="nets-desc">$desc</div>
<ul class="categories-ul">
<li class="tool"><a href="$base" class="categories-link categories-all{{ if $sel_all }} categories-selected{{ endif }}">$all</a></li>
{{ for $terms as $term }}
<li class="tool"><a href="$base?f=&category=$term.name" class="categories-link{{ if $term.selected }} categories-selected{{ endif }}">$term.name</a></li>
{{ endfor }}
</ul>
</div>

View File

@ -15,6 +15,7 @@
<input type="hidden" name="post_id" value="$post_id" /> <input type="hidden" name="post_id" value="$post_id" />
<input type="hidden" name="preview" id="jot-preview" value="0" /> <input type="hidden" name="preview" id="jot-preview" value="0" />
<div id="jot-title-wrap"><input name="title" id="jot-title" type="text" placeholder="$placeholdertitle" value="$title" class="jothidden" style="display:none"></div> <div id="jot-title-wrap"><input name="title" id="jot-title" type="text" placeholder="$placeholdertitle" value="$title" class="jothidden" style="display:none"></div>
<div id="jot-category-wrap"><input name="category" id="jot-category" type="text" placeholder="$placeholdercategory" value="$category" class="jothidden" style="display:none" /></div>
<div id="jot-text-wrap"> <div id="jot-text-wrap">
<img id="profile-jot-text-loading" src="images/rotator.gif" alt="$wait" title="$wait" style="display: none;" /> <img id="profile-jot-text-loading" src="images/rotator.gif" alt="$wait" title="$wait" style="display: none;" />
<textarea rows="5" cols="64" class="profile-jot-text" id="profile-jot-text" name="body" >{{ if $content }}$content{{ else }}$share{{ endif }}</textarea> <textarea rows="5" cols="64" class="profile-jot-text" id="profile-jot-text" name="body" >{{ if $content }}$content{{ else }}$share{{ endif }}</textarea>

View File

@ -76,17 +76,21 @@ input#dfrn-url {
} }
#jot-title { #jot-title, #jot-category {
background-color: #333333; background-color: #333333;
border: 1px solid #333333; border: 1px solid #333333;
} }
#jot-title::-webkit-input-placeholder{ color: #555555!important;} #jot-title::-webkit-input-placeholder{ color: #555555!important;}
#jot-title:-moz-placeholder{color: #555555!important;} #jot-title:-moz-placeholder{color: #555555!important;}
#jot-category::-webkit-input-placeholder{ color: #555555!important;}
#jot-category:-moz-placeholder{color: #555555!important;}
#jot-title:hover, #jot-title:hover,
#jot-title:focus { #jot-title:focus,
#jot-category:hover,
#jot-category:focus {
border: 1px solid #cccccc; border: 1px solid #cccccc;
} }
blockquote { blockquote {

View File

@ -34,6 +34,7 @@
{{ if $nv }} {{ if $nv }}
<h3>Find Friends<a id="close_friends_icon" onClick="close_friends()" class="icon close_box" title="close"></a></h3> <h3>Find Friends<a id="close_friends_icon" onClick="close_friends()" class="icon close_box" title="close"></a></h3>
<a class="$nv.directory.2" href="$nv.directory.0" style="margin-left: 10px; " title="$nv.directory.3" >$nv.directory.1</a><br> <a class="$nv.directory.2" href="$nv.directory.0" style="margin-left: 10px; " title="$nv.directory.3" >$nv.directory.1</a><br>
<a class="$nv.global_directory.2" href="$nv.global_directory.0" style="margin-left: 10px; " title="$nv.global_directory.3" >$nv.global_directory.1</a><br>
<a class="$nv.match.2" href="$nv.match.0" style="margin-left: 10px; " title="$nv.match.3" >$nv.match.1</a><br> <a class="$nv.match.2" href="$nv.match.0" style="margin-left: 10px; " title="$nv.match.3" >$nv.match.1</a><br>
<a class="$nv.suggest.2" href="$nv.suggest.0" style="margin-left: 10px; " title="$nv.suggest.3" >$nv.suggest.1</a><br> <a class="$nv.suggest.2" href="$nv.suggest.0" style="margin-left: 10px; " title="$nv.suggest.3" >$nv.suggest.1</a><br>
<a class="$nv.invite.2" href="$nv.invite.0" style="margin-left: 10px; " title="$nv.invite.3" >$nv.invite.1</a> <a class="$nv.invite.2" href="$nv.invite.0" style="margin-left: 10px; " title="$nv.invite.3" >$nv.invite.1</a>

View File

@ -113,12 +113,12 @@ function showForm($error, $content) {
echo <<<EOF echo <<<EOF
<div class='wrap1'> <div class='wrap1'>
<h2><img class='logo' src='friendika-32.png' align='middle';/> <h2><img class='logo' src='friendika-32.png' align='middle';/>
Friendika Bookmarklet</h2> Friendica Bookmarklet</h2>
</div> </div>
<div class="wrap2"> <div class="wrap2">
<form method="post" action="{$_SERVER['PHP_SELF']}"> <form method="post" action="{$_SERVER['PHP_SELF']}">
Enter the email address of the Friendika Account that you want to cross-post to:(example: user@friendika.org)<br /><br /> Enter the email address of the Friendica Account that you want to cross-post to:(example: user@friendica.org)<br /><br />
Account ID: <input type="text" name="friendika_acct_name" value="{$username_cookie}" size="50"/><br /> Account ID: <input type="text" name="friendika_acct_name" value="{$username_cookie}" size="50"/><br />
Password: <input type="password" name="friendika_password" value="{$password_cookie}" size="50"/><br /> Password: <input type="password" name="friendika_password" value="{$password_cookie}" size="50"/><br />
<textarea name="content" id="content" rows="6" cols="70">{$content}</textarea><br /> <textarea name="content" id="content" rows="6" cols="70">{$content}</textarea><br />

View File

@ -139,7 +139,8 @@ function diabook_aerith_community_info(){
//nav FIND FRIENDS //nav FIND FRIENDS
if(local_user()) { if(local_user()) {
$nv = array(); $nv = array();
$nv['directory'] = Array('directory', t('Directory'), "", ""); $nv['directory'] = Array('directory', t('Local').' '.t('Directory'), "", "");
$nv['global_directory'] = Array('http://dir.friendica.com/', t('Global Directory'), "", "");
$nv['match'] = Array('match', t('Similar Interests'), "", ""); $nv['match'] = Array('match', t('Similar Interests'), "", "");
$nv['suggest'] = Array('suggest', t('Friend Suggestions'), "", ""); $nv['suggest'] = Array('suggest', t('Friend Suggestions'), "", "");
$nv['invite'] = Array('invite', t('Invite Friends'), "", ""); $nv['invite'] = Array('invite', t('Invite Friends'), "", "");

View File

@ -34,6 +34,7 @@
{{ if $nv }} {{ if $nv }}
<h3>Find Friends<a id="close_friends_icon" onClick="close_friends()" class="icon close_box" title="close"></a></h3> <h3>Find Friends<a id="close_friends_icon" onClick="close_friends()" class="icon close_box" title="close"></a></h3>
<a class="$nv.directory.2" href="$nv.directory.0" style="margin-left: 10px; " title="$nv.directory.3" >$nv.directory.1</a><br> <a class="$nv.directory.2" href="$nv.directory.0" style="margin-left: 10px; " title="$nv.directory.3" >$nv.directory.1</a><br>
<a class="$nv.global_directory.2" href="$nv.global_directory.0" style="margin-left: 10px; " title="$nv.global_directory.3" >$nv.global_directory.1</a><br>
<a class="$nv.match.2" href="$nv.match.0" style="margin-left: 10px; " title="$nv.match.3" >$nv.match.1</a><br> <a class="$nv.match.2" href="$nv.match.0" style="margin-left: 10px; " title="$nv.match.3" >$nv.match.1</a><br>
<a class="$nv.suggest.2" href="$nv.suggest.0" style="margin-left: 10px; " title="$nv.suggest.3" >$nv.suggest.1</a><br> <a class="$nv.suggest.2" href="$nv.suggest.0" style="margin-left: 10px; " title="$nv.suggest.3" >$nv.suggest.1</a><br>
<a class="$nv.invite.2" href="$nv.invite.0" style="margin-left: 10px; " title="$nv.invite.3" >$nv.invite.1</a> <a class="$nv.invite.2" href="$nv.invite.0" style="margin-left: 10px; " title="$nv.invite.3" >$nv.invite.1</a>

View File

@ -113,12 +113,12 @@ function showForm($error, $content) {
echo <<<EOF echo <<<EOF
<div class='wrap1'> <div class='wrap1'>
<h2><img class='logo' src='friendika-32.png' align='middle';/> <h2><img class='logo' src='friendika-32.png' align='middle';/>
Friendika Bookmarklet</h2> Friendica Bookmarklet</h2>
</div> </div>
<div class="wrap2"> <div class="wrap2">
<form method="post" action="{$_SERVER['PHP_SELF']}"> <form method="post" action="{$_SERVER['PHP_SELF']}">
Enter the email address of the Friendika Account that you want to cross-post to:(example: user@friendika.org)<br /><br /> Enter the email address of the Friendica Account that you want to cross-post to:(example: user@friendica.org)<br /><br />
Account ID: <input type="text" name="friendika_acct_name" value="{$username_cookie}" size="50"/><br /> Account ID: <input type="text" name="friendika_acct_name" value="{$username_cookie}" size="50"/><br />
Password: <input type="password" name="friendika_password" value="{$password_cookie}" size="50"/><br /> Password: <input type="password" name="friendika_password" value="{$password_cookie}" size="50"/><br />
<textarea name="content" id="content" rows="6" cols="70">{$content}</textarea><br /> <textarea name="content" id="content" rows="6" cols="70">{$content}</textarea><br />

View File

@ -139,7 +139,8 @@ function diabook_blue_community_info(){
//nav FIND FRIENDS //nav FIND FRIENDS
if(local_user()) { if(local_user()) {
$nv = array(); $nv = array();
$nv['directory'] = Array('directory', t('Directory'), "", ""); $nv['directory'] = Array('directory', t('Local').' '.t('Directory'), "", "");
$nv['global_directory'] = Array('http://dir.friendica.com/', t('Global Directory'), "", "");
$nv['match'] = Array('match', t('Similar Interests'), "", ""); $nv['match'] = Array('match', t('Similar Interests'), "", "");
$nv['suggest'] = Array('suggest', t('Friend Suggestions'), "", ""); $nv['suggest'] = Array('suggest', t('Friend Suggestions'), "", "");
$nv['invite'] = Array('invite', t('Invite Friends'), "", ""); $nv['invite'] = Array('invite', t('Invite Friends'), "", "");

View File

@ -34,6 +34,7 @@
{{ if $nv }} {{ if $nv }}
<h3>Find Friends<a id="close_friends_icon" onClick="close_friends()" class="icon close_box" title="close"></a></h3> <h3>Find Friends<a id="close_friends_icon" onClick="close_friends()" class="icon close_box" title="close"></a></h3>
<a class="$nv.directory.2" href="$nv.directory.0" style="margin-left: 10px; " title="$nv.directory.3" >$nv.directory.1</a><br> <a class="$nv.directory.2" href="$nv.directory.0" style="margin-left: 10px; " title="$nv.directory.3" >$nv.directory.1</a><br>
<a class="$nv.global_directory.2" href="$nv.global_directory.0" style="margin-left: 10px; " title="$nv.global_directory.3" >$nv.global_directory.1</a><br>
<a class="$nv.match.2" href="$nv.match.0" style="margin-left: 10px; " title="$nv.match.3" >$nv.match.1</a><br> <a class="$nv.match.2" href="$nv.match.0" style="margin-left: 10px; " title="$nv.match.3" >$nv.match.1</a><br>
<a class="$nv.suggest.2" href="$nv.suggest.0" style="margin-left: 10px; " title="$nv.suggest.3" >$nv.suggest.1</a><br> <a class="$nv.suggest.2" href="$nv.suggest.0" style="margin-left: 10px; " title="$nv.suggest.3" >$nv.suggest.1</a><br>
<a class="$nv.invite.2" href="$nv.invite.0" style="margin-left: 10px; " title="$nv.invite.3" >$nv.invite.1</a> <a class="$nv.invite.2" href="$nv.invite.0" style="margin-left: 10px; " title="$nv.invite.3" >$nv.invite.1</a>

View File

@ -113,12 +113,12 @@ function showForm($error, $content) {
echo <<<EOF echo <<<EOF
<div class='wrap1'> <div class='wrap1'>
<h2><img class='logo' src='friendika-32.png' align='middle';/> <h2><img class='logo' src='friendika-32.png' align='middle';/>
Friendika Bookmarklet</h2> Friendica Bookmarklet</h2>
</div> </div>
<div class="wrap2"> <div class="wrap2">
<form method="post" action="{$_SERVER['PHP_SELF']}"> <form method="post" action="{$_SERVER['PHP_SELF']}">
Enter the email address of the Friendika Account that you want to cross-post to:(example: user@friendika.org)<br /><br /> Enter the email address of the Friendica Account that you want to cross-post to:(example: user@friendica.org)<br /><br />
Account ID: <input type="text" name="friendika_acct_name" value="{$username_cookie}" size="50"/><br /> Account ID: <input type="text" name="friendika_acct_name" value="{$username_cookie}" size="50"/><br />
Password: <input type="password" name="friendika_password" value="{$password_cookie}" size="50"/><br /> Password: <input type="password" name="friendika_password" value="{$password_cookie}" size="50"/><br />
<textarea name="content" id="content" rows="6" cols="70">{$content}</textarea><br /> <textarea name="content" id="content" rows="6" cols="70">{$content}</textarea><br />

View File

@ -139,7 +139,8 @@ function diabook_red_community_info(){
//nav FIND FRIENDS //nav FIND FRIENDS
if(local_user()) { if(local_user()) {
$nv = array(); $nv = array();
$nv['directory'] = Array('directory', t('Directory'), "", ""); $nv['directory'] = Array('directory', t('Local').' '.t('Directory'), "", "");
$nv['global_directory'] = Array('http://dir.friendica.com/', t('Global Directory'), "", "");
$nv['match'] = Array('match', t('Similar Interests'), "", ""); $nv['match'] = Array('match', t('Similar Interests'), "", "");
$nv['suggest'] = Array('suggest', t('Friend Suggestions'), "", ""); $nv['suggest'] = Array('suggest', t('Friend Suggestions'), "", "");
$nv['invite'] = Array('invite', t('Invite Friends'), "", ""); $nv['invite'] = Array('invite', t('Invite Friends'), "", "");

View File

@ -34,6 +34,7 @@
{{ if $nv }} {{ if $nv }}
<h3>Find Friends<a id="close_friends_icon" onClick="close_friends()" class="icon close_box" title="close"></a></h3> <h3>Find Friends<a id="close_friends_icon" onClick="close_friends()" class="icon close_box" title="close"></a></h3>
<a class="$nv.directory.2" href="$nv.directory.0" style="margin-left: 10px; " title="$nv.directory.3" >$nv.directory.1</a><br> <a class="$nv.directory.2" href="$nv.directory.0" style="margin-left: 10px; " title="$nv.directory.3" >$nv.directory.1</a><br>
<a class="$nv.global_directory.2" href="$nv.global_directory.0" style="margin-left: 10px; " title="$nv.global_directory.3" >$nv.global_directory.1</a><br>
<a class="$nv.match.2" href="$nv.match.0" style="margin-left: 10px; " title="$nv.match.3" >$nv.match.1</a><br> <a class="$nv.match.2" href="$nv.match.0" style="margin-left: 10px; " title="$nv.match.3" >$nv.match.1</a><br>
<a class="$nv.suggest.2" href="$nv.suggest.0" style="margin-left: 10px; " title="$nv.suggest.3" >$nv.suggest.1</a><br> <a class="$nv.suggest.2" href="$nv.suggest.0" style="margin-left: 10px; " title="$nv.suggest.3" >$nv.suggest.1</a><br>
<a class="$nv.invite.2" href="$nv.invite.0" style="margin-left: 10px; " title="$nv.invite.3" >$nv.invite.1</a> <a class="$nv.invite.2" href="$nv.invite.0" style="margin-left: 10px; " title="$nv.invite.3" >$nv.invite.1</a>

View File

@ -113,12 +113,12 @@ function showForm($error, $content) {
echo <<<EOF echo <<<EOF
<div class='wrap1'> <div class='wrap1'>
<h2><img class='logo' src='friendika-32.png' align='middle';/> <h2><img class='logo' src='friendika-32.png' align='middle';/>
Friendika Bookmarklet</h2> Friendica Bookmarklet</h2>
</div> </div>
<div class="wrap2"> <div class="wrap2">
<form method="post" action="{$_SERVER['PHP_SELF']}"> <form method="post" action="{$_SERVER['PHP_SELF']}">
Enter the email address of the Friendika Account that you want to cross-post to:(example: user@friendika.org)<br /><br /> Enter the email address of the Friendica Account that you want to cross-post to:(example: user@friendica.org)<br /><br />
Account ID: <input type="text" name="friendika_acct_name" value="{$username_cookie}" size="50"/><br /> Account ID: <input type="text" name="friendika_acct_name" value="{$username_cookie}" size="50"/><br />
Password: <input type="password" name="friendika_password" value="{$password_cookie}" size="50"/><br /> Password: <input type="password" name="friendika_password" value="{$password_cookie}" size="50"/><br />
<textarea name="content" id="content" rows="6" cols="70">{$content}</textarea><br /> <textarea name="content" id="content" rows="6" cols="70">{$content}</textarea><br />

View File

@ -143,7 +143,8 @@ function diabook_community_info(){
//right_aside FIND FRIENDS //right_aside FIND FRIENDS
if(local_user()) { if(local_user()) {
$nv = array(); $nv = array();
$nv['directory'] = Array('directory', t('Directory'), "", ""); $nv['directory'] = Array('directory', t('Local').' '.t('Directory'), "", "");
$nv['global_directory'] = Array('http://dir.friendica.com/', t('Global Directory'), "", "");
$nv['match'] = Array('match', t('Similar Interests'), "", ""); $nv['match'] = Array('match', t('Similar Interests'), "", "");
$nv['suggest'] = Array('suggest', t('Friend Suggestions'), "", ""); $nv['suggest'] = Array('suggest', t('Friend Suggestions'), "", "");
$nv['invite'] = Array('invite', t('Invite Friends'), "", ""); $nv['invite'] = Array('invite', t('Invite Friends'), "", "");

View File

@ -285,7 +285,7 @@ div.wall-item-content-wrapper.shiny {
float: left; float: left;
} }
#jot-title { #jot-title, #jot-category {
border: 0px; border: 0px;
margin: 0px; margin: 0px;
height: 20px; height: 20px;
@ -296,11 +296,15 @@ div.wall-item-content-wrapper.shiny {
} }
#jot-title::-webkit-input-placeholder{font-weight: normal;} #jot-title::-webkit-input-placeholder{font-weight: normal;}
#jot-category::-webkit-input-placeholder{font-weight: normal;}
#jot-title:-moz-placeholder{font-weight: normal;} #jot-title:-moz-placeholder{font-weight: normal;}
#jot-category:-moz-placeholder{font-weight: normal;}
#jot-title:hover, #jot-title:hover,
#jot-title:focus { #jot-title:focus,
#jot-category:hover,
#jot-category:focus {
border: 1px solid #cccccc; border: 1px solid #cccccc;
} }
@ -322,7 +326,7 @@ div.wall-item-content-wrapper.shiny {
margin-bottom: 10px; margin-bottom: 10px;
} }
.group-selected, .nets-selected, .fileas-selected { .group-selected, .nets-selected, .fileas-selected, .categories-selected {
padding: 3px; padding: 3px;
-moz-border-radius: 3px; -moz-border-radius: 3px;
border-radius: 3px; border-radius: 3px;
@ -1881,11 +1885,11 @@ a.mail-list-link {
margin-top: 10px; margin-top: 10px;
} }
.nets-ul, .fileas-ul { .nets-ul, .fileas-ul, .categories-ul {
list-style-type: none; list-style-type: none;
} }
.nets-ul li, .fileas-ul li { .nets-ul li, .fileas-ul li, .categories-ul li {
margin-top: 10px; margin-top: 10px;
} }
@ -1896,11 +1900,11 @@ a.mail-list-link {
margin-left: 42px; margin-left: 42px;
} }
.fileas-link { .fileas-link, .categories-link {
margin-left: 24px; margin-left: 24px;
} }
.fileas-all { .fileas-all, .categories-all {
margin-left: 0px; margin-left: 0px;
} }
@ -2628,12 +2632,12 @@ aside input[type='text'] {
margin-top: 10px; margin-top: 10px;
} }
.body-tag, .filesavetags { .body-tag, .filesavetags, .categorytags {
opacity: 0.5; opacity: 0.5;
filter:alpha(opacity=50); filter:alpha(opacity=50);
} }
.body-tag:hover, .filesavetags:hover { .body-tag:hover, .filesavetags:hover, .categorytags:hover {
opacity: 1.0 !important; opacity: 1.0 !important;
filter:alpha(opacity=100) !important; filter:alpha(opacity=100) !important;
} }