Merge commit 'upstream/master'

This commit is contained in:
Michael Vogel 2012-04-11 19:35:51 +02:00
commit ee714daf4d
133 changed files with 2953 additions and 1978 deletions

1799
boot.php

File diff suppressed because it is too large Load Diff

View File

@ -6,40 +6,41 @@ Account Basics
**Registration**
Not all Friendica sites allow open registration. If registration is allowed, you will see a "Register" link immediately below the login prompts on the site home page. Following this link will take you to the site registration page. The strength of our network is that lots of different sites are all completely compatible with each other. If the site you're visting doesn't allow registration, or you think you might prefer another one, you can find a <a href ="http://dir.friendica.com/siteinfo">list of public servers here</a>, and find one that meets your needs.
Not all Friendica sites allow open registration. If registration is allowed, you will see a "Register" link immediately below the login prompts on the site home page. Following this link will take you to the site registration page. The strength of our network is that lots of different sites are all completely compatible with each other. If the site you're visting doesn't allow registration, or you think you might prefer another one, you can find a <a href="http://dir.friendica.com/siteinfo">list of public servers here</a>, and find one that meets your needs.
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.
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.

View File

@ -6,11 +6,11 @@ Bugs and Issues
If your server has a support page, you should report any bugs/issues you encounter there first. Reporting to your support page before reporting to the developers makes their job easier, as they don't have to deal with bug reports that might not have anything to do with them, and that helps us get new features faster.
If you're a technical user, or your site doesn't have a support page, you'll need to use the <a href = "http://bugs.friendica.com/">Bug Tracker</a>. Please perform a search to see if there's already an open bug that matches yours before submitting anything.
If you're a technical user, or your site doesn't have a support page, you'll need to use the <a href="http://bugs.friendica.com/">Bug Tracker</a>. Please perform a search to see if there's already an open bug that matches yours before submitting anything.
Try to provide as much information as you can about the bug, including the **full** text of any error messages or notices, and any steps required to replicate the problem in as much detail as possible. It's generally better to provide too much information than not enough.
<a href = "http://www.chiark.greenend.org.uk/~sgtatham/bugs.html">See this article</a> to learn more about submitting **good** bug reports.
<a href="http://www.chiark.greenend.org.uk/~sgtatham/bugs.html">See this article</a> to learn more about submitting **good** bug reports.
**Bug Sponsorship**

View File

@ -5,11 +5,11 @@ Making Friends
Friendship in Friendica can take on a great many different meanings. But let's keep it simple, you want to be friends with somebody. How do you do it?
The easiest thing to do is to join the <a href = "http://kakste.com/profile/newhere">New Here</a> group. This group is especially for people new to the Friendica network. Simply connect to the group, post to the wall, and make new friends. You don't even have to like us - comment on a few of our posts, and other people will start to add you too.
The easiest thing to do is to join the <a href="http://kakste.com/profile/newhere">New Here</a> group. This group is especially for people new to the Friendica network. Simply connect to the group, post to the wall, and make new friends. You don't even have to like us - comment on a few of our posts, and other people will start to add you too.
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).

View File

@ -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.

View File

@ -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.

View File

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

View File

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

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -134,11 +134,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 +150,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 +158,11 @@ 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 '';
}

View File

@ -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))

View File

@ -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')
));

View File

@ -806,11 +806,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,
);

View File

@ -80,6 +80,16 @@ function field_timezone($name='timezone', $label='', $current = 'America/Los_Ang
if(! function_exists('datetime_convert')) {
function datetime_convert($from = 'UTC', $to = 'UTC', $s = 'now', $fmt = "Y-m-d H:i:s") {
// Defaults to UTC if nothing is set, but throws an exception if set to empty string.
// Provide some sane defaults regardless.
if($from === '')
$from = 'UTC';
if($to === '')
$to = 'UTC';
if($s === '')
$s = 'now';
// Slight hackish adjustment so that 'zero' datetime actually returns what is intended
// otherwise we end up with -0001-11-30 ...
// add 32 days so that we at least get year 00, and then hack around the fact that

View File

@ -8,189 +8,273 @@ require_once('include/datetime.php');
*
* For debugging, insert 'dbg(1);' anywhere in the program flow.
* dbg(0); will turn it off. Logging is performed at LOGGER_DATA level.
* When logging, all binary info is converted to text and html entities are escaped so that
* the debugging stream is safe to view within both terminals and web pages.
* When logging, all binary info is converted to
* text and html entities are escaped so that
* the debugging stream is safe to view
* within both terminals and web pages.
*
*/
if(! class_exists('dba')) {
class dba {
private $debug = 0;
private $db;
public $mysqli = true;
public $connected = false;
public $error = false;
if(! class_exists('dba')) {
function __construct($server,$user,$pass,$db,$install = false) {
class dba {
$server = trim($server);
$user = trim($user);
$pass = trim($pass);
$db = trim($db);
if (!(strlen($server) && strlen($user))){
$this->connected = false;
$this->db = null;
return;
}
private $debug = 0;
private $db;
private $exceptions;
if($install) {
if(strlen($server) && ($server !== 'localhost') && ($server !== '127.0.0.1')) {
if(! dns_get_record($server, DNS_A + DNS_CNAME + DNS_PTR)) {
$this->error = sprintf( t('Cannot locate DNS info for database server \'%s\''), $server);
$this->connected = false;
$this->db = null;
return;
public $mysqli = true;
public $connected = false;
public $error = false;
function __construct($server,$user,$pass,$db,$install = false) {
$server = trim($server);
$user = trim($user);
$pass = trim($pass);
$db = trim($db);
//we need both, server and username, so fail if one is missing
if (!(strlen($server) && strlen($user))){
$this->connected = false;
$this->db = null;
throw new InvalidArgumentException(t("Server name of user name are missing. "));
}
//when we are installing
if($install) {
if(strlen($server) && ($server !== 'localhost') && ($server !== '127.0.0.1')) {
if(! dns_get_record($server, DNS_A + DNS_CNAME + DNS_PTR)) {
$this->connected = false;
$this->db = null;
throw new InvalidArgumentException( t('Cannot locate DNS info for database server \'%s\''), $server);
}
}
}
if(class_exists('mysqli')) {
$this->db = new mysqli($server,$user,$pass,$db);
if(NULL === $this->db->connect_error) {
$this->connected = true;
} else {
throw new RuntimeException($this->db->connect_error);
}
} else {
$this->mysqli = false;
$this->db = mysql_connect($server,$user,$pass);
if($this->db && mysql_select_db($db,$this->db)) {
$this->connected = true;
} else {
throw new RuntimeException(mysql_error());
}
}
}
if(class_exists('mysqli')) {
$this->db = @new mysqli($server,$user,$pass,$db);
if(! mysqli_connect_errno()) {
$this->connected = true;
}
public function excep($excep) {
$this->exceptions=$excep;
}
else {
$this->mysqli = false;
$this->db = mysql_connect($server,$user,$pass);
if($this->db && mysql_select_db($db,$this->db)) {
$this->connected = true;
}
}
if(! $this->connected) {
$this->db = null;
if(! $install)
system_unavailable();
}
}
public function getdb() {
return $this->db;
}
public function q($sql) {
if((! $this->db) || (! $this->connected))
return false;
if($this->mysqli)
$result = @$this->db->query($sql);
else
$result = @mysql_query($sql,$this->db);
public function getdb() {
return $this->db;
}
if($this->debug) {
public function q($sql) {
$mesg = '';
if((! $this->db) || (! $this->connected)) {
$this->throwOrLog(new RuntimeException(t("There is no db connection. ")));
return;
}
if($this->mysqli) {
if($this->db->errno)
logger('dba: ' . $this->db->error);
$result = $this->db->query($sql);
} else {
$result = mysql_query($sql,$this->db);
}
elseif(mysql_errno($this->db))
logger('dba: ' . mysql_error($this->db));
if($result === false)
$mesg = 'false';
elseif($result === true)
$mesg = 'true';
else {
if($this->mysqli)
$mesg = $result->num_rows . ' results' . EOL;
else
$mesg = mysql_num_rows($result) . ' results' . EOL;
//on debug mode or fail, the query is written to the log.
//this won't work if logger can not read it's logging level
//from the db.
if($this->debug || FALSE === $result) {
$mesg = '';
if($result === false) {
$mesg = 'false '.$this->error();
} elseif($result === true) {
$mesg = 'true';
} else {
if($this->mysqli) {
$mesg = $result->num_rows . t(' results') . EOL;
} else {
$mesg = mysql_num_rows($result) . t(' results') . EOL;
}
}
$str = 'SQL = ' . printable($sql) . EOL . t('SQL returned ') . $mesg . EOL;
// If dbfail.out exists, we will write any failed calls directly to it,
// regardless of any logging that may or may nor be in effect.
// These usually indicate SQL syntax errors that need to be resolved.
if(file_exists('dbfail.out')) {
file_put_contents('dbfail.out', datetime_convert() . "\n" . $str . "\n", FILE_APPEND);
}
logger('dba: ' . $str );
if(FALSE===$result) {
$this->throwOrLog(new RuntimeException('dba: ' . $str));
return;
}
}
$str = 'SQL = ' . printable($sql) . EOL . 'SQL returned ' . $mesg . EOL;
logger('dba: ' . $str );
if($result === true) {
return $result;
}
$r = array();
if($this->mysqli) {
if($result->num_rows) {
while($x = $result->fetch_array(MYSQLI_ASSOC)) {
$r[] = $x;
}
$result->free_result();
}
} else {
if(mysql_num_rows($result)) {
while($x = mysql_fetch_array($result, MYSQL_ASSOC)) {
$r[] = $x;
}
mysql_free_result($result);
}
}
if($this->debug) {
logger('dba: ' . printable(print_r($r, true)));
}
return($r);
}
private function error() {
if($this->mysqli) {
return $this->db->error;
} else {
return mysql_error($this->db);
}
}
private function throwOrLog(Exception $ex) {
if($this->exceptions) {
throw $ex;
} else {
logger('dba: '.$ex->getMessage());
}
}
/**
* starts a transaction. Transactions need to be finished with
* commit() or rollback(). Please mind that the db table engine may
* not support this.
*/
public function beginTransaction() {
if($this->mysqli) {
return $this->db->autocommit(false);
} else {
//no transaction support in mysql module...
mysql_query('SET AUTOCOMMIT = 0;', $db);
}
}
/**
* rollback a transaction. So, rollback anything that was done since the last call
* to beginTransaction().
*/
public function rollback() {
if($this->mysqli) {
return $this->db->rollback();
} else {
//no transaction support in mysql module...
mysql_query('ROLLBACK;', $db);
}
$this->stopTransaction();
}
/**
* If dbfail.out exists, we will write any failed calls directly to it,
* regardless of any logging that may or may nor be in effect.
* These usually indicate SQL syntax errors that need to be resolved.
* commit a transaction. So, write any query to the database.
*/
if($result === false) {
logger('dba: ' . printable($sql) . ' returned false.');
if(file_exists('dbfail.out'))
file_put_contents('dbfail.out', datetime_convert() . "\n" . printable($sql) . ' returned false' . "\n", FILE_APPEND);
public function commit() {
if($this->mysqli) {
return $this->db->commit();
} else {
//no transaction support in mysql module...
mysql_query('COMMIT;', $db);
}
$this->stopTransaction();
}
private function stopTransaction() {
if($this->mysqli) {
return $this->db->autocommit(true);
} else {
//no transaction support in mysql module...
mysql_query('SET AUTOCOMMIT = 1;', $db);
}
}
public function dbg($dbg) {
$this->debug = $dbg;
}
if(($result === true) || ($result === false))
return $result;
$r = array();
if($this->mysqli) {
if($result->num_rows) {
while($x = $result->fetch_array(MYSQLI_ASSOC))
$r[] = $x;
$result->free_result();
}
}
else {
if(mysql_num_rows($result)) {
while($x = mysql_fetch_array($result, MYSQL_ASSOC))
$r[] = $x;
mysql_free_result($result);
public function escape($str) {
if($this->db && $this->connected) {
if($this->mysqli) {
return $this->db->real_escape_string($str);
} else {
return mysql_real_escape_string($str,$this->db);
}
}
}
if($this->debug)
logger('dba: ' . printable(print_r($r, true)));
return($r);
}
public function dbg($dbg) {
$this->debug = $dbg;
}
public function escape($str) {
if($this->db && $this->connected) {
if($this->mysqli)
return @$this->db->real_escape_string($str);
else
return @mysql_real_escape_string($str,$this->db);
}
}
function __destruct() {
if ($this->db)
if($this->mysqli)
$this->db->close();
else
function __destruct() {
if ($this->db) {
if($this->mysqli) {
$this->db->close();
}
} else {
mysql_close($this->db);
}
}
}
}}
}
if(! function_exists('printable')) {
function printable($s) {
$s = preg_replace("~([\x01-\x08\x0E-\x0F\x10-\x1F\x7F-\xFF])~",".", $s);
$s = str_replace("\x00",'.',$s);
if(x($_SERVER,'SERVER_NAME'))
$s = escape_tags($s);
return $s;
}}
function printable($s) {
$s = preg_replace("~([\x01-\x08\x0E-\x0F\x10-\x1F\x7F-\xFF])~",".", $s);
$s = str_replace("\x00",'.',$s);
if(x($_SERVER,'SERVER_NAME'))
$s = escape_tags($s);
return $s;
}
}
// Procedural functions
if(! function_exists('dbg')) {
function dbg($state) {
global $db;
if($db)
$db->dbg($state);
}}
if(! function_exists('dbg')) {
function dbg($state) {
global $db;
if($db)
$db->dbg($state);
}
}
if(! function_exists('dbesc')) {
function dbesc($str) {
global $db;
if($db && $db->connected)
return($db->escape($str));
else
return(str_replace("'","\\'",$str));
}}
if(! function_exists('dbesc')) {
function dbesc($str) {
global $db;
if($db && $db->connected)
return($db->escape($str));
else
return(str_replace("'","\\'",$str));
}
}
@ -199,30 +283,31 @@ function dbesc($str) {
// Example: $r = q("SELECT * FROM `%s` WHERE `uid` = %d",
// 'user', 1);
if(! function_exists('q')) {
function q($sql) {
if(! function_exists('q')) {
function q($sql) {
global $db;
$args = func_get_args();
unset($args[0]);
global $db;
$args = func_get_args();
unset($args[0]);
if($db && $db->connected) {
$stmt = vsprintf($sql,$args);
if($stmt === false)
logger('dba: vsprintf error: ' . print_r(debug_backtrace(),true));
return $db->q($stmt);
}
/**
*
* This will happen occasionally trying to store the
* session data after abnormal program termination
*
*/
logger('dba: no database: ' . print_r($args,true));
return false;
if($db && $db->connected) {
$stmt = vsprintf($sql,$args);
if($stmt === false)
logger('dba: vsprintf error: ' . print_r(debug_backtrace(),true));
return $db->q($stmt);
}
/**
*
* This will happen occasionally trying to store the
* session data after abnormal program termination
*
*/
logger('dba: no database: ' . print_r($args,true));
return false;
}}
}
/**
*
@ -230,36 +315,39 @@ function q($sql) {
*
*/
if(! function_exists('dbq')) {
function dbq($sql) {
if(! function_exists('dbq')) {
function dbq($sql) {
global $db;
if($db && $db->connected)
$ret = $db->q($sql);
else
$ret = false;
return $ret;
}}
global $db;
if($db && $db->connected)
$ret = $db->q($sql);
else
$ret = false;
return $ret;
}
}
// Caller is responsible for ensuring that any integer arguments to
// Caller is responsible for ensuring that any integer arguments to
// dbesc_array are actually integers and not malformed strings containing
// SQL injection vectors. All integer array elements should be specifically
// cast to int to avoid trouble.
// SQL injection vectors. All integer array elements should be specifically
// cast to int to avoid trouble.
if(! function_exists('dbesc_array_cb')) {
function dbesc_array_cb(&$item, $key) {
if(is_string($item))
$item = dbesc($item);
}}
function dbesc_array_cb(&$item, $key) {
if(is_string($item))
$item = dbesc($item);
}
}
if(! function_exists('dbesc_array')) {
function dbesc_array(&$arr) {
if(is_array($arr) && count($arr)) {
array_walk($arr,'dbesc_array_cb');
function dbesc_array(&$arr) {
if(is_array($arr) && count($arr)) {
array_walk($arr,'dbesc_array_cb');
}
}
}}
}

View File

@ -1856,6 +1856,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 +1882,7 @@ function local_delivery($importer,$data) {
// schedule a scan?
}
*/
// handle friend suggestion notification

View File

@ -692,18 +692,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)));
$url = 'http://www.gravatar.com/avatar/' . $hash . '.jpg'
. '?s=' . $size . '&d=' . $opt . '&r=' . $rating;
if(! function_exists('avatar_img')) {
function avatar_img($email) {
logger('gravatar: ' . $email . ' ' . $url);
return $url;
$a = get_app();
$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'];
}}

View File

@ -1506,3 +1506,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;
}

View File

@ -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
@ -258,6 +257,18 @@ if($a->module_loaded) {
$func($a);
}
if(function_exists(str_replace('-','_',current_theme()) . '_init')) {
$func = str_replace('-','_',current_theme()) . '_init';
$func($a);
}
// elseif (x($a->theme_info,"extends") && file_exists("view/theme/".$a->theme_info["extends"]."/theme.php")) {
// require_once("view/theme/".$a->theme_info["extends"]."/theme.php");
// if(function_exists(str_replace('-','_',$a->theme_info["extends"]) . '_init')) {
// $func = str_replace('-','_',$a->theme_info["extends"]) . '_init';
// $func($a);
// }
// }
if(($_SERVER['REQUEST_METHOD'] === 'POST') && (! $a->error)
&& (function_exists($a->module . '_post'))
&& (! x($_POST,'auth-params'))) {
@ -348,13 +359,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;

View File

@ -174,7 +174,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 +193,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);
@ -204,7 +202,7 @@ function admin_page_site_post(&$a){
$proxy = ((x($_POST,'proxy')) ? notags(trim($_POST['proxy'])) : '');
$timeout = ((x($_POST,'timeout')) ? intval(trim($_POST['timeout'])) : 60);
$dfrn_only = ((x($_POST,'dfrn_only')) ? True : False);
$ostatus_disabled = !((x($_POST,'ostatus_disabled')) ? True : False);
$ostatus_disabled = !((x($_POST,'ostatus_disabled')) ? True : False);
$diaspora_enabled = ((x($_POST,'diaspora_enabled')) ? True : False);
$ssl_policy = ((x($_POST,'ssl_policy')) ? intval($_POST['ssl_policy']) : 0);
@ -283,7 +281,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);
@ -380,7 +377,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.")),

View File

@ -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'])

View File

@ -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');

View File

@ -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':

View File

@ -180,7 +180,7 @@ function dfrn_request_post(&$a) {
// (ignore reply, nothing we can do it failed)
goaway($dfrn_url);
goaway(zrl($dfrn_url));
return; // NOTREACHED
}
@ -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,17 +310,60 @@ function dfrn_request_post(&$a) {
return;
}
// Canonicalise email-style profile locator
$hcard = '';
$url = webfinger_dfrn($url,$hcard);
if(substr($url,0,5) === 'stat:') {
$network = NETWORK_OSTATUS;
$url = substr($url,5);
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 {
$network = NETWORK_DFRN;
// Canonicalise email-style profile locator
$url = webfinger_dfrn($url,$hcard);
if(substr($url,0,5) === 'stat:') {
$network = NETWORK_OSTATUS;
$url = substr($url,5);
}
else {
$network = NETWORK_DFRN;
}
}
logger('dfrn_request: url: ' . $url);

View File

@ -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);
}
@ -351,7 +350,7 @@ function item_post(&$a) {
$image_uri = substr($image_uri,0, strpos($image_uri,'-'));
if(! strlen($image_uri))
continue;
$srch = '<' . intval($profile_uid) . '>';
$srch = '<' . intval($contact_record['id']) . '>';
$r = q("SELECT `id` FROM `photo` WHERE `allow_cid` = '%s' AND `allow_gid` = '' AND `deny_cid` = '' AND `deny_gid` = ''
AND `resource-id` = '%s' AND `uid` = %d LIMIT 1",
dbesc($srch),
@ -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);
}
}

View File

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

View File

@ -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;
@ -48,4 +48,4 @@ function newmember_content(&$a) {
$o .= '</div>';
return $o;
}
}

View File

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

View File

@ -121,16 +121,17 @@ 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);
$r = q("UPDATE `profile`
@ -361,7 +362,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 +382,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';

10
mod/randprof.php Normal file
View File

@ -0,0 +1,10 @@
<?php
function randprof_init(&$a) {
require_once('include/Contact.php');
$x = random_profile();
if($x)
goaway($x);
goaway($a->get_baseurl() . '/profile');
}

View File

@ -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);
@ -333,7 +329,7 @@ function register_post(&$a) {
if($img->is_valid()) {
$img->scaleImageSquare(175);
$hash = photo_new_resource();
$r = $img->store($newuid, 0, $hash, $filename, t('Profile Photos'), 4 );

View File

@ -7,7 +7,7 @@ function wall_attach_post(&$a) {
if($a->argc > 1) {
$nick = $a->argv[1];
$r = q("SELECT * FROM `user` WHERE `nickname` = '%s' AND `blocked` = 0 LIMIT 1",
$r = q("SELECT `user`.*, `contact`.`id` FROM `user` LEFT JOIN `contact` on `user`.`uid` = `contact`.`uid` WHERE `user`.`nickname` = '%s' AND `user`.`blocked` = 0 and `contact`.`self` = 1 LIMIT 1",
dbesc($nick)
);
if(! count($r))
@ -21,6 +21,7 @@ function wall_attach_post(&$a) {
$visitor = 0;
$page_owner_uid = $r[0]['uid'];
$page_owner_cid = $r[0]['id'];
$page_owner_nick = $r[0]['nickname'];
$community_page = (($r[0]['page-flags'] == PAGE_COMMUNITY) ? true : false);
@ -73,7 +74,7 @@ function wall_attach_post(&$a) {
dbesc($filedata),
dbesc($created),
dbesc($created),
dbesc('<' . $page_owner_uid . '>'),
dbesc('<' . $page_owner_cid . '>'),
dbesc(''),
dbesc(''),
dbesc('')

View File

@ -6,7 +6,7 @@ function wall_upload_post(&$a) {
if($a->argc > 1) {
$nick = $a->argv[1];
$r = q("SELECT * FROM `user` WHERE `nickname` = '%s' AND `blocked` = 0 LIMIT 1",
$r = q("SELECT `user`.*, `contact`.`id` FROM `user` LEFT JOIN `contact` on `user`.`uid` = `contact`.`uid` WHERE `user`.`nickname` = '%s' AND `user`.`blocked` = 0 and `contact`.`self` = 1 LIMIT 1",
dbesc($nick)
);
if(! count($r))
@ -16,10 +16,13 @@ function wall_upload_post(&$a) {
else
return;
$can_post = false;
$visitor = 0;
$page_owner_uid = $r[0]['uid'];
$default_cid = $r[0]['id'];
$page_owner_nick = $r[0]['nickname'];
$community_page = (($r[0]['page-flags'] == PAGE_COMMUNITY) ? true : false);
@ -34,6 +37,7 @@ function wall_upload_post(&$a) {
if(count($r)) {
$can_post = true;
$visitor = remote_user();
$default_cid = $visitor;
}
}
}
@ -76,7 +80,7 @@ function wall_upload_post(&$a) {
$smallest = 0;
$defperm = '<' . $page_owner_uid . '>';
$defperm = '<' . $default_cid . '>';
$r = $ph->store($page_owner_uid, $visitor, $hash, $filename, t('Wall Photos'), 0, 0, $defperm);

File diff suppressed because it is too large Load Diff

View File

@ -17,7 +17,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>

View File

@ -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",

View File

@ -16,9 +16,9 @@ msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: http://bugs.friendica.com/\n"
"POT-Creation-Date: 2012-04-05 10:00-0700\n"
"PO-Revision-Date: 2012-04-06 10:40+0000\n"
"Last-Translator: bavatar <tobias.diekershoff@gmx.net>\n"
"POT-Creation-Date: 2012-04-06 10:00-0700\n"
"PO-Revision-Date: 2012-04-08 23:57+0000\n"
"Last-Translator: zottel <transifex@zottel.net>\n"
"Language-Team: German (http://www.transifex.net/projects/p/friendica/language/de/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@ -216,7 +216,7 @@ msgstr "l, F j"
msgid "Edit event"
msgstr "Veranstaltung bearbeiten"
#: ../../mod/events.php:272 ../../include/text.php:1050
#: ../../mod/events.php:272 ../../include/text.php:1053
msgid "link to source"
msgstr "Link zum Originalbeitrag"
@ -410,7 +410,7 @@ msgstr "wurde getaggt in einem"
#: ../../view/theme/diabook-red/theme.php:82
#: ../../view/theme/diabook-blue/theme.php:82
#: ../../view/theme/diabook/theme.php:86
#: ../../view/theme/diabook-aerith/theme.php:82 ../../include/text.php:1294
#: ../../view/theme/diabook-aerith/theme.php:82 ../../include/text.php:1297
#: ../../include/diaspora.php:1654 ../../include/conversation.php:53
#: ../../include/conversation.php:126
msgid "photo"
@ -2234,7 +2234,7 @@ msgstr "Markierte"
msgid "Shared Links"
msgstr "Geteilte Links"
#: ../../mod/network.php:270
#: ../../mod/network.php:274
#, php-format
msgid "Warning: This group contains %s member from an insecure network."
msgid_plural ""
@ -2242,31 +2242,31 @@ msgid_plural ""
msgstr[0] "Warnung: Diese Gruppe beinhaltet %s Person aus einem unsicheren Netzwerk."
msgstr[1] "Warnung: Diese Gruppe beinhaltet %s Personen aus unsicheren Netzwerken."
#: ../../mod/network.php:273
#: ../../mod/network.php:277
msgid "Private messages to this group are at risk of public disclosure."
msgstr "Private Nachrichten an diese Gruppe könnten an die Öffentlichkeit geraten."
#: ../../mod/network.php:318
#: ../../mod/network.php:322
msgid "No such group"
msgstr "Es gibt keine solche Gruppe"
#: ../../mod/network.php:329
#: ../../mod/network.php:333
msgid "Group is empty"
msgstr "Gruppe ist leer"
#: ../../mod/network.php:333
#: ../../mod/network.php:337
msgid "Group: "
msgstr "Gruppe: "
#: ../../mod/network.php:343
#: ../../mod/network.php:347
msgid "Contact: "
msgstr "Kontakt: "
#: ../../mod/network.php:345
#: ../../mod/network.php:349
msgid "Private messages to this person are at risk of public disclosure."
msgstr "Private Nachrichten an diese Person könnten an die Öffentlichkeit gelangen."
#: ../../mod/network.php:350
#: ../../mod/network.php:354
msgid "Invalid contact."
msgstr "Ungültiger Kontakt."
@ -2275,7 +2275,7 @@ msgid "Personal Notes"
msgstr "Persönliche Notizen"
#: ../../mod/notes.php:63 ../../mod/filer.php:30
#: ../../addon/facebook/facebook.php:673 ../../include/text.php:649
#: ../../addon/facebook/facebook.php:673 ../../include/text.php:652
msgid "Save"
msgstr "Speichern"
@ -2538,7 +2538,7 @@ msgstr "Alle Kontakte (mit gesichertem Profilzugriff)"
msgid "No contacts."
msgstr "Keine Kontakte."
#: ../../mod/viewcontacts.php:76 ../../include/text.php:586
#: ../../mod/viewcontacts.php:76 ../../include/text.php:589
msgid "View Contacts"
msgstr "Kontakte anzeigen"
@ -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 ""
@ -4397,7 +4397,7 @@ msgstr "Neueste Favoriten"
#: ../../view/theme/diabook-red/theme.php:74
#: ../../view/theme/diabook-blue/theme.php:74
#: ../../view/theme/diabook/theme.php:78
#: ../../view/theme/diabook-aerith/theme.php:74 ../../include/text.php:1292
#: ../../view/theme/diabook-aerith/theme.php:74 ../../include/text.php:1295
#: ../../include/conversation.php:45 ../../include/conversation.php:118
msgid "event"
msgstr "Veranstaltung"
@ -5223,21 +5223,21 @@ msgstr "Verbinde Dienste"
#: ../../view/theme/diabook/theme.php:212
#: ../../view/theme/diabook-aerith/theme.php:207
msgid "PostIt to Friendica"
msgstr "PostIt nach Friendica"
msgstr "Bei Friendica posten"
#: ../../view/theme/diabook-red/theme.php:207
#: ../../view/theme/diabook-blue/theme.php:207
#: ../../view/theme/diabook/theme.php:212
#: ../../view/theme/diabook-aerith/theme.php:207
msgid "Post to Friendica"
msgstr "Bei Friendica veröffentlichen"
msgstr "Wenn du diesen Link"
#: ../../view/theme/diabook-red/theme.php:208
#: ../../view/theme/diabook-blue/theme.php:208
#: ../../view/theme/diabook/theme.php:213
#: ../../view/theme/diabook-aerith/theme.php:208
msgid " from anywhere by bookmarking this Link."
msgstr " von überall her indem du diesen Link zu deinen Lesezeichen hinzufügst."
msgstr "zu deinen Lesezeichen hinzufügst, kannst du von überallher Links bei Friendica veröffentlichen."
#: ../../view/theme/diabook-red/theme.php:236
#: ../../view/theme/diabook-blue/theme.php:236
@ -5695,158 +5695,158 @@ msgstr "(kein Betreff)"
msgid "noreply"
msgstr "noreply"
#: ../../include/text.php:240
#: ../../include/text.php:243
msgid "prev"
msgstr "vorige"
#: ../../include/text.php:242
#: ../../include/text.php:245
msgid "first"
msgstr "erste"
#: ../../include/text.php:271
#: ../../include/text.php:274
msgid "last"
msgstr "letzte"
#: ../../include/text.php:274
#: ../../include/text.php:277
msgid "next"
msgstr "nächste"
#: ../../include/text.php:565
#: ../../include/text.php:568
msgid "No contacts"
msgstr "Keine Kontakte"
#: ../../include/text.php:574
#: ../../include/text.php:577
#, php-format
msgid "%d Contact"
msgid_plural "%d Contacts"
msgstr[0] "%d Kontakt"
msgstr[1] "%d Kontakte"
#: ../../include/text.php:647 ../../include/nav.php:91
#: ../../include/text.php:650 ../../include/nav.php:91
msgid "Search"
msgstr "Suche"
#: ../../include/text.php:828
#: ../../include/text.php:831
msgid "Monday"
msgstr "Montag"
#: ../../include/text.php:828
#: ../../include/text.php:831
msgid "Tuesday"
msgstr "Dienstag"
#: ../../include/text.php:828
#: ../../include/text.php:831
msgid "Wednesday"
msgstr "Mittwoch"
#: ../../include/text.php:828
#: ../../include/text.php:831
msgid "Thursday"
msgstr "Donnerstag"
#: ../../include/text.php:828
#: ../../include/text.php:831
msgid "Friday"
msgstr "Freitag"
#: ../../include/text.php:828
#: ../../include/text.php:831
msgid "Saturday"
msgstr "Samstag"
#: ../../include/text.php:828
#: ../../include/text.php:831
msgid "Sunday"
msgstr "Sonntag"
#: ../../include/text.php:832
#: ../../include/text.php:835
msgid "January"
msgstr "Januar"
#: ../../include/text.php:832
#: ../../include/text.php:835
msgid "February"
msgstr "Februar"
#: ../../include/text.php:832
#: ../../include/text.php:835
msgid "March"
msgstr "März"
#: ../../include/text.php:832
#: ../../include/text.php:835
msgid "April"
msgstr "April"
#: ../../include/text.php:832
#: ../../include/text.php:835
msgid "May"
msgstr "Mai"
#: ../../include/text.php:832
#: ../../include/text.php:835
msgid "June"
msgstr "Juni"
#: ../../include/text.php:832
#: ../../include/text.php:835
msgid "July"
msgstr "Juli"
#: ../../include/text.php:832
#: ../../include/text.php:835
msgid "August"
msgstr "August"
#: ../../include/text.php:832
#: ../../include/text.php:835
msgid "September"
msgstr "September"
#: ../../include/text.php:832
#: ../../include/text.php:835
msgid "October"
msgstr "Oktober"
#: ../../include/text.php:832
#: ../../include/text.php:835
msgid "November"
msgstr "November"
#: ../../include/text.php:832
#: ../../include/text.php:835
msgid "December"
msgstr "Dezember"
#: ../../include/text.php:916
#: ../../include/text.php:919
msgid "bytes"
msgstr "Byte"
#: ../../include/text.php:933
#: ../../include/text.php:936
msgid "Categories:"
msgstr "Kategorien:"
#: ../../include/text.php:945
#: ../../include/text.php:948
msgid "remove"
msgstr "löschen"
#: ../../include/text.php:945
#: ../../include/text.php:948
msgid "[remove]"
msgstr "[löschen]"
#: ../../include/text.php:948
#: ../../include/text.php:951
msgid "Filed under:"
msgstr "Abgelegt unter:"
#: ../../include/text.php:964 ../../include/text.php:976
#: ../../include/text.php:967 ../../include/text.php:979
msgid "Click to open/close"
msgstr "Zum öffnen/schließen klicken"
#: ../../include/text.php:1068
#: ../../include/text.php:1071
msgid "Select an alternate language"
msgstr "Alternative Sprache auswählen"
#: ../../include/text.php:1080
#: ../../include/text.php:1083
msgid "default"
msgstr "standard"
#: ../../include/text.php:1296
#: ../../include/text.php:1299
msgid "activity"
msgstr "Aktivität"
#: ../../include/text.php:1298
#: ../../include/text.php:1301
msgid "comment"
msgstr "Kommentar"
#: ../../include/text.php:1299
#: ../../include/text.php:1302
msgid "post"
msgstr "Beitrag"
#: ../../include/text.php:1454
#: ../../include/text.php:1457
msgid "Item filed"
msgstr "Beitrag abgelegt"
@ -6220,7 +6220,7 @@ msgstr "%s hat dir eine neue private Nachricht auf %s geschrieben."
#: ../../include/enotify.php:42
#, php-format
msgid "%s sent you %s."
msgstr "%s hat Dir geschickt %s"
msgstr "%s hat Dir %s geschickt"
#: ../../include/enotify.php:42
msgid "a private message"
@ -6316,7 +6316,7 @@ msgstr "%s markierte %s"
#: ../../include/enotify.php:121
msgid "your post"
msgstr "Dein Beitrag"
msgstr "Deinen Beitrag"
#: ../../include/enotify.php:130
msgid "[Friendica:Notify] Introduction received"

View File

@ -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";
@ -1159,9 +1159,9 @@ $a->strings["Invite Friends"] = "Freunde einladen";
$a->strings["Community Pages"] = "Foren";
$a->strings["Help or @NewHere ?"] = "Hilfe oder @NewHere";
$a->strings["Connect Services"] = "Verbinde Dienste";
$a->strings["PostIt to Friendica"] = "PostIt nach Friendica";
$a->strings["Post to Friendica"] = "Bei Friendica veröffentlichen";
$a->strings[" from anywhere by bookmarking this Link."] = " von überall her indem du diesen Link zu deinen Lesezeichen hinzufügst.";
$a->strings["PostIt to Friendica"] = "Bei Friendica posten";
$a->strings["Post to Friendica"] = "Wenn du diesen Link";
$a->strings[" from anywhere by bookmarking this Link."] = "zu deinen Lesezeichen hinzufügst, kannst du von überallher Links bei Friendica veröffentlichen.";
$a->strings["Your posts and conversations"] = "Deine Beiträge und Unterhaltungen";
$a->strings["Your profile page"] = "Deine Profilseite";
$a->strings["Your contacts"] = "Deine Kontakte";
@ -1401,7 +1401,7 @@ $a->strings["%s Administrator"] = "der Administrator von %s";
$a->strings["%s <!item_type!>"] = "%s <!item_type!>";
$a->strings["[Friendica:Notify] New mail received at %s"] = "[Friendica Meldung] Neue Nachricht erhalten von %s";
$a->strings["%s sent you a new private message at %s."] = "%s hat dir eine neue private Nachricht auf %s geschrieben.";
$a->strings["%s sent you %s."] = "%s hat Dir geschickt %s";
$a->strings["%s sent you %s."] = "%s hat Dir %s geschickt";
$a->strings["a private message"] = "eine private Nachricht";
$a->strings["Please visit %s to view and/or reply to your private messages."] = "Bitte besuche %s, um deine privaten Nachrichten anzusehen und/oder zu beantworten.";
$a->strings["%s's"] = "%s's";
@ -1421,7 +1421,7 @@ $a->strings["tagged you"] = "erwähnte Dich";
$a->strings["[Friendica:Notify] %s tagged your post"] = "[Friendica Meldung] %s markierte Deinen Beitrag";
$a->strings["%s tagged your post at %s"] = "%s hat deinen Beitrag auf %s getaggt";
$a->strings["%s tagged %s"] = "%s markierte %s";
$a->strings["your post"] = "Dein Beitrag";
$a->strings["your post"] = "Deinen Beitrag";
$a->strings["[Friendica:Notify] Introduction received"] = "[Friendica Meldung] Kontaktanfrage erhalten";
$a->strings["You've received an introduction from '%s' at %s"] = "Du hast eine Kontaktanfrage von '%s' auf %s erhalten";
$a->strings["You've received %s from %s."] = "Du hast %s von %s erhalten.";
@ -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';

View File

@ -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

View File

@ -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 }}

View File

@ -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 : "",

View File

@ -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>

View File

@ -11,6 +11,7 @@ $a->theme_info = array(
'extends' => 'duepuntozero',
);
function darkzero_NS_init(&$a) {
$a->page['htmlhead'] .= <<< EOT
<script>
$(document).ready(function() {
@ -57,3 +58,4 @@ $('.savedsearchterm').hover(
</script>
EOT;
}

View File

@ -12,6 +12,7 @@ $a->theme_info = array(
'extends' => 'duepuntozero',
);
function darkzero_init(&$a) {
$a->page['htmlhead'] .= <<< EOT
<script>
$(document).ready(function() {
@ -58,3 +59,4 @@ $('.savedsearchterm').hover(
</script>
EOT;
}

View File

@ -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);" onBlur="commentClose(this,$id);" >$comment</textarea>
<a class="icon bb-video" onclick="insertFormatting('video',$id);">video</a>
<a class="icon bb-image" onclick="insertFormatting('img',$id);">img</a>
<a class="icon bb-url" onclick="insertFormatting('url',$id);">url</a>
<a class="icon underline" onclick="insertFormatting('u',$id);">u</a>
<a class="icon italic" onclick="insertFormatting('i',$id);">i</a>
<a class="icon bold" onclick="insertFormatting('b',$id);">b</a>
<a class="icon quote" onclick="insertFormatting('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>

Binary file not shown.

After

Width:  |  Height:  |  Size: 697 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 939 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 917 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 699 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 568 B

After

Width:  |  Height:  |  Size: 803 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 568 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 577 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 579 B

After

Width:  |  Height:  |  Size: 901 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 579 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 754 B

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 754 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 795 B

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 795 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 631 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 604 B

View File

@ -0,0 +1,4 @@
<a class="embed_yt" href='$embedurl' onclick='this.innerHTML=Base64.decode("$escapedhtml"); yt_iframe(); return false;' style='float:left; margin: 1em; position: relative;'>
<img width='$tw' height='$th' src='$turl' >
<div style='position: absolute; top: 0px; left: 0px; width: $twpx; height: $thpx; background: url(images/icons/48/play.png) no-repeat center center;'></div>
</a>

View File

@ -1298,6 +1298,7 @@ transition: all 0.2s ease-in-out;
padding: 5px;
margin-bottom: 0px;
width: 575px;
padding-top: 10px;
}
.tread-wrapper a{
color: #3465A4;
@ -1447,7 +1448,7 @@ transition: all 0.2s ease-in-out;
}
.wall-item-comment-wrapper {
margin: 1px 0px 0px 80px;
margin: 1px 5px 17px 80px;
background-color: #fff;
width: 500px;
}
@ -2173,7 +2174,7 @@ blockquote {
color: #777;
}
.oembed {
font-size: large;
font-weight: bold;
}
.aprofile dt{

View File

@ -1291,6 +1291,7 @@ transition: all 0.2s ease-in-out;
padding: 5px;
margin-bottom: 0px;
width: 575px;
padding-top: 10px;
}
.tread-wrapper a{
color: #3465A4;
@ -1439,7 +1440,7 @@ transition: all 0.2s ease-in-out;
padding-left: 12px;
}
.wall-item-comment-wrapper {
margin: 1px 5px 1px 80px;
margin: 1px 5px 17px 80px;
}
.wall-item-comment-wrapper .comment-edit-photo {
display: none;
@ -2162,7 +2163,7 @@ blockquote {
color: #777;
}
.oembed {
font-size: large;
font-weight: bold;
}
.aprofile dt{

View File

@ -83,6 +83,35 @@
#adminpage .selectall { text-align: right; }
/* icons */
.icon.bb-url{
background-image: url("../../../view/theme/diabook-aerith/icons/bb-url.png");
float: right;
margin-top: 2px;}
.icon.quote{
background-image: url("../../../view/theme/diabook-aerith/icons/quote.png");
float: right;
margin-top: 2px;}
.icon.bold{
background-image: url("../../../view/theme/diabook-aerith/icons/bold.png");
float: right;
margin-top: 2px;}
.icon.underline{
background-image: url("../../../view/theme/diabook-aerith/icons/underline.png");
float: right;
margin-top: 2px;}
.icon.italic{
background-image: url("../../../view/theme/diabook-aerith/icons/italic.png");
float: right;
margin-top: 2px;}
.icon.bb-image{
background-image: url("../../../view/theme/diabook-aerith/icons/bb-image.png");
float: right;
margin-top: 2px;}
.icon.bb-video{
background-image: url("../../../view/theme/diabook-aerith/icons/bb-video.png");
float: right;
margin-top: 2px;}
.icon.contacts {
background-image: url("../../../view/theme/diabook-aerith/icons/contacts.png");}
.icon.notifications {
@ -1276,7 +1305,7 @@ body .pageheader{
font-size: 20px;
margin-bottom: 20px;
margin-top: 0px;
max-width: 575px;
max-width: 775px;
}
.qcomment{
max-width: 122px;
@ -1331,6 +1360,7 @@ body .pageheader{
padding: 5px;
margin-bottom: 0px;
width: 775px;
padding-top: 10px;
}
.tread-wrapper a{
color: #3465A4;
@ -1592,7 +1622,7 @@ body .pageheader{
padding-left: 12px;
}
.wall-item-comment-wrapper {
margin: 1px 5px 1px 80px;
margin: 1px 5px 17px 80px;
}
.wall-item-comment-wrapper .comment-edit-photo {
display: none;
@ -2324,7 +2354,7 @@ blockquote {
color: #777;
}
.oembed {
font-size: large;
font-weight: bold;
}
.aprofile dt{

View File

@ -3,13 +3,13 @@
/*
* Name: Diabook-aerith
* Description: Diabook-aerith : report bugs and request here: http://pad.toktan.org/p/diabook or contact me : thomas_bierey@friendica.eu
* Version: (Version: 1.014)
* Version: (Version: 1.016)
* Author:
*/
//print diabook-version for debugging
$diabook_version = "Diabook-aerith (Version: 1.014)";
$diabook_version = "Diabook-aerith (Version: 1.016)";
$a->page['htmlhead'] .= sprintf('<script "%s" ></script>', $diabook_version);
@ -366,6 +366,35 @@ $a->page['htmlhead'] .= '
</script>';
$a->page['htmlhead'] .= '
<script>
$(document).ready(function() {
$("iframe").each(function(){
var ifr_source = $(this).attr("src");
var wmode = "wmode=transparent";
if(ifr_source.indexOf("?") != -1) {
var getQString = ifr_source.split("?");
var oldString = getQString[1];
var newString = getQString[0];
$(this).attr("src",newString+"?"+wmode+"&"+oldString);
}
else $(this).attr("src",ifr_source+"?"+wmode);
});
});
function yt_iframe() {
$("iframe").load(function() {
var ifr_src = $(this).contents().find("body iframe").attr("src");
$("iframe").contents().find("body iframe").attr("src", ifr_src+"&wmode=transparent");
});
};
</script>';
if ($a->argv[0].$a->argv[1] === "profile".$a->user['nickname'] or $a->argv[0] === "network" && local_user()){
$a->page['htmlhead'] .= '
@ -374,7 +403,12 @@ $a->page['htmlhead'] .= '
$(function() {
$(".oembed.photo img").aeImageResize({height: 400, width: 400});
});
</script>';
if($ccCookie != "8") {
$a->page['htmlhead'] .= '
<script>
$("right_aside").ready(function(){
if($.cookie("close_pages") == "1")
@ -458,9 +492,10 @@ function close_lastlikes(){
document.getElementById( "close_lastlikes" ).style.display = "none";
$.cookie("close_lastlikes","1", { expires: 365, path: "/" });
};
</script>';}
$a->page['htmlhead'] .= '
<script>
function restore_boxes(){
$.cookie("close_pages","2", { expires: 365, path: "/" });
$.cookie("close_helpers","2", { expires: 365, path: "/" });
@ -471,5 +506,38 @@ function restore_boxes(){
$.cookie("close_lastphotos","2", { expires: 365, path: "/" });
$.cookie("close_lastlikes","2", { expires: 365, path: "/" });
alert("Right-hand column was restored. Please refresh your browser");
};
</script>';}
}
</script>';}
$a->page['htmlhead'] .= '
<script type="text/javascript">
function insertFormatting(BBcode,id) {
var tmpStr = $("#comment-edit-text-" + id).val();
if(tmpStr == "Kommentar") {
tmpStr = "";
$("#comment-edit-text-" + id).addClass("comment-edit-text-full");
$("#comment-edit-text-" + id).removeClass("comment-edit-text-empty");
openMenu("comment-edit-submit-wrapper-" + id);
}
textarea = document.getElementById("comment-edit-text-" +id);
if (document.selection) {
textarea.focus();
selected = document.selection.createRange();
if (BBcode == "url"){
selected.text = "["+BBcode+"]" + "http://" + selected.text + "[/"+BBcode+"]";
} else
selected.text = "["+BBcode+"]" + selected.text + "[/"+BBcode+"]";
} else if (textarea.selectionStart || textarea.selectionStart == "0") {
var start = textarea.selectionStart;
var end = textarea.selectionEnd;
if (BBcode == "url"){
textarea.value = textarea.value.substring(0, start) + "["+BBcode+"]" + "http://" + textarea.value.substring(start, end) + "[/"+BBcode+"]" + textarea.value.substring(end, textarea.value.length);
} else
textarea.value = textarea.value.substring(0, start) + "["+BBcode+"]" + textarea.value.substring(start, end) + "[/"+BBcode+"]" + textarea.value.substring(end, textarea.value.length);
}
return true;
}
</script> ';

View File

@ -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);" onBlur="commentClose(this,$id);" >$comment</textarea>
<a class="icon bb-video" onclick="insertFormatting('video',$id);">video</a>
<a class="icon bb-image" onclick="insertFormatting('img',$id);">img</a>
<a class="icon bb-url" onclick="insertFormatting('url',$id);">url</a>
<a class="icon underline" onclick="insertFormatting('u',$id);">u</a>
<a class="icon italic" onclick="insertFormatting('i',$id);">i</a>
<a class="icon bold" onclick="insertFormatting('b',$id);">b</a>
<a class="icon quote" onclick="insertFormatting('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>

Binary file not shown.

After

Width:  |  Height:  |  Size: 697 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 939 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 917 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 699 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 577 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 631 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 604 B

View File

@ -0,0 +1,4 @@
<a class="embed_yt" href='$embedurl' onclick='this.innerHTML=Base64.decode("$escapedhtml"); yt_iframe(); return false;' style='float:left; margin: 1em; position: relative;'>
<img width='$tw' height='$th' src='$turl' >
<div style='position: absolute; top: 0px; left: 0px; width: $twpx; height: $thpx; background: url(images/icons/48/play.png) no-repeat center center;'></div>
</a>

View File

@ -1260,6 +1260,7 @@ transition: all 0.2s ease-in-out;
padding: 5px;
margin-bottom: 0px;
width: 575px;
padding-top: 10px;
}
.tread-wrapper a{
color: #1872A2;
@ -1409,7 +1410,7 @@ transition: all 0.2s ease-in-out;
}
.wall-item-comment-wrapper {
margin: 1px 0px 0px 80px;
margin: 1px 5px 17px 80px;
background-color: #fff;
width: 500px;
}
@ -2134,7 +2135,7 @@ blockquote {
color: #777;
}
.oembed {
font-size: large;
font-weight: bold;
}
.aprofile dt{

View File

@ -1258,6 +1258,7 @@ transition: all 0.2s ease-in-out;
padding: 5px;
margin-bottom: 0px;
width: 575px;
padding-top: 10px;
}
.tread-wrapper a{
color: #1872A2;
@ -1406,7 +1407,7 @@ transition: all 0.2s ease-in-out;
padding-left: 12px;
}
.wall-item-comment-wrapper {
margin: 1px 5px 1px 80px;
margin: 1px 5px 17px 80px;
}
.wall-item-comment-wrapper .comment-edit-photo {
display: none;
@ -2129,7 +2130,7 @@ blockquote {
color: #777;
}
.oembed {
font-size: large;
font-weight: bold;
}
.aprofile dt{

View File

@ -82,7 +82,35 @@
#adminpage table tr:hover { background-color: #eeeeee; }
#adminpage .selectall { text-align: right; }
/* icons */
.icon.bb-url{
background-image: url("../../../view/theme/diabook-blue/icons/bb-url.png");
float: right;
margin-top: 2px;}
.icon.quote{
background-image: url("../../../view/theme/diabook-blue/icons/quote.png");
float: right;
margin-top: 2px;}
.icon.bold{
background-image: url("../../../view/theme/diabook-blue/icons/bold.png");
float: right;
margin-top: 2px;}
.icon.underline{
background-image: url("../../../view/theme/diabook-blue/icons/underline.png");
float: right;
margin-top: 2px;}
.icon.italic{
background-image: url("../../../view/theme/diabook-blue/icons/italic.png");
float: right;
margin-top: 2px;}
.icon.bb-image{
background-image: url("../../../view/theme/diabook-blue/icons/bb-image.png");
float: right;
margin-top: 2px;}
.icon.bb-video{
background-image: url("../../../view/theme/diabook-blue/icons/bb-video.png");
float: right;
margin-top: 2px;}
.icon.contacts {
background-image: url("../../../view/theme/diabook-blue/icons/contacts.png");}
.icon.notifications {
@ -1236,7 +1264,7 @@ body .pageheader{
font-size: 20px;
margin-bottom: 20px;
margin-top: 0px;
max-width: 575px;
max-width: 775px;
}
.qcomment{
max-width: 122px;
@ -1287,6 +1315,7 @@ body .pageheader{
padding: 5px;
margin-bottom: 0px;
width: 775px;
padding-top: 10px;
}
.tread-wrapper a{
color: #1872A2;
@ -1550,7 +1579,7 @@ body .pageheader{
padding-left: 12px;
}
.wall-item-comment-wrapper {
margin: 1px 5px 1px 80px;
margin: 1px 5px 17px 80px;
}
.wall-item-comment-wrapper .comment-edit-photo {
display: none;
@ -2281,7 +2310,7 @@ blockquote {
color: #777;
}
.oembed {
font-size: large;
font-weight: bold;
}
.aprofile dt{

View File

@ -3,13 +3,13 @@
/*
* Name: Diabook-blue
* Description: Diabook-blue: report bugs and request here: http://pad.toktan.org/p/diabook or contact me : thomas_bierey@friendica.eu
* Version: (Version: 1.014)
* Version: (Version: 1.016)
* Author:
*/
//print diabook-version for debugging
$diabook_version = "Diabook-blue (Version: 1.014)";
$diabook_version = "Diabook-blue (Version: 1.016)";
$a->page['htmlhead'] .= sprintf('<script "%s" ></script>', $diabook_version);
//change css on network and profilepages
@ -366,15 +366,50 @@ $a->page['htmlhead'] .= '
</script>';
$a->page['htmlhead'] .= '
<script>
$(document).ready(function() {
$("iframe").each(function(){
var ifr_source = $(this).attr("src");
var wmode = "wmode=transparent";
if(ifr_source.indexOf("?") != -1) {
var getQString = ifr_source.split("?");
var oldString = getQString[1];
var newString = getQString[0];
$(this).attr("src",newString+"?"+wmode+"&"+oldString);
}
else $(this).attr("src",ifr_source+"?"+wmode);
});
});
function yt_iframe() {
$("iframe").load(function() {
var ifr_src = $(this).contents().find("body iframe").attr("src");
$("iframe").contents().find("body iframe").attr("src", ifr_src+"&wmode=transparent");
});
};
</script>';
if ($a->argv[0].$a->argv[1] === "profile".$a->user['nickname'] or $a->argv[0] === "network" && local_user()){
$a->page['htmlhead'] .= '
<script>
$(function() {
$(function() {
$(".oembed.photo img").aeImageResize({height: 400, width: 400});
});
</script>';
if($ccCookie != "8") {
$a->page['htmlhead'] .= '
<script>
$("right_aside").ready(function(){
if($.cookie("close_pages") == "1")
@ -458,9 +493,10 @@ function close_lastlikes(){
document.getElementById( "close_lastlikes" ).style.display = "none";
$.cookie("close_lastlikes","1", { expires: 365, path: "/" });
};
</script>';}
$a->page['htmlhead'] .= '
<script>
function restore_boxes(){
$.cookie("close_pages","2", { expires: 365, path: "/" });
$.cookie("close_helpers","2", { expires: 365, path: "/" });
@ -471,5 +507,38 @@ function restore_boxes(){
$.cookie("close_lastphotos","2", { expires: 365, path: "/" });
$.cookie("close_lastlikes","2", { expires: 365, path: "/" });
alert("Right-hand column was restored. Please refresh your browser");
};
}
</script>';}
$a->page['htmlhead'] .= '
<script type="text/javascript">
function insertFormatting(BBcode,id) {
var tmpStr = $("#comment-edit-text-" + id).val();
if(tmpStr == "Kommentar") {
tmpStr = "";
$("#comment-edit-text-" + id).addClass("comment-edit-text-full");
$("#comment-edit-text-" + id).removeClass("comment-edit-text-empty");
openMenu("comment-edit-submit-wrapper-" + id);
}
textarea = document.getElementById("comment-edit-text-" +id);
if (document.selection) {
textarea.focus();
selected = document.selection.createRange();
if (BBcode == "url"){
selected.text = "["+BBcode+"]" + "http://" + selected.text + "[/"+BBcode+"]";
} else
selected.text = "["+BBcode+"]" + selected.text + "[/"+BBcode+"]";
} else if (textarea.selectionStart || textarea.selectionStart == "0") {
var start = textarea.selectionStart;
var end = textarea.selectionEnd;
if (BBcode == "url"){
textarea.value = textarea.value.substring(0, start) + "["+BBcode+"]" + "http://" + textarea.value.substring(start, end) + "[/"+BBcode+"]" + textarea.value.substring(end, textarea.value.length);
} else
textarea.value = textarea.value.substring(0, start) + "["+BBcode+"]" + textarea.value.substring(start, end) + "[/"+BBcode+"]" + textarea.value.substring(end, textarea.value.length);
}
return true;
}
</script> ';

View File

@ -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);" onBlur="commentClose(this,$id);" >$comment</textarea>
<a class="icon bb-video" onclick="insertFormatting('video',$id);">video</a>
<a class="icon bb-image" onclick="insertFormatting('img',$id);">img</a>
<a class="icon bb-url" onclick="insertFormatting('url',$id);">url</a>
<a class="icon underline" onclick="insertFormatting('u',$id);">u</a>
<a class="icon italic" onclick="insertFormatting('i',$id);">i</a>
<a class="icon bold" onclick="insertFormatting('b',$id);">b</a>
<a class="icon quote" onclick="insertFormatting('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>

Binary file not shown.

After

Width:  |  Height:  |  Size: 697 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 939 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 917 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 699 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 577 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 631 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 604 B

View File

@ -0,0 +1,4 @@
<a class="embed_yt" href='$embedurl' onclick='this.innerHTML=Base64.decode("$escapedhtml"); yt_iframe(); return false;' style='float:left; margin: 1em; position: relative;'>
<img width='$tw' height='$th' src='$turl' >
<div style='position: absolute; top: 0px; left: 0px; width: $twpx; height: $thpx; background: url(images/icons/48/play.png) no-repeat center center;'></div>
</a>

View File

@ -1295,6 +1295,7 @@ transition: all 0.2s ease-in-out;
padding: 5px;
margin-bottom: 0px;
width: 575px;
padding-top: 10px;
}
.tread-wrapper a{
color: red;
@ -1444,7 +1445,7 @@ transition: all 0.2s ease-in-out;
}
.wall-item-comment-wrapper {
margin: 1px 0px 0px 80px;
margin: 1px 5px 17px 80px;
background-color: #fff;
width: 500px;
}
@ -2171,7 +2172,7 @@ blockquote {
color: #777;
}
.oembed {
font-size: large;
font-weight: bold;
}
.aprofile dt{

View File

@ -1271,6 +1271,7 @@ transition: all 0.2s ease-in-out;
padding: 5px;
margin-bottom: 0px;
width: 575px;
padding-top: 10px;
}
.tread-wrapper a{
color: red;
@ -1419,7 +1420,7 @@ transition: all 0.2s ease-in-out;
padding-left: 12px;
}
.wall-item-comment-wrapper {
margin: 1px 5px 1px 80px;
margin: 1px 5px 17px 80px;
}
.wall-item-comment-wrapper .comment-edit-photo {
display: none;
@ -2143,7 +2144,7 @@ blockquote {
color: #777;
}
.oembed {
font-size: large;
font-weight: bold;
}
.aprofile dt{

View File

@ -82,7 +82,35 @@
#adminpage table tr:hover { background-color: #eeeeee; }
#adminpage .selectall { text-align: right; }
/* icons */
.icon.bb-url{
background-image: url("../../../view/theme/diabook-red/icons/bb-url.png");
float: right;
margin-top: 2px;}
.icon.quote{
background-image: url("../../../view/theme/diabook-red/icons/quote.png");
float: right;
margin-top: 2px;}
.icon.bold{
background-image: url("../../../view/theme/diabook-red/icons/bold.png");
float: right;
margin-top: 2px;}
.icon.underline{
background-image: url("../../../view/theme/diabook-red/icons/underline.png");
float: right;
margin-top: 2px;}
.icon.italic{
background-image: url("../../../view/theme/diabook-red/icons/italic.png");
float: right;
margin-top: 2px;}
.icon.bb-image{
background-image: url("../../../view/theme/diabook-red/icons/bb-image.png");
float: right;
margin-top: 2px;}
.icon.bb-video{
background-image: url("../../../view/theme/diabook-red/icons/bb-video.png");
float: right;
margin-top: 2px;}
.icon.contacts {
background-image: url("../../../view/theme/diabook-red/icons/contacts.png");}
.icon.notifications {
@ -1266,7 +1294,7 @@ body .pageheader{
font-size: 20px;
margin-bottom: 20px;
margin-top: 0px;
max-width: 575px;
max-width: 775px;
}
.qcomment{
max-width: 122px;
@ -1317,6 +1345,7 @@ body .pageheader{
padding: 5px;
margin-bottom: 0px;
width: 775px;
padding-top: 10px;
}
.tread-wrapper a{
color: red;
@ -1579,7 +1608,7 @@ body .pageheader{
padding-left: 12px;
}
.wall-item-comment-wrapper {
margin: 1px 5px 1px 80px;
margin: 1px 5px 17px 80px;
}
.wall-item-comment-wrapper .comment-edit-photo {
display: none;
@ -2310,7 +2339,7 @@ blockquote {
color: #777;
}
.oembed {
font-size: large;
font-weight: bold;
}
.aprofile dt{

View File

@ -3,13 +3,13 @@
/*
* Name: Diabook-red
* Description: Diabook-red: report bugs and request here: http://pad.toktan.org/p/diabook or contact me : thomas_bierey@friendica.eu
* Version: (Version: 1.014)
* Version: (Version: 1.016)
* Author:
*/
//print diabook-version for debugging
$diabook_version = "Diabook-red (Version: 1.014)";
$diabook_version = "Diabook-red (Version: 1.016)";
$a->page['htmlhead'] .= sprintf('<script "%s" ></script>', $diabook_version);
//change css on network and profilepages
@ -367,15 +367,50 @@ $a->page['htmlhead'] .= '
</script>';
$a->page['htmlhead'] .= '
<script>
$(document).ready(function() {
$("iframe").each(function(){
var ifr_source = $(this).attr("src");
var wmode = "wmode=transparent";
if(ifr_source.indexOf("?") != -1) {
var getQString = ifr_source.split("?");
var oldString = getQString[1];
var newString = getQString[0];
$(this).attr("src",newString+"?"+wmode+"&"+oldString);
}
else $(this).attr("src",ifr_source+"?"+wmode);
});
});
function yt_iframe() {
$("iframe").load(function() {
var ifr_src = $(this).contents().find("body iframe").attr("src");
$("iframe").contents().find("body iframe").attr("src", ifr_src+"&wmode=transparent");
});
};
</script>';
if ($a->argv[0].$a->argv[1] === "profile".$a->user['nickname'] or $a->argv[0] === "network" && local_user()){
$a->page['htmlhead'] .= '
<script>
$(function() {
$(function() {
$(".oembed.photo img").aeImageResize({height: 400, width: 400});
});
</script>';
if($ccCookie != "8") {
$a->page['htmlhead'] .= '
<script>
$("right_aside").ready(function(){
if($.cookie("close_pages") == "1")
@ -459,9 +494,10 @@ function close_lastlikes(){
document.getElementById( "close_lastlikes" ).style.display = "none";
$.cookie("close_lastlikes","1", { expires: 365, path: "/" });
};
</script>';}
$a->page['htmlhead'] .= '
<script>
function restore_boxes(){
$.cookie("close_pages","2", { expires: 365, path: "/" });
$.cookie("close_helpers","2", { expires: 365, path: "/" });
@ -472,5 +508,38 @@ function restore_boxes(){
$.cookie("close_lastphotos","2", { expires: 365, path: "/" });
$.cookie("close_lastlikes","2", { expires: 365, path: "/" });
alert("Right-hand column was restored. Please refresh your browser");
};
}
</script>';}
$a->page['htmlhead'] .= '
<script type="text/javascript">
function insertFormatting(BBcode,id) {
var tmpStr = $("#comment-edit-text-" + id).val();
if(tmpStr == "Kommentar") {
tmpStr = "";
$("#comment-edit-text-" + id).addClass("comment-edit-text-full");
$("#comment-edit-text-" + id).removeClass("comment-edit-text-empty");
openMenu("comment-edit-submit-wrapper-" + id);
}
textarea = document.getElementById("comment-edit-text-" +id);
if (document.selection) {
textarea.focus();
selected = document.selection.createRange();
if (BBcode == "url"){
selected.text = "["+BBcode+"]" + "http://" + selected.text + "[/"+BBcode+"]";
} else
selected.text = "["+BBcode+"]" + selected.text + "[/"+BBcode+"]";
} else if (textarea.selectionStart || textarea.selectionStart == "0") {
var start = textarea.selectionStart;
var end = textarea.selectionEnd;
if (BBcode == "url"){
textarea.value = textarea.value.substring(0, start) + "["+BBcode+"]" + "http://" + textarea.value.substring(start, end) + "[/"+BBcode+"]" + textarea.value.substring(end, textarea.value.length);
} else
textarea.value = textarea.value.substring(0, start) + "["+BBcode+"]" + textarea.value.substring(start, end) + "[/"+BBcode+"]" + textarea.value.substring(end, textarea.value.length);
}
return true;
}
</script> ';

View File

@ -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);" onBlur="commentClose(this,$id);" >$comment</textarea>
<a class="icon bb-image" onclick="insertFormatting('img',$id);">img</a>
<a class="icon bb-url" onclick="insertFormatting('url',$id);">url</a>
<a class="icon bb-video" onclick="insertFormatting('video',$id);">video</a>
<a class="icon underline" onclick="insertFormatting('u',$id);">u</a>
<a class="icon italic" onclick="insertFormatting('i',$id);">i</a>
<a class="icon bold" onclick="insertFormatting('b',$id);">b</a>
<a class="icon quote" onclick="insertFormatting('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>

Binary file not shown.

After

Width:  |  Height:  |  Size: 697 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 939 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 917 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 699 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 559 B

After

Width:  |  Height:  |  Size: 773 B

Some files were not shown because too many files have changed in this diff Show More