diff options
author | Friendika <info@friendika.com> | 2011-04-18 15:51:03 -0700 |
---|---|---|
committer | Friendika <info@friendika.com> | 2011-04-18 15:51:03 -0700 |
commit | b84f49df10ec83f0c078c9d55cd8ebd7a4742757 (patch) | |
tree | a9f89924ce3977324a9303212a3cc06adc2c44d2 | |
parent | 42613902edef3cbbc74c317b8de5e4e3b9f9e209 (diff) | |
parent | 1d8bd89fece18e861760eeed40ded146e01a0abb (diff) | |
download | volse-hubzilla-b84f49df10ec83f0c078c9d55cd8ebd7a4742757.tar.gz volse-hubzilla-b84f49df10ec83f0c078c9d55cd8ebd7a4742757.tar.bz2 volse-hubzilla-b84f49df10ec83f0c078c9d55cd8ebd7a4742757.zip |
Merge branch 'translateitems' of https://github.com/fabrixxm/friendika into fabrixxm-translateitems
-rw-r--r-- | include/conversation.php | 52 | ||||
-rw-r--r-- | view/theme/darkzero/border.jpg | bin | 0 -> 521 bytes | |||
-rw-r--r-- | view/theme/darkzero/head.jpg | bin | 0 -> 1269 bytes | |||
-rw-r--r-- | view/theme/darkzero/sectionend.jpg | bin | 0 -> 355 bytes | |||
-rw-r--r-- | view/theme/darkzero/shiny.png | bin | 0 -> 362 bytes | |||
-rw-r--r-- | view/theme/darkzero/style.css | 64 |
6 files changed, 114 insertions, 2 deletions
diff --git a/include/conversation.php b/include/conversation.php index 4c858d818..3ec0706e9 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -1,6 +1,51 @@ <?php /** + * Render actions localized + */ +function localize_item(&$item){ + + if ($item['verb']=="http://activitystrea.ms/schema/1.0/like" || + $item['verb']=="http://activitystrea.ms/schema/1.0/dislike"){ + + $r = q("SELECT * from `item`,`contact` WHERE + `item`.`contact-id`=`contact`.`id` AND `item`.`uri`='%s';", + dbesc($item['parent-uri'])); + if(count($r)==0) return; + $obj=$r[0]; + + $author = '[url=' . $item['author-link'] . ']' . $item['author-name'] . '[/url]'; + $objauthor = '[url=' . $obj['author-link'] . ']' . $obj['author-name'] . '[/url]'; + + $post_type = (($obj['resource-id']) ? t('photo') : t('status')); + $plink = '[url=' . $obj['plink'] . ']' . $post_type . '[/url]'; + + switch($item['verb']){ + case "http://activitystrea.ms/schema/1.0/like": + $bodyverb = t('%1$s likes %2$s\'s %3$s'); + break; + case "http://activitystrea.ms/schema/1.0/dislike": + $bodyverb = t('%1$s doesn\'t like %2$s\'s %3$s'); + break; + } + $item['body'] = sprintf($bodyverb, $author, $objauthor, $plink); + + } + if ($item['verb']=='http://activitystrea.ms/schema/1.0/make-friend'){ + + $b = str_replace("[/url]","[/url]\n", $item['body']); + preg_match_all("|(\[url.*\[/url\])|", $b, $match); + + $item['body'] = $match[0][0]." " + .t('is now friends with') + ." ".$match[0][1]."\n\n\n" + .$match[0][2]; + + } + +} + +/** * "Render" a conversation or list of items for HTML display. * There are two major forms of display: * - Sequential or unthreaded ("New Item View" or search results) @@ -10,7 +55,6 @@ * that are based on unique features of the calling module. * */ - function conversation(&$a, $items, $mode, $update) { require_once('bbcode.php'); @@ -118,7 +162,8 @@ function conversation(&$a, $items, $mode, $update) { $drop = replace_macros((($dropping)? $droptpl : $fakedrop), array('$id' => $item['id'], '$delete' => t('Delete'))); - + // + localize_item($item); $drop = replace_macros($droptpl,array('$id' => $item['id'])); $lock = '<div class="wall-item-lock"></div>'; @@ -384,6 +429,9 @@ function conversation(&$a, $items, $mode, $update) { if(strcmp(datetime_convert('UTC','UTC',$item['created']),datetime_convert('UTC','UTC','now - 12 hours')) > 0) $indent .= ' shiny'; + // + localize_item($item); + // Build the HTML $tmp_item = replace_macros($template,array( diff --git a/view/theme/darkzero/border.jpg b/view/theme/darkzero/border.jpg Binary files differnew file mode 100644 index 000000000..4967412bf --- /dev/null +++ b/view/theme/darkzero/border.jpg diff --git a/view/theme/darkzero/head.jpg b/view/theme/darkzero/head.jpg Binary files differnew file mode 100644 index 000000000..67e852140 --- /dev/null +++ b/view/theme/darkzero/head.jpg diff --git a/view/theme/darkzero/sectionend.jpg b/view/theme/darkzero/sectionend.jpg Binary files differnew file mode 100644 index 000000000..9d5d5c8f3 --- /dev/null +++ b/view/theme/darkzero/sectionend.jpg diff --git a/view/theme/darkzero/shiny.png b/view/theme/darkzero/shiny.png Binary files differnew file mode 100644 index 000000000..994c0d05d --- /dev/null +++ b/view/theme/darkzero/shiny.png diff --git a/view/theme/darkzero/style.css b/view/theme/darkzero/style.css new file mode 100644 index 000000000..c92529f26 --- /dev/null +++ b/view/theme/darkzero/style.css @@ -0,0 +1,64 @@ +@import url('../duepuntozero/style.css'); + +/* dark variation Fabio Comuni <fabrix.xm@gmail.com> */ + +a:link, a:visited { color: #99CCFF; text-decoration: none; } +a:hover {text-decoration: underline; } + +input, select, textarea { + background-color: #222222; + color: #FFFFFF; + border: 1px solid #444444; +} +.openid { background-color: #222222;} + +body { background-color: #222222; color: #cccccc; background-image: url(head.jpg); } +aside{ background-image: url(border.jpg); padding-bottom: 0px; } +section { background-color: #333333; background-image: url(border.jpg); } + + +#profile-tabs-wrapper { background-image: url(head.jpg); } +div.wall-item-content-wrapper.shiny { background-image: url('shiny.png'); } + +nav #banner #logo-text a { color: #ffffff; } + +.wall-item-content-wrapper { border: 1px solid #444444; } +.wall-item-tools { background-color: #444444; background-image: none;} +.comment-edit-wrapper{ background-color: #333333; } +.wall-item-content-wrapper.comment { background-color: #444444; border: 0px;} +.photo-top-album-name{ background-color: #333333; } +.photo-album-image-wrapper .caption { background-color: rgba(51, 51, 51, 0.8); color: #FFFFFF; } + +.nav-selected.nav-link { color: #ffffff!important; border-bottom: 0px} +.nav-commlink, .nav-login-link {background-color: #b7bab3;} +.nav-commlink:link, .nav-commlink:visited, +.nav-login-link:link, .nav-login-link:visited{ + color: #ffffff; +} + +.fakelink, .fakelink:visited { + color: #99CCFF; +} + +.wall-item-name-link { + color: #99CCFF; +} + +.wall-item-photo-menu li a { + color: #CCCCCC; background-color: #333333; +} + +.wall-item-photo-menu li a:hover { + background-color: #CCCCCC; color: #333333; +} +#page-footer { min-height: 1em;} +footer { + margin: 0px 10%; + display: block; + background-image: url('sectionend.jpg'); + background-position: top left; + background-repeat: repeat-x; + height: 25px; +} + + |