aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--images/red.pngbin0 -> 4032 bytes
-rw-r--r--include/ItemObject.php2
-rw-r--r--include/iquery.php4
-rw-r--r--include/template_processor.php51
-rw-r--r--mod/channel.php3
-rw-r--r--mod/network.php4
-rw-r--r--mod/settings.php14
-rw-r--r--view/theme/redbasic/css/style.css22
-rw-r--r--view/tpl/head.tpl2
-rw-r--r--view/tpl/settings_display.tpl2
10 files changed, 79 insertions, 25 deletions
diff --git a/images/red.png b/images/red.png
new file mode 100644
index 000000000..803fd00f8
--- /dev/null
+++ b/images/red.png
Binary files differ
diff --git a/include/ItemObject.php b/include/ItemObject.php
index 09f5d1298..45ea6860a 100644
--- a/include/ItemObject.php
+++ b/include/ItemObject.php
@@ -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'])),
diff --git a/include/iquery.php b/include/iquery.php
index 03264de28..0d51134a4 100644
--- a/include/iquery.php
+++ b/include/iquery.php
@@ -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'])));
diff --git a/include/template_processor.php b/include/template_processor.php
index 89f03dfe0..61526e570 100644
--- a/include/template_processor.php
+++ b/include/template_processor.php
@@ -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);
+
+ }
}
}
diff --git a/mod/channel.php b/mod/channel.php
index 7fecad427..75dc0d83c 100644
--- a/mod/channel.php
+++ b/mod/channel.php
@@ -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;
diff --git a/mod/network.php b/mod/network.php
index e1061405f..47de3e380 100644
--- a/mod/network.php
+++ b/mod/network.php
@@ -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']));
}
diff --git a/mod/settings.php b/mod/settings.php
index 99de364b7..465b07f09 100644
--- a/mod/settings.php
+++ b/mod/settings.php
@@ -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,
diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css
index f70dd5d3f..4f9931057 100644
--- a/view/theme/redbasic/css/style.css
+++ b/view/theme/redbasic/css/style.css
@@ -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);
diff --git a/view/tpl/head.tpl b/view/tpl/head.tpl
index 9c0e6b09a..632ab21ca 100644
--- a/view/tpl/head.tpl
+++ b/view/tpl/head.tpl
@@ -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"
diff --git a/view/tpl/settings_display.tpl b/view/tpl/settings_display.tpl
index 24fc11027..2aac64515 100644
--- a/view/tpl/settings_display.tpl
+++ b/view/tpl/settings_display.tpl
@@ -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}}