several small fixes and adjustments
This commit is contained in:
parent
fa8b4e98b7
commit
e9b5b0f0b4
BIN
images/red.png
Normal file
BIN
images/red.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.9 KiB |
@ -209,7 +209,7 @@ class Item extends BaseObject {
|
||||
|
||||
'type' => implode("",array_slice(explode("/",$item['verb']),-1)),
|
||||
'tags' => $tags,
|
||||
'body' => template_escape($body),
|
||||
'body' => $body,
|
||||
'text' => strip_tags(template_escape($body)),
|
||||
'id' => $this->get_id(),
|
||||
'linktitle' => sprintf( t('View %s\'s profile @ %s'), $profile_name, ((strlen($item['author-link'])) ? $item['author-link'] : $item['url'])),
|
||||
|
@ -9,8 +9,8 @@ function network_query($a,$arr) {
|
||||
|
||||
$ordering = (($arr['order'] === 'post') ? "`created`" : "`commented`") . " DESC ";
|
||||
|
||||
$itemspage = get_pconfig($arr['uid'],'system','itemspage_network');
|
||||
$a->set_pager_itemspage(((intval($itemspage_network)) ? $itemspage_network : 40));
|
||||
$itemspage = get_pconfig($arr['uid'],'system','itemspage');
|
||||
$a->set_pager_itemspage(((intval($itemspage)) ? $itemspage : 40));
|
||||
|
||||
$pager_sql = ((intval($arr['update'])) ? '' : sprintf(" LIMIT %d, %d ",intval($a->pager['start']), intval($a->pager['itemspage'])));
|
||||
|
||||
|
@ -46,7 +46,7 @@
|
||||
foreach($keys as $k) {
|
||||
$val = (isset($val[$k]) ? $val[$k] : null);
|
||||
}
|
||||
return $val;
|
||||
return template_escape($val);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -196,12 +196,49 @@
|
||||
* (subgrup 1), match close bracket
|
||||
*/
|
||||
if (preg_match_all('/\$(\[)?([a-zA-Z0-9-_]+\.?)+(?(1)\])/', $s,$m)){
|
||||
|
||||
foreach($m[0] as $var){
|
||||
$varn = str_replace(array("[","]"), array("",""), $var);
|
||||
$val = $this->_get_var($varn, true);
|
||||
if ($val!=KEY_NOT_EXISTS)
|
||||
$s = str_replace($var, $val, $s);
|
||||
foreach($m[0] as $var){
|
||||
|
||||
$exp = str_replace(array("[", "]"), array("", ""), $var);
|
||||
$exptks = explode("|", $exp);
|
||||
|
||||
$varn = $exptks[0];
|
||||
unset($exptks[0]);
|
||||
$val = $this->_get_var($varn, true);
|
||||
if ($val != KEY_NOT_EXISTS) {
|
||||
/* run filters */
|
||||
/*
|
||||
* Filter are in form of:
|
||||
* filtername:arg:arg:arg
|
||||
*
|
||||
* "filtername" is function name
|
||||
* "arg"s are optional, var value is appended to the end
|
||||
* if one "arg"==='x' , is replaced with var value
|
||||
*
|
||||
* examples:
|
||||
* $item.body|htmlspecialchars // escape html chars
|
||||
* $item.body|htmlspecialchars|strtoupper // escape html and uppercase result
|
||||
* $item.created|date:%Y %M %j // format date (created is a timestamp)
|
||||
* $item.body|str_replace:cat:dog // replace all "cat" with "dog"
|
||||
* $item.body|str_replace:cat:dog:x:1 // replace one "cat" with "dog"
|
||||
|
||||
*/
|
||||
foreach ($exptks as $filterstr) {
|
||||
$filter = explode(":", $filterstr);
|
||||
$filtername = $filter[0];
|
||||
unset($filter[0]);
|
||||
$valkey = array_search("x", $filter);
|
||||
if ($valkey === false) {
|
||||
$filter[] = $val;
|
||||
} else {
|
||||
$filter[$valkey] = $val;
|
||||
}
|
||||
if (function_exists($filtername)) {
|
||||
$val = call_user_func_array($filtername, $filter);
|
||||
}
|
||||
}
|
||||
$s = str_replace($var, $val, $s);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -74,6 +74,9 @@ function channel_content(&$a, $update = 0, $load = false) {
|
||||
$tab = 'posts';
|
||||
$o = '';
|
||||
|
||||
|
||||
$is_owner = (((local_user()) && ($a->profile['profile_uid'] == local_user())) ? true : false);
|
||||
|
||||
if($update) {
|
||||
// Ensure we've got a profile owner if updating.
|
||||
$a->profile['profile_uid'] = $update;
|
||||
|
@ -561,8 +561,8 @@ function network_content(&$a, $update = 0, $load = false) {
|
||||
|
||||
}
|
||||
else {
|
||||
$itemspage_network = get_pconfig(local_user(),'system','itemspage_network');
|
||||
$a->set_pager_itemspage(((intval($itemspage_network)) ? $itemspage_network : 40));
|
||||
$itemspage = get_pconfig(local_user(),'system','itemspage');
|
||||
$a->set_pager_itemspage(((intval($itemspage)) ? $itemspage : 40));
|
||||
$pager_sql = sprintf(" LIMIT %d, %d ",intval($a->pager['start']), intval($a->pager['itemspage']));
|
||||
}
|
||||
|
||||
|
@ -187,9 +187,9 @@ function settings_post(&$a) {
|
||||
if($browser_update < 10000)
|
||||
$browser_update = 10000;
|
||||
|
||||
$itemspage_network = ((x($_POST,'itemspage_network')) ? intval($_POST['itemspage_network']) : 40);
|
||||
if($itemspage_network > 100)
|
||||
$itemspage_network = 100;
|
||||
$itemspage = ((x($_POST,'itemspage')) ? intval($_POST['itemspage']) : 40);
|
||||
if($itemspage > 100)
|
||||
$itemspage = 100;
|
||||
|
||||
|
||||
if($mobile_theme !== '') {
|
||||
@ -197,7 +197,7 @@ function settings_post(&$a) {
|
||||
}
|
||||
|
||||
set_pconfig(local_user(),'system','update_interval', $browser_update);
|
||||
set_pconfig(local_user(),'system','itemspage_network', $itemspage_network);
|
||||
set_pconfig(local_user(),'system','itemspage', $itemspage);
|
||||
set_pconfig(local_user(),'system','no_smilies',$nosmile);
|
||||
|
||||
|
||||
@ -745,8 +745,8 @@ function settings_content(&$a) {
|
||||
$browser_update = intval(get_pconfig(local_user(), 'system','update_interval'));
|
||||
$browser_update = (($browser_update == 0) ? 40 : $browser_update / 1000); // default if not set: 40 seconds
|
||||
|
||||
$itemspage_network = intval(get_pconfig(local_user(), 'system','itemspage_network'));
|
||||
$itemspage_network = (($itemspage_network > 0 && $itemspage_network < 101) ? $itemspage_network : 40); // default if not set: 40 items
|
||||
$itemspage = intval(get_pconfig(local_user(), 'system','itemspage'));
|
||||
$itemspage = (($itemspage > 0 && $itemspage < 101) ? $itemspage : 40); // default if not set: 40 items
|
||||
|
||||
$nosmile = get_pconfig(local_user(),'system','no_smilies');
|
||||
$nosmile = (($nosmile===false)? '0': $nosmile); // default if not set: 0
|
||||
@ -769,7 +769,7 @@ function settings_content(&$a) {
|
||||
'$theme' => array('theme', t('Display Theme:'), $theme_selected, '', $themes, 'preview'),
|
||||
'$mobile_theme' => array('mobile_theme', t('Mobile Theme:'), $mobile_theme_selected, '', $mobile_themes, ''),
|
||||
'$ajaxint' => array('browser_update', t("Update browser every xx seconds"), $browser_update, t('Minimum of 10 seconds, no maximum')),
|
||||
'$itemspage_network' => array('itemspage_network', t("Number of items to display on the network page:"), $itemspage_network, t('Maximum of 100 items')),
|
||||
'$itemspage' => array('itemspage', t("Maximum number of conversations to load at any time:"), $itemspage, t('Maximum of 100 items')),
|
||||
'$nosmile' => array('nosmile', t("Don't show emoticons"), $nosmile, ''),
|
||||
|
||||
'$theme_config' => $theme_config,
|
||||
|
@ -698,6 +698,13 @@ input#dfrn-url {
|
||||
padding: 12px;
|
||||
}
|
||||
|
||||
#profiles-menu.menu-popup {
|
||||
left: 200px;
|
||||
right: auto;
|
||||
top: 22px;
|
||||
}
|
||||
|
||||
|
||||
#profile-edit-profile-name-label,
|
||||
#profile-edit-name-label,
|
||||
#profile-edit-pdesc-label,
|
||||
@ -1161,7 +1168,7 @@ input#dfrn-url {
|
||||
}
|
||||
|
||||
.thread-wrapper.toplevel_item {
|
||||
padding: 30px;
|
||||
/*padding: 30px; */
|
||||
width: 90%;
|
||||
}
|
||||
|
||||
@ -2115,13 +2122,20 @@ aside input[type='text'] {
|
||||
|
||||
#nav-search-text:hover {
|
||||
background-color: #FFF;
|
||||
color: #000;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
#nav-search-text {
|
||||
border-radius: 14px;
|
||||
background-color: #AAAAAA;
|
||||
color: #eec;
|
||||
color: #eec;
|
||||
}
|
||||
|
||||
/* this doesn't seem to work */
|
||||
|
||||
#nav-search-text::-moz-placeholder { color: #444; }
|
||||
#nav-search-text::-webkit-input-placeholder {
|
||||
color: #444 !important;
|
||||
}
|
||||
|
||||
#nav-user-linkmenu img {
|
||||
@ -3093,7 +3107,7 @@ ul.menu-popup {
|
||||
color: #eec;
|
||||
padding: 0px;
|
||||
list-style: none;
|
||||
border-radius: 0px 0px 20px 20px;
|
||||
/* border-radius: 0px 0px 20px 20px; */
|
||||
z-index: 100000;
|
||||
-webkit-box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.7);
|
||||
-moz-box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.7);
|
||||
|
@ -12,7 +12,7 @@ $js_strings
|
||||
|
||||
$head_js
|
||||
|
||||
<link rel="shortcut icon" href="$baseurl/images/fred-32.png" />
|
||||
<link rel="shortcut icon" href="$baseurl/images/red.png" />
|
||||
<link rel="search"
|
||||
href="$baseurl/opensearch"
|
||||
type="application/opensearchdescription+xml"
|
||||
|
@ -6,7 +6,7 @@
|
||||
{{inc field_themeselect.tpl with $field=$theme }}{{endinc}}
|
||||
{{inc field_themeselect.tpl with $field=$mobile_theme }}{{endinc}}
|
||||
{{inc field_input.tpl with $field=$ajaxint }}{{endinc}}
|
||||
{{inc field_input.tpl with $field=$itemspage_network }}{{endinc}}
|
||||
{{inc field_input.tpl with $field=$itemspage }}{{endinc}}
|
||||
{{inc field_checkbox.tpl with $field=$nosmile}}{{endinc}}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user