updates
This commit is contained in:
parent
4f64599210
commit
c673c70c25
1
boot.php
1
boot.php
@ -382,6 +382,7 @@ if(! class_exists('App')) {
|
|||||||
public $plugins;
|
public $plugins;
|
||||||
public $apps = array();
|
public $apps = array();
|
||||||
public $identities;
|
public $identities;
|
||||||
|
public $sourcename = '';
|
||||||
|
|
||||||
public $nav_sel;
|
public $nav_sel;
|
||||||
|
|
||||||
|
@ -247,7 +247,7 @@ class Photo {
|
|||||||
if($this->is_imagick()) {
|
if($this->is_imagick()) {
|
||||||
$this->image->setFirstIterator();
|
$this->image->setFirstIterator();
|
||||||
do {
|
do {
|
||||||
$this->image->rotateImage(new ImagickPixel(), $degrees);
|
$this->image->rotateImage(new ImagickPixel(), -$degrees); // ImageMagick rotates in the opposite direction of imagerotate()
|
||||||
} while ($this->image->nextImage());
|
} while ($this->image->nextImage());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -202,9 +202,9 @@ function bb2diaspora($Text,$preserve_nl = false, $fordiaspora = true) {
|
|||||||
// the following was added on 10-January-2012 due to an inability of Diaspora's
|
// the following was added on 10-January-2012 due to an inability of Diaspora's
|
||||||
// new javascript markdown processor to handle links with images as the link "text"
|
// new javascript markdown processor to handle links with images as the link "text"
|
||||||
// It is not optimal and may be removed if this ability is restored in the future
|
// It is not optimal and may be removed if this ability is restored in the future
|
||||||
if ($fordiaspora)
|
//if ($fordiaspora)
|
||||||
$Text = preg_replace("/\[url\=([^\[\]]*)\]\s*\[img\](.*?)\[\/img\]\s*\[\/url\]/ism",
|
// $Text = preg_replace("/\[url\=([^\[\]]*)\]\s*\[img\](.*?)\[\/img\]\s*\[\/url\]/ism",
|
||||||
"[url]$1[/url]\n[img]$2[/img]", $Text);
|
// "[url]$1[/url]\n[img]$2[/img]", $Text);
|
||||||
|
|
||||||
// Convert it to HTML - don't try oembed
|
// Convert it to HTML - don't try oembed
|
||||||
$Text = bbcode($Text, $preserve_nl, false);
|
$Text = bbcode($Text, $preserve_nl, false);
|
||||||
|
@ -224,6 +224,12 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true) {
|
|||||||
// Check for list text
|
// Check for list text
|
||||||
$Text = str_replace("[*]", "<li>", $Text);
|
$Text = str_replace("[*]", "<li>", $Text);
|
||||||
|
|
||||||
|
// Check for style sheet commands
|
||||||
|
$Text = preg_replace("(\[style=(.*?)\](.*?)\[\/style\])ism","<span style=\"$1;\">$2</span>",$Text);
|
||||||
|
|
||||||
|
// Check for CSS classes
|
||||||
|
$Text = preg_replace("(\[class=(.*?)\](.*?)\[\/class\])ism","<span class=\"$1\">$2</span>",$Text);
|
||||||
|
|
||||||
// handle nested lists
|
// handle nested lists
|
||||||
$endlessloop = 0;
|
$endlessloop = 0;
|
||||||
|
|
||||||
|
@ -722,6 +722,7 @@ function conversation(&$a, $items, $mode, $update, $page_mode = 'traditional') {
|
|||||||
'$edurl' => t('Link'),
|
'$edurl' => t('Link'),
|
||||||
'$edvideo' => t('Video'),
|
'$edvideo' => t('Video'),
|
||||||
'$preview' => t('Preview'),
|
'$preview' => t('Preview'),
|
||||||
|
'$sourceapp' => t($a->sourcename),
|
||||||
'$ww' => (($mode === 'network') ? $commentww : '')
|
'$ww' => (($mode === 'network') ? $commentww : '')
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
@ -1210,7 +1211,7 @@ function status_editor($a,$x, $notes_cid = 0, $popup=false) {
|
|||||||
'$bang' => $x['bang'],
|
'$bang' => $x['bang'],
|
||||||
'$profile_uid' => $x['profile_uid'],
|
'$profile_uid' => $x['profile_uid'],
|
||||||
'$preview' => t('Preview'),
|
'$preview' => t('Preview'),
|
||||||
'$mobileapp' => t('Friendica mobile web'),
|
'$sourceapp' => t($a->sourcename),
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|
||||||
|
@ -3589,7 +3589,7 @@ function drop_item($id,$interactive = true) {
|
|||||||
|
|
||||||
// check if logged in user is either the author or owner of this item
|
// check if logged in user is either the author or owner of this item
|
||||||
|
|
||||||
if((local_user() == $item['uid']) || (remote_user() == $item['contact-id'])) {
|
if((local_user() == $item['uid']) || (remote_user() == $item['contact-id']) || (! $interactive)) {
|
||||||
|
|
||||||
// delete the item
|
// delete the item
|
||||||
|
|
||||||
|
@ -686,6 +686,10 @@ class Markdownify {
|
|||||||
# [1]: mailto:mail@example.com Title
|
# [1]: mailto:mail@example.com Title
|
||||||
$tag['href'] = 'mailto:'.$bufferDecoded;
|
$tag['href'] = 'mailto:'.$bufferDecoded;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$this->out('['.$buffer.']('.$tag['href'].' "'.$tag['title'].'")', true);
|
||||||
|
|
||||||
|
/*
|
||||||
# [This link][id]
|
# [This link][id]
|
||||||
foreach ($this->stack['a'] as $tag2) {
|
foreach ($this->stack['a'] as $tag2) {
|
||||||
if ($tag2['href'] == $tag['href'] && $tag2['title'] === $tag['title']) {
|
if ($tag2['href'] == $tag['href'] && $tag2['title'] === $tag['title']) {
|
||||||
@ -699,6 +703,7 @@ class Markdownify {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$this->out('['.$buffer.']['.$tag['linkID'].']', true);
|
$this->out('['.$buffer.']['.$tag['linkID'].']', true);
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@ -737,7 +742,7 @@ class Markdownify {
|
|||||||
|
|
||||||
// 
|
// 
|
||||||
if ($this->parser->tagAttributes['title'] != "")
|
if ($this->parser->tagAttributes['title'] != "")
|
||||||
$this->out('!['.$this->parser->tagAttributes['alt'].']('.$this->parser->tagAttributes['src'].'"'.$this->parser->tagAttributes['title'].'")', true);
|
$this->out('!['.$this->parser->tagAttributes['alt'].']('.$this->parser->tagAttributes['src'].' "'.$this->parser->tagAttributes['title'].'")', true);
|
||||||
else
|
else
|
||||||
$this->out('!['.$this->parser->tagAttributes['alt'].']('.$this->parser->tagAttributes['src'].')', true);
|
$this->out('!['.$this->parser->tagAttributes['alt'].']('.$this->parser->tagAttributes['src'].')', true);
|
||||||
|
|
||||||
|
@ -894,7 +894,7 @@ function scale_external_images($s, $include_link = true, $scale_replace = false)
|
|||||||
$s = htmlspecialchars_decode($s);
|
$s = htmlspecialchars_decode($s);
|
||||||
|
|
||||||
$matches = null;
|
$matches = null;
|
||||||
$c = preg_match_all('/\[img\](.*?)\[\/img\]/ism',$s,$matches,PREG_SET_ORDER);
|
$c = preg_match_all('/\[img.*?\](.*?)\[\/img\]/ism',$s,$matches,PREG_SET_ORDER);
|
||||||
if($c) {
|
if($c) {
|
||||||
require_once('include/Photo.php');
|
require_once('include/Photo.php');
|
||||||
foreach($matches as $mtch) {
|
foreach($matches as $mtch) {
|
||||||
@ -915,6 +915,12 @@ function scale_external_images($s, $include_link = true, $scale_replace = false)
|
|||||||
$scaled = $mtch[1];
|
$scaled = $mtch[1];
|
||||||
$i = fetch_url($scaled);
|
$i = fetch_url($scaled);
|
||||||
|
|
||||||
|
$cache = get_config('system','itemcache');
|
||||||
|
if (($cache != '') and is_dir($cache)) {
|
||||||
|
$cachefile = $cache."/".hash("md5", $scaled);
|
||||||
|
file_put_contents($cachefile, $i);
|
||||||
|
}
|
||||||
|
|
||||||
// guess mimetype from headers or filename
|
// guess mimetype from headers or filename
|
||||||
$type = guess_image_type($mtch[1],true);
|
$type = guess_image_type($mtch[1],true);
|
||||||
|
|
||||||
@ -940,6 +946,11 @@ function scale_external_images($s, $include_link = true, $scale_replace = false)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// replace the special char encoding
|
||||||
|
|
||||||
|
$s = htmlspecialchars($s,ENT_QUOTES,'UTF-8');
|
||||||
|
|
||||||
return $s;
|
return $s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -58,8 +58,11 @@ function zot_verify(&$item,$identity) {
|
|||||||
|
|
||||||
|
|
||||||
function zot_notify($entity,$url) {
|
function zot_notify($entity,$url) {
|
||||||
$x = z_post_url($url,
|
$x = z_post_url($url, array(
|
||||||
array('zot_uid' => $entity_global_id, 'callback' => z_root() . '/zot', 'spec' => ZOT_REVISION));
|
'zot_uid' => $entity['entity_global_id'],
|
||||||
|
'callback' => z_root() . '/zot',
|
||||||
|
'spec' => ZOT_REVISION)
|
||||||
|
);
|
||||||
return($x);
|
return($x);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -697,6 +697,7 @@ function render_content(&$a, $items, $mode, $update, $preview = false) {
|
|||||||
'$edurl' => t('Link'),
|
'$edurl' => t('Link'),
|
||||||
'$edvideo' => t('Video'),
|
'$edvideo' => t('Video'),
|
||||||
'$preview' => t('Preview'),
|
'$preview' => t('Preview'),
|
||||||
|
'$sourceapp' => t($a->sourcename),
|
||||||
'$ww' => (($mode === 'network') ? $commentww : '')
|
'$ww' => (($mode === 'network') ? $commentww : '')
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
@ -115,8 +115,8 @@ function editpost_content(&$a) {
|
|||||||
'$jotnets' => $jotnets,
|
'$jotnets' => $jotnets,
|
||||||
'$title' => $itm[0]['title'],
|
'$title' => $itm[0]['title'],
|
||||||
'$placeholdertitle' => t('Set title'),
|
'$placeholdertitle' => t('Set title'),
|
||||||
'$category' => file_tag_file_to_list($itm[0]['file'], 'category'),
|
'$category' => file_tag_file_to_list($itm[0]['file'], 'category'),
|
||||||
'$placeholdercategory' => t('Categories (comma-separated list)'),
|
'$placeholdercategory' => t('Categories (comma-separated list)'),
|
||||||
'$emtitle' => t('Example: bob@example.com, mary@example.com'),
|
'$emtitle' => t('Example: bob@example.com, mary@example.com'),
|
||||||
'$lockstate' => $lockstate,
|
'$lockstate' => $lockstate,
|
||||||
'$acl' => '', // populate_acl((($group) ? $group_acl : $a->user), $celeb),
|
'$acl' => '', // populate_acl((($group) ? $group_acl : $a->user), $celeb),
|
||||||
@ -124,7 +124,7 @@ function editpost_content(&$a) {
|
|||||||
'$profile_uid' => $_SESSION['uid'],
|
'$profile_uid' => $_SESSION['uid'],
|
||||||
'$preview' => t('Preview'),
|
'$preview' => t('Preview'),
|
||||||
'$jotplugins' => $jotplugins,
|
'$jotplugins' => $jotplugins,
|
||||||
'$mobileapp' => t('Friendica mobile web'),
|
'$sourceapp' => t($a->sourcename),
|
||||||
));
|
));
|
||||||
|
|
||||||
return $o;
|
return $o;
|
||||||
|
@ -176,6 +176,9 @@ function parseurl_getsiteinfo($url) {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$src = completeurl($siteinfo["image"], $url);
|
$src = completeurl($siteinfo["image"], $url);
|
||||||
|
|
||||||
|
unset($siteinfo["image"]);
|
||||||
|
|
||||||
$photodata = getimagesize($src);
|
$photodata = getimagesize($src);
|
||||||
|
|
||||||
if (($photodata[0] > 10) and ($photodata[1] > 10))
|
if (($photodata[0] > 10) and ($photodata[1] > 10))
|
||||||
@ -292,8 +295,7 @@ function parse_url_content(&$a) {
|
|||||||
$siteinfo = parseurl_getsiteinfo($url);
|
$siteinfo = parseurl_getsiteinfo($url);
|
||||||
|
|
||||||
if($siteinfo["title"] == "") {
|
if($siteinfo["title"] == "") {
|
||||||
echo print_r($siteinfo, true);
|
echo sprintf($template,$url,$url,'') . $str_tags;
|
||||||
//echo sprintf($template,$url,$url,'') . $str_tags;
|
|
||||||
killme();
|
killme();
|
||||||
} else {
|
} else {
|
||||||
$text = $siteinfo["text"];
|
$text = $siteinfo["text"];
|
||||||
@ -302,7 +304,7 @@ function parse_url_content(&$a) {
|
|||||||
|
|
||||||
$image = "";
|
$image = "";
|
||||||
|
|
||||||
if($siteinfo["image"] != ""){
|
if(sizeof($siteinfo["images"]) > 0){
|
||||||
/*
|
/*
|
||||||
Execute below code only if image is present in siteinfo
|
Execute below code only if image is present in siteinfo
|
||||||
*/
|
*/
|
||||||
|
@ -1408,6 +1408,7 @@ function photos_content(&$a) {
|
|||||||
'$myphoto' => $contact['thumb'],
|
'$myphoto' => $contact['thumb'],
|
||||||
'$comment' => t('Comment'),
|
'$comment' => t('Comment'),
|
||||||
'$submit' => t('Submit'),
|
'$submit' => t('Submit'),
|
||||||
|
'$sourceapp' => t($a->sourcename),
|
||||||
'$ww' => ''
|
'$ww' => ''
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
@ -1343,4 +1343,3 @@ function update_1153() {
|
|||||||
if(!$r) return UPDATE_FAILED;
|
if(!$r) return UPDATE_FAILED;
|
||||||
return UPDATE_SUCCESS;
|
return UPDATE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1 +1 @@
|
|||||||
2012-07-31.32
|
2012-08-05.37
|
||||||
|
@ -17,7 +17,7 @@ aside{ background-image: url(../img/border.jpg); padding-bottom: 0px; }
|
|||||||
section { background-color: #333333; background-image: url(../img/border.jpg); }
|
section { background-color: #333333; background-image: url(../img/border.jpg); }
|
||||||
|
|
||||||
|
|
||||||
.tabs { background-image: url(../head.jpg); }
|
.tabs { background-image: url(../img/head.jpg); }
|
||||||
div.wall-item-content-wrapper.shiny { background-image: url('../img/shiny.png'); }
|
div.wall-item-content-wrapper.shiny { background-image: url('../img/shiny.png'); }
|
||||||
|
|
||||||
nav #banner #logo-text a { color: #ffffff; }
|
nav #banner #logo-text a { color: #ffffff; }
|
||||||
|
@ -2549,4 +2549,9 @@ list-style-type: disc;
|
|||||||
#photos-upload-newalbum-div {
|
#photos-upload-newalbum-div {
|
||||||
float: left;
|
float: left;
|
||||||
width: 175px;
|
width: 175px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.item-image-preview {
|
||||||
|
float: left;
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
@ -2906,4 +2906,4 @@ list-style-type: disc;
|
|||||||
#photos-upload-newalbum-div {
|
#photos-upload-newalbum-div {
|
||||||
float: left;
|
float: left;
|
||||||
width: 175px;
|
width: 175px;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user