Merge pull request #1003 from annando/master
app.net feeds, number of comments and better handling of the reply button in "vier"
This commit is contained in:
commit
5fb971d060
|
@ -438,6 +438,12 @@ function get_atom_elements($feed, $item, $contact = array()) {
|
||||||
$res['body'] = unxmlify($item->get_content());
|
$res['body'] = unxmlify($item->get_content());
|
||||||
$res['plink'] = unxmlify($item->get_link(0));
|
$res['plink'] = unxmlify($item->get_link(0));
|
||||||
|
|
||||||
|
if (isset($contact["network"]) AND ($contact["network"] == NETWORK_FEED) AND strstr($res['plink'], ".app.net/")) {
|
||||||
|
logger("get_atom_elements: detected app.net posting: ".print_r($res, true), LOGGER_DEBUG);
|
||||||
|
$res['title'] = "";
|
||||||
|
$res['body'] = nl2br($res['body']);
|
||||||
|
}
|
||||||
|
|
||||||
// removing the content of the title if its identically to the body
|
// removing the content of the title if its identically to the body
|
||||||
// This helps with auto generated titles e.g. from tumblr
|
// This helps with auto generated titles e.g. from tumblr
|
||||||
if (title_is_body($res["title"], $res["body"]))
|
if (title_is_body($res["title"], $res["body"]))
|
||||||
|
@ -860,6 +866,9 @@ function get_atom_elements($feed, $item, $contact = array()) {
|
||||||
$res["title"] = "";
|
$res["title"] = "";
|
||||||
} elseif (isset($contact["network"]) AND ($contact["network"] == NETWORK_OSTATUS))
|
} elseif (isset($contact["network"]) AND ($contact["network"] == NETWORK_OSTATUS))
|
||||||
$res["body"] = add_page_info_to_body($res["body"]);
|
$res["body"] = add_page_info_to_body($res["body"]);
|
||||||
|
elseif (isset($contact["network"]) AND ($contact["network"] == NETWORK_FEED) AND strstr($res['plink'], ".app.net/")) {
|
||||||
|
$res["body"] = add_page_info_to_body($res["body"]);
|
||||||
|
}
|
||||||
|
|
||||||
$arr = array('feed' => $feed, 'item' => $item, 'result' => $res);
|
$arr = array('feed' => $feed, 'item' => $item, 'result' => $res);
|
||||||
|
|
||||||
|
|
|
@ -1126,9 +1126,20 @@ function original_url($url, $depth=1, $fetchbody = false) {
|
||||||
if (in_array($param, array("utm_source", "utm_medium", "utm_term", "utm_content", "utm_campaign",
|
if (in_array($param, array("utm_source", "utm_medium", "utm_term", "utm_content", "utm_campaign",
|
||||||
"wt_mc", "pk_campaign", "pk_kwd", "mc_cid", "mc_eid",
|
"wt_mc", "pk_campaign", "pk_kwd", "mc_cid", "mc_eid",
|
||||||
"fb_action_ids", "fb_action_types", "fb_ref",
|
"fb_action_ids", "fb_action_types", "fb_ref",
|
||||||
|
"awesm",
|
||||||
"woo_campaign", "woo_source", "woo_medium", "woo_content", "woo_term"))) {
|
"woo_campaign", "woo_source", "woo_medium", "woo_content", "woo_term"))) {
|
||||||
|
|
||||||
|
$pair = $param."=".urlencode($value);
|
||||||
|
$url = str_replace($pair, "", $url);
|
||||||
|
|
||||||
|
// Second try: if the url isn't encoded completely
|
||||||
|
$pair = $param."=".str_replace(" ", "+", $value);
|
||||||
|
$url = str_replace($pair, "", $url);
|
||||||
|
|
||||||
|
// Third try: Maybey the url isn't encoded at all
|
||||||
$pair = $param."=".$value;
|
$pair = $param."=".$value;
|
||||||
$url = str_replace($pair, "", $url);
|
$url = str_replace($pair, "", $url);
|
||||||
|
|
||||||
$url = str_replace(array("?&", "&&"), array("?", ""), $url);
|
$url = str_replace(array("?&", "&&"), array("?", ""), $url);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -355,13 +355,14 @@ function admin_page_site_post(&$a){
|
||||||
$use_fulltext_engine = ((x($_POST,'use_fulltext_engine')) ? True : False);
|
$use_fulltext_engine = ((x($_POST,'use_fulltext_engine')) ? True : False);
|
||||||
$itemcache = ((x($_POST,'itemcache')) ? notags(trim($_POST['itemcache'])) : '');
|
$itemcache = ((x($_POST,'itemcache')) ? notags(trim($_POST['itemcache'])) : '');
|
||||||
$itemcache_duration = ((x($_POST,'itemcache_duration')) ? intval($_POST['itemcache_duration']) : 0);
|
$itemcache_duration = ((x($_POST,'itemcache_duration')) ? intval($_POST['itemcache_duration']) : 0);
|
||||||
|
$max_comments = ((x($_POST,'max_comments')) ? intval($_POST['max_comments']) : 0);
|
||||||
$lockpath = ((x($_POST,'lockpath')) ? notags(trim($_POST['lockpath'])) : '');
|
$lockpath = ((x($_POST,'lockpath')) ? notags(trim($_POST['lockpath'])) : '');
|
||||||
$temppath = ((x($_POST,'temppath')) ? notags(trim($_POST['temppath'])) : '');
|
$temppath = ((x($_POST,'temppath')) ? notags(trim($_POST['temppath'])) : '');
|
||||||
$basepath = ((x($_POST,'basepath')) ? notags(trim($_POST['basepath'])) : '');
|
$basepath = ((x($_POST,'basepath')) ? notags(trim($_POST['basepath'])) : '');
|
||||||
$singleuser = ((x($_POST,'singleuser')) ? notags(trim($_POST['singleuser'])) : '');
|
$singleuser = ((x($_POST,'singleuser')) ? notags(trim($_POST['singleuser'])) : '');
|
||||||
if($ssl_policy != intval(get_config('system','ssl_policy'))) {
|
if($ssl_policy != intval(get_config('system','ssl_policy'))) {
|
||||||
if($ssl_policy == SSL_POLICY_FULL) {
|
if($ssl_policy == SSL_POLICY_FULL) {
|
||||||
q("update `contact` set
|
q("update `contact` set
|
||||||
`url` = replace(`url` , 'http:' , 'https:'),
|
`url` = replace(`url` , 'http:' , 'https:'),
|
||||||
`photo` = replace(`photo` , 'http:' , 'https:'),
|
`photo` = replace(`photo` , 'http:' , 'https:'),
|
||||||
`thumb` = replace(`thumb` , 'http:' , 'https:'),
|
`thumb` = replace(`thumb` , 'http:' , 'https:'),
|
||||||
|
@ -478,6 +479,7 @@ function admin_page_site_post(&$a){
|
||||||
set_config('system','use_fulltext_engine', $use_fulltext_engine);
|
set_config('system','use_fulltext_engine', $use_fulltext_engine);
|
||||||
set_config('system','itemcache', $itemcache);
|
set_config('system','itemcache', $itemcache);
|
||||||
set_config('system','itemcache_duration', $itemcache_duration);
|
set_config('system','itemcache_duration', $itemcache_duration);
|
||||||
|
set_config('system','max_comments', $max_comments);
|
||||||
set_config('system','lockpath', $lockpath);
|
set_config('system','lockpath', $lockpath);
|
||||||
set_config('system','temppath', $temppath);
|
set_config('system','temppath', $temppath);
|
||||||
set_config('system','basepath', $basepath);
|
set_config('system','basepath', $basepath);
|
||||||
|
@ -630,12 +632,13 @@ function admin_page_site(&$a) {
|
||||||
'$suppress_language' => array('suppress_language', t("Suppress Language"), get_config('system','suppress_language'), t("Suppress language information in meta information about a posting.")),
|
'$suppress_language' => array('suppress_language', t("Suppress Language"), get_config('system','suppress_language'), t("Suppress language information in meta information about a posting.")),
|
||||||
'$itemcache' => array('itemcache', t("Path to item cache"), get_config('system','itemcache'), "The item caches buffers generated bbcode and external images."),
|
'$itemcache' => array('itemcache', t("Path to item cache"), get_config('system','itemcache'), "The item caches buffers generated bbcode and external images."),
|
||||||
'$itemcache_duration' => array('itemcache_duration', t("Cache duration in seconds"), get_config('system','itemcache_duration'), t("How long should the cache files be hold? Default value is 86400 seconds (One day).")),
|
'$itemcache_duration' => array('itemcache_duration', t("Cache duration in seconds"), get_config('system','itemcache_duration'), t("How long should the cache files be hold? Default value is 86400 seconds (One day).")),
|
||||||
|
'$max_comments' => array('max_comments', t("Maximum numbers of comments per post"), get_config('system','max_comments'), t("How much comments should be shown for each post? Default value is 100.")),
|
||||||
'$lockpath' => array('lockpath', t("Path for lock file"), get_config('system','lockpath'), "The lock file is used to avoid multiple pollers at one time. Only define a folder here."),
|
'$lockpath' => array('lockpath', t("Path for lock file"), get_config('system','lockpath'), "The lock file is used to avoid multiple pollers at one time. Only define a folder here."),
|
||||||
'$temppath' => array('temppath', t("Temp path"), get_config('system','temppath'), "If you have a restricted system where the webserver can't access the system temp path, enter another path here."),
|
'$temppath' => array('temppath', t("Temp path"), get_config('system','temppath'), "If you have a restricted system where the webserver can't access the system temp path, enter another path here."),
|
||||||
'$basepath' => array('basepath', t("Base path to installation"), get_config('system','basepath'), "If the system cannot detect the correct path to your installation, enter the correct path here. This setting should only be set if you are using a restricted system and symbolic links to your webroot."),
|
'$basepath' => array('basepath', t("Base path to installation"), get_config('system','basepath'), "If the system cannot detect the correct path to your installation, enter the correct path here. This setting should only be set if you are using a restricted system and symbolic links to your webroot."),
|
||||||
|
|
||||||
'$relocate_url' => array('relocate_url', t("New base url"), $a->get_baseurl(), "Change base url for this server. Sends relocate message to all DFRN contacts of all users."),
|
'$relocate_url' => array('relocate_url', t("New base url"), $a->get_baseurl(), "Change base url for this server. Sends relocate message to all DFRN contacts of all users."),
|
||||||
|
|
||||||
'$form_security_token' => get_form_security_token("admin_site"),
|
'$form_security_token' => get_form_security_token("admin_site"),
|
||||||
|
|
||||||
));
|
));
|
||||||
|
|
|
@ -111,6 +111,7 @@
|
||||||
{{include file="field_checkbox.tpl" field=$use_fulltext_engine}}
|
{{include file="field_checkbox.tpl" field=$use_fulltext_engine}}
|
||||||
{{include file="field_input.tpl" field=$itemcache}}
|
{{include file="field_input.tpl" field=$itemcache}}
|
||||||
{{include file="field_input.tpl" field=$itemcache_duration}}
|
{{include file="field_input.tpl" field=$itemcache_duration}}
|
||||||
|
{{include file="field_input.tpl" field=$max_comments}}
|
||||||
<div class="submit"><input type="submit" name="page_site" value="{{$submit}}" /></div>
|
<div class="submit"><input type="submit" name="page_site" value="{{$submit}}" /></div>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -47,6 +47,7 @@
|
||||||
$("#comment-edit-text-" + id).value = '';
|
$("#comment-edit-text-" + id).value = '';
|
||||||
$("#comment-edit-text-" + id).addClass("comment-edit-text-full");
|
$("#comment-edit-text-" + id).addClass("comment-edit-text-full");
|
||||||
$("#comment-edit-text-" + id).removeClass("comment-edit-text-empty");
|
$("#comment-edit-text-" + id).removeClass("comment-edit-text-empty");
|
||||||
|
$("#comment-edit-text-" + id).focus();
|
||||||
$("#mod-cmnt-wrap-" + id).show();
|
$("#mod-cmnt-wrap-" + id).show();
|
||||||
openMenu("comment-edit-submit-wrapper-" + id);
|
openMenu("comment-edit-submit-wrapper-" + id);
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -51,7 +51,7 @@
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
text-decoration: inherit;
|
text-decoration: inherit;
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
font-size: 1.3333333333333333em;
|
font-size: 1.2em;
|
||||||
}
|
}
|
||||||
a .icon {
|
a .icon {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
|
|
@ -1728,6 +1728,13 @@ h2 {
|
||||||
margin-left: 15px;
|
margin-left: 15px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
#profile-smiley-wrapper {
|
||||||
|
float: left;
|
||||||
|
margin-left: 15px;
|
||||||
|
cursor: pointer;
|
||||||
|
margin-top: 3px;
|
||||||
|
height: 10px;
|
||||||
|
}
|
||||||
#jot-perms-icon {
|
#jot-perms-icon {
|
||||||
float: right;
|
float: right;
|
||||||
margin-left: 15px;
|
margin-left: 15px;
|
||||||
|
|
|
@ -99,7 +99,7 @@
|
||||||
{{if $item.threaded}}
|
{{if $item.threaded}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{if $item.comment}}
|
{{if $item.comment}}
|
||||||
<span id="comment-{{$item.id}}" class="fakelink togglecomment" onclick="commentExpand({{$item.id}}); openClose('item-comments-{{$item.id}}');"><i class="icon-reply"></i></span>
|
<span id="comment-{{$item.id}}" class="fakelink togglecomment" onclick="openClose('item-comments-{{$item.id}}'); commentExpand({{$item.id}});"><i class="icon-reply"></i></span>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{if $item.vote}}
|
{{if $item.vote}}
|
||||||
{{if $item.vote.like}}
|
{{if $item.vote.like}}
|
||||||
|
|
Loading…
Reference in a new issue