Merge remote branch 'upstream/master'
109
boot.php
|
@ -9,9 +9,9 @@ require_once('include/nav.php');
|
|||
require_once('include/cache.php');
|
||||
|
||||
define ( 'FRIENDICA_PLATFORM', 'Friendica');
|
||||
define ( 'FRIENDICA_VERSION', '2.3.1306' );
|
||||
define ( 'FRIENDICA_VERSION', '2.3.1311' );
|
||||
define ( 'DFRN_PROTOCOL_VERSION', '2.23' );
|
||||
define ( 'DB_UPDATE_VERSION', 1137 );
|
||||
define ( 'DB_UPDATE_VERSION', 1138 );
|
||||
|
||||
define ( 'EOL', "<br />\r\n" );
|
||||
define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' );
|
||||
|
@ -109,7 +109,7 @@ define ( 'NETWORK_XMPP', 'xmpp'); // XMPP
|
|||
define ( 'NETWORK_MYSPACE', 'mysp'); // MySpace
|
||||
define ( 'NETWORK_GPLUS', 'goog'); // Google+
|
||||
|
||||
/*
|
||||
/**
|
||||
* These numbers are used in stored permissions
|
||||
* and existing allocations MUST NEVER BE CHANGED
|
||||
* OR RE-ASSIGNED! You may only add to them.
|
||||
|
@ -206,6 +206,7 @@ define ( 'ACTIVITY_OBJ_P_PHOTO', NAMESPACE_ACTIVITY_SCHEMA . 'profile-photo' );
|
|||
define ( 'ACTIVITY_OBJ_ALBUM', NAMESPACE_ACTIVITY_SCHEMA . 'photo-album' );
|
||||
define ( 'ACTIVITY_OBJ_EVENT', NAMESPACE_ACTIVITY_SCHEMA . 'event' );
|
||||
define ( 'ACTIVITY_OBJ_TAGTERM', NAMESPACE_DFRN . '/tagterm' );
|
||||
define ( 'ACTIVITY_OBJ_PROFILE', NAMESPACE_DFRN . '/profile' );
|
||||
|
||||
/**
|
||||
* item weight for query ordering
|
||||
|
@ -515,7 +516,8 @@ class App {
|
|||
}
|
||||
|
||||
|
||||
}}
|
||||
}
|
||||
}
|
||||
|
||||
// retrieve the App structure
|
||||
// useful in functions which require it but don't get it passed to them
|
||||
|
@ -524,7 +526,8 @@ if(! function_exists('get_app')) {
|
|||
function get_app() {
|
||||
global $a;
|
||||
return $a;
|
||||
}};
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// Multi-purpose function to check variable state.
|
||||
|
@ -552,7 +555,8 @@ function x($s,$k = NULL) {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
}}
|
||||
}
|
||||
}
|
||||
|
||||
// called from db initialisation if db is dead.
|
||||
|
||||
|
@ -561,7 +565,8 @@ function system_unavailable() {
|
|||
include('system_unavailable.php');
|
||||
system_down();
|
||||
killme();
|
||||
}}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -653,8 +658,32 @@ function check_config(&$a) {
|
|||
|
||||
// call the specific update
|
||||
|
||||
// global $db;
|
||||
// $db->excep(TRUE);
|
||||
// try {
|
||||
// $db->beginTransaction();
|
||||
$func = 'update_' . $x;
|
||||
$func($a);
|
||||
// $db->commit();
|
||||
// } catch(Exception $ex) {
|
||||
// $db->rollback();
|
||||
// //send the administrator an e-mail
|
||||
// $email_tpl = get_intltext_template("update_fail_eml.tpl");
|
||||
// $email_tpl = replace_macros($email_tpl, array(
|
||||
// '$sitename' => $a->config['sitename'],
|
||||
// '$siteurl' => $a->get_baseurl(),
|
||||
// '$update' => $x,
|
||||
// '$error' => $ex->getMessage()));
|
||||
// $subject=sprintf(t('Update Error at %s'), $a->get_baseurl());
|
||||
|
||||
// mail($a->config['admin_email'], $subject, $text,
|
||||
// 'From: ' . t('Administrator') . '@' . $_SERVER['SERVER_NAME'] . "\n"
|
||||
// . 'Content-type: text/plain; charset=UTF-8' . "\n"
|
||||
// . 'Content-transfer-encoding: 8bit' );
|
||||
// //try the logger
|
||||
// logger('update failed: '.$ex->getMessage().EOL);
|
||||
// }
|
||||
// $db->excep(FALSE);
|
||||
}
|
||||
}
|
||||
set_config('system','build', DB_UPDATE_VERSION);
|
||||
|
@ -714,7 +743,8 @@ function check_config(&$a) {
|
|||
load_hooks();
|
||||
|
||||
return;
|
||||
}}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function get_guid($size=16) {
|
||||
|
@ -782,7 +812,8 @@ function login($register = false, $hiddens=false) {
|
|||
call_hooks('login_hook',$o);
|
||||
|
||||
return $o;
|
||||
}}
|
||||
}
|
||||
}
|
||||
|
||||
// Used to end the current process, after saving session state.
|
||||
|
||||
|
@ -790,7 +821,8 @@ if(! function_exists('killme')) {
|
|||
function killme() {
|
||||
session_write_close();
|
||||
exit;
|
||||
}}
|
||||
}
|
||||
}
|
||||
|
||||
// redirect to another URL and terminate this process.
|
||||
|
||||
|
@ -798,7 +830,8 @@ if(! function_exists('goaway')) {
|
|||
function goaway($s) {
|
||||
header("Location: $s");
|
||||
killme();
|
||||
}}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Returns the uid of locally logged in user or false.
|
||||
|
@ -808,7 +841,8 @@ function local_user() {
|
|||
if((x($_SESSION,'authenticated')) && (x($_SESSION,'uid')))
|
||||
return intval($_SESSION['uid']);
|
||||
return false;
|
||||
}}
|
||||
}
|
||||
}
|
||||
|
||||
// Returns contact id of authenticated site visitor or false
|
||||
|
||||
|
@ -817,7 +851,8 @@ function remote_user() {
|
|||
if((x($_SESSION,'authenticated')) && (x($_SESSION,'visitor_id')))
|
||||
return intval($_SESSION['visitor_id']);
|
||||
return false;
|
||||
}}
|
||||
}
|
||||
}
|
||||
|
||||
// contents of $s are displayed prominently on the page the next time
|
||||
// a page is loaded. Usually used for errors or alerts.
|
||||
|
@ -828,14 +863,16 @@ function notice($s) {
|
|||
if(! x($_SESSION,'sysmsg')) $_SESSION['sysmsg'] = array();
|
||||
if($a->interactive)
|
||||
$_SESSION['sysmsg'][] = $s;
|
||||
}}
|
||||
}
|
||||
}
|
||||
if(! function_exists('info')) {
|
||||
function info($s) {
|
||||
$a = get_app();
|
||||
if(! x($_SESSION,'sysmsg_info')) $_SESSION['sysmsg_info'] = array();
|
||||
if($a->interactive)
|
||||
$_SESSION['sysmsg_info'][] = $s;
|
||||
}}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// wrapper around config to limit the text length of an incoming message
|
||||
|
@ -844,7 +881,8 @@ if(! function_exists('get_max_import_size')) {
|
|||
function get_max_import_size() {
|
||||
global $a;
|
||||
return ((x($a->config,'max_import_size')) ? $a->config['max_import_size'] : 0 );
|
||||
}}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -946,7 +984,8 @@ function profile_load(&$a, $nickname, $profile = 0) {
|
|||
$a->page['aside'] .= contact_block();*/
|
||||
|
||||
return;
|
||||
}}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
|
@ -1095,7 +1134,8 @@ function profile_sidebar($profile, $block = 0) {
|
|||
call_hooks('profile_sidebar', $arr);
|
||||
|
||||
return $o;
|
||||
}}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(! function_exists('get_birthdays')) {
|
||||
|
@ -1164,7 +1204,8 @@ function get_birthdays() {
|
|||
}
|
||||
}
|
||||
return $o;
|
||||
}}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(! function_exists('get_events')) {
|
||||
|
@ -1228,7 +1269,8 @@ function get_events() {
|
|||
}
|
||||
|
||||
return $o;
|
||||
}}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
|
@ -1264,7 +1306,8 @@ function proc_run($cmd){
|
|||
}
|
||||
$cmdline = implode($args," ");
|
||||
proc_close(proc_open($cmdline." &",array(),$foo));
|
||||
}}
|
||||
}
|
||||
}
|
||||
|
||||
if(! function_exists('current_theme')) {
|
||||
function current_theme(){
|
||||
|
@ -1290,7 +1333,8 @@ function current_theme(){
|
|||
if(count($fallback))
|
||||
return (str_replace('view/theme/','', substr($fallback[0],0,-10)));
|
||||
|
||||
}}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Return full URL to theme which is currently in effect.
|
||||
|
@ -1303,7 +1347,8 @@ function current_theme_url() {
|
|||
if (file_exists('view/theme/' . $t . '/style.php'))
|
||||
return($a->get_baseurl() . '/view/theme/' . $t . '/style.pcss');
|
||||
return($a->get_baseurl() . '/view/theme/' . $t . '/style.css');
|
||||
}}
|
||||
}
|
||||
}
|
||||
|
||||
if(! function_exists('feed_birthday')) {
|
||||
function feed_birthday($uid,$tz) {
|
||||
|
@ -1351,7 +1396,8 @@ function feed_birthday($uid,$tz) {
|
|||
}
|
||||
|
||||
return $birthday;
|
||||
}}
|
||||
}
|
||||
}
|
||||
|
||||
if(! function_exists('is_site_admin')) {
|
||||
function is_site_admin() {
|
||||
|
@ -1359,7 +1405,8 @@ function is_site_admin() {
|
|||
if(local_user() && x($a->user,'email') && x($a->config,'admin_email') && ($a->user['email'] === $a->config['admin_email']))
|
||||
return true;
|
||||
return false;
|
||||
}}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(! function_exists('load_contact_links')) {
|
||||
|
@ -1385,7 +1432,8 @@ function load_contact_links($uid) {
|
|||
$ret['empty'] = true;
|
||||
$a->contacts = $ret;
|
||||
return;
|
||||
}}
|
||||
}
|
||||
}
|
||||
|
||||
if(! function_exists('profile_tabs')){
|
||||
function profile_tabs($a, $is_owner=False, $nickname=Null){
|
||||
|
@ -1437,7 +1485,8 @@ function profile_tabs($a, $is_owner=False, $nickname=Null){
|
|||
$tpl = get_markup_template('common_tabs.tpl');
|
||||
|
||||
return replace_macros($tpl,array('$tabs' => $arr['tabs']));
|
||||
}}
|
||||
}
|
||||
}
|
||||
|
||||
function get_my_url() {
|
||||
if(x($_SESSION,'my_url'))
|
||||
|
@ -1445,11 +1494,13 @@ function get_my_url() {
|
|||
return false;
|
||||
}
|
||||
|
||||
function zrl($s) {
|
||||
function zrl($s,$force = false) {
|
||||
if(! strlen($s))
|
||||
return $s;
|
||||
if(! strpos($s,'/profile/'))
|
||||
if((! strpos($s,'/profile/')) && (! $force))
|
||||
return $s;
|
||||
if($force && substr($s,-1,1) !== '/')
|
||||
$s = $s . '/';
|
||||
$achar = strpos($s,'?') ? '&' : '?';
|
||||
$mine = get_my_url();
|
||||
if($mine and ! link_compare($mine,$s))
|
||||
|
|
1079
database.sql
|
@ -10,36 +10,37 @@ Not all Friendica sites allow open registration. If registration is allowed, you
|
|||
|
||||
If you'd like to have your own server, you can do that too. Visit <a href="http://friendica.com/download">the Friendica website</a> to download the code with setup instructions. It's a very simple install process that anybody experienced in hosting websites, or with basic Linux experience can handle easily.
|
||||
|
||||
|
||||
*OpenID*
|
||||
|
||||
The first field on the Registration page is for an OpenID address. If you do not have an OpenID address or do not wish to use OpenID, leave this field blank. If you have an OpenID account elsewhere and wish to use it, enter the address into this field and click 'Register'. Friendica will attempt to extract as much information as possible from your OpenID provider and return to this page with those items already filled in.
|
||||
|
||||
|
||||
*Your Full Name*
|
||||
|
||||
Please provide your full name **as you would like it to be displayed on this system**. Most people use their real name for this, but you're under no obligation to do so yourself.
|
||||
|
||||
|
||||
*Email Address*
|
||||
|
||||
Please provide a valid email address. Your email address is **never** published. We need this to send you account information and your login details. You may also occasionally receive notifications of incoming messages or items requiring your attention, but you have the ability to completely disable these from your Settings page once you have logged in. This doesn't have to be your primary email address, but it does need to be a real email address. You can't get your initial password, or reset a lost password later without it. This is the only bit of personal information that has to be accurate.
|
||||
|
||||
|
||||
*Nickname*
|
||||
|
||||
A nickname is used to generate web addresses for many of your personal pages, and is also treated like an email address when establishing communications with others. Due to the way that the nickname is used, it has some limitations. It must contain only US-ASCII text characters and numbers, and must also start with a text character. It also must be unique on this system. This is used in many places to identify your account, and once set - cannot be changed.
|
||||
|
||||
|
||||
|
||||
*Directory Publishing*
|
||||
|
||||
The Registration form also allows you to choose whether or not to list your account in the online directory. This is like a "phone book" and you may choose to be unlisted. We recommend that you select 'Yes' so that other people (friends, family, etc.) will be able to find you. If you choose 'No', you will essentially be invisible and have few opportunities for interaction. Whichever you choose, this can be changed any time from your Settings page after you login.
|
||||
|
||||
|
||||
*Register*
|
||||
|
||||
Once you have provided the necessary details, click the 'Register' button. An email will be sent to you providing your account login details. Please watch your email (including spam folders) for your registration details and initial password.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
**Login Page**
|
||||
|
||||
On the 'Login' page, please enter your login information that was provided during registration. You may use either your nickname or email address as a Login Name.
|
||||
|
@ -55,6 +56,7 @@ Otherwise, enter your password. This will have been initially provided in your r
|
|||
|
||||
After your first login, please visit the 'Settings' page from the top menu bar and change your password to something that you will remember.
|
||||
|
||||
|
||||
**Getting Started**
|
||||
|
||||
A ['Tips for New Members'](newmember) link will show up on your home page for two weeks to provide some important Getting Started information.
|
||||
|
|
|
@ -9,7 +9,7 @@ The easiest thing to do is to join the <a href = "http://kakste.com/profile/newh
|
|||
|
||||
The next thing you can do is look at the Directory. The directory is split up into two parts. If you click the directory button, you will be presented with a list of all members (who chose to be listed) on your server. You'll also see a link to the Global Directory. If you click through to the global directory, you will be presented with a list of everybody who chose to be listed across all instances of Friendica. You will also see a "Show Community Forums" link, which will direct you to Groups, Forums and Fanpages. You connect to people, groups and forums in the same way, except groups and forums will automatically accept your introduction request, whereas a human will approve you manually.
|
||||
|
||||
To connect with other Friendica user
|
||||
To connect with other Friendica users:
|
||||
|
||||
Visit their profile. Just beneath their profile picture will be the word 'Connect' (we're assuming this is an English language profile).
|
||||
|
||||
|
|
|
@ -164,10 +164,15 @@ Your module functions will often contain the function plugin_name_content(&$a),
|
|||
**'init_1'** - called just after DB has been opened and before session start
|
||||
$b is not used or passed
|
||||
|
||||
|
||||
**'page_end'** - called after HTML content functions have completed
|
||||
$b is (string) HTML of content div
|
||||
|
||||
**'avatar_lookup'** - called when looking up the avatar
|
||||
$b is (array)
|
||||
'size' => the size of the avatar that will be looked up
|
||||
'email' => email to look up the avatar for
|
||||
'url' => the (string) generated URL of the avatar
|
||||
|
||||
|
||||
A complete list of all hook callbacks with file locations (generated 14-Feb-2012): Please see the source for details of any hooks not documented above.
|
||||
|
||||
|
|
|
@ -172,16 +172,6 @@ $a->config['system']['no_regfullname'] = true;
|
|||
```
|
||||
|
||||
|
||||
**Gravatars**
|
||||
|
||||
During registration, we will try to automatically find a user photo for you on the web using the gravatar service. You may turn this off by setting 'no_gravatar' to true. Default is false.
|
||||
|
||||
Config:
|
||||
```
|
||||
$a->config['system']['no_gravatar'] = true;
|
||||
```
|
||||
|
||||
|
||||
**OpenID**
|
||||
|
||||
By default, OpenID may be used for both registration and logins. If you do not wish to make OpenID facilities available on your system (at all), set 'no_openid' to true. Default is false.
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
[[!meta title="And Finally..."]]
|
||||
|
||||
And that brings the Quick Start to an end.
|
||||
|
||||
Here are some more things to help get you started:
|
||||
|
@ -18,7 +20,7 @@ Here are some more things to help get you started:
|
|||
|
||||
**Documentation**
|
||||
|
||||
- <a href = "/help/Connectors">Connecting to more networks</a>
|
||||
- <a href = "/help">Help Index</a>
|
||||
- <a href="help/Connectors">Connecting to more networks</a>
|
||||
- <a href="help">Help Index</a>
|
||||
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
This is the global directory. If you get lost, you can <a href = "/help/groupsandpages">click this link</a> to bring yourself back here.
|
||||
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>.
|
||||
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>
|
||||
|
||||
|
|
|
@ -6,8 +6,8 @@ This is a bit like your Facebook wall. It's where all your status messgages are
|
|||
|
||||
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>
|
||||
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>
|
||||
<iframe src="login" width="950" height="600"></iframe>
|
||||
|
||||
|
||||
|
|
|
@ -1,11 +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 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!
|
||||
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>
|
||||
<iframe src="suggest" width="950" height="600"></iframe>
|
||||
|
||||
|
||||
|
|
|
@ -1,9 +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 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>.
|
||||
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>
|
||||
<iframe src="network" width="950" height="600"></iframe>
|
||||
|
||||
|
||||
|
|
|
@ -1,13 +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 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>.
|
||||
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="_blank">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="_blank">Friendica Support</a> or <a href="help/Connectors" target="_blank">see the instructions here</a>.
|
||||
|
||||
When you're ready, we can move on to <a href = "/help/makingnewfriends">making new friends</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>
|
||||
<iframe src="settings/connectors" width="950" height="600"></iframe>
|
||||
|
||||
|
||||
|
|
|
@ -23,16 +23,24 @@ function user_remove($uid) {
|
|||
);
|
||||
|
||||
q("DELETE FROM `contact` WHERE `uid` = %d", intval($uid));
|
||||
q("DELETE FROM `gcign` WHERE `uid` = %d", intval($uid));
|
||||
q("DELETE FROM `group` WHERE `uid` = %d", intval($uid));
|
||||
q("DELETE FROM `group_member` WHERE `uid` = %d", intval($uid));
|
||||
q("DELETE FROM `intro` WHERE `uid` = %d", intval($uid));
|
||||
q("DELETE FROM `event` WHERE `uid` = %d", intval($uid));
|
||||
q("DELETE FROM `item` WHERE `uid` = %d", intval($uid));
|
||||
q("DELETE FROM `item_id` WHERE `uid` = %d", intval($uid));
|
||||
q("DELETE FROM `mail` WHERE `uid` = %d", intval($uid));
|
||||
q("DELETE FROM `mailacct` WHERE `uid` = %d", intval($uid));
|
||||
q("DELETE FROM `manage` WHERE `uid` = %d", intval($uid));
|
||||
q("DELETE FROM `notify` WHERE `uid` = %d", intval($uid));
|
||||
q("DELETE FROM `photo` WHERE `uid` = %d", intval($uid));
|
||||
q("DELETE FROM `attach` WHERE `uid` = %d", intval($uid));
|
||||
q("DELETE FROM `profile` WHERE `uid` = %d", intval($uid));
|
||||
q("DELETE FROM `profile_check` WHERE `uid` = %d", intval($uid));
|
||||
q("DELETE FROM `pconfig` WHERE `uid` = %d", intval($uid));
|
||||
q("DELETE FROM `search` WHERE `uid` = %d", intval($uid));
|
||||
q("DELETE FROM `spam` WHERE `uid` = %d", intval($uid));
|
||||
q("DELETE FROM `user` WHERE `uid` = %d", intval($uid));
|
||||
if($uid == local_user()) {
|
||||
unset($_SESSION['authenticated']);
|
||||
|
@ -134,11 +142,11 @@ function contact_photo_menu($contact) {
|
|||
$posts_link = $a->get_baseurl() . '/network/?cid=' . $contact['id'];
|
||||
|
||||
$menu = Array(
|
||||
t("View status") => $status_link,
|
||||
t("View profile") => $profile_link,
|
||||
t("View photos") => $photos_link,
|
||||
t("View recent") => $posts_link,
|
||||
t("Edit contact") => $contact_url,
|
||||
t("View Status") => $status_link,
|
||||
t("View Profile") => $profile_link,
|
||||
t("View Photos") => $photos_link,
|
||||
t("Network Posts") => $posts_link,
|
||||
t("Edit Contact") => $contact_url,
|
||||
t("Send PM") => $pm_url,
|
||||
);
|
||||
|
||||
|
@ -150,7 +158,7 @@ function contact_photo_menu($contact) {
|
|||
$o = "";
|
||||
foreach($menu as $k=>$v){
|
||||
if ($v!="") {
|
||||
if(($k !== t("View recent")) && ($k !== t("Send PM")))
|
||||
if(($k !== t("Network Posts")) && ($k !== t("Send PM")))
|
||||
$o .= "<li><a target=\"redir\" href=\"$v\">$k</a></li>\n";
|
||||
else
|
||||
$o .= "<li><a href=\"$v\">$k</a></li>\n";
|
||||
|
@ -158,3 +166,36 @@ function contact_photo_menu($contact) {
|
|||
}
|
||||
return $o;
|
||||
}}
|
||||
|
||||
|
||||
function random_profile() {
|
||||
$r = q("select url from gcontact where url like '%%://%%/profile/%%' order by rand() limit 1");
|
||||
if(count($r))
|
||||
return dirname($r[0]['url']);
|
||||
return '';
|
||||
}
|
||||
|
||||
|
||||
function contacts_not_grouped($uid,$start = 0,$count = 0) {
|
||||
|
||||
if(! $count) {
|
||||
$r = q("select count(*) as total from contact where uid = %d and self = 0 and id not in (select distinct(`contact-id`) from group_member where uid = %d) ",
|
||||
intval($uid),
|
||||
intval($uid)
|
||||
);
|
||||
|
||||
return $r;
|
||||
|
||||
|
||||
}
|
||||
|
||||
$r = q("select * from contact where uid = %d and self = 0 and id not in (select distinct(`contact-id`) from group_member where uid = %d) and blocked = 0 and pending = 0 limit %d, %d",
|
||||
intval($uid),
|
||||
intval($uid),
|
||||
intval($start),
|
||||
intval($count)
|
||||
);
|
||||
|
||||
return $r;
|
||||
}
|
||||
|
||||
|
|
|
@ -446,7 +446,7 @@ function probe_url($url, $mode = PROBE_NORMAL) {
|
|||
$phost = substr($url,strpos($url,'@')+1);
|
||||
$profile = 'http://' . $phost;
|
||||
// fix nick character range
|
||||
$vcard = array('fn' => $name, 'nick' => $name, 'photo' => gravatar_img($url));
|
||||
$vcard = array('fn' => $name, 'nick' => $name, 'photo' => avatar_img($url));
|
||||
$notify = 'smtp ' . random_string();
|
||||
$poll = 'email ' . random_string();
|
||||
$priority = 0;
|
||||
|
@ -655,7 +655,7 @@ function probe_url($url, $mode = PROBE_NORMAL) {
|
|||
}
|
||||
|
||||
if((! $vcard['photo']) && strlen($email))
|
||||
$vcard['photo'] = gravatar_img($email);
|
||||
$vcard['photo'] = avatar_img($email);
|
||||
if($poll === $profile)
|
||||
$lnk = $feed->get_permalink();
|
||||
if(isset($lnk) && strlen($lnk))
|
||||
|
|
|
@ -12,6 +12,7 @@ function follow_widget() {
|
|||
}
|
||||
|
||||
function findpeople_widget() {
|
||||
require_once('include/Contact.php');
|
||||
|
||||
$a = get_app();
|
||||
|
||||
|
@ -32,6 +33,7 @@ function findpeople_widget() {
|
|||
'$findthem' => t('Find'),
|
||||
'$suggest' => t('Friend Suggestions'),
|
||||
'$similar' => t('Similar Interests'),
|
||||
'$random' => t('Random Profile'),
|
||||
'$inv' => t('Invite Friends')
|
||||
));
|
||||
|
||||
|
|
|
@ -810,11 +810,11 @@ function item_photo_menu($item){
|
|||
}
|
||||
|
||||
$menu = Array(
|
||||
t("View status") => $status_link,
|
||||
t("View profile") => $profile_link,
|
||||
t("View photos") => $photos_link,
|
||||
t("View recent") => $posts_link,
|
||||
t("Edit contact") => $contact_url,
|
||||
t("View Status") => $status_link,
|
||||
t("View Profile") => $profile_link,
|
||||
t("View Photos") => $photos_link,
|
||||
t("Network Posts") => $posts_link,
|
||||
t("Edit Contact") => $contact_url,
|
||||
t("Send PM") => $pm_url,
|
||||
);
|
||||
|
||||
|
|
|
@ -212,6 +212,7 @@ function group_side($every="contacts",$each="group",$edit = false, $group_id = 0
|
|||
'$title' => t('Groups'),
|
||||
'$edittext' => t('Edit group'),
|
||||
'$createtext' => t('Create a new group'),
|
||||
'$ungrouped' => (($every === 'contacts') ? t('Contacts not in any group') : ''),
|
||||
'$groups' => $groups,
|
||||
'$add' => t('add'),
|
||||
));
|
||||
|
|
|
@ -19,9 +19,15 @@ function get_feed_for(&$a, $dfrn_id, $owner_nick, $last_update, $direction = 0)
|
|||
$converse = true;
|
||||
if($a->argv[$x] == 'starred')
|
||||
$starred = true;
|
||||
if($a->argv[$x] === 'category' && $a->argc > ($x + 1) && strlen($a->argv[$x+1]))
|
||||
$category = $a->argv[$x+1];
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
// default permissions - anonymous user
|
||||
|
||||
$sql_extra = " AND `allow_cid` = '' AND `allow_gid` = '' AND `deny_cid` = '' AND `deny_gid` = '' ";
|
||||
|
@ -101,6 +107,10 @@ function get_feed_for(&$a, $dfrn_id, $owner_nick, $last_update, $direction = 0)
|
|||
if(! strlen($last_update))
|
||||
$last_update = 'now -30 days';
|
||||
|
||||
if(x($category)) {
|
||||
$sql_extra .= file_tag_file_query('item',$category,'category');
|
||||
}
|
||||
|
||||
if($public_feed) {
|
||||
if(! $converse)
|
||||
$sql_extra .= " AND `contact`.`self` = 1 ";
|
||||
|
@ -1856,6 +1866,8 @@ function local_delivery($importer,$data) {
|
|||
$feed->enable_order_by_date(false);
|
||||
$feed->init();
|
||||
|
||||
/*
|
||||
// Currently unsupported - needs a lot of work
|
||||
$reloc = $feed->get_feed_tags( NAMESPACE_DFRN, 'relocate' );
|
||||
if(isset($reloc[0]['child'][NAMESPACE_DFRN])) {
|
||||
$base = $reloc[0]['child'][NAMESPACE_DFRN];
|
||||
|
@ -1880,6 +1892,7 @@ function local_delivery($importer,$data) {
|
|||
// schedule a scan?
|
||||
|
||||
}
|
||||
*/
|
||||
|
||||
// handle friend suggestion notification
|
||||
|
||||
|
@ -2971,12 +2984,23 @@ function item_expire($uid,$days) {
|
|||
if($expire_items==0 && $item['type']!='note')
|
||||
continue;
|
||||
|
||||
|
||||
$r = q("UPDATE `item` SET `deleted` = 1, `edited` = '%s', `changed` = '%s' WHERE `id` = %d LIMIT 1",
|
||||
dbesc(datetime_convert()),
|
||||
dbesc(datetime_convert()),
|
||||
intval($item['id'])
|
||||
);
|
||||
|
||||
$r = q("DELETE FROM item_id where iid in (select id from item where parent = %d) and uid = %d",
|
||||
intval($item['id']),
|
||||
intval($uid)
|
||||
);
|
||||
|
||||
$r = q("DELETE FROM sign where iid in (select id from item where parent = %d) and uid = %d",
|
||||
intval($item['id']),
|
||||
intval($uid)
|
||||
);
|
||||
|
||||
// kill the kids
|
||||
|
||||
$r = q("UPDATE `item` SET `deleted` = 1, `edited` = '%s', `changed` = '%s' WHERE `parent-uri` = '%s' AND `uid` = %d ",
|
||||
|
|
|
@ -587,8 +587,9 @@ function fetch_xrd_links($url) {
|
|||
|
||||
if(! function_exists('validate_url')) {
|
||||
function validate_url(&$url) {
|
||||
// no naked subdomains
|
||||
if(strpos($url,'.') === false)
|
||||
|
||||
// no naked subdomains (allow localhost for tests)
|
||||
if(strpos($url,'.') === false && strpos($url,'/localhost/') === false)
|
||||
return false;
|
||||
if(substr($url,0,4) != 'http')
|
||||
$url = 'http://' . $url;
|
||||
|
@ -692,18 +693,23 @@ function allowed_email($email) {
|
|||
}}
|
||||
|
||||
|
||||
if(! function_exists('gravatar_img')) {
|
||||
function gravatar_img($email) {
|
||||
$size = 175;
|
||||
$opt = 'identicon'; // psuedo-random geometric pattern if not found
|
||||
$rating = 'pg';
|
||||
$hash = md5(trim(strtolower($email)));
|
||||
if(! function_exists('avatar_img')) {
|
||||
function avatar_img($email) {
|
||||
|
||||
$url = 'http://www.gravatar.com/avatar/' . $hash . '.jpg'
|
||||
. '?s=' . $size . '&d=' . $opt . '&r=' . $rating;
|
||||
$a = get_app();
|
||||
|
||||
logger('gravatar: ' . $email . ' ' . $url);
|
||||
return $url;
|
||||
$avatar['size'] = 175;
|
||||
$avatar['email'] = $email;
|
||||
$avatar['url'] = '';
|
||||
$avatar['success'] = false;
|
||||
|
||||
call_hooks('avatar_lookup', $avatar);
|
||||
|
||||
if(! $avatar['success'])
|
||||
$avatar['url'] = $a->get_baseurl() . '/images/person-175.jpg';
|
||||
|
||||
logger('Avatar: ' . $avatar['email'] . ' ' . $avatar['url'], LOGGER_DEBUG);
|
||||
return $avatar['url'];
|
||||
}}
|
||||
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ function sexpref_selector($current="",$suffix="") {
|
|||
|
||||
function marital_selector($current="",$suffix="") {
|
||||
$o = '';
|
||||
$select = array('', t('Single'), t('Lonely'), t('Available'), t('Unavailable'), t('Dating'), t('Unfaithful'), t('Sex Addict'), t('Friends'), t('Friends/Benefits'), t('Casual'), t('Engaged'), t('Married'), t('Partners'), t('Cohabiting'), t('Happy'), t('Not Looking'), t('Swinger'), t('Betrayed'), t('Separated'), t('Unstable'), t('Divorced'), t('Widowed'), t('Uncertain'), t('Complicated'), t('Don\'t care'), t('Ask me') );
|
||||
$select = array('', t('Single'), t('Lonely'), t('Available'), t('Unavailable'), t('Has crush'), t('Infatuated'), t('Dating'), t('Unfaithful'), t('Sex Addict'), t('Friends'), t('Friends/Benefits'), t('Casual'), t('Engaged'), t('Married'), t('Imaginarily married'), t('Partners'), t('Cohabiting'), t('Common law'), t('Happy'), t('Not looking'), t('Swinger'), t('Betrayed'), t('Separated'), t('Unstable'), t('Divorced'), t('Imaginarily divorced'), t('Widowed'), t('Uncertain'), t('It\'s complicated'), t('Don\'t care'), t('Ask me') );
|
||||
|
||||
$o .= "<select name=\"marital\" id=\"marital-select\" size=\"1\" >";
|
||||
foreach($select as $selection) {
|
||||
|
|
|
@ -326,7 +326,7 @@ function check_form_security_token($typename = '', $formname = 'form_security_to
|
|||
}
|
||||
|
||||
function check_form_security_std_err_msg() {
|
||||
return t('The form security token was not correct. This probably happened because the form has been opened for too long (>3 hours) before subitting it.') . EOL;
|
||||
return t('The form security token was not correct. This probably happened because the form has been opened for too long (>3 hours) before submitting it.') . EOL;
|
||||
}
|
||||
function check_form_security_token_redirectOnErr($err_redirect, $typename = '', $formname = 'form_security_token') {
|
||||
if (!check_form_security_token($typename, $formname)) {
|
||||
|
|
|
@ -1068,10 +1068,12 @@ function unamp($s) {
|
|||
if(! function_exists('lang_selector')) {
|
||||
function lang_selector() {
|
||||
global $lang;
|
||||
$o = '<div id="lang-select-icon" class="icon language" title="' . t('Select an alternate language') . '" onclick="openClose(\'language-selector\');" ></div>';
|
||||
$o .= '<div id="language-selector" style="display: none;" >';
|
||||
$o .= '<form action="#" method="post" ><select name="system_language" onchange="this.form.submit();" >';
|
||||
|
||||
$langs = glob('view/*/strings.php');
|
||||
|
||||
$lang_options = array();
|
||||
$selected = "";
|
||||
|
||||
if(is_array($langs) && count($langs)) {
|
||||
$langs[] = '';
|
||||
if(! in_array('view/en/strings.php',$langs))
|
||||
|
@ -1079,17 +1081,22 @@ function lang_selector() {
|
|||
asort($langs);
|
||||
foreach($langs as $l) {
|
||||
if($l == '') {
|
||||
$default_selected = ((! x($_SESSION,'language')) ? ' selected="selected" ' : '');
|
||||
$o .= '<option value="" ' . $default_selected . '>' . t('default') . '</option>';
|
||||
$lang_options[""] = t('default');
|
||||
continue;
|
||||
}
|
||||
$ll = substr($l,5);
|
||||
$ll = substr($ll,0,strrpos($ll,'/'));
|
||||
$selected = (($ll === $lang && (x($_SESSION, 'language'))) ? ' selected="selected" ' : '');
|
||||
$o .= '<option value="' . $ll . '"' . $selected . '>' . $ll . '</option>';
|
||||
$selected = (($ll === $lang && (x($_SESSION, 'language'))) ? $ll : $selected);
|
||||
$lang_options[$ll]=$ll;
|
||||
}
|
||||
}
|
||||
$o .= '</select></form></div>';
|
||||
|
||||
$tpl = get_markup_template("lang_selector.tpl");
|
||||
$o = replace_macros($tpl, array(
|
||||
'$title' => t('Select an alternate language'),
|
||||
'$langs' => array($lang_options, $selected),
|
||||
|
||||
));
|
||||
return $o;
|
||||
}}
|
||||
|
||||
|
@ -1506,3 +1513,8 @@ function undo_post_tagging($s) {
|
|||
return $s;
|
||||
}
|
||||
|
||||
function fix_mce_lf($s) {
|
||||
$s = str_replace("\r\n","\n",$s);
|
||||
$s = str_replace("\n\n","\n",$s);
|
||||
return $s;
|
||||
}
|
||||
|
|
13
index.php
|
@ -38,11 +38,10 @@ load_translation_table($lang);
|
|||
*/
|
||||
|
||||
require_once("dba.php");
|
||||
$db = new dba($db_host, $db_user, $db_pass, $db_data, $install);
|
||||
unset($db_host, $db_user, $db_pass, $db_data);
|
||||
|
||||
|
||||
if(! $install) {
|
||||
$db = new dba($db_host, $db_user, $db_pass, $db_data, $install);
|
||||
unset($db_host, $db_user, $db_pass, $db_data);
|
||||
|
||||
/**
|
||||
* Load configs from db. Overwrite configs from .htconfig.php
|
||||
|
@ -96,6 +95,10 @@ if((x($_SESSION,'language')) && ($_SESSION['language'] !== $lang)) {
|
|||
if(x($_GET,'zrl')) {
|
||||
$_SESSION['my_url'] = $_GET['zrl'];
|
||||
$a->query_string = preg_replace('/[\?&]zrl=(.*?)([\?&]|$)/is','',$a->query_string);
|
||||
if(! $install) {
|
||||
$arr = array('zrl' => $_SESSION['my_url'], 'url' => $a->cmd);
|
||||
call_hooks('zrl_init',$arr);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -360,13 +363,13 @@ $profile = $a->profile;
|
|||
|
||||
header("Content-type: text/html; charset=utf-8");
|
||||
|
||||
$template = 'view/' . current_theme() . '/'
|
||||
$template = 'view/theme/' . current_theme() . '/'
|
||||
. ((x($a->page,'template')) ? $a->page['template'] : 'default' ) . '.php';
|
||||
|
||||
if(file_exists($template))
|
||||
require_once($template);
|
||||
else
|
||||
require_once(str_replace(current_theme() . '/', '', $template));
|
||||
require_once(str_replace('theme/' . current_theme() . '/', '', $template));
|
||||
|
||||
session_write_close();
|
||||
exit;
|
||||
|
|
|
@ -137,13 +137,12 @@
|
|||
$('#mail-update-li').html(mail);
|
||||
|
||||
var eNotif = $(data).find('notif')
|
||||
notif = eNotif.attr('count');
|
||||
if (notif>=0){
|
||||
$("#nav-notifications-linkmenu").addClass("on");
|
||||
|
||||
if (eNotif.children("note").length==0){
|
||||
$("#nav-notifications-menu").html(notifications_empty);
|
||||
} else {
|
||||
nnm = $("#nav-notifications-menu");
|
||||
|
||||
nnm.html(notifications_all + notifications_mark);
|
||||
|
||||
//nnm.attr('popup','true');
|
||||
eNotif.children("note").each(function(){
|
||||
e = $(this);
|
||||
|
@ -151,10 +150,12 @@
|
|||
html = notifications_tpl.format(e.attr('href'),e.attr('photo'), text, e.attr('date'), e.attr('seen'));
|
||||
nnm.append(html);
|
||||
});
|
||||
|
||||
}
|
||||
notif = eNotif.attr('count');
|
||||
if (notif>0){
|
||||
$("#nav-notifications-linkmenu").addClass("on");
|
||||
} else {
|
||||
// $("#nav-notifications-linkmenu").removeClass("on");
|
||||
// $("#nav-notifications-menu").html(notifications_empty);
|
||||
$("#nav-notifications-linkmenu").removeClass("on");
|
||||
}
|
||||
if(notif == 0) { notif = ''; $('#notify-update').removeClass('show') } else { $('#notify-update').addClass('show') }
|
||||
$('#notify-update').html(notif);
|
||||
|
|
|
@ -40,6 +40,20 @@ function admin_post(&$a){
|
|||
goaway($a->get_baseurl(true) . '/admin/plugins/' . $a->argv[2] );
|
||||
return; // NOTREACHED
|
||||
break;
|
||||
case 'themes':
|
||||
$theme = $a->argv[2];
|
||||
if (is_file("view/theme/$theme/config.php")){
|
||||
require_once("view/theme/$theme/config.php");
|
||||
if (function_exists("theme_admin_post")){
|
||||
theme_admin_post($a);
|
||||
}
|
||||
}
|
||||
info(t('Theme settings updated.'));
|
||||
if(is_ajax()) return;
|
||||
|
||||
goaway($a->get_baseurl(true) . '/admin/themes/' . $theme );
|
||||
return;
|
||||
break;
|
||||
case 'logs':
|
||||
admin_page_logs_post($a);
|
||||
break;
|
||||
|
@ -129,8 +143,14 @@ function admin_content(&$a) {
|
|||
} else {
|
||||
$o = admin_page_summary($a);
|
||||
}
|
||||
|
||||
if(is_ajax()) {
|
||||
echo $o;
|
||||
killme();
|
||||
} else {
|
||||
return $o;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
|
@ -174,7 +194,6 @@ function admin_page_site_post(&$a){
|
|||
return;
|
||||
}
|
||||
|
||||
|
||||
$sitename = ((x($_POST,'sitename')) ? notags(trim($_POST['sitename'])) : '');
|
||||
$banner = ((x($_POST,'banner')) ? trim($_POST['banner']) : false);
|
||||
$language = ((x($_POST,'language')) ? notags(trim($_POST['language'])) : '');
|
||||
|
@ -194,7 +213,6 @@ function admin_page_site_post(&$a){
|
|||
$global_directory = ((x($_POST,'directory_submit_url')) ? notags(trim($_POST['directory_submit_url'])) : '');
|
||||
$no_multi_reg = ((x($_POST,'no_multi_reg')) ? True : False);
|
||||
$no_openid = !((x($_POST,'no_openid')) ? True : False);
|
||||
$no_gravatar = !((x($_POST,'no_gravatar')) ? True : False);
|
||||
$no_regfullname = !((x($_POST,'no_regfullname')) ? True : False);
|
||||
$no_utf = !((x($_POST,'no_utf')) ? True : False);
|
||||
$no_community_page = !((x($_POST,'no_community_page')) ? True : False);
|
||||
|
@ -283,7 +301,6 @@ function admin_page_site_post(&$a){
|
|||
set_config('system','directory_search_url', $global_search_url);
|
||||
set_config('system','block_extended_register', $no_multi_reg);
|
||||
set_config('system','no_openid', $no_openid);
|
||||
set_config('system','no_gravatar', $no_gravatar);
|
||||
set_config('system','no_regfullname', $no_regfullname);
|
||||
set_config('system','no_community_page', $no_community_page);
|
||||
set_config('system','no_utf', $no_utf);
|
||||
|
@ -365,7 +382,7 @@ function admin_page_site(&$a) {
|
|||
'$sitename' => array('sitename', t("Site name"), htmlentities($a->config['sitename'], ENT_QUOTES), ""),
|
||||
'$banner' => array('banner', t("Banner/Logo"), $banner, ""),
|
||||
'$language' => array('language', t("System language"), get_config('system','language'), "", $lang_choices),
|
||||
'$theme' => array('theme', t("System theme"), get_config('system','theme'), t("Default system theme - may be over-ridden by user profiles"), $theme_choices),
|
||||
'$theme' => array('theme', t("System theme"), get_config('system','theme'), t("Default system theme - may be over-ridden by user profiles - <a href='#' id='cnftheme'>change theme settings</a>"), $theme_choices),
|
||||
'$ssl_policy' => array('ssl_policy', t("SSL link policy"), (string) intval(get_config('system','ssl_policy')), t("Determines whether generated links should be forced to use SSL"), $ssl_choices),
|
||||
'$maximagesize' => array('maximagesize', t("Maximum image size"), get_config('system','maximagesize'), t("Maximum size in bytes of uploaded images. Default is 0, which means no limits.")),
|
||||
|
||||
|
@ -380,7 +397,6 @@ function admin_page_site(&$a) {
|
|||
|
||||
'$no_multi_reg' => array('no_multi_reg', t("Block multiple registrations"), get_config('system','block_extended_register'), t("Disallow users to register additional accounts for use as pages.")),
|
||||
'$no_openid' => array('no_openid', t("OpenID support"), !get_config('system','no_openid'), t("OpenID support for registration and logins.")),
|
||||
'$no_gravatar' => array('no_gravatar', t("Gravatar support"), !get_config('system','no_gravatar'), t("Search new user's photo on Gravatar.")),
|
||||
'$no_regfullname' => array('no_regfullname', t("Fullname check"), !get_config('system','no_regfullname'), t("Force users to register with a space between firstname and lastname in Full name, as an antispam measure")),
|
||||
'$no_utf' => array('no_utf', t("UTF-8 Regular expressions"), !get_config('system','no_utf'), t("Use PHP UTF8 regular expressions")),
|
||||
'$no_community_page' => array('no_community_page', t("Show Community Page"), !get_config('system','no_community_page'), t("Display a Community page showing all recent public postings on this site.")),
|
||||
|
@ -772,14 +788,22 @@ function admin_page_themes(&$a){
|
|||
}
|
||||
|
||||
$readme=Null;
|
||||
if (is_file("view/$theme/README.md")){
|
||||
$readme = file_get_contents("view/$theme/README.md");
|
||||
if (is_file("view/theme/$theme/README.md")){
|
||||
$readme = file_get_contents("view/theme/$theme/README.md");
|
||||
$readme = Markdown($readme);
|
||||
} else if (is_file("view/$theme/README")){
|
||||
$readme = "<pre>". file_get_contents("view/$theme/README") ."</pre>";
|
||||
} else if (is_file("view/theme/$theme/README")){
|
||||
$readme = "<pre>". file_get_contents("view/theme/$theme/README") ."</pre>";
|
||||
}
|
||||
|
||||
$admin_form="";
|
||||
if (is_file("view/theme/$theme/config.php")){
|
||||
require_once("view/theme/$theme/config.php");
|
||||
if(function_exists("theme_admin")){
|
||||
$admin_form = theme_admin($a);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
$screenshot = array( get_theme_screenshot($theme), t('Screenshot'));
|
||||
if(! stristr($screenshot[0],$theme))
|
||||
|
@ -809,7 +833,7 @@ function admin_page_themes(&$a){
|
|||
|
||||
|
||||
/**
|
||||
* List plugins
|
||||
* List themes
|
||||
*/
|
||||
|
||||
$xthemes = array();
|
||||
|
|
|
@ -45,13 +45,13 @@ function community_content(&$a, $update = 0) {
|
|||
// OR your own posts if you are a logged in member
|
||||
|
||||
|
||||
$r = q("SELECT COUNT(*) AS `total`
|
||||
$r = q("SELECT distinct(`item`.`uri`) AS `total`
|
||||
FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id` LEFT JOIN `user` ON `user`.`uid` = `item`.`uid`
|
||||
WHERE `item`.`visible` = 1 AND `item`.`deleted` = 0 and `item`.`moderated` = 0
|
||||
AND `item`.`allow_cid` = '' AND `item`.`allow_gid` = ''
|
||||
AND `item`.`deny_cid` = '' AND `item`.`deny_gid` = ''
|
||||
AND `item`.`private` = 0 AND `item`.`wall` = 1 AND `user`.`hidewall` = 0
|
||||
AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0 "
|
||||
AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0 group by `item`.`uri` "
|
||||
);
|
||||
|
||||
if(count($r))
|
||||
|
@ -62,7 +62,7 @@ function community_content(&$a, $update = 0) {
|
|||
return $o;
|
||||
}
|
||||
|
||||
$r = q("SELECT `item`.*, `item`.`id` AS `item_id`,
|
||||
$r = q("SELECT distinct(`item`.`uri`), `item`.*, `item`.`id` AS `item_id`,
|
||||
`contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`rel`,
|
||||
`contact`.`network`, `contact`.`thumb`, `contact`.`self`, `contact`.`writable`,
|
||||
`contact`.`id` AS `cid`, `contact`.`uid` AS `contact-uid`,
|
||||
|
@ -73,7 +73,7 @@ function community_content(&$a, $update = 0) {
|
|||
AND `item`.`allow_cid` = '' AND `item`.`allow_gid` = ''
|
||||
AND `item`.`deny_cid` = '' AND `item`.`deny_gid` = ''
|
||||
AND `item`.`private` = 0 AND `item`.`wall` = 1 AND `user`.`hidewall` = 0
|
||||
AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0
|
||||
AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0 group by `item`.`uri`
|
||||
ORDER BY `received` DESC LIMIT %d, %d ",
|
||||
intval($a->pager['start']),
|
||||
intval($a->pager['itemspage'])
|
||||
|
|
|
@ -85,7 +85,7 @@ function contacts_post(&$a) {
|
|||
if($priority > 5 || $priority < 0)
|
||||
$priority = 0;
|
||||
|
||||
$info = escape_tags(trim($_POST['info']));
|
||||
$info = fix_mce_lf(escape_tags(trim($_POST['info'])));
|
||||
|
||||
$r = q("UPDATE `contact` SET `profile-id` = %d, `priority` = %d , `info` = '%s',
|
||||
`hidden` = %d WHERE `id` = %d AND `uid` = %d LIMIT 1",
|
||||
|
@ -232,8 +232,14 @@ function contacts_content(&$a) {
|
|||
$contact_id = $a->data['contact']['id'];
|
||||
$contact = $a->data['contact'];
|
||||
|
||||
$tpl = get_markup_template('contact_head.tpl');
|
||||
$a->page['htmlhead'] .= replace_macros($tpl, array('$baseurl' => $a->get_baseurl(true)));
|
||||
$editselect = 'exact';
|
||||
if(intval(get_pconfig(local_user(),'system','plaintext')))
|
||||
$editselect = 'none';
|
||||
|
||||
$a->page['htmlhead'] .= replace_macros(get_markup_template('contact_head.tpl'), array(
|
||||
'$baseurl' => $a->get_baseurl(true),
|
||||
'$editselect' => $editselect,
|
||||
));
|
||||
|
||||
require_once('include/contact_selectors.php');
|
||||
|
||||
|
|
|
@ -428,11 +428,13 @@ function dfrn_poll_content(&$a) {
|
|||
break; // NOTREACHED
|
||||
}
|
||||
|
||||
$nickname = $a->argv[1];
|
||||
|
||||
$r = q("SELECT `contact`.*, `user`.`username`, `user`.`nickname`
|
||||
FROM `contact` LEFT JOIN `user` ON `contact`.`uid` = `user`.`uid`
|
||||
WHERE `contact`.`blocked` = 0 AND `contact`.`pending` = 0
|
||||
AND `user`.`nickname` = '%s' $sql_extra LIMIT 1",
|
||||
dbesc($a->argv[1])
|
||||
dbesc($nickname)
|
||||
);
|
||||
|
||||
if(count($r)) {
|
||||
|
@ -482,7 +484,7 @@ function dfrn_poll_content(&$a) {
|
|||
));
|
||||
}
|
||||
|
||||
$profile = $r[0]['nickname'];
|
||||
$profile = ((count($r) && $r[0]['nickname']) ? $r[0]['nickname'] : $nickname);
|
||||
|
||||
switch($destination_url) {
|
||||
case 'profile':
|
||||
|
|
|
@ -261,7 +261,7 @@ function dfrn_request_post(&$a) {
|
|||
WHERE `intro`.`blocked` = 1 AND `contact`.`self` = 0
|
||||
AND `contact`.`network` != '%s'
|
||||
AND `intro`.`datetime` < UTC_TIMESTAMP() - INTERVAL 30 MINUTE ",
|
||||
dbesc(NETWORK_MAIL)
|
||||
dbesc(NETWORK_MAIL2)
|
||||
);
|
||||
if(count($r)) {
|
||||
foreach($r as $rr) {
|
||||
|
@ -286,7 +286,7 @@ function dfrn_request_post(&$a) {
|
|||
WHERE `intro`.`blocked` = 1 AND `contact`.`self` = 0
|
||||
AND `contact`.`network` = '%s'
|
||||
AND `intro`.`datetime` < UTC_TIMESTAMP() - INTERVAL 3 DAY ",
|
||||
dbesc(NETWORK_MAIL)
|
||||
dbesc(NETWORK_MAIL2)
|
||||
);
|
||||
if(count($r)) {
|
||||
foreach($r as $rr) {
|
||||
|
@ -301,6 +301,8 @@ function dfrn_request_post(&$a) {
|
|||
}
|
||||
}
|
||||
|
||||
$email_follow = (x($_POST,'email_follow') ? intval($_POST['email_follow']) : 0);
|
||||
$real_name = (x($_POST,'realname') ? notags(trim($_POST['realname'])) : '');
|
||||
|
||||
$url = trim($_POST['dfrn_url']);
|
||||
if(! strlen($url)) {
|
||||
|
@ -308,9 +310,51 @@ function dfrn_request_post(&$a) {
|
|||
return;
|
||||
}
|
||||
|
||||
$hcard = '';
|
||||
|
||||
if($email_follow) {
|
||||
|
||||
if(! strpos($url,'@')) {
|
||||
notice( t('Invalid email address.') . EOL);
|
||||
return;
|
||||
}
|
||||
|
||||
$addr = $url;
|
||||
$name = ($realname) ? $realname : $addr;
|
||||
$nick = substr($addr,0,strpos($addr,'@'));
|
||||
$url = 'http://' . substr($addr,strpos($addr,'@') + 1);
|
||||
$nurl = normalise_url($host);
|
||||
$poll = 'email ' . random_string();
|
||||
$notify = 'smtp ' . random_string();
|
||||
$blocked = 1;
|
||||
$pending = 1;
|
||||
$network = NETWORK_MAIL2;
|
||||
$rel = CONTACT_IS_FOLLOWER;
|
||||
|
||||
$mail_disabled = ((function_exists('imap_open') && (! get_config('system','imap_disabled'))) ? 0 : 1);
|
||||
if(get_config('system','dfrn_only'))
|
||||
$mail_disabled = 1;
|
||||
|
||||
if(! $mail_disabled) {
|
||||
$failed = false;
|
||||
$r = q("SELECT * FROM `mailacct` WHERE `uid` = %d LIMIT 1",
|
||||
intval($uid)
|
||||
);
|
||||
if(! count($r)) {
|
||||
notice( t('This account has not been configured for email. Request failed.') . EOL);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
else {
|
||||
|
||||
// Canonicalise email-style profile locator
|
||||
|
||||
$hcard = '';
|
||||
$url = webfinger_dfrn($url,$hcard);
|
||||
|
||||
if(substr($url,0,5) === 'stat:') {
|
||||
|
@ -320,6 +364,7 @@ function dfrn_request_post(&$a) {
|
|||
else {
|
||||
$network = NETWORK_DFRN;
|
||||
}
|
||||
}
|
||||
|
||||
logger('dfrn_request: url: ' . $url);
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ function directory_content(&$a) {
|
|||
$gdirpath = dirname(get_config('system','directory_submit_url'));
|
||||
if(strlen($gdirpath)) {
|
||||
$globaldir = '<ul><li><div id="global-directory-link"><a href="'
|
||||
. $gdirpath . '">' . t('Global Directory') . '</a></div></li></ul>';
|
||||
. zrl($gdirpath,true) . '">' . t('Global Directory') . '</a></div></li></ul>';
|
||||
}
|
||||
|
||||
$admin = '';
|
||||
|
|
|
@ -451,7 +451,7 @@ function load_database_rem($v, $i){
|
|||
function load_database($db) {
|
||||
|
||||
$str = file_get_contents('database.sql');
|
||||
$str = array_reduce(explode("\n", $str),"load_database_rem","");
|
||||
// $str = array_reduce(explode("\n", $str),"load_database_rem","");
|
||||
$arr = explode(';',$str);
|
||||
$errors = false;
|
||||
foreach($arr as $a) {
|
||||
|
|
|
@ -272,8 +272,7 @@ function item_post(&$a) {
|
|||
|
||||
$plaintext = (local_user() ? intval(get_pconfig(local_user(),'system','plaintext')) : 0);
|
||||
if((! $parent) && (! $api_source) && (! $plaintext)) {
|
||||
$body = str_replace("\r\n","\n",$body);
|
||||
$body = str_replace("\n\n","\n",$body);
|
||||
$body = fix_mce_lf($body);
|
||||
}
|
||||
|
||||
|
||||
|
@ -447,7 +446,7 @@ function item_post(&$a) {
|
|||
|
||||
if(count($tags)) {
|
||||
foreach($tags as $tag) {
|
||||
handle_tag($a, $body, $inform, $str_tags, $profile_uid, $tag);
|
||||
handle_tag($a, $body, $inform, $str_tags, (local_user()) ? local_user() : $profile_uid , $tag);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -48,8 +48,7 @@ function message_post(&$a) {
|
|||
|
||||
$plaintext = intval(get_pconfig(local_user(),'system','plaintext'));
|
||||
if(! $plaintext) {
|
||||
$body = str_replace("\r\n","\n",$body);
|
||||
$body = str_replace("\n\n","\n",$body);
|
||||
$body = fix_mce_lf($body);
|
||||
}
|
||||
|
||||
$ret = send_message($recipient, $body, $subject, $replyto);
|
||||
|
|
|
@ -13,7 +13,7 @@ function newmember_content(&$a) {
|
|||
|
||||
$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="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;
|
||||
|
||||
|
|
|
@ -0,0 +1,65 @@
|
|||
<?php
|
||||
|
||||
require_once('include/Contact.php');
|
||||
require_once('include/socgraph.php');
|
||||
require_once('include/contact_selectors.php');
|
||||
|
||||
function nogroup_init(&$a) {
|
||||
|
||||
if(! local_user())
|
||||
return;
|
||||
|
||||
require_once('include/group.php');
|
||||
require_once('include/contact_widgets.php');
|
||||
|
||||
if(! x($a->page,'aside'))
|
||||
$a->page['aside'] = '';
|
||||
|
||||
$a->page['aside'] .= group_side('contacts','group',false,0,$contact_id);
|
||||
}
|
||||
|
||||
|
||||
function nogroup_content(&$a) {
|
||||
|
||||
if(! local_user()) {
|
||||
notice( t('Permission denied.') . EOL);
|
||||
return '';
|
||||
}
|
||||
|
||||
require_once('include/Contact.php');
|
||||
$r = contacts_not_grouped(local_user());
|
||||
if(count($r)) {
|
||||
$a->set_pager_total($r[0]['total']);
|
||||
}
|
||||
$r = contacts_not_grouped(local_user(),$a->pager['start'],$a->pager['itemspage']);
|
||||
if(count($r)) {
|
||||
foreach($r as $rr) {
|
||||
|
||||
|
||||
$contacts[] = array(
|
||||
'img_hover' => sprintf( t('Visit %s\'s profile [%s]'),$rr['name'],$rr['url']),
|
||||
'edit_hover' => t('Edit contact'),
|
||||
'photo_menu' => contact_photo_menu($rr),
|
||||
'id' => $rr['id'],
|
||||
'alt_text' => $alt_text,
|
||||
'dir_icon' => $dir_icon,
|
||||
'thumb' => $rr['thumb'],
|
||||
'name' => $rr['name'],
|
||||
'username' => $rr['name'],
|
||||
'sparkle' => $sparkle,
|
||||
'itemurl' => $rr['url'],
|
||||
'url' => $url,
|
||||
'network' => network_to_name($rr['network']),
|
||||
);
|
||||
}
|
||||
}
|
||||
$tpl = get_markup_template("nogroup-template.tpl");
|
||||
$o .= replace_macros($tpl,array(
|
||||
'$header' => t('Contacts who are not members of a group'),
|
||||
'$contacts' => $contacts,
|
||||
'$paginate' => paginate($a),
|
||||
));
|
||||
|
||||
return $o;
|
||||
|
||||
}
|
|
@ -151,7 +151,7 @@ function notifications_content(&$a) {
|
|||
'$fullname' => $rr['fname'],
|
||||
'$url' => zrl($rr['furl']),
|
||||
'$hidden' => array('hidden', t('Hide this contact from others'), ($rr['hidden'] == 1), ''),
|
||||
'$activity' => array('activity', t('Post a new friend activity'), 1, t('if applicable')),
|
||||
'$activity' => array('activity', t('Post a new friend activity'), (intval(get_pconfig(local_user(),'system','post_newfriend')) ? '1' : 0), t('if applicable')),
|
||||
|
||||
'$knowyou' => $knowyou,
|
||||
'$approve' => t('Approve'),
|
||||
|
@ -198,7 +198,7 @@ function notifications_content(&$a) {
|
|||
'$photo' => ((x($rr,'photo')) ? $rr['photo'] : "images/person-175.jpg"),
|
||||
'$fullname' => $rr['name'],
|
||||
'$hidden' => array('hidden', t('Hide this contact from others'), ($rr['hidden'] == 1), ''),
|
||||
'$activity' => array('activity', t('Post a new friend activity'), 1, t('if applicable')),
|
||||
'$activity' => array('activity', t('Post a new friend activity'), (intval(get_pconfig(local_user(),'system','post_newfriend')) ? '1' : 0), t('if applicable')),
|
||||
'$url' => zrl($rr['url']),
|
||||
'$knowyou' => $knowyou,
|
||||
'$approve' => t('Approve'),
|
||||
|
|
|
@ -14,7 +14,7 @@ function profile_init(&$a) {
|
|||
else {
|
||||
$r = q("select nickname from user where blocked = 0 and account_expired = 0 and verified = 1 order by rand() limit 1");
|
||||
if(count($r)) {
|
||||
$which = $r[0]['nickname'];
|
||||
goaway($a->get_baseurl() . '/profile/' . $r[0]['nickname']);
|
||||
}
|
||||
else {
|
||||
notice( t('Requested profile is not available.') . EOL );
|
||||
|
|
140
mod/profiles.php
|
@ -51,6 +51,7 @@ function profiles_post(&$a) {
|
|||
if($orig[0]['name'] != $name)
|
||||
$namechanged = true;
|
||||
|
||||
|
||||
$pdesc = notags(trim($_POST['pdesc']));
|
||||
$gender = notags(trim($_POST['gender']));
|
||||
$address = notags(trim($_POST['address']));
|
||||
|
@ -61,15 +62,16 @@ function profiles_post(&$a) {
|
|||
$pub_keywords = notags(trim($_POST['pub_keywords']));
|
||||
$prv_keywords = notags(trim($_POST['prv_keywords']));
|
||||
$marital = notags(trim($_POST['marital']));
|
||||
if($marital != $orig[0]['marital'])
|
||||
$maritalchanged = true;
|
||||
|
||||
$with = ((x($_POST,'with')) ? notags(trim($_POST['with'])) : '');
|
||||
|
||||
// linkify the relationship target if applicable
|
||||
|
||||
$withchanged = false;
|
||||
|
||||
if(strlen($with)) {
|
||||
if($with != strip_tags($orig[0]['with'])) {
|
||||
$withchanged = true;
|
||||
$prf = '';
|
||||
$lookup = $with;
|
||||
if(strpos($lookup,'@') === 0)
|
||||
|
@ -121,18 +123,40 @@ function profiles_post(&$a) {
|
|||
$politic = notags(trim($_POST['politic']));
|
||||
$religion = notags(trim($_POST['religion']));
|
||||
|
||||
$about = escape_tags(trim($_POST['about']));
|
||||
$interest = escape_tags(trim($_POST['interest']));
|
||||
$contact = escape_tags(trim($_POST['contact']));
|
||||
$music = escape_tags(trim($_POST['music']));
|
||||
$book = escape_tags(trim($_POST['book']));
|
||||
$tv = escape_tags(trim($_POST['tv']));
|
||||
$film = escape_tags(trim($_POST['film']));
|
||||
$romance = escape_tags(trim($_POST['romance']));
|
||||
$work = escape_tags(trim($_POST['work']));
|
||||
$education = escape_tags(trim($_POST['education']));
|
||||
$about = fix_mce_lf(escape_tags(trim($_POST['about'])));
|
||||
$interest = fix_mce_lf(escape_tags(trim($_POST['interest'])));
|
||||
$contact = fix_mce_lf(escape_tags(trim($_POST['contact'])));
|
||||
$music = fix_mce_lf(escape_tags(trim($_POST['music'])));
|
||||
$book = fix_mce_lf(escape_tags(trim($_POST['book'])));
|
||||
$tv = fix_mce_lf(escape_tags(trim($_POST['tv'])));
|
||||
$film = fix_mce_lf(escape_tags(trim($_POST['film'])));
|
||||
$romance = fix_mce_lf(escape_tags(trim($_POST['romance'])));
|
||||
$work = fix_mce_lf(escape_tags(trim($_POST['work'])));
|
||||
$education = fix_mce_lf(escape_tags(trim($_POST['education'])));
|
||||
|
||||
$hide_friends = (($_POST['hide-friends'] == 1) ? 1: 0);
|
||||
|
||||
|
||||
|
||||
$changes = array();
|
||||
if($is_default) {
|
||||
if($marital != $orig[0]['marital']) $changes[] = '♥ ' . t('Marital Status');
|
||||
if($withchanged) $changes[] = '♥ ' . t('Romantic Partner');
|
||||
if($work != $orig[0]['work']) $changes[] = t('Work/Employment');
|
||||
if($religion != $orig[0]['religion']) $changes[] = t('Religion');
|
||||
if($politic != $orig[0]['politic']) $changes[] = t('Political Views');
|
||||
if($gender != $orig[0]['gender']) $changes[] = t('Gender');
|
||||
if($sexual != $orig[0]['sexual']) $changes[] = t('Sexual Preference');
|
||||
if($homepage != $orig[0]['homepage']) $changes[] = t('Homepage');
|
||||
if($interest != $orig[0]['interest']) $changes[] = t('Interests');
|
||||
if($address != $orig[0]['address'] || $locality != $orig[0]['locality'] || $region != $orig[0]['region']
|
||||
|| $country_name != $orig[0]['country_name'])
|
||||
$changes[] = t('Location');
|
||||
|
||||
profile_activity($changes);
|
||||
|
||||
}
|
||||
|
||||
$r = q("UPDATE `profile`
|
||||
SET `profile-name` = '%s',
|
||||
`name` = '%s',
|
||||
|
@ -194,7 +218,7 @@ function profiles_post(&$a) {
|
|||
dbesc($education),
|
||||
intval($hide_friends),
|
||||
intval($a->argv[1]),
|
||||
intval($_SESSION['uid'])
|
||||
intval(local_user())
|
||||
);
|
||||
|
||||
if($r)
|
||||
|
@ -221,6 +245,79 @@ function profiles_post(&$a) {
|
|||
}
|
||||
|
||||
|
||||
function profile_activity($changed) {
|
||||
$a = get_app();
|
||||
|
||||
if(! local_user() || ! is_array($changed) || ! count($changed))
|
||||
return;
|
||||
|
||||
if($a->user['hidewall'] || get_config('system','block_public'))
|
||||
return;
|
||||
|
||||
if(! get_pconfig(local_user(),'system','post_profilechange'))
|
||||
return;
|
||||
|
||||
require_once('include/items.php');
|
||||
|
||||
$self = q("SELECT * FROM `contact` WHERE `self` = 1 AND `uid` = %d LIMIT 1",
|
||||
intval(local_user())
|
||||
);
|
||||
|
||||
if(! count($self))
|
||||
return;
|
||||
|
||||
$arr = array();
|
||||
$arr['uri'] = $arr['parent-uri'] = item_new_uri($a->get_hostname(), local_user());
|
||||
$arr['uid'] = local_user();
|
||||
$arr['contact-id'] = $self[0]['id'];
|
||||
$arr['wall'] = 1;
|
||||
$arr['type'] = 'wall';
|
||||
$arr['gravity'] = 0;
|
||||
$arr['origin'] = 1;
|
||||
$arr['author-name'] = $arr['owner-name'] = $self[0]['name'];
|
||||
$arr['author-link'] = $arr['owner-link'] = $self[0]['url'];
|
||||
$arr['author-avatar'] = $arr['owner-avatar'] = $self[0]['thumb'];
|
||||
$arr['verb'] = ACTIVITY_UPDATE;
|
||||
$arr['object-type'] = ACTIVITY_OBJ_PROFILE;
|
||||
|
||||
$A = '[url=' . $self[0]['url'] . ']' . $self[0]['name'] . '[/url]';
|
||||
|
||||
|
||||
$changes = '';
|
||||
$t = count($changed);
|
||||
$z = 0;
|
||||
foreach($changed as $ch) {
|
||||
if(strlen($changes)) {
|
||||
if ($z == ($t - 1))
|
||||
$changes .= ' and ';
|
||||
else
|
||||
$changes .= ', ';
|
||||
}
|
||||
$z ++;
|
||||
$changes .= $ch;
|
||||
}
|
||||
|
||||
$prof = '[url=' . $self[0]['url'] . '?tab=profile' . ']' . t('public profile') . '[/url]';
|
||||
|
||||
$arr['body'] = sprintf( t('%1$s has an updated %2$s, changing %3$s.'), $A, $prof, $changes);
|
||||
|
||||
$arr['object'] = '<object><type>' . ACTIVITY_OBJ_PROFILE . '</type><title>' . $self[0]['name'] . '</title>'
|
||||
. '<id>' . $self[0]['url'] . '/' . $self[0]['name'] . '</id>';
|
||||
$arr['object'] .= '<link>' . xmlify('<link rel="alternate" type="text/html" href="' . $self[0]['url'] . '?tab=profile' . '" />' . "\n");
|
||||
$arr['object'] .= xmlify('<link rel="photo" type="image/jpeg" href="' . $self[0]['thumb'] . '" />' . "\n");
|
||||
$arr['object'] .= '</link></object>' . "\n";
|
||||
$arr['last-child'] = 1;
|
||||
|
||||
$arr['allow_cid'] = $a->user['allow_cid'];
|
||||
$arr['allow_gid'] = $a->user['allow_gid'];
|
||||
$arr['deny_cid'] = $a->user['deny_cid'];
|
||||
$arr['deny_gid'] = $a->user['deny_gid'];
|
||||
|
||||
$i = item_store($arr);
|
||||
if($i)
|
||||
proc_run('php',"include/notifier.php","activity","$i");
|
||||
|
||||
}
|
||||
|
||||
|
||||
function profiles_content(&$a) {
|
||||
|
@ -361,7 +458,16 @@ function profiles_content(&$a) {
|
|||
|
||||
require_once('include/profile_selectors.php');
|
||||
|
||||
$tpl = get_markup_template('profed_head.tpl');
|
||||
|
||||
$editselect = 'textareas';
|
||||
if(intval(get_pconfig(local_user(),'system','plaintext')))
|
||||
$editselect = 'none';
|
||||
|
||||
$a->page['htmlhead'] .= replace_macros(get_markup_template('profed_head.tpl'), array(
|
||||
'$baseurl' => $a->get_baseurl(true),
|
||||
'$editselect' => $editselect,
|
||||
));
|
||||
|
||||
|
||||
$opt_tpl = get_markup_template("profile-hide-friends.tpl");
|
||||
$hide_friends = replace_macros($opt_tpl,array(
|
||||
|
@ -372,10 +478,12 @@ function profiles_content(&$a) {
|
|||
'$no_selected' => (($r[0]['hide-friends'] == 0) ? " checked=\"checked\" " : "")
|
||||
));
|
||||
|
||||
|
||||
$a->page['htmlhead'] .= replace_macros($tpl, array('$baseurl' => $a->get_baseurl(true)));
|
||||
$a->page['htmlhead'] .= "<script type=\"text/javascript\" src=\"js/country.js\" ></script>";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$f = get_config('system','birthday_input_format');
|
||||
if(! $f)
|
||||
$f = 'ymd';
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
|
||||
function randprof_init(&$a) {
|
||||
require_once('include/Contact.php');
|
||||
$x = random_profile();
|
||||
if($x)
|
||||
goaway(zrl($x));
|
||||
goaway($a->get_baseurl() . '/profile');
|
||||
}
|
|
@ -314,17 +314,13 @@ function register_post(&$a) {
|
|||
|
||||
}
|
||||
|
||||
$use_gravatar = ((get_config('system','no_gravatar')) ? false : true);
|
||||
|
||||
// if we have an openid photo use it.
|
||||
// otherwise unless it is disabled, use gravatar
|
||||
|
||||
if($use_gravatar || strlen($photo)) {
|
||||
// if we have no OpenID photo try to look up an avatar
|
||||
if(! strlen($photo))
|
||||
$photo = avatar_img($email);
|
||||
|
||||
// unless there is no avatar-plugin loaded
|
||||
if(strlen($photo)) {
|
||||
require_once('include/Photo.php');
|
||||
|
||||
if(($use_gravatar) && (! strlen($photo)))
|
||||
$photo = gravatar_img($email);
|
||||
$photo_failure = false;
|
||||
|
||||
$filename = basename($photo);
|
||||
|
|
103
mod/settings.php
|
@ -15,10 +15,6 @@ function get_theme_config_file($theme){
|
|||
}
|
||||
|
||||
function settings_init(&$a) {
|
||||
if(local_user()) {
|
||||
profile_load($a,$a->user['nickname']);
|
||||
}
|
||||
|
||||
// These lines provide the javascript needed by the acl selector
|
||||
|
||||
$a->page['htmlhead'] .= "<script> var ispublic = '" . t('everybody') . "';" ;
|
||||
|
@ -47,6 +43,47 @@ function settings_init(&$a) {
|
|||
EOT;
|
||||
|
||||
|
||||
|
||||
$tabs = array(
|
||||
array(
|
||||
'label' => t('Account settings'),
|
||||
'url' => $a->get_baseurl(true).'/settings',
|
||||
'selected' => (($a->argc == 1)?'active':''),
|
||||
),
|
||||
array(
|
||||
'label' => t('Display settings'),
|
||||
'url' => $a->get_baseurl(true).'/settings/display',
|
||||
'selected' => (($a->argc > 1) && ($a->argv[1] === 'display')?'active':''),
|
||||
),
|
||||
|
||||
array(
|
||||
'label' => t('Connector settings'),
|
||||
'url' => $a->get_baseurl(true).'/settings/connectors',
|
||||
'selected' => (($a->argc > 1) && ($a->argv[1] === 'connectors')?'active':''),
|
||||
),
|
||||
array(
|
||||
'label' => t('Plugin settings'),
|
||||
'url' => $a->get_baseurl(true).'/settings/addon',
|
||||
'selected' => (($a->argc > 1) && ($a->argv[1] === 'addon')?'active':''),
|
||||
),
|
||||
array(
|
||||
'label' => t('Connected apps'),
|
||||
'url' => $a->get_baseurl(true) . '/settings/oauth',
|
||||
'selected' => (($a->argc > 1) && ($a->argv[1] === 'oauth')?'active':''),
|
||||
),
|
||||
array(
|
||||
'label' => t('Export personal data'),
|
||||
'url' => $a->get_baseurl(true) . '/uexport',
|
||||
'selected' => ''
|
||||
)
|
||||
);
|
||||
|
||||
$tabtpl = get_markup_template("generic_links_widget.tpl");
|
||||
$a->page['aside'] = replace_macros($tabtpl, array(
|
||||
'$title' => t('Settings'),
|
||||
'$items' => $tabs,
|
||||
));
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -309,6 +346,8 @@ function settings_post(&$a) {
|
|||
$suggestme = ((x($_POST,'suggestme')) ? intval($_POST['suggestme']) : 0);
|
||||
$hide_friends = (($_POST['hide-friends'] == 1) ? 1: 0);
|
||||
$hidewall = (($_POST['hidewall'] == 1) ? 1: 0);
|
||||
$post_newfriend = (($_POST['post_newfriend'] == 1) ? 1: 0);
|
||||
$post_profilechange = (($_POST['post_profilechange'] == 1) ? 1: 0);
|
||||
|
||||
|
||||
$notify = 0;
|
||||
|
@ -391,6 +430,8 @@ function settings_post(&$a) {
|
|||
set_pconfig(local_user(),'expire','photos', $expire_photos);
|
||||
|
||||
set_pconfig(local_user(),'system','suggestme', $suggestme);
|
||||
set_pconfig(local_user(),'system','post_newfriend', $post_newfriend);
|
||||
set_pconfig(local_user(),'system','post_profilechange', $post_profilechange);
|
||||
|
||||
|
||||
$r = q("UPDATE `user` SET `username` = '%s', `email` = '%s', `openid` = '%s', `timezone` = '%s', `allow_cid` = '%s', `allow_gid` = '%s', `deny_cid` = '%s', `deny_gid` = '%s', `notify-flags` = %d, `page-flags` = %d, `default-location` = '%s', `allow_location` = %d, `maxreq` = %d, `expire` = %d, `openidserver` = '%s', `blockwall` = %d, `hidewall` = %d, `blocktags` = %d, `unkmail` = %d, `cntunkmail` = %d WHERE `uid` = %d LIMIT 1",
|
||||
|
@ -479,44 +520,7 @@ function settings_content(&$a) {
|
|||
return;
|
||||
}
|
||||
|
||||
$tabs = array(
|
||||
array(
|
||||
'label' => t('Account settings'),
|
||||
'url' => $a->get_baseurl(true).'/settings',
|
||||
'sel' => (($a->argc == 1)?'active':''),
|
||||
),
|
||||
array(
|
||||
'label' => t('Display settings'),
|
||||
'url' => $a->get_baseurl(true).'/settings/display',
|
||||
'sel' => (($a->argc > 1) && ($a->argv[1] === 'display')?'active':''),
|
||||
),
|
||||
|
||||
array(
|
||||
'label' => t('Connector settings'),
|
||||
'url' => $a->get_baseurl(true).'/settings/connectors',
|
||||
'sel' => (($a->argc > 1) && ($a->argv[1] === 'connectors')?'active':''),
|
||||
),
|
||||
array(
|
||||
'label' => t('Plugin settings'),
|
||||
'url' => $a->get_baseurl(true).'/settings/addon',
|
||||
'sel' => (($a->argc > 1) && ($a->argv[1] === 'addon')?'active':''),
|
||||
),
|
||||
array(
|
||||
'label' => t('Connections'),
|
||||
'url' => $a->get_baseurl(true) . '/settings/oauth',
|
||||
'sel' => (($a->argc > 1) && ($a->argv[1] === 'oauth')?'active':''),
|
||||
),
|
||||
array(
|
||||
'label' => t('Export personal data'),
|
||||
'url' => $a->get_baseurl(true) . '/uexport',
|
||||
'sel' => ''
|
||||
)
|
||||
);
|
||||
|
||||
$tabtpl = get_markup_template("common_tabs.tpl");
|
||||
$tabs = replace_macros($tabtpl, array(
|
||||
'$tabs' => $tabs,
|
||||
));
|
||||
|
||||
if(($a->argc > 1) && ($a->argv[1] === 'oauth')) {
|
||||
|
||||
|
@ -524,7 +528,6 @@ function settings_content(&$a) {
|
|||
$tpl = get_markup_template("settings_oauth_edit.tpl");
|
||||
$o .= replace_macros($tpl, array(
|
||||
'$form_security_token' => get_form_security_token("settings_oauth"),
|
||||
'$tabs' => $tabs,
|
||||
'$title' => t('Add application'),
|
||||
'$submit' => t('Submit'),
|
||||
'$cancel' => t('Cancel'),
|
||||
|
@ -551,7 +554,6 @@ function settings_content(&$a) {
|
|||
$tpl = get_markup_template("settings_oauth_edit.tpl");
|
||||
$o .= replace_macros($tpl, array(
|
||||
'$form_security_token' => get_form_security_token("settings_oauth"),
|
||||
'$tabs' => $tabs,
|
||||
'$title' => t('Add application'),
|
||||
'$submit' => t('Update'),
|
||||
'$cancel' => t('Cancel'),
|
||||
|
@ -594,7 +596,6 @@ function settings_content(&$a) {
|
|||
'$consumerkey' => t('Client key starts with'),
|
||||
'$noname' => t('No name'),
|
||||
'$remove' => t('Remove authorization'),
|
||||
'$tabs' => $tabs,
|
||||
'$apps' => $r,
|
||||
));
|
||||
return $o;
|
||||
|
@ -614,7 +615,6 @@ function settings_content(&$a) {
|
|||
$o .= replace_macros($tpl, array(
|
||||
'$form_security_token' => get_form_security_token("settings_addon"),
|
||||
'$title' => t('Plugin Settings'),
|
||||
'$tabs' => $tabs,
|
||||
'$settings_addons' => $settings_addons
|
||||
));
|
||||
return $o;
|
||||
|
@ -658,7 +658,6 @@ function settings_content(&$a) {
|
|||
'$form_security_token' => get_form_security_token("settings_connectors"),
|
||||
|
||||
'$title' => t('Connector Settings'),
|
||||
'$tabs' => $tabs,
|
||||
|
||||
'$diasp_enabled' => $diasp_enabled,
|
||||
'$ostat_enabled' => $ostat_enabled,
|
||||
|
@ -735,7 +734,6 @@ function settings_content(&$a) {
|
|||
|
||||
$tpl = get_markup_template("settings_display.tpl");
|
||||
$o = replace_macros($tpl, array(
|
||||
'$tabs' => $tabs,
|
||||
'$ptitle' => t('Display Settings'),
|
||||
'$form_security_token' => get_form_security_token("settings_display"),
|
||||
'$submit' => t('Submit'),
|
||||
|
@ -796,6 +794,11 @@ function settings_content(&$a) {
|
|||
$suggestme = get_pconfig(local_user(), 'system','suggestme');
|
||||
$suggestme = (($suggestme===false)? '0': $suggestme); // default if not set: 0
|
||||
|
||||
$post_newfriend = get_pconfig(local_user(), 'system','post_newfriend');
|
||||
$post_newfriend = (($post_newfriend===false)? '0': $post_newfriend); // default if not set: 0
|
||||
|
||||
$post_profilechange = get_pconfig(local_user(), 'system','post_profilechange');
|
||||
$post_profilechange = (($post_profilechange===false)? '0': $post_profilechange); // default if not set: 0
|
||||
|
||||
|
||||
if(! strlen($a->user['timezone']))
|
||||
|
@ -884,6 +887,8 @@ function settings_content(&$a) {
|
|||
));
|
||||
|
||||
|
||||
|
||||
|
||||
$invisible = (((! $profile['publish']) && (! $profile['net-publish']))
|
||||
? true : false);
|
||||
|
||||
|
@ -920,7 +925,6 @@ function settings_content(&$a) {
|
|||
);
|
||||
|
||||
$o .= replace_macros($stpl,array(
|
||||
'$tabs' => $tabs,
|
||||
'$ptitle' => t('Account Settings'),
|
||||
|
||||
'$submit' => t('Submit'),
|
||||
|
@ -965,6 +969,9 @@ function settings_content(&$a) {
|
|||
|
||||
|
||||
'$h_not' => t('Notification Settings'),
|
||||
'$activity_options' => t('By default post a status message when:'),
|
||||
'$post_newfriend' => array('post_newfriend', t('accepting a friend request'), $post_newfriend, ''),
|
||||
'$post_profilechange' => array('post_profilechange', t('making an <em>interesting</em> profile change'), $post_profilechange, ''),
|
||||
'$lbl_not' => t('Send a notification email when:'),
|
||||
'$notify1' => array('notify1', t('You receive an introduction'), ($notify & NOTIFY_INTRO), NOTIFY_INTRO, ''),
|
||||
'$notify2' => array('notify2', t('Your introductions are confirmed'), ($notify & NOTIFY_CONFIRM), NOTIFY_CONFIRM, ''),
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
define( 'UPDATE_VERSION' , 1137 );
|
||||
define( 'UPDATE_VERSION' , 1138 );
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -1206,3 +1206,10 @@ function update_1136() {
|
|||
q("ALTER TABLE `pconfig` ADD UNIQUE `access` ( `uid` , `cat` , `k` )");
|
||||
|
||||
}
|
||||
|
||||
|
||||
function update_1137() {
|
||||
q("alter table item_id DROP `face` , DROP `dspr` , DROP `twit` , DROP `stat` ");
|
||||
q("ALTER TABLE `item_id` ADD `sid` CHAR( 255 ) NOT NULL AFTER `uid` , ADD `service` CHAR( 255 ) NOT NULL AFTER `sid` , add index (`sid`), add index ( `service`) ");
|
||||
}
|
||||
|
||||
|
|
1785
util/messages.po
|
@ -17,7 +17,7 @@
|
|||
</p>
|
||||
|
||||
{{ if $screenshot }}
|
||||
<a href="$screenshot.0" ><img src="$screenshot.0" width="320" height="240" alt="$screenshot.1" /></a>
|
||||
<a href="$screenshot.0" class='screenshot'><img src="$screenshot.0" alt="$screenshot.1" /></a>
|
||||
{{ endif }}
|
||||
|
||||
{{ if $admin_form }}
|
||||
|
|
|
@ -1,3 +1,39 @@
|
|||
<script>
|
||||
$(function(){
|
||||
|
||||
$("#cnftheme").fancybox({
|
||||
width: 800,
|
||||
autoDimensions: false,
|
||||
onStart: function(){
|
||||
var theme = $("#id_theme :selected").val();
|
||||
$("#cnftheme").attr('href',"$baseurl/admin/themes/"+theme);
|
||||
},
|
||||
onComplete: function(){
|
||||
$("div#fancybox-content form").submit(function(e){
|
||||
var url = $(this).attr('action');
|
||||
// can't get .serialize() to work...
|
||||
var data={};
|
||||
$(this).find("input").each(function(){
|
||||
data[$(this).attr('name')] = $(this).val();
|
||||
});
|
||||
$(this).find("select").each(function(){
|
||||
data[$(this).attr('name')] = $(this).children(":selected").val();
|
||||
});
|
||||
console.log(":)", url, data);
|
||||
|
||||
$.post(url, data, function(data) {
|
||||
if(timer) clearTimeout(timer);
|
||||
NavUpdate();
|
||||
$.fancybox.close();
|
||||
})
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<div id='adminpage'>
|
||||
<h1>$title - $page</h1>
|
||||
|
||||
|
@ -17,7 +53,6 @@
|
|||
|
||||
{{ inc field_checkbox.tpl with $field=$no_multi_reg }}{{ endinc }}
|
||||
{{ inc field_checkbox.tpl with $field=$no_openid }}{{ endinc }}
|
||||
{{ inc field_checkbox.tpl with $field=$no_gravatar }}{{ endinc }}
|
||||
{{ inc field_checkbox.tpl with $field=$no_regfullname }}{{ endinc }}
|
||||
|
||||
<div class="submit"><input type="submit" name="page_site" value="$submit" /></div>
|
||||
|
|
|
@ -7,7 +7,7 @@ $page_desc<br />
|
|||
<li><a href="http://friendica.com" title="$friendica">$friendica</a></li>
|
||||
<li><a href="http://joindiaspora.com" title="$diaspora">$diaspora</a> $diasnote</li>
|
||||
<li><a href="http://ostatus.org" title="$public_net" >$statusnet</a></li>
|
||||
<li>$emailnet</li>
|
||||
{{ if $emailnet }}<li>$emailnet</li>{{ endif }}
|
||||
</ul>
|
||||
</p>
|
||||
<p>
|
||||
|
|
|
@ -2,10 +2,9 @@
|
|||
src="$baseurl/library/tinymce/jscripts/tiny_mce/tiny_mce_src.js"></script>
|
||||
<script language="javascript" type="text/javascript">
|
||||
|
||||
|
||||
tinyMCE.init({
|
||||
theme : "advanced",
|
||||
mode : "exact",
|
||||
mode : "$editselect",
|
||||
elements: "contact-edit-info",
|
||||
plugins : "bbcode",
|
||||
theme_advanced_buttons1 : "bold,italic,underline,undo,redo,link,unlink,image,forecolor",
|
||||
|
|
|
@ -4161,7 +4161,7 @@ msgstr "Fehler: der angegebene API Schlüssel scheint nicht korrekt zu sein (Zug
|
|||
|
||||
#: ../../addon/facebook/facebook.php:665
|
||||
msgid "The given API Key seems to work correctly."
|
||||
msgstr "Der angegebene API Schlüssel scheint nicht korrekt zu funktionieren."
|
||||
msgstr "Der angegebene API Schlüssel scheint korrekt zu funktionieren."
|
||||
|
||||
#: ../../addon/facebook/facebook.php:667
|
||||
msgid ""
|
||||
|
@ -6405,7 +6405,7 @@ msgstr "Willkommen zurück "
|
|||
#: ../../include/security.php:329
|
||||
msgid ""
|
||||
"The form security token was not correct. This probably happened because the "
|
||||
"form has been opened for too long (>3 hours) before subitting it."
|
||||
"form has been opened for too long (>3 hours) before submitting it."
|
||||
msgstr "Der Formular-Sicherheits-Token war nicht korrekt. Der Grund ist wahrscheinlich, dass das Formular zu lange (>3 Stunden) offen war, bevor es abgeschickt wurde."
|
||||
|
||||
#: ../../include/Contact.php:137 ../../include/conversation.php:813
|
||||
|
|
|
@ -777,7 +777,7 @@ $a->strings["{0} tagged %s's post with #%s"] = "{0} hat %ss Beitrag mit dem Schl
|
|||
$a->strings["{0} mentioned you in a post"] = "{0} hat dich in einem Beitrag erwähnt";
|
||||
$a->strings["OpenID protocol error. No ID returned."] = "OpenID Protokollfehler. Keine ID zurückgegeben.";
|
||||
$a->strings["Account not found and OpenID registration is not permitted on this site."] = "Account wurde nicht gefunden und OpenID Registrierung auf diesem Server nicht gestattet.";
|
||||
$a->strings["Login failed."] = "Annmeldung fehlgeschlagen.";
|
||||
$a->strings["Login failed."] = "Anmeldung fehlgeschlagen.";
|
||||
$a->strings["Connect URL missing."] = "Connect-URL fehlt";
|
||||
$a->strings["This site is not configured to allow communications with other networks."] = "Diese Seite ist so konfiguriert, dass keine Kommunikation mit anderen Netzwerken erfolgen kann.";
|
||||
$a->strings["No compatible communication protocols or feeds were discovered."] = "Es wurden keine kompatiblen Kommunikationsprotokolle oder Feeds gefunden.";
|
||||
|
@ -924,7 +924,7 @@ $a->strings["Facebook Connector Settings"] = "Facebook-Verbindungseinstellungen"
|
|||
$a->strings["Facebook API Key"] = "Facebook API Schlüssel";
|
||||
$a->strings["Error: it appears that you have specified the App-ID and -Secret in your .htconfig.php file. As long as they are specified there, they cannot be set using this form.<br><br>"] = "Fehler: du scheinst die App-ID und das App-Geheimnis in deiner .htconfig.php Datei angegeben zu haben. Solange sie dort festgelegt werden kannst du dieses Formular hier nicht verwenden.<br><br>";
|
||||
$a->strings["Error: the given API Key seems to be incorrect (the application access token could not be retrieved)."] = "Fehler: der angegebene API Schlüssel scheint nicht korrekt zu sein (Zugriffstoken konnte nicht empfangen werden).";
|
||||
$a->strings["The given API Key seems to work correctly."] = "Der angegebene API Schlüssel scheint nicht korrekt zu funktionieren.";
|
||||
$a->strings["The given API Key seems to work correctly."] = "Der angegebene API Schlüssel scheint korrekt zu funktionieren.";
|
||||
$a->strings["The correctness of the API Key could not be detected. Somthing strange's going on."] = "Die Echtheit des API Schlüssels konnte nicht überprüft werden. Etwas Merkwürdiges ist hier im Gange.";
|
||||
$a->strings["App-ID / API-Key"] = "App-ID / API-Key";
|
||||
$a->strings["Application secret"] = "Anwendungs-Geheimnis";
|
||||
|
@ -1441,7 +1441,7 @@ $a->strings["image/photo"] = "Bild/Foto";
|
|||
$a->strings["Welcome "] = "Willkommen ";
|
||||
$a->strings["Please upload a profile photo."] = "Bitte lade ein Profilbild hoch.";
|
||||
$a->strings["Welcome back "] = "Willkommen zurück ";
|
||||
$a->strings["The form security token was not correct. This probably happened because the form has been opened for too long (>3 hours) before subitting it."] = "Der Formular-Sicherheits-Token war nicht korrekt. Der Grund ist wahrscheinlich, dass das Formular zu lange (>3 Stunden) offen war, bevor es abgeschickt wurde.";
|
||||
$a->strings["The form security token was not correct. This probably happened because the form has been opened for too long (>3 hours) before submitting it."] = "Der Formular-Sicherheits-Token war nicht korrekt. Der Grund ist wahrscheinlich, dass das Formular zu lange (>3 Stunden) offen war, bevor es abgeschickt wurde.";
|
||||
$a->strings["View status"] = "Status anzeigen";
|
||||
$a->strings["View profile"] = "Profil anzeigen";
|
||||
$a->strings["View photos"] = "Fotos ansehen";
|
||||
|
@ -1511,3 +1511,4 @@ $a->strings["[today]"] = "[heute]";
|
|||
$a->strings["Event Reminders"] = "Veranstaltungserinnerungen";
|
||||
$a->strings["Events this week:"] = "Veranstaltungen diese Woche";
|
||||
$a->strings["[No description]"] = "[keine Beschreibung]";
|
||||
$a->strings['Update Error at %s'] = 'Fehler beim Updaten von %s';
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
Hey,
|
||||
Ich bin's, $sitename.
|
||||
Die Friendica-Entwickler haben gerade Update $update freigegeben,
|
||||
aber als ich es installieren wollte, ist irgendetwas schief gegangen.
|
||||
Das sollte schnell repariert werden und alleine schaffe ich es nicht.
|
||||
Wende dich bitte an einen Friendica-Entwickler, wenn du mir nicht selbst helfen kannst.
|
||||
Meine Datenbank könnte ziemlich durcheinander sein.
|
||||
|
||||
Die Fehlermeldung ist '$error'.
|
||||
|
||||
Tut mir leid,
|
||||
dein Friendica Server unter $siteurl
|
|
@ -7,7 +7,7 @@ $page_desc<br />
|
|||
<li><a href="http://friendica.com" title="$friendica">$friendica</a></li>
|
||||
<li><a href="http://joindiaspora.com" title="$diaspora">$diaspora</a> $diasnote</li>
|
||||
<li><a href="http://ostatus.org" title="$public_net" >$statusnet</a></li>
|
||||
<li>$emailnet</li>
|
||||
{{ if $emailnet }}<li>$emailnet</li>{{ endif }}
|
||||
</ul>
|
||||
$invite_desc
|
||||
</p>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
<div class='field checkbox'>
|
||||
<label for='id_$field.0'>$field.1</label>
|
||||
<input type="checkbox" name='$field.0' id='id_$field.0' value="1" {{ if $field.2 }}checked="true"{{ endif }}>
|
||||
<input type="checkbox" name='$field.0' id='id_$field.0' value="1" {{ if $field.2 }}checked="checked"{{ endif }}>
|
||||
<span class='field_help'>$field.3</span>
|
||||
</div>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
|
||||
<script>$(function(){ previewTheme($("#id_$field.0")[0]); });</script>
|
||||
<div class='field select'>
|
||||
<label for='id_$field.0'>$field.1</label>
|
||||
<select name='$field.0' id='id_$field.0' onchange="previewTheme(this);" >
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
<div class="widget">
|
||||
{{if $title}}<h3>$title</h3>{{endif}}
|
||||
{{if $desc}}<div class="desc">$desc</div>{{endif}}
|
||||
|
||||
<ul>
|
||||
{{ for $items as $item }}
|
||||
<li class="tool"><a href="$item.url" class="{{ if $item.selected }}selected{{ endif }}">$item.label</a></li>
|
||||
{{ endfor }}
|
||||
</ul>
|
||||
|
||||
</div>
|
|
@ -23,6 +23,11 @@
|
|||
<div id="sidebar-new-group">
|
||||
<a href="group/new">$createtext</a>
|
||||
</div>
|
||||
{{ if $ungrouped }}
|
||||
<div id="sidebar-ungrouped">
|
||||
<a href="nogroup">$ungrouped</a>
|
||||
</div>
|
||||
{{ endif }}
|
||||
</div>
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
<div id="lang-select-icon" class="icon s22 language" title="$title" onclick="openClose('language-selector');" >lang</div>
|
||||
<div id="language-selector" style="display: none;" >
|
||||
<form action="#" method="post" >
|
||||
<select name="system_language" onchange="this.form.submit();" >
|
||||
{{ for $langs.0 as $v=>$l }}
|
||||
<option value="$v" {{if $v==$langs.1}}selected="selected"{{endif}}>$l</option>
|
||||
{{ endfor }}
|
||||
</select>
|
||||
</form>
|
||||
</div>
|
|
@ -0,0 +1,12 @@
|
|||
<h1>$header</h1>
|
||||
|
||||
{{ for $contacts as $contact }}
|
||||
{{ inc contact_template.tpl }}{{ endinc }}
|
||||
{{ endfor }}
|
||||
<div id="contact-edit-end"></div>
|
||||
|
||||
$paginate
|
||||
|
||||
|
||||
|
||||
|
|
@ -6,6 +6,7 @@
|
|||
</form>
|
||||
<div class="side-link" id="side-match-link"><a href="match" >$similar</a></div>
|
||||
<div class="side-link" id="side-suggest-link"><a href="suggest" >$suggest</a></div>
|
||||
<div class="side-link" id="side-random-profile-link" ><a href="randprof" target="extlink" >$random</a></div>
|
||||
{{ if $inv }}
|
||||
<div class="side-link" id="side-invite-link" ><a href="invite" >$inv</a></div>
|
||||
{{ endif }}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
tinyMCE.init({
|
||||
theme : "advanced",
|
||||
mode : "textareas",
|
||||
mode : "$editselect",
|
||||
plugins : "bbcode,paste",
|
||||
theme_advanced_buttons1 : "bold,italic,underline,undo,redo,link,unlink,image,forecolor,formatselect,code",
|
||||
theme_advanced_buttons2 : "",
|
||||
|
|
|
@ -159,7 +159,7 @@ $sexual
|
|||
$lbl_about
|
||||
</p>
|
||||
|
||||
<textarea rows="10" cols="72" id="profile-jot-text" name="about" >$about</textarea>
|
||||
<textarea rows="10" cols="72" id="profile-about-text" name="about" >$about</textarea>
|
||||
|
||||
</div>
|
||||
<div id="about-jot-end"></div>
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
$tabs
|
||||
|
||||
<h1>$ptitle</h1>
|
||||
|
||||
$nickname_block
|
||||
|
@ -101,7 +99,13 @@ $unkmail
|
|||
|
||||
<h3 class="settings-heading">$h_not</h3>
|
||||
|
||||
<div id="settings-notify-desc">$lbl_not </div>
|
||||
<strong>$activity_options</strong>
|
||||
|
||||
{{inc field_checkbox.tpl with $field=$post_newfriend }}{{endinc}}
|
||||
{{inc field_checkbox.tpl with $field=$post_profilechange }}{{endinc}}
|
||||
|
||||
|
||||
<div id="settings-notify-desc"><strong>$lbl_not </strong></div>
|
||||
|
||||
<div class="group">
|
||||
{{inc field_intcheckbox.tpl with $field=$notify1 }}{{endinc}}
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
$tabs
|
||||
|
||||
<h1>$title</h1>
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
$tabs
|
||||
|
||||
<h1>$title</h1>
|
||||
|
||||
<div class="connector_statusmsg">$diasp_enabled</div>
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
$tabs
|
||||
|
||||
<h1>$ptitle</h1>
|
||||
|
||||
<form action="settings/display" id="settings-form" method="post" autocomplete="off" >
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
$tabs
|
||||
|
||||
<h1>$title</h1>
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
$tabs
|
||||
|
||||
<h1>$title</h1>
|
||||
|
||||
<form method="POST">
|
||||
|
|
|
@ -0,0 +1,41 @@
|
|||
<div class="comment-wwedit-wrapper" id="comment-edit-wrapper-$id" style="display: block;">
|
||||
<form class="comment-edit-form" id="comment-edit-form-$id" action="item" method="post" onsubmit="post_comment($id); return false;">
|
||||
<input type="hidden" name="type" value="$type" />
|
||||
<input type="hidden" name="profile_uid" value="$profile_uid" />
|
||||
<input type="hidden" name="parent" value="$parent" />
|
||||
<input type="hidden" name="return" value="$return_path" />
|
||||
<input type="hidden" name="jsreload" value="$jsreload" />
|
||||
<input type="hidden" name="preview" id="comment-preview-inp-$id" value="0" />
|
||||
|
||||
<div class="comment-edit-photo" id="comment-edit-photo-$id" >
|
||||
<a class="comment-edit-photo-link" href="$mylink" title="$mytitle"><img class="my-comment-photo" src="$myphoto" alt="$mytitle" title="$mytitle" /></a>
|
||||
</div>
|
||||
<div class="comment-edit-photo-end"></div>
|
||||
<textarea id="comment-edit-text-$id" class="comment-edit-text-empty" name="body" onFocus="commentOpen(this,$id);tautogrow($id)" onBlur="commentClose(this,$id);" >$comment</textarea>
|
||||
<a class="icon bb-image" onclick="insertFormatting('$comment','img',$id);">img</a>
|
||||
<a class="icon bb-url" onclick="insertFormatting('$comment','url',$id);">url</a>
|
||||
<a class="icon bb-video" onclick="insertFormatting('$comment','video',$id);">video</a>
|
||||
<a class="icon underline" onclick="insertFormatting('$comment','u',$id);">u</a>
|
||||
<a class="icon italic" onclick="insertFormatting('$comment','i',$id);">i</a>
|
||||
<a class="icon bold" onclick="insertFormatting('$comment','b',$id);">b</a>
|
||||
<a class="icon quote" onclick="insertFormatting('$comment','quote',$id);">quote</a>
|
||||
{{ if $qcomment }}
|
||||
<select id="qcomment-select-$id" name="qcomment-$id" class="qcomment" onchange="qCommentInsert(this,$id);" >
|
||||
<option value=""></option>
|
||||
{{ for $qcomment as $qc }}
|
||||
<option value="$qc">$qc</option>
|
||||
{{ endfor }}
|
||||
</select>
|
||||
{{ endif }}
|
||||
|
||||
<div class="comment-edit-text-end"></div>
|
||||
<div class="comment-edit-submit-wrapper" id="comment-edit-submit-wrapper-$id" style="display: none;" >
|
||||
<input type="submit" onclick="post_comment($id); return false;" id="comment-edit-submit-$id" class="comment-edit-submit" name="submit" value="$submit" />
|
||||
<span onclick="preview_comment($id);" id="comment-edit-preview-link-$id" class="fakelink">$preview</span>
|
||||
<div id="comment-edit-preview-$id" class="comment-edit-preview" style="display:none;"></div>
|
||||
</div>
|
||||
|
||||
<div class="comment-edit-end"></div>
|
||||
</form>
|
||||
|
||||
</div>
|
|
@ -0,0 +1,71 @@
|
|||
<?php
|
||||
/**
|
||||
* Theme settings
|
||||
*/
|
||||
|
||||
|
||||
|
||||
function theme_content(&$a){
|
||||
if(!local_user())
|
||||
return;
|
||||
|
||||
$font_size = get_pconfig(local_user(), 'diabook-aerith', 'font_size' );
|
||||
$line_height = get_pconfig(local_user(), 'diabook-aerith', 'line_height' );
|
||||
|
||||
return diabook_form($a,$font_size, $line_height);
|
||||
}
|
||||
|
||||
function theme_post(&$a){
|
||||
if(! local_user())
|
||||
return;
|
||||
|
||||
if (isset($_POST['diabook-aerith-settings-submit'])){
|
||||
set_pconfig(local_user(), 'diabook-aerith', 'font_size', $_POST['diabook-aerith_font_size']);
|
||||
set_pconfig(local_user(), 'diabook-aerith', 'line_height', $_POST['diabook-aerith_line_height']);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function theme_admin(&$a){
|
||||
$font_size = get_config('diabook-aerith', 'font_size' );
|
||||
$line_height = get_config('diabook-aerith', 'line_height' );
|
||||
|
||||
return diabook_form($a,$font_size, $line_height);
|
||||
}
|
||||
|
||||
function theme_admin_post(&$a){
|
||||
if (isset($_POST['diabook-aerith-settings-submit'])){
|
||||
set_config('diabook-aerith', 'font_size', $_POST['diabook-aerith_font_size']);
|
||||
set_config('diabook-aerith', 'line_height', $_POST['diabook-aerith_line_height']);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function diabook_form(&$a, $font_size, $line_height){
|
||||
$line_heights = array(
|
||||
"1.4"=>"1.4",
|
||||
"1.3"=>"1.3",
|
||||
"1.2"=>"1.2",
|
||||
"1.1"=>"1.1",
|
||||
);
|
||||
|
||||
$font_sizes = array(
|
||||
'14'=>'14',
|
||||
'13.5'=>'13.5',
|
||||
'13'=>'13',
|
||||
'12.5'=>'12.5',
|
||||
'12'=>'12',
|
||||
);
|
||||
|
||||
|
||||
|
||||
$t = file_get_contents( dirname(__file__). "/theme_settings.tpl" );
|
||||
$o .= replace_macros($t, array(
|
||||
'$submit' => t('Submit'),
|
||||
'$baseurl' => $a->get_baseurl(),
|
||||
'$title' => t("Theme settings"),
|
||||
'$font_size' => array('diabook-aerith_font_size', t('Set font-size for posts and comments'), $font_size, '', $font_sizes),
|
||||
'$line_height' => array('diabook-aerith_line_height', t('Set line-height for posts and comments'), $line_height, '', $line_heights),
|
||||
));
|
||||
return $o;
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
<div id="widget_$title">
|
||||
{{if $title}}<h3 style="border-bottom: 1px solid #D2D2D2;">$title</h3>{{endif}}
|
||||
{{if $desc}}<div class="desc">$desc</div>{{endif}}
|
||||
|
||||
<ul class="rs_tabs">
|
||||
{{ for $items as $item }}
|
||||
<li><a href="$item.url" class="rs_tab button {{ if $item.selected }}selected{{ endif }}">$item.label</a></li>
|
||||
{{ endfor }}
|
||||
</ul>
|
||||
|
||||
</div>
|
|
@ -1,18 +1,18 @@
|
|||
<div id="group-sidebar" class="widget">
|
||||
<div class="title tool">
|
||||
<h3 class="label">$title</h3>
|
||||
<a href="group/new" title="$createtext" class="action"><span class="icon text s16 add"></span></a>
|
||||
<div id="profile_side" >
|
||||
<div class="">
|
||||
<h3 style="margin-left: 2px;">$title<a href="group/new" title="$createtext" class="icon text_add"></a></h3>
|
||||
</div>
|
||||
|
||||
<div id="sidebar-group-list">
|
||||
<ul>
|
||||
<ul class="menu-profile-side">
|
||||
{{ for $groups as $group }}
|
||||
<li class="tool {{ if $group.selected }}selected{{ endif }}">
|
||||
<a href="$group.href" class="label">
|
||||
<li class="menu-profile-list">
|
||||
<span class="menu-profile-icon {{ if $group.selected }}group_selected{{else}}group_unselected{{ endif }}"></span>
|
||||
<a href="$group.href" class="menu-profile-list-item">
|
||||
$group.text
|
||||
</a>
|
||||
{{ if $group.edit }}
|
||||
<a href="$group.edit.href" class="action"><span class="icon text s10 edit"></span></a>
|
||||
<a href="$group.edit.href" class="action"><span class="icon text_edit" ></span></a>
|
||||
{{ endif }}
|
||||
{{ if $group.cid }}
|
||||
<input type="checkbox"
|
||||
|
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 762 B After Width: | Height: | Size: 762 B |
After Width: | Height: | Size: 697 B |
After Width: | Height: | Size: 939 B |
After Width: | Height: | Size: 917 B |
After Width: | Height: | Size: 699 B |
Before Width: | Height: | Size: 685 B After Width: | Height: | Size: 685 B |
Before Width: | Height: | Size: 206 B After Width: | Height: | Size: 206 B |
Before Width: | Height: | Size: 680 B After Width: | Height: | Size: 774 B |
Before Width: | Height: | Size: 568 B After Width: | Height: | Size: 803 B |
After Width: | Height: | Size: 568 B |
Before Width: | Height: | Size: 292 B After Width: | Height: | Size: 292 B |
Before Width: | Height: | Size: 663 B After Width: | Height: | Size: 723 B |
Before Width: | Height: | Size: 352 B After Width: | Height: | Size: 352 B |
Before Width: | Height: | Size: 722 B After Width: | Height: | Size: 706 B |
After Width: | Height: | Size: 577 B |
Before Width: | Height: | Size: 365 B After Width: | Height: | Size: 365 B |
Before Width: | Height: | Size: 366 B After Width: | Height: | Size: 366 B |
Before Width: | Height: | Size: 697 B After Width: | Height: | Size: 697 B |
Before Width: | Height: | Size: 664 B After Width: | Height: | Size: 637 B |
Before Width: | Height: | Size: 579 B After Width: | Height: | Size: 901 B |
Before Width: | Height: | Size: 579 B After Width: | Height: | Size: 579 B |
After Width: | Height: | Size: 579 B |
Before Width: | Height: | Size: 300 B After Width: | Height: | Size: 300 B |
Before Width: | Height: | Size: 739 B After Width: | Height: | Size: 764 B |