Browse Source

add support for more file attachment types

pull/607/head
Zach Prezkuta 9 years ago
parent
commit
6152cbd5ac
  1. 996
      include/attach.php
  2. 16
      include/text.php
  3. 1
      view/theme/diabook/diabook-aerith/style-network-wide.css
  4. 1
      view/theme/diabook/diabook-aerith/style-network.css
  5. 1
      view/theme/diabook/diabook-aerith/style-profile-wide.css
  6. 1
      view/theme/diabook/diabook-aerith/style-profile.css
  7. 1
      view/theme/diabook/diabook-aerith/style-wide.css
  8. 1
      view/theme/diabook/diabook-aerith/style.css
  9. 1
      view/theme/diabook/diabook-blue/style-network-wide.css
  10. 1
      view/theme/diabook/diabook-blue/style-network.css
  11. 1
      view/theme/diabook/diabook-blue/style-profile-wide.css
  12. 1
      view/theme/diabook/diabook-blue/style-profile.css
  13. 1
      view/theme/diabook/diabook-blue/style-wide.css
  14. 1
      view/theme/diabook/diabook-blue/style.css
  15. 1
      view/theme/diabook/diabook-green/style-network-wide.css
  16. 1
      view/theme/diabook/diabook-green/style-network.css
  17. 1
      view/theme/diabook/diabook-green/style-profile-wide.css
  18. 1
      view/theme/diabook/diabook-green/style-profile.css
  19. 1
      view/theme/diabook/diabook-green/style-wide.css
  20. 1
      view/theme/diabook/diabook-green/style.css
  21. 3
      view/theme/diabook/style-network.css
  22. 1
      view/theme/diabook/style-profile.css
  23. 1
      view/theme/diabook/style.css
  24. 3
      view/theme/dispy/dark/style.css
  25. 1
      view/theme/dispy/dark/style.less
  26. 3
      view/theme/dispy/light/style.css
  27. 1
      view/theme/dispy/light/style.less
  28. 1
      view/theme/duepuntozero/style.css
  29. 1
      view/theme/facepark/style.css
  30. 1
      view/theme/frost-mobile/style.css
  31. 1
      view/theme/frost/style.css
  32. 1
      view/theme/smoothly/style.css
  33. 3
      view/theme/testbubble/style.css

996
include/attach.php
File diff suppressed because it is too large
View File

16
include/text.php

@ -1050,7 +1050,18 @@ function prepare_body($item,$attach = false) {
$cnt = preg_match_all('|\[attach\]href=\"(.*?)\" length=\"(.*?)\" type=\"(.*?)\" title=\"(.*?)\"|',$r,$matches, PREG_SET_ORDER);
if($cnt) {
foreach($matches as $mtch) {
$icontype = strtolower(substr($mtch[3],0,strpos($mtch[3],'/')));
$filetype = strtolower(substr( $mtch[3], 0, strpos($mtch[3],'/') ));
if($filetype) {
$filesubtype = strtolower(substr( $mtch[3], strpos($mtch[3],'/') + 1 ));
$filesubtype = str_replace('.', '-', $filesubtype);
}
else {
$filetype = 'unkn';
$filesubtype = 'unkn';
}
$icon = '<div class="attachtype icon s22 type-' . $filetype . ' subtype-' . $filesubtype . '"></div>';
/*$icontype = strtolower(substr($mtch[3],0,strpos($mtch[3],'/')));
switch($icontype) {
case 'video':
case 'audio':
@ -1061,7 +1072,8 @@ function prepare_body($item,$attach = false) {
default:
$icon = '<div class="attachtype icon s22 type-unkn"></div>';
break;
}
}*/
$title = ((strlen(trim($mtch[4]))) ? escape_tags(trim($mtch[4])) : escape_tags($mtch[1]));
$title .= ' ' . $mtch[2] . ' ' . t('bytes');
if((local_user() == $item['uid']) && ($item['contact-id'] != $a->contact['id']) && ($item['network'] == NETWORK_DFRN))

1
view/theme/diabook/diabook-aerith/style-network-wide.css

@ -185,6 +185,7 @@
.attachtype {
display: block; width: 20px; height: 23px;
background-image: url('../../../../images/content-types.png');
background-position: -80px 0px;
}
.type-video { background-position: 0px 0px; }

1
view/theme/diabook/diabook-aerith/style-network.css

@ -185,6 +185,7 @@
.attachtype {
display: block; width: 20px; height: 23px;
background-image: url('../../../../images/content-types.png');
background-position: -80px 0px;
}
.type-video { background-position: 0px 0px; }

1
view/theme/diabook/diabook-aerith/style-profile-wide.css

@ -185,6 +185,7 @@
.attachtype {
display: block; width: 20px; height: 23px;
background-image: url('../../../../images/content-types.png');
background-position: -80px 0px;
}
.type-video { background-position: 0px 0px; }

1
view/theme/diabook/diabook-aerith/style-profile.css

@ -185,6 +185,7 @@
.attachtype {
display: block; width: 20px; height: 23px;
background-image: url('../../../../images/content-types.png');
background-position: -80px 0px;
}
.type-video { background-position: 0px 0px; }

1
view/theme/diabook/diabook-aerith/style-wide.css

@ -219,6 +219,7 @@
.attachtype {
display: block; width: 20px; height: 23px;
background-image: url('../../../images/content-types.png');
background-position: -80px 0px;
}
.type-video { background-position: 0px 0px; }

1
view/theme/diabook/diabook-aerith/style.css

@ -219,6 +219,7 @@
.attachtype {
display: block; width: 20px; height: 23px;
background-image: url('../../../images/content-types.png');
background-position: -80px 0px;
}
.type-video { background-position: 0px 0px; }

1
view/theme/diabook/diabook-blue/style-network-wide.css

@ -185,6 +185,7 @@
.attachtype {
display: block; width: 20px; height: 23px;
background-image: url('../../../../images/content-types.png');
background-position: -80px 0px;
}
.type-video { background-position: 0px 0px; }

1
view/theme/diabook/diabook-blue/style-network.css

@ -185,6 +185,7 @@
.attachtype {
display: block; width: 20px; height: 23px;
background-image: url('../../../../images/content-types.png');
background-position: -80px 0px;
}
.type-video { background-position: 0px 0px; }

1
view/theme/diabook/diabook-blue/style-profile-wide.css

@ -185,6 +185,7 @@
.attachtype {
display: block; width: 20px; height: 23px;
background-image: url('../../../../images/content-types.png');
background-position: -80px 0px;
}
.type-video { background-position: 0px 0px; }

1
view/theme/diabook/diabook-blue/style-profile.css

@ -185,6 +185,7 @@
.attachtype {
display: block; width: 20px; height: 23px;
background-image: url('../../../../images/content-types.png');
background-position: -80px 0px;
}
.type-video { background-position: 0px 0px; }

1
view/theme/diabook/diabook-blue/style-wide.css

@ -218,6 +218,7 @@
.attachtype {
display: block; width: 20px; height: 23px;
background-image: url('../../../images/content-types.png');
background-position: -80px 0px;
}
.type-video { background-position: 0px 0px; }

1
view/theme/diabook/diabook-blue/style.css

@ -218,6 +218,7 @@
.attachtype {
display: block; width: 20px; height: 23px;
background-image: url('../../../images/content-types.png');
background-position: -80px 0px;
}
.type-video { background-position: 0px 0px; }

1
view/theme/diabook/diabook-green/style-network-wide.css

@ -185,6 +185,7 @@
.attachtype {
display: block; width: 20px; height: 23px;
background-image: url('../../../../images/content-types.png');
background-position: -80px 0px;
}
.type-video { background-position: 0px 0px; }

1
view/theme/diabook/diabook-green/style-network.css

@ -185,6 +185,7 @@
.attachtype {
display: block; width: 20px; height: 23px;
background-image: url('../../../../images/content-types.png');
background-position: -80px 0px;
}
.type-video { background-position: 0px 0px; }

1
view/theme/diabook/diabook-green/style-profile-wide.css

@ -185,6 +185,7 @@
.attachtype {
display: block; width: 20px; height: 23px;
background-image: url('../../../../images/content-types.png');
background-position: -80px 0px;
}
.type-video { background-position: 0px 0px; }

1
view/theme/diabook/diabook-green/style-profile.css

@ -185,6 +185,7 @@
.attachtype {
display: block; width: 20px; height: 23px;
background-image: url('../../../../images/content-types.png');
background-position: -80px 0px;
}
.type-video { background-position: 0px 0px; }

1
view/theme/diabook/diabook-green/style-wide.css

@ -219,6 +219,7 @@
.attachtype {
display: block; width: 20px; height: 23px;
background-image: url('../../../images/content-types.png');
background-position: -80px 0px;
}
.type-video { background-position: 0px 0px; }

1
view/theme/diabook/diabook-green/style.css

@ -219,6 +219,7 @@
.attachtype {
display: block; width: 20px; height: 23px;
background-image: url('../../../images/content-types.png');
background-position: -80px 0px;
}
.type-video { background-position: 0px 0px; }

3
view/theme/diabook/style-network.css

@ -186,6 +186,7 @@
.attachtype {
display: block; width: 20px; height: 23px;
background-image: url('../../../images/content-types.png');
background-position: -80px 0px;
}
.type-video { background-position: 0px 0px; }
@ -2568,4 +2569,4 @@ list-style-type: disc;
#photos-upload-newalbum-div {
float: left;
width: 175px;
}
}

1
view/theme/diabook/style-profile.css

@ -185,6 +185,7 @@
.attachtype {
display: block; width: 20px; height: 23px;
background-image: url('../../../images/content-types.png');
background-position: -80px 0px;
}
.type-video { background-position: 0px 0px; }

1
view/theme/diabook/style.css

@ -221,6 +221,7 @@
.attachtype {
display: block; width: 20px; height: 23px;
background-image: url('../../../images/content-types.png');
background-position: -80px 0px;
}
.type-video { background-position: 0px 0px; }

3
view/theme/dispy/dark/style.css

@ -512,7 +512,8 @@ div[id$="wrapper"]{height:100%;}div[id$="wrapper"] br{clear:left;}
.icon.dim{opacity:0.3;}
#pause{position:fixed;bottom:40px;right:30px;z-index:10;}
.border{border:1px solid #babdb6;-o-border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;border-radius:5px;}.border:hover{border:1px solid #babdb6;-o-border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;border-radius:5px;}
.attachtype{display:block;width:20px;height:23px;background-image:url(../../../images/content-types.png);}
.attachtype{display:block;width:20px;height:23px;background-image:url(../../../images/content-types.png);background-position: -80px 0px;
}
.type-video{background-position:0px 0px;}
.type-image{background-position:-20px 0;}
.type-audio{background-position:-40px 0;}

1
view/theme/dispy/dark/style.less

@ -2998,6 +2998,7 @@ div {
display: block;
.box(20px, 23px);
background-image: url(../../../images/content-types.png);
background-position: -80px 0px;
}
.type-video {
background-position: 0px 0px;

3
view/theme/dispy/light/style.css

@ -512,7 +512,8 @@ div[id$="wrapper"]{height:100%;}div[id$="wrapper"] br{clear:left;}
.icon.dim{opacity:0.3;}
#pause{position:fixed;bottom:40px;right:30px;z-index:10;}
.border{border:1px solid #babdb6;-o-border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;border-radius:5px;}.border:hover{border:1px solid #babdb6;-o-border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;border-radius:5px;}
.attachtype{display:block;width:20px;height:23px;background-image:url(../../../images/content-types.png);}
.attachtype{display:block;width:20px;height:23px;background-image:url(../../../images/content-types.png);background-position: -80px 0px;
}
.type-video{background-position:0px 0px;}
.type-image{background-position:-20px 0;}
.type-audio{background-position:-40px 0;}

1
view/theme/dispy/light/style.less

@ -2999,6 +2999,7 @@ div {
display: block;
.box(20px, 23px);
background-image: url(../../../images/content-types.png);
background-position: -80px 0px;
}
.type-video {
background-position: 0px 0px;

1
view/theme/duepuntozero/style.css

@ -3137,6 +3137,7 @@ aside input[type='text'] {
display: block; width: 20px; height: 23px;
float: left;
background-image: url('../../../images/content-types.png');
background-position: -80px 0px;
}
.body-attach {

1
view/theme/facepark/style.css

@ -2935,6 +2935,7 @@ aside input[type='text'] {
display: block; width: 20px; height: 23px;
float: left;
background-image: url('../../../images/content-types.png');
background-position: -80px 0px;
}
.body-attach {

1
view/theme/frost-mobile/style.css

@ -3850,6 +3850,7 @@ aside input[type='text'] {
display: block; width: 20px; height: 23px;
float: left;
background-image: url('../../../images/content-types.png');
background-position: -80px 0px;
}
.body-attach {

1
view/theme/frost/style.css

@ -3761,6 +3761,7 @@ aside input[type='text'] {
display: block; width: 20px; height: 23px;
float: left;
background-image: url('../../../images/content-types.png');
background-position: -80px 0px;
}
.body-attach {

1
view/theme/smoothly/style.css

@ -3792,6 +3792,7 @@ margin-left: 0px;
.attachtype {
display: block; width: 20px; height: 23px;
background-image: url("../../../images/content-types.png");
background-position: -80px 0px;
}
.type-video { background-position: 0px 0px; }

3
view/theme/testbubble/style.css

@ -2962,6 +2962,7 @@ tr {
.attachtype {
display: block; width: 20px; height: 23px;
background-image: url('../../../images/content-types.png');
background-position: -80px 0px;
}
.type-video { background-position: 0px 0px; }
@ -3289,4 +3290,4 @@ ul.menu-popup {
/* Pages profile widget */
#page-profile div#profile-page-list{
margin-left: 45px;
}
}
Loading…
Cancel
Save