diff options
author | friendica <info@friendica.com> | 2012-08-11 18:54:23 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2012-08-11 18:54:23 -0700 |
commit | e80d69d25b816cda36e2c772db2805f2dc744bbe (patch) | |
tree | 1b5f9f40061639d41b22591ae29491964934dc05 | |
parent | cac2d408329c8ad0f2f7faed07c4615be12acdf5 (diff) | |
download | volse-hubzilla-e80d69d25b816cda36e2c772db2805f2dc744bbe.tar.gz volse-hubzilla-e80d69d25b816cda36e2c772db2805f2dc744bbe.tar.bz2 volse-hubzilla-e80d69d25b816cda36e2c772db2805f2dc744bbe.zip |
merge upstream
31 files changed, 252 insertions, 129 deletions
@@ -399,6 +399,8 @@ if(! class_exists('App')) { public $sourcename = ''; public $videowidth = 425; public $videoheight = 350; + public $force_max_items = 0; + public $theme_thread_allow = true; private $scheme; private $hostname; diff --git a/include/bb2diaspora.php b/include/bb2diaspora.php index 9ede42f6c..b0e12027a 100644 --- a/include/bb2diaspora.php +++ b/include/bb2diaspora.php @@ -196,6 +196,14 @@ function bb2diaspora($Text,$preserve_nl = false, $fordiaspora = true) { // The bbcode parser now handles youtube-links (and the other stuff) correctly. // Additionally the html code is now fixed so that lists are now working. + /** + * Transform #tags, strip off the [url] and replace spaces with underscore + */ + $Text = preg_replace_callback('/#\[url\=(\w+.*?)\](\w+.*?)\[\/url\]/i', create_function('$match', + 'return \'#\'. str_replace(\' \', \'_\', $match[2]);' + ), $Text); + + // Converting images with size parameters to simple images. Markdown doesn't know it. $Text = preg_replace("/\[img\=([0-9]*)x([0-9]*)\](.*?)\[\/img\]/ism", '[img]$3[/img]', $Text); diff --git a/include/conversation.php b/include/conversation.php index f1f6c83fe..c41d00def 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -303,6 +303,9 @@ function localize_item(&$item){ function count_descendants($item) { $total = count($item['children']); + if($item['verb'] === ACTIVITY_LIKE || $item['verb'] === ACTIVITY_DISLIKE) + return 0; + if($total > 0) { foreach($item['children'] as $child) { $total += count_descendants($child); @@ -316,7 +319,7 @@ function count_descendants($item) { * Recursively prepare a thread for HTML */ -function prepare_threads_body($a, $items, $cmnt_tpl, $page_writeable, $mode, $profile_owner, $thread_level=1) { +function prepare_threads_body($a, $items, $cmnt_tpl, $page_writeable, $mode, $profile_owner, $alike, $dlike, $thread_level=1) { $result = array(); $wall_template = 'wall_thread.tpl'; @@ -333,11 +336,14 @@ function prepare_threads_body($a, $items, $cmnt_tpl, $page_writeable, $mode, $pr $nb_items--; continue; } + + if($item['verb'] === ACTIVITY_LIKE || $item['verb'] === ACTIVITY_DISLIKE) { + $nb_items --; + continue; + } $items_seen++; - $alike = array(); - $dlike = array(); $comment = ''; $template = $wall_template; $commentww = ''; @@ -408,9 +414,6 @@ function prepare_threads_body($a, $items, $cmnt_tpl, $page_writeable, $mode, $pr $tag = trim($tag); if ($tag!="") $tags[] = bbcode($tag); } - - like_puller($a,$item,$alike,'like'); - like_puller($a,$item,$dlike,'dislike'); $like = ((x($alike,$item['uri'])) ? format_like($alike[$item['uri']],$alike[$item['uri'] . '-l'],'like',$item['uri']) : ''); $dislike = ((x($dlike,$item['uri'])) ? format_like($dlike[$item['uri']],$dlike[$item['uri'] . '-l'],'dislike',$item['uri']) : ''); @@ -530,6 +533,7 @@ function prepare_threads_body($a, $items, $cmnt_tpl, $page_writeable, $mode, $pr '$edurl' => t('Link'), '$edvideo' => t('Video'), '$preview' => t('Preview'), + '$indent' => $indent, '$sourceapp' => t($a->sourcename), '$ww' => (($mode === 'network') ? $commentww : '') )); @@ -586,6 +590,7 @@ function prepare_threads_body($a, $items, $cmnt_tpl, $page_writeable, $mode, $pr 'comment' => $comment, 'previewing' => $previewing, 'wait' => t('Please wait'), + 'thread_level' => $thread_level, ); $arr = array('item' => $item, 'output' => $tmp_item); @@ -599,7 +604,7 @@ function prepare_threads_body($a, $items, $cmnt_tpl, $page_writeable, $mode, $pr $item_result['children'] = array(); if(count($item['children'])) { - $item_result['children'] = prepare_threads_body($a, $item['children'], $cmnt_tpl, $page_writeable, $mode, $profile_owner, ($thread_level + 1)); + $item_result['children'] = prepare_threads_body($a, $item['children'], $cmnt_tpl, $page_writeable, $mode, $profile_owner, $alike, $dlike, ($thread_level + 1)); } $item_result['private'] = $item['private']; $item_result['toplevel'] = ($toplevelpost ? 'toplevel_item' : ''); @@ -607,7 +612,7 @@ function prepare_threads_body($a, $items, $cmnt_tpl, $page_writeable, $mode, $pr /* * I don't like this very much... */ - if(get_config('system','thread_allow')) { + if(get_config('system','thread_allow') && $a->theme_thread_allow) { $item_result['flatten'] = false; $item_result['threaded'] = true; } @@ -831,6 +836,7 @@ function conversation(&$a, $items, $mode, $update, $page_mode = 'traditional') { 'conv' => (($preview) ? '' : array('href'=> $a->get_baseurl($ssl_state) . '/display/' . $nickname . '/' . $item['id'], 'title'=> t('View in context'))), 'previewing' => $previewing, 'wait' => t('Please wait'), + 'thread_level' => 1, ); $arr = array('item' => $item, 'output' => $tmp_item); @@ -870,6 +876,11 @@ function conversation(&$a, $items, $mode, $update, $page_mode = 'traditional') { foreach($items as $item) { like_puller($a,$item,$alike,'like'); like_puller($a,$item,$dlike,'dislike'); + + if($item['id'] == $item['parent']) { + $threads[] = $item; + } + } $comments_collapsed = false; diff --git a/include/items.php b/include/items.php index 7b454a542..4c84b32f8 100755 --- a/include/items.php +++ b/include/items.php @@ -2430,7 +2430,7 @@ function local_delivery($importer,$data) { intval($importer['importer_uid']) ); if($r && count($r)) - $is_a_remote_delete = true; + $is_a_remote_delete = true; // Does this have the characteristics of a community or private group comment? // If it's a reply to a wall post on a community/prvgroup page it's a @@ -2739,7 +2739,7 @@ function local_delivery($importer,$data) { } if($posted_id && $parent) { - + proc_run('php',"include/notifier.php","comment-import","$posted_id"); if((! $is_like) && (! $importer['self'])) { diff --git a/include/notifier.php b/include/notifier.php index d67f2dd3a..e6523f147 100644 --- a/include/notifier.php +++ b/include/notifier.php @@ -18,6 +18,31 @@ require_once('include/html2plain.php'); * us by hosting providers. */ +/* + * The notifier is typically called with: + * + * proc_run('php', "include/notifier.php", COMMAND, ITEM_ID); + * + * where COMMAND is one of the following: + * + * activity (in diaspora.php, dfrn_confirm.php, profiles.php) + * comment-import (in diaspora.php, items.php) + * comment-new (in item.php) + * drop (in diaspora.php, items.php, photos.php) + * edit_post (in item.php) + * event (in events.php) + * expire (in items.php) + * like (in like.php, poke.php) + * mail (in message.php) + * suggest (in fsuggest.php) + * tag (in photos.php, poke.php, tagger.php) + * tgroup (in items.php) + * wall-new (in photos.php, item.php) + * + * and ITEM_ID is the id of the item in the database that needs to be sent to others. + */ + + function notifier_run($argv, $argc){ global $a, $db; diff --git a/include/template_processor.php b/include/template_processor.php index 9c6e27916..0f52d12a4 100644 --- a/include/template_processor.php +++ b/include/template_processor.php @@ -63,7 +63,7 @@ if ($b[0]=="$") $b = $this->_get_var($b); $val = ($a == $b); } else if (strpos($args[2],"!=")>0){ - list($a,$b) = explode("!=",$args[2]); + list($a,$b) = array_map("trim", explode("!=",$args[2])); $a = $this->_get_var($a); if ($b[0]=="$") $b = $this->_get_var($b); $val = ($a != $b); @@ -133,6 +133,26 @@ return $ret; } + + /** + * DEBUG node + * + * {{ debug $var [$var [$var [...]]] }}{{ enddebug }} + * + * replace node with <pre>var_dump($var, $var, ...);</pre> + */ + private function _replcb_debug($args){ + $vars = array_map('trim', explode(" ",$args[2])); + $vars[] = $args[1]; + + $ret = "<pre>"; + foreach ($vars as $var){ + $ret .= htmlspecialchars(var_export( $this->_get_var($var), true )); + $ret .= "\n"; + } + $ret .= "</pre>"; + return $ret; + } private function _replcb_node($m) { $node = $this->nodes[$m[1]]; diff --git a/version.inc b/version.inc index e30502b2a..09e05beee 100644 --- a/version.inc +++ b/version.inc @@ -1 +1 @@ -2012-08-09.41 +2012-08-11.43 diff --git a/view/theme/comix-plain/search_item.tpl b/view/theme/comix-plain/search_item.tpl index dba289031..828e1065b 100644 --- a/view/theme/comix-plain/search_item.tpl +++ b/view/theme/comix-plain/search_item.tpl @@ -1,5 +1,5 @@ -<div class="wall-item-outside-wrapper$item.indent$item.previewing" id="wall-item-outside-wrapper-$item.id" > - <div class="wall-item-content-wrapper$item.indent" id="wall-item-content-wrapper-$item.id" > +<div class="wall-item-outside-wrapper $item.indent$item.previewing" id="wall-item-outside-wrapper-$item.id" > + <div class="wall-item-content-wrapper $item.indent" id="wall-item-content-wrapper-$item.id" > <div class="wall-item-info" id="wall-item-info-$item.id"> <div class="wall-item-photo-wrapper" id="wall-item-photo-wrapper-$item.id" onmouseover="if (typeof t$item.id != 'undefined') clearTimeout(t$item.id); openMenu('wall-item-photo-menu-button-$item.id')" @@ -47,7 +47,7 @@ {{ endif }} </div> -<div class="wall-item-outside-wrapper-end$item.indent" ></div> +<div class="wall-item-outside-wrapper-end $item.indent" ></div> </div> diff --git a/view/theme/comix-plain/wall_item.tpl b/view/theme/comix-plain/wall_item.tpl index dfcd8ca96..0ef70cf8b 100644 --- a/view/theme/comix-plain/wall_item.tpl +++ b/view/theme/comix-plain/wall_item.tpl @@ -1,11 +1,11 @@ -<div class="wall-item-outside-wrapper$item.indent$item.previewing" id="wall-item-outside-wrapper-$item.id" > - <div class="wall-item-content-wrapper$item.indent" id="wall-item-content-wrapper-$item.id" > +<div class="wall-item-outside-wrapper $item.indent$item.previewing" id="wall-item-outside-wrapper-$item.id" > + <div class="wall-item-content-wrapper $item.indent" id="wall-item-content-wrapper-$item.id" > <div class="wall-item-info" id="wall-item-info-$item.id"> <div class="wall-item-photo-wrapper" id="wall-item-photo-wrapper-$item.id" onmouseover="if (typeof t$item.id != 'undefined') clearTimeout(t$item.id); openMenu('wall-item-photo-menu-button-$item.id')" onmouseout="t$item.id=setTimeout('closeMenu(\'wall-item-photo-menu-button-$item.id\'); closeMenu(\'wall-item-photo-menu-$item.id\');',200)"> <a href="$item.profile_url" target="redir" title="$item.linktitle" class="wall-item-photo-link" id="wall-item-photo-link-$item.id"> - <img src="$item.thumb" class="wall-item-photo$item.sparkle$item.indent" id="wall-item-photo-$item.id" style="height: 80px; width: 80px;" alt="$item.name" /> + <img src="$item.thumb" class="wall-item-photo$item.sparkle $item.indent" id="wall-item-photo-$item.id" style="height: 80px; width: 80px;" alt="$item.name" /> </a> <span onclick="openClose('wall-item-photo-menu-$item.id');" class="fakelink wall-item-photo-menu-button" id="wall-item-photo-menu-button-$item.id">menu</span> <div class="wall-item-photo-menu" id="wall-item-photo-menu-$item.id"> @@ -74,5 +74,5 @@ $item.comment </div> -<div class="wall-item-outside-wrapper-end$item.indent" ></div> +<div class="wall-item-outside-wrapper-end $item.indent" ></div> </div> diff --git a/view/theme/comix-plain/wallwall_item.tpl b/view/theme/comix-plain/wallwall_item.tpl index abd5967b2..4c5b12087 100644 --- a/view/theme/comix-plain/wallwall_item.tpl +++ b/view/theme/comix-plain/wallwall_item.tpl @@ -1,5 +1,5 @@ -<div class="wall-item-outside-wrapper$item.indent$item.previewing wallwall" id="wall-item-outside-wrapper-$item.id" > - <div class="wall-item-content-wrapper$item.indent" id="wall-item-content-wrapper-$item.id" > +<div class="wall-item-outside-wrapper $item.indent$item.previewing wallwall" id="wall-item-outside-wrapper-$item.id" > + <div class="wall-item-content-wrapper $item.indent" id="wall-item-content-wrapper-$item.id" > <div class="wall-item-info wallwall" id="wall-item-info-$item.id"> <div class="wall-item-photo-wrapper wwto" id="wall-item-ownerphoto-wrapper-$item.id" > <a href="$item.owner_url" target="redir" title="$item.olinktitle" class="wall-item-photo-link" id="wall-item-ownerphoto-link-$item.id"> @@ -10,7 +10,7 @@ onmouseover="if (typeof t$item.id != 'undefined') clearTimeout(t$item.id); openMenu('wall-item-photo-menu-button-$item.id')" onmouseout="t$item.id=setTimeout('closeMenu(\'wall-item-photo-menu-button-$item.id\'); closeMenu(\'wall-item-photo-menu-$item.id\');',200)"> <a href="$item.profile_url" target="redir" title="$item.linktitle" class="wall-item-photo-link" id="wall-item-photo-link-$item.id"> - <img src="$item.thumb" class="wall-item-photo$item.sparkle$item.indent" id="wall-item-photo-$item.id" style="height: 80px; width: 80px;" alt="$item.name" /></a> + <img src="$item.thumb" class="wall-item-photo$item.sparkle $item.indent" id="wall-item-photo-$item.id" style="height: 80px; width: 80px;" alt="$item.name" /></a> <span onclick="openClose('wall-item-photo-menu-$item.id');" class="fakelink wall-item-photo-menu-button" id="wall-item-photo-menu-button-$item.id">menu</span> <div class="wall-item-photo-menu" id="wall-item-photo-menu-$item.id"> <ul> @@ -80,6 +80,6 @@ $item.comment </div> -<div class="wall-item-outside-wrapper-end$item.indent" ></div> +<div class="wall-item-outside-wrapper-end $item.indent" ></div> </div> diff --git a/view/theme/comix/search_item.tpl b/view/theme/comix/search_item.tpl index dba289031..828e1065b 100644 --- a/view/theme/comix/search_item.tpl +++ b/view/theme/comix/search_item.tpl @@ -1,5 +1,5 @@ -<div class="wall-item-outside-wrapper$item.indent$item.previewing" id="wall-item-outside-wrapper-$item.id" > - <div class="wall-item-content-wrapper$item.indent" id="wall-item-content-wrapper-$item.id" > +<div class="wall-item-outside-wrapper $item.indent$item.previewing" id="wall-item-outside-wrapper-$item.id" > + <div class="wall-item-content-wrapper $item.indent" id="wall-item-content-wrapper-$item.id" > <div class="wall-item-info" id="wall-item-info-$item.id"> <div class="wall-item-photo-wrapper" id="wall-item-photo-wrapper-$item.id" onmouseover="if (typeof t$item.id != 'undefined') clearTimeout(t$item.id); openMenu('wall-item-photo-menu-button-$item.id')" @@ -47,7 +47,7 @@ {{ endif }} </div> -<div class="wall-item-outside-wrapper-end$item.indent" ></div> +<div class="wall-item-outside-wrapper-end $item.indent" ></div> </div> diff --git a/view/theme/comix/wall_item.tpl b/view/theme/comix/wall_item.tpl index dfcd8ca96..0ef70cf8b 100644 --- a/view/theme/comix/wall_item.tpl +++ b/view/theme/comix/wall_item.tpl @@ -1,11 +1,11 @@ -<div class="wall-item-outside-wrapper$item.indent$item.previewing" id="wall-item-outside-wrapper-$item.id" > - <div class="wall-item-content-wrapper$item.indent" id="wall-item-content-wrapper-$item.id" > +<div class="wall-item-outside-wrapper $item.indent$item.previewing" id="wall-item-outside-wrapper-$item.id" > + <div class="wall-item-content-wrapper $item.indent" id="wall-item-content-wrapper-$item.id" > <div class="wall-item-info" id="wall-item-info-$item.id"> <div class="wall-item-photo-wrapper" id="wall-item-photo-wrapper-$item.id" onmouseover="if (typeof t$item.id != 'undefined') clearTimeout(t$item.id); openMenu('wall-item-photo-menu-button-$item.id')" onmouseout="t$item.id=setTimeout('closeMenu(\'wall-item-photo-menu-button-$item.id\'); closeMenu(\'wall-item-photo-menu-$item.id\');',200)"> <a href="$item.profile_url" target="redir" title="$item.linktitle" class="wall-item-photo-link" id="wall-item-photo-link-$item.id"> - <img src="$item.thumb" class="wall-item-photo$item.sparkle$item.indent" id="wall-item-photo-$item.id" style="height: 80px; width: 80px;" alt="$item.name" /> + <img src="$item.thumb" class="wall-item-photo$item.sparkle $item.indent" id="wall-item-photo-$item.id" style="height: 80px; width: 80px;" alt="$item.name" /> </a> <span onclick="openClose('wall-item-photo-menu-$item.id');" class="fakelink wall-item-photo-menu-button" id="wall-item-photo-menu-button-$item.id">menu</span> <div class="wall-item-photo-menu" id="wall-item-photo-menu-$item.id"> @@ -74,5 +74,5 @@ $item.comment </div> -<div class="wall-item-outside-wrapper-end$item.indent" ></div> +<div class="wall-item-outside-wrapper-end $item.indent" ></div> </div> diff --git a/view/theme/comix/wallwall_item.tpl b/view/theme/comix/wallwall_item.tpl index abd5967b2..4c5b12087 100644 --- a/view/theme/comix/wallwall_item.tpl +++ b/view/theme/comix/wallwall_item.tpl @@ -1,5 +1,5 @@ -<div class="wall-item-outside-wrapper$item.indent$item.previewing wallwall" id="wall-item-outside-wrapper-$item.id" > - <div class="wall-item-content-wrapper$item.indent" id="wall-item-content-wrapper-$item.id" > +<div class="wall-item-outside-wrapper $item.indent$item.previewing wallwall" id="wall-item-outside-wrapper-$item.id" > + <div class="wall-item-content-wrapper $item.indent" id="wall-item-content-wrapper-$item.id" > <div class="wall-item-info wallwall" id="wall-item-info-$item.id"> <div class="wall-item-photo-wrapper wwto" id="wall-item-ownerphoto-wrapper-$item.id" > <a href="$item.owner_url" target="redir" title="$item.olinktitle" class="wall-item-photo-link" id="wall-item-ownerphoto-link-$item.id"> @@ -10,7 +10,7 @@ onmouseover="if (typeof t$item.id != 'undefined') clearTimeout(t$item.id); openMenu('wall-item-photo-menu-button-$item.id')" onmouseout="t$item.id=setTimeout('closeMenu(\'wall-item-photo-menu-button-$item.id\'); closeMenu(\'wall-item-photo-menu-$item.id\');',200)"> <a href="$item.profile_url" target="redir" title="$item.linktitle" class="wall-item-photo-link" id="wall-item-photo-link-$item.id"> - <img src="$item.thumb" class="wall-item-photo$item.sparkle$item.indent" id="wall-item-photo-$item.id" style="height: 80px; width: 80px;" alt="$item.name" /></a> + <img src="$item.thumb" class="wall-item-photo$item.sparkle $item.indent" id="wall-item-photo-$item.id" style="height: 80px; width: 80px;" alt="$item.name" /></a> <span onclick="openClose('wall-item-photo-menu-$item.id');" class="fakelink wall-item-photo-menu-button" id="wall-item-photo-menu-button-$item.id">menu</span> <div class="wall-item-photo-menu" id="wall-item-photo-menu-$item.id"> <ul> @@ -80,6 +80,6 @@ $item.comment </div> -<div class="wall-item-outside-wrapper-end$item.indent" ></div> +<div class="wall-item-outside-wrapper-end $item.indent" ></div> </div> diff --git a/view/theme/dispy/search_item.tpl b/view/theme/dispy/search_item.tpl index bfad1b7b7..35572caa0 100644 --- a/view/theme/dispy/search_item.tpl +++ b/view/theme/dispy/search_item.tpl @@ -1,5 +1,5 @@ -<div class="wall-item-outside-wrapper$item.indent$item.previewing" id="wall-item-outside-wrapper-$item.id" > - <div class="wall-item-content-wrapper$item.indent" id="wall-item-content-wrapper-$item.id" > +<div class="wall-item-outside-wrapper $item.indent$item.previewing" id="wall-item-outside-wrapper-$item.id" > + <div class="wall-item-content-wrapper $item.indent" id="wall-item-content-wrapper-$item.id" > <div class="wall-item-info" id="wall-item-info-$item.id"> <div class="wall-item-photo-wrapper" id="wall-item-photo-wrapper-$item.id" onmouseover="if (typeof t$item.id != 'undefined') clearTimeout(t$item.id); openMenu('wall-item-photo-menu-button-$item.id')" @@ -47,7 +47,7 @@ {{ endif }} </div> -<div class="wall-item-outside-wrapper-end$item.indent" ></div> +<div class="wall-item-outside-wrapper-end $item.indent" ></div> </div> diff --git a/view/theme/dispy/wall_item.tpl b/view/theme/dispy/wall_item.tpl index 8d6f258e6..d5cc7f16c 100644 --- a/view/theme/dispy/wall_item.tpl +++ b/view/theme/dispy/wall_item.tpl @@ -1,6 +1,6 @@ <a name="$item.id" ></a> -<div class="wall-item-outside-wrapper$item.indent$item.previewing" id="wall-item-outside-wrapper-$item.id" > - <div class="wall-item-content-wrapper$item.indent" id="wall-item-content-wrapper-$item.id" > +<div class="wall-item-outside-wrapper $item.indent$item.previewing" id="wall-item-outside-wrapper-$item.id" > + <div class="wall-item-content-wrapper $item.indent" id="wall-item-content-wrapper-$item.id" > <div class="wall-item-info" id="wall-item-info-$item.id"> <div class="wall-item-photo-wrapper" id="wall-item-photo-wrapper-$item.id" onmouseover="if (typeof t$item.id != 'undefined') clearTimeout(t$item.id); openMenu('wall-item-photo-menu-button-$item.id')" @@ -84,5 +84,5 @@ $item.comment </div> -<div class="wall-item-outside-wrapper-end$item.indent" ></div> +<div class="wall-item-outside-wrapper-end $item.indent" ></div> </div> diff --git a/view/theme/dispy/wallwall_item.tpl b/view/theme/dispy/wallwall_item.tpl index f5187b710..63c8a2e96 100644 --- a/view/theme/dispy/wallwall_item.tpl +++ b/view/theme/dispy/wallwall_item.tpl @@ -1,6 +1,6 @@ <a name="$item.id" ></a> -<div class="wall-item-outside-wrapper$item.indent$item.previewing wallwall" id="wall-item-outside-wrapper-$item.id" > - <div class="wall-item-content-wrapper$item.indent" id="wall-item-content-wrapper-$item.id" > +<div class="wall-item-outside-wrapper $item.indent$item.previewing wallwall" id="wall-item-outside-wrapper-$item.id" > + <div class="wall-item-content-wrapper $item.indent" id="wall-item-content-wrapper-$item.id" > <div class="wall-item-info wallwall" id="wall-item-info-$item.id"> <div class="wall-item-photo-wrapper wwto" id="wall-item-ownerphoto-wrapper-$item.id" > <a href="$item.owner_url" target="redir" title="$item.olinktitle" class="wall-item-photo-link" id="wall-item-ownerphoto-link-$item.id"> @@ -93,6 +93,6 @@ class="icon recycle wall-item-share-buttons" title="$item.vote.share.0" onclick $item.comment </div> -<div class="wall-item-outside-wrapper-end$item.indent" ></div> +<div class="wall-item-outside-wrapper-end $item.indent" ></div> </div> diff --git a/view/theme/quattro/dark/style.css b/view/theme/quattro/dark/style.css index d397a9305..17ee6576d 100644 --- a/view/theme/quattro/dark/style.css +++ b/view/theme/quattro/dark/style.css @@ -1072,6 +1072,7 @@ section { width: 710px; border: 1px solid #2d2d2d; margin-top: 10px; + background-color: #fce94f; } .comment-edit-preview .contact-photo { width: 32px; @@ -1965,25 +1966,23 @@ footer { opacity: 0.3; filter: alpha(opacity=30); } -[class^="comment-edit-bb"] { +.comment-edit-bb { list-style: none; display: none; - margin: 0px 0 0px 60px; + margin: 0px; + padding: 0px; width: 75%; } -[class^="comment-edit-bb"] > li { +.comment-edit-bb > li { display: inline-block; margin: 10px 10px 0 0; visibility: none; } -[class^="comment-edit-bb-end"] { - clear: both; -} .editicon { display: inline-block; width: 16px; height: 16px; - background-image: url(bbedit.png); + background-image: url(icons/bbedit.png); text-decoration: none; } .editicon :hover { diff --git a/view/theme/quattro/green/style.css b/view/theme/quattro/green/style.css index fdab77eb7..10cff53fd 100644 --- a/view/theme/quattro/green/style.css +++ b/view/theme/quattro/green/style.css @@ -1072,6 +1072,7 @@ section { width: 710px; border: 1px solid #2d2d2d; margin-top: 10px; + background-color: #ddffdd; } .comment-edit-preview .contact-photo { width: 32px; @@ -1965,25 +1966,23 @@ footer { opacity: 0.3; filter: alpha(opacity=30); } -[class^="comment-edit-bb"] { +.comment-edit-bb { list-style: none; display: none; - margin: 0px 0 0px 60px; + margin: 0px; + padding: 0px; width: 75%; } -[class^="comment-edit-bb"] > li { +.comment-edit-bb > li { display: inline-block; margin: 10px 10px 0 0; visibility: none; } -[class^="comment-edit-bb-end"] { - clear: both; -} .editicon { display: inline-block; width: 16px; height: 16px; - background-image: url(bbedit.png); + background-image: url(icons/bbedit.png); text-decoration: none; } .editicon :hover { diff --git a/view/theme/quattro/quattro.less b/view/theme/quattro/quattro.less index a3ab8107b..ad1262d48 100644 --- a/view/theme/quattro/quattro.less +++ b/view/theme/quattro/quattro.less @@ -532,6 +532,7 @@ section { color: @CommentBoxFullColor; border: 1px solid @CommentBoxFullBorderColor; } + } .threaded .wall-item-comment-wrapper { margin-left: 0px; } @@ -540,6 +541,7 @@ section { width: 710px; border: 1px solid @Grey5; margin-top: 10px; + background-color: @JotPreviewBackgroundColor; .contact-photo { width: 32px; height: 32px; margin-left: 16px; /*background: url(../../../images/icons/22/user.png) no-repeat center center;*/ @@ -1328,25 +1330,24 @@ footer { height: 100px; display: table-row; } /* edit buttons for comments */ .icon.dim { opacity: 0.3;filter:alpha(opacity=30); } -[class^="comment-edit-bb"] { +.comment-edit-bb { list-style: none; display: none; - margin: 0px 0 0px 60px; + margin: 0px; + padding: 0px; width: 75%; } -[class^="comment-edit-bb"] > li { +.comment-edit-bb > li { display: inline-block; margin: 10px 10px 0 0; visibility: none; } -[class^="comment-edit-bb-end"] { - clear: both; -} + .editicon { display: inline-block; width: 16px; height: 16px; - background-image: url(bbedit.png); + background-image: url(icons/bbedit.png); text-decoration: none; :hover {background-color: #ccc;} } diff --git a/view/theme/quattro/theme.php b/view/theme/quattro/theme.php index 5cb373eef..1c986e4c8 100644 --- a/view/theme/quattro/theme.php +++ b/view/theme/quattro/theme.php @@ -42,11 +42,21 @@ function insertFormatting(comment,BBcode,id) { return true; } +function showThread(id) { + $("#collapsed-comments-" + id).show() + $("#collapsed-comments-" + id + " .collapsed-comments").show() +} +function hideThread(id) { + $("#collapsed-comments-" + id).hide() + $("#collapsed-comments-" + id + " .collapsed-comments").hide() +} + + function cmtBbOpen(id) { - $(".comment-edit-bb-" + id).show(); + $("#comment-edit-bb-" + id).show(); } -function cmtBbClose(comment, id) { - $(".comment-edit-bb-" + id).hide(); +function cmtBbClose(id) { + $("#comment-edit-bb-" + id).hide(); } $(document).ready(function() { diff --git a/view/theme/quattro/tpl/comment_item.tpl b/view/theme/quattro/tpl/comment_item.tpl index ea24d95cc..7d1d7550b 100644 --- a/view/theme/quattro/tpl/comment_item.tpl +++ b/view/theme/quattro/tpl/comment_item.tpl @@ -10,8 +10,8 @@ <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> - <ul class="comment-edit-bb-$id"> + <ul id="comment-edit-bb-$id" + class="comment-edit-bb"> <li><a class="editicon boldbb shadow" style="cursor: pointer;" title="$edbold" onclick="insertFormatting('$comment','b', $id);"></a></li> @@ -37,8 +37,11 @@ style="cursor: pointer;" title="$edvideo" onclick="insertFormatting('$comment','video', $id);"></a></li> </ul> - <div class="comment-edit-bb-end"></div> - <textarea id="comment-edit-text-$id" class="comment-edit-text-empty" name="body" onFocus="commentOpen(this,$id);cmtBbOpen($id);" onBlur="commentClose(this,$id);" >$comment</textarea> + <textarea id="comment-edit-text-$id" + class="comment-edit-text-empty" + name="body" + onFocus="commentOpen(this,$id) && cmtBbOpen($id);" + onBlur="commentClose(this,$id) && cmtBbClose($id);" >$comment</textarea> {{ if $qcomment }} <select id="qcomment-select-$id" name="qcomment-$id" class="qcomment" onchange="qCommentInsert(this,$id);" > <option value=""></option> @@ -48,14 +51,12 @@ </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> diff --git a/view/theme/quattro/tpl/threaded_conversation.tpl b/view/theme/quattro/tpl/threaded_conversation.tpl index 491c47302..13c38acb2 100644 --- a/view/theme/quattro/tpl/threaded_conversation.tpl +++ b/view/theme/quattro/tpl/threaded_conversation.tpl @@ -1,6 +1,8 @@ {{ for $threads as $item }} + <div id="tread-wrapper-$item.id" class="tread-wrapper {{ if $item.threaded }}threaded{{ endif }}"> + {{ if $item.type == tag }} {{ inc wall_item_tag.tpl }}{{ endinc }} {{ else }} diff --git a/view/theme/quattro/tpl/wall_item_tag.tpl b/view/theme/quattro/tpl/wall_item_tag.tpl index 205fcfebc..e1ef93213 100644 --- a/view/theme/quattro/tpl/wall_item_tag.tpl +++ b/view/theme/quattro/tpl/wall_item_tag.tpl @@ -1,3 +1,5 @@ +{{ if $item.thread_level!=1 }}<div class="children">{{ endif }} + <div class="wall-item-container item-tag $item.indent"> <div class="wall-item-item"> <div class="wall-item-info"> @@ -18,8 +20,8 @@ </div> </div> +{{ if $item.thread_level!=1 }}</div>{{ endif }} + {{ if $item.flatten }} -<div class="wall-item-comment-wrapper" > - $item.comment -</div> +<div class="wall-item-comment-wrapper" >$item.comment</div> {{ endif }} diff --git a/view/theme/quattro/tpl/wall_thread.tpl b/view/theme/quattro/tpl/wall_thread.tpl index 4d454f00d..01738b666 100644 --- a/view/theme/quattro/tpl/wall_thread.tpl +++ b/view/theme/quattro/tpl/wall_thread.tpl @@ -2,12 +2,24 @@ {{ else }} {{if $item.comment_firstcollapsed}} <div class="hide-comments-outer"> - <span id="hide-comments-total-$item.id" class="hide-comments-total">$item.num_comments</span> <span id="hide-comments-$item.id" class="hide-comments fakelink" onclick="showHideComments($item.id);">$item.hide_text</span> + <span id="hide-comments-total-$item.id" + class="hide-comments-total">$item.num_comments</span> + <span id="hide-comments-$item.id" + class="hide-comments fakelink" + onclick="showHideComments($item.id);">$item.hide_text</span> + {{ if $item.thread_level==3 }} - + <span id="hide-thread-$item-id" + class="fakelink" + onclick="showThread($item.id);">expand</span> / + <span id="hide-thread-$item-id" + class="fakelink" + onclick="hideThread($item.id);">collapse</span> thread{{ endif }} </div> <div id="collapsed-comments-$item.id" class="collapsed-comments" style="display: none;"> {{endif}} {{ endif }} +{{ if $item.thread_level!=1 }}<div class="children">{{ endif }} <div class="wall-item-decor"> <span class="icon s22 star $item.isstarred" id="starred-$item.id" title="$item.star.starred">$item.star.starred</span> @@ -93,35 +105,40 @@ <div class="wall-item-like" id="wall-item-like-$item.id">$item.like</div> <div class="wall-item-dislike" id="wall-item-dislike-$item.id">$item.dislike</div> </div> - {{ if $item.threaded }}{{ if $item.comment }} + {{ if $item.threaded }}{{ if $item.comment }}{{ if $item.thread_level!=1 }} <div class="wall-item-bottom"> <div class="wall-item-links"></div> <div class="wall-item-comment-wrapper"> - $item.comment + $item.comment </div> </div> - {{ endif }}{{ endif }} + {{ endif }}{{ endif }}{{ endif }} </div> -{{ for $item.children as $item }} - <div class="children"> - {{ if $item.type == tag }} - {{ inc wall_item_tag.tpl }}{{ endinc }} - {{ else }} - {{ inc $item.template }}{{ endinc }} - {{ endif }} - </div> + +{{ for $item.children as $child }} + {{ if $item.type == tag }} + {{ inc wall_item_tag.tpl with $item=$child }}{{ endinc }} + {{ else }} + {{ inc $item.template with $item=$child }}{{ endinc }} + {{ endif }} {{ endfor }} +{{ if $item.thread_level!=1 }}</div>{{ endif }} + + {{if $mode == display}} {{ else }} {{if $item.comment_lastcollapsed}}</div>{{endif}} {{ endif }} +{{if $item.threaded}}{{if $item.comment}}{{if $item.thread_level==1}} +<div class="wall-item-comment-wrapper" >$item.comment</div> +{{ endif }}{{ endif }}{{ endif }} + + {{ if $item.flatten }} -<div class="wall-item-comment-wrapper" > - $item.comment -</div> +<div class="wall-item-comment-wrapper" >$item.comment</div> {{ endif }} diff --git a/view/theme/quattro/tpl/wallwall_thread.tpl b/view/theme/quattro/tpl/wallwall_thread.tpl index cc2f8e362..93a8838eb 100644 --- a/view/theme/quattro/tpl/wallwall_thread.tpl +++ b/view/theme/quattro/tpl/wallwall_thread.tpl @@ -2,12 +2,25 @@ {{ else }} {{if $item.comment_firstcollapsed}} <div class="hide-comments-outer"> - <span id="hide-comments-total-$item.id" class="hide-comments-total">$item.num_comments</span> <span id="hide-comments-$item.id" class="hide-comments fakelink" onclick="showHideComments($item.id);">$item.hide_text</span> + <span id="hide-comments-total-$item.id" + class="hide-comments-total">$item.num_comments</span> + <span id="hide-comments-$item.id" + class="hide-comments fakelink" + onclick="showHideComments($item.id);">$item.hide_text</span> + {{ if $item.thread_level==3 }} - + <span id="hide-thread-$item-id" + class="fakelink" + onclick="showThread($item.id);">expand</span> / + <span id="hide-thread-$item-id" + class="fakelink" + onclick="hideThread($item.id);">collapse</span> thread{{ endif }} </div> <div id="collapsed-comments-$item.id" class="collapsed-comments" style="display: none;"> {{endif}} {{ endif }} +{{ if $item.thread_level!=1 }}<div class="children">{{ endif }} + <div class="wall-item-decor"> <span class="icon s22 star $item.isstarred" id="starred-$item.id" title="$item.star.starred">$item.star.starred</span> {{ if $item.lock }}<span class="icon s22 lock fakelink" onclick="lockview(event,$item.id);" title="$item.lock">$item.lock</span>{{ endif }} @@ -101,34 +114,38 @@ <div class="wall-item-dislike" id="wall-item-dislike-$item.id">$item.dislike</div> </div> - {{ if $item.threaded }}{{ if $item.comment }} + {{ if $item.threaded }}{{ if $item.comment }}{{ if $item.indent==comment }} <div class="wall-item-bottom"> <div class="wall-item-links"></div> <div class="wall-item-comment-wrapper"> $item.comment </div> </div> - {{ endif }}{{ endif }} + {{ endif }}{{ endif }}{{ endif }} </div> -{{ for $item.children as $item }} - <div class="children"> - {{ if $item.type == tag }} - {{ inc wall_item_tag.tpl }}{{ endinc }} - {{ else }} - {{ inc $item.template }}{{ endinc }} - {{ endif }} - </div> +{{ for $item.children as $child }} + {{ if $item.type == tag }} + {{ inc wall_item_tag.tpl with $item=$child }}{{ endinc }} + {{ else }} + {{ inc $item.template with $item=$child }}{{ endinc }} + {{ endif }} {{ endfor }} +{{ if $item.thread_level!=1 }}</div>{{ endif }} + + {{if $mode == display}} {{ else }} {{if $item.comment_lastcollapsed}}</div>{{endif}} {{ endif }} +{{if $item.threaded}}{{if $item.comment}}{{if $item.thread_level==1}} +<div class="wall-item-comment-wrapper" >$item.comment</div> +{{ endif }}{{ endif }}{{ endif }} + + {{ if $item.flatten }} -<div class="wall-item-comment-wrapper" > - $item.comment -</div> +<div class="wall-item-comment-wrapper" >$item.comment</div> {{ endif }} diff --git a/view/tpl/head.tpl b/view/tpl/head.tpl index 08fe8303a..ba2850c0e 100644 --- a/view/tpl/head.tpl +++ b/view/tpl/head.tpl @@ -29,7 +29,9 @@ $head_js $("#comment-edit-text-" + id).removeClass("comment-edit-text-empty"); $("#mod-cmnt-wrap-" + id).show(); openMenu("comment-edit-submit-wrapper-" + id); + return true; } + return false; } function commentClose(obj,id) { if(obj.value == '') { @@ -38,7 +40,9 @@ $head_js $("#comment-edit-text-" + id).addClass("comment-edit-text-empty"); $("#mod-cmnt-wrap-" + id).hide(); closeMenu("comment-edit-submit-wrapper-" + id); + return true; } + return false; } function showHideCommentBox(id) { diff --git a/view/tpl/search_item.tpl b/view/tpl/search_item.tpl index dc4a43c6a..b0c7f3c28 100644 --- a/view/tpl/search_item.tpl +++ b/view/tpl/search_item.tpl @@ -1,6 +1,6 @@ <a name="$item.id" ></a> -<div class="wall-item-outside-wrapper$item.indent$item.previewing" id="wall-item-outside-wrapper-$item.id" > - <div class="wall-item-content-wrapper$item.indent" id="wall-item-content-wrapper-$item.id" > +<div class="wall-item-outside-wrapper $item.indent$item.previewing" id="wall-item-outside-wrapper-$item.id" > + <div class="wall-item-content-wrapper $item.indent" id="wall-item-content-wrapper-$item.id" > <div class="wall-item-info" id="wall-item-info-$item.id"> <div class="wall-item-photo-wrapper" id="wall-item-photo-wrapper-$item.id" onmouseover="if (typeof t$item.id != 'undefined') clearTimeout(t$item.id); openMenu('wall-item-photo-menu-button-$item.id')" @@ -55,7 +55,7 @@ {{ endif }} </div> -<div class="wall-item-outside-wrapper-end$item.indent" ></div> +<div class="wall-item-outside-wrapper-end $item.indent" ></div> </div> diff --git a/view/tpl/wall_item.tpl b/view/tpl/wall_item.tpl index 458677433..9b4d584c0 100644 --- a/view/tpl/wall_item.tpl +++ b/view/tpl/wall_item.tpl @@ -1,6 +1,6 @@ <a name="$item.id" ></a> -<div class="wall-item-outside-wrapper$item.indent$item.previewing" id="wall-item-outside-wrapper-$item.id" > - <div class="wall-item-content-wrapper$item.indent" id="wall-item-content-wrapper-$item.id" > +<div class="wall-item-outside-wrapper $item.indent$item.previewing" id="wall-item-outside-wrapper-$item.id" > + <div class="wall-item-content-wrapper $item.indent" id="wall-item-content-wrapper-$item.id" > <div class="wall-item-info" id="wall-item-info-$item.id"> <div class="wall-item-photo-wrapper" id="wall-item-photo-wrapper-$item.id" onmouseover="if (typeof t$item.id != 'undefined') clearTimeout(t$item.id); openMenu('wall-item-photo-menu-button-$item.id')" @@ -75,5 +75,5 @@ $item.comment </div> -<div class="wall-item-outside-wrapper-end$item.indent" ></div> +<div class="wall-item-outside-wrapper-end $item.indent" ></div> </div> diff --git a/view/tpl/wall_thread.tpl b/view/tpl/wall_thread.tpl index 600f755b1..6f7ced7fe 100644 --- a/view/tpl/wall_thread.tpl +++ b/view/tpl/wall_thread.tpl @@ -73,18 +73,20 @@ </div> {{ if $item.drop.dropping }}<input type="checkbox" onclick="checkboxhighlight(this);" title="$item.drop.select" class="item-select" name="itemselected[]" value="$item.id" />{{ endif }} <div class="wall-item-delete-end"></div> + </div> + </div> + <div class="wall-item-wrapper-end"></div> + <div class="wall-item-like $item.indent" id="wall-item-like-$item.id">$item.like</div> + <div class="wall-item-dislike $item.indent" id="wall-item-dislike-$item.id">$item.dislike</div> + {{ if $item.threaded }} {{ if $item.comment }} - <div class="wall-item-comment-wrapper" > + <div class="wall-item-comment-wrapper$item.indent" > $item.comment </div> {{ endif }} {{ endif }} - </div> - </div> - <div class="wall-item-wrapper-end"></div> - <div class="wall-item-like $item.indent" id="wall-item-like-$item.id">$item.like</div> - <div class="wall-item-dislike $item.indent" id="wall-item-dislike-$item.id">$item.dislike</div> + <div class="wall-item-outside-wrapper-end$item.indent" ></div> </div> {{ for $item.children as $item }} @@ -98,3 +100,4 @@ {{ endif }} </div> {{if $item.comment_lastcollapsed}}</div>{{endif}} + diff --git a/view/tpl/wallwall_item.tpl b/view/tpl/wallwall_item.tpl index 983c03287..e614d936e 100644 --- a/view/tpl/wallwall_item.tpl +++ b/view/tpl/wallwall_item.tpl @@ -1,6 +1,6 @@ <a name="$item.id" ></a> -<div class="wall-item-outside-wrapper$item.indent$item.previewing wallwall" id="wall-item-outside-wrapper-$item.id" > - <div class="wall-item-content-wrapper$item.indent" id="wall-item-content-wrapper-$item.id" > +<div class="wall-item-outside-wrapper $item.indent$item.previewing wallwall" id="wall-item-outside-wrapper-$item.id" > + <div class="wall-item-content-wrapper $item.indent" id="wall-item-content-wrapper-$item.id" > <div class="wall-item-info wallwall" id="wall-item-info-$item.id"> <div class="wall-item-photo-wrapper wwto" id="wall-item-ownerphoto-wrapper-$item.id" > <a href="$item.owner_url" target="redir" title="$item.olinktitle" class="wall-item-photo-link" id="wall-item-ownerphoto-link-$item.id"> @@ -81,6 +81,6 @@ $item.comment </div> -<div class="wall-item-outside-wrapper-end$item.indent" ></div> +<div class="wall-item-outside-wrapper-end $item.indent" ></div> </div> diff --git a/view/tpl/wallwall_thread.tpl b/view/tpl/wallwall_thread.tpl index 89f121f21..15c016c16 100644 --- a/view/tpl/wallwall_thread.tpl +++ b/view/tpl/wallwall_thread.tpl @@ -6,8 +6,8 @@ {{endif}} <div id="tread-wrapper-$item.id" class="tread-wrapper $item.toplevel"> <a name="$item.id" ></a> -<div class="wall-item-outside-wrapper$item.indent$item.previewing wallwall" id="wall-item-outside-wrapper-$item.id" > - <div class="wall-item-content-wrapper$item.indent" id="wall-item-content-wrapper-$item.id" > +<div class="wall-item-outside-wrapper $item.indent$item.previewing wallwall" id="wall-item-outside-wrapper-$item.id" > + <div class="wall-item-content-wrapper $item.indent" id="wall-item-content-wrapper-$item.id" > <div class="wall-item-info wallwall" id="wall-item-info-$item.id"> <div class="wall-item-photo-wrapper wwto" id="wall-item-ownerphoto-wrapper-$item.id" > <a href="$item.owner_url" target="redir" title="$item.olinktitle" class="wall-item-photo-link" id="wall-item-ownerphoto-link-$item.id"> @@ -78,19 +78,21 @@ </div> {{ if $item.drop.dropping }}<input type="checkbox" onclick="checkboxhighlight(this);" title="$item.drop.select" class="item-select" name="itemselected[]" value="$item.id" />{{ endif }} <div class="wall-item-delete-end"></div> + </div> + </div> + <div class="wall-item-wrapper-end"></div> + <div class="wall-item-like $item.indent" id="wall-item-like-$item.id">$item.like</div> + <div class="wall-item-dislike $item.indent" id="wall-item-dislike-$item.id">$item.dislike</div> + {{ if $item.threaded }} {{ if $item.comment }} - <div class="wall-item-comment-wrapper" > + <div class="wall-item-comment-wrapper $item.indent" > $item.comment </div> {{ endif }} {{ endif }} - </div> - </div> - <div class="wall-item-wrapper-end"></div> - <div class="wall-item-like $item.indent" id="wall-item-like-$item.id">$item.like</div> - <div class="wall-item-dislike $item.indent" id="wall-item-dislike-$item.id">$item.dislike</div> -<div class="wall-item-outside-wrapper-end$item.indent" ></div> + +<div class="wall-item-outside-wrapper-end $item.indent" ></div> </div> {{ for $item.children as $item }} {{ inc $item.template }}{{ endinc }} |