diff --git a/boot.php b/boot.php index ea9ef91443..1f4a2a06b5 100644 --- a/boot.php +++ b/boot.php @@ -349,12 +349,22 @@ if(! class_exists('App')) { public $plugins; public $apps = array(); public $identities; - public $sourcename = ''; public $nav_sel; public $category; + // Allow themes to control internal parameters + // by changing App values in theme.php + // + // Possibly should make these part of the plugin + // system, but it seems like overkill to invoke + // all the plugin machinery just to change a couple + // of values + public $sourcename = ''; + public $videowidth = 425; + public $videoheight = 350; + private $scheme; private $hostname; private $baseurl; diff --git a/include/bbcode.php b/include/bbcode.php index d83cd35814..85c0059ccd 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -325,7 +325,7 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true) { // Try to Oembed if ($tryoembed) { - $Text = preg_replace("/\[video\](.*?\.(ogg|ogv|oga|ogm|webm|mp4))\[\/video\]/ism", '', $Text); + $Text = preg_replace("/\[video\](.*?\.(ogg|ogv|oga|ogm|webm|mp4))\[\/video\]/ism", '', $Text); $Text = preg_replace("/\[audio\](.*?\.(ogg|ogv|oga|ogm|webm|mp4|mp3))\[\/audio\]/ism", '', $Text); $Text = preg_replace_callback("/\[video\](.*?)\[\/video\]/ism", 'tryoembed', $Text); @@ -339,7 +339,7 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true) { if ($tryoembed) - $Text = preg_replace("/\[iframe\](.*?)\[\/iframe\]/ism", '', $Text); + $Text = preg_replace("/\[iframe\](.*?)\[\/iframe\]/ism", '', $Text); else $Text = preg_replace("/\[iframe\](.*?)\[\/iframe\]/ism", '$1', $Text); @@ -355,7 +355,7 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true) { $Text = preg_replace("/\[youtube\]https?:\/\/youtu.be\/(.*?)\[\/youtube\]/ism",'[youtube]$1[/youtube]',$Text); if ($tryoembed) - $Text = preg_replace("/\[youtube\]([A-Za-z0-9\-_=]+)(.*?)\[\/youtube\]/ism", '', $Text); + $Text = preg_replace("/\[youtube\]([A-Za-z0-9\-_=]+)(.*?)\[\/youtube\]/ism", '', $Text); else $Text = preg_replace("/\[youtube\]([A-Za-z0-9\-_=]+)(.*?)\[\/youtube\]/ism", "http://www.youtube.com/watch?v=$1", $Text); @@ -369,7 +369,7 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true) { $Text = preg_replace("/\[vimeo\]https?:\/\/vimeo.com\/([0-9]+)(.*?)\[\/vimeo\]/ism",'[vimeo]$1[/vimeo]',$Text); if ($tryoembed) - $Text = preg_replace("/\[vimeo\]([0-9]+)(.*?)\[\/vimeo\]/ism", '', $Text); + $Text = preg_replace("/\[vimeo\]([0-9]+)(.*?)\[\/vimeo\]/ism", '', $Text); else $Text = preg_replace("/\[vimeo\]([0-9]+)(.*?)\[\/vimeo\]/ism", "http://vimeo.com/$1", $Text); diff --git a/include/oembed.php b/include/oembed.php index a4452586ee..6fc4c53717 100755 --- a/include/oembed.php +++ b/include/oembed.php @@ -12,7 +12,9 @@ function oembed_replacecb($matches){ function oembed_fetch_url($embedurl){ - $txt = Cache::get($embedurl); + $a = get_app(); + + $txt = Cache::get($a->videowidth . $embedurl); // These media files should now be caught in bbcode.php // left here as a fallback in case this is called from another source @@ -38,7 +40,7 @@ function oembed_fetch_url($embedurl){ $entries = $xpath->query("//link[@type='application/json+oembed']"); foreach($entries as $e){ $href = $e->getAttributeNode("href")->nodeValue; - $txt = fetch_url($href . '&maxwidth=425'); + $txt = fetch_url($href . '&maxwidth=' . $a->videowidth); break; } } @@ -47,7 +49,7 @@ function oembed_fetch_url($embedurl){ if ($txt==false || $txt==""){ // try oohembed service - $ourl = "http://oohembed.com/oohembed/?url=".urlencode($embedurl).'&maxwidth=425'; + $ourl = "http://oohembed.com/oohembed/?url=".urlencode($embedurl).'&maxwidth=' . $a->videowidth; $txt = fetch_url($ourl); } @@ -55,7 +57,7 @@ function oembed_fetch_url($embedurl){ if ($txt[0]!="{") $txt='{"type":"error"}'; //save in cache - Cache::set($embedurl,$txt); + Cache::set($a->videowidth . $embedurl,$txt); } diff --git a/view/theme/dispy/dark/icons.png b/view/theme/dispy/dark/icons.png index 67c8f3f0b4..aaf97473b4 100644 Binary files a/view/theme/dispy/dark/icons.png and b/view/theme/dispy/dark/icons.png differ diff --git a/view/theme/dispy/dark/icons.svg b/view/theme/dispy/dark/icons.svg index 7cbbd3574e..90b83bf811 100644 --- a/view/theme/dispy/dark/icons.svg +++ b/view/theme/dispy/dark/icons.svg @@ -43,6 +43,58 @@ is_visible="true" teeth="10" phi="10" /> + + + + + + + + + + + + + + + fit-margin-bottom="0" + inkscape:showpageshadow="false" + showborder="true"> image/svg+xml - + @@ -117,7 +171,7 @@ id="layer1" transform="translate(0,-852.36218)"> + + + + + + + + + + diff --git a/view/theme/dispy/dark/style.css b/view/theme/dispy/dark/style.css index 95e2bb9983..ff30337a35 100644 --- a/view/theme/dispy/dark/style.css +++ b/view/theme/dispy/dark/style.css @@ -90,7 +90,7 @@ nav .nav-link{display:inline-block;width:22px;height:22px;overflow:hidden;margin #nav-home-link{background-position:-44px -132px;}#nav-home-link:hover{background-position:-66px -132px;} #nav-intro-link{background-position:0px -88px;}#nav-intro-link:hover{background-position:-22px -88px;} #nav-login-link,#nav-logout-link{background-position:0 -88px;}#nav-login-link:hover,#nav-logout-link:hover{background-position:-22px -88px;} -#nav-manage-link{background-position:0px -22px;}#nav-manage-link:hover{background-position:-22px -22px;} +#nav-manage-link{background-position:-88px -88px;}#nav-manage-link:hover{background-position:-110px -88px;} #nav-messages-link{background-position:-44px -88px;}#nav-messages-link:hover{background-position:-66px -88px;} #nav-notify-link,#nav-notifications-linkmenu{background-position:-44px -110px;} #nav-notify-link:hover{background-position:-66px -110px;} diff --git a/view/theme/dispy/dark/style.less b/view/theme/dispy/dark/style.less index f701c12253..d7becbedb8 100644 --- a/view/theme/dispy/dark/style.less +++ b/view/theme/dispy/dark/style.less @@ -542,9 +542,9 @@ nav .nav-link { } } #nav-manage-link { - background-position: 0px -22px; + background-position: -88px -88px; &:hover { - background-position: -22px -22px; + background-position: -110px -88px; } } #nav-messages-link { diff --git a/view/theme/dispy/head.tpl b/view/theme/dispy/head.tpl index a34df96bee..5f6b26a78a 100644 --- a/view/theme/dispy/head.tpl +++ b/view/theme/dispy/head.tpl @@ -2,27 +2,30 @@ - - + + + - - + - + + {{ endif }} diff --git a/view/theme/dispy/light/icons.png b/view/theme/dispy/light/icons.png index 5c2eab36e4..1494c1b8b4 100644 Binary files a/view/theme/dispy/light/icons.png and b/view/theme/dispy/light/icons.png differ diff --git a/view/theme/dispy/light/icons.svg b/view/theme/dispy/light/icons.svg index 7b82b94eaa..1531edc191 100644 --- a/view/theme/dispy/light/icons.svg +++ b/view/theme/dispy/light/icons.svg @@ -14,9 +14,9 @@ height="200" id="svg3403" version="1.1" - inkscape:version="0.48+devel r" + inkscape:version="0.48.3.1 r9886" sodipodi:docname="icons.svg" - inkscape:export-filename="/var/www3/kisikew.org/portal/pub/fd/view/theme/dispy/icons.png" + inkscape:export-filename="/var/www3/kisikew.org/portal/pub/fd/view/theme/dispy/light/icons.png" inkscape:export-xdpi="90" inkscape:export-ydpi="90"> + + + + + + + + + + + + + + image/svg+xml - + @@ -1482,7 +1534,7 @@ id="path4166" /> + + + + + + + + diff --git a/view/theme/dispy/light/style.css b/view/theme/dispy/light/style.css index 9a991b796e..03942c6cde 100644 --- a/view/theme/dispy/light/style.css +++ b/view/theme/dispy/light/style.css @@ -90,7 +90,7 @@ nav .nav-link{display:inline-block;width:22px;height:22px;overflow:hidden;margin #nav-home-link{background-position:-44px -132px;}#nav-home-link:hover{background-position:-66px -132px;} #nav-intro-link{background-position:0px -88px;}#nav-intro-link:hover{background-position:-22px -88px;} #nav-login-link,#nav-logout-link{background-position:0 -88px;}#nav-login-link:hover,#nav-logout-link:hover{background-position:-22px -88px;} -#nav-manage-link{background-position:0px -22px;}#nav-manage-link:hover{background-position:-22px -22px;} +#nav-manage-link{background-position:-88px -88px;}#nav-manage-link:hover{background-position:-110px -88px;} #nav-messages-link{background-position:-44px -88px;}#nav-messages-link:hover{background-position:-66px -88px;} #nav-notify-link,#nav-notifications-linkmenu{background-position:-44px -110px;} #nav-notify-link:hover{background-position:-66px -110px;} diff --git a/view/theme/dispy/light/style.less b/view/theme/dispy/light/style.less index 87b405470c..3db91a8507 100644 --- a/view/theme/dispy/light/style.less +++ b/view/theme/dispy/light/style.less @@ -543,9 +543,9 @@ nav .nav-link { } } #nav-manage-link { - background-position: 0px -22px; + background-position: -88px -88px; &:hover { - background-position: -22px -22px; + background-position: -110px -88px; } } #nav-messages-link { diff --git a/view/theme/frost-mobile/profile_photo.tpl b/view/theme/frost-mobile/profile_photo.tpl new file mode 100644 index 0000000000..42fc139f8f --- /dev/null +++ b/view/theme/frost-mobile/profile_photo.tpl @@ -0,0 +1,19 @@ +

$title

+ +
+ + +
+ + +
+ +
+ +
+ +
+ + diff --git a/view/theme/frost-mobile/theme.php b/view/theme/frost-mobile/theme.php index 314361b9c9..96d40958ef 100644 --- a/view/theme/frost-mobile/theme.php +++ b/view/theme/frost-mobile/theme.php @@ -4,7 +4,7 @@ * Name: Frost--mobile version * Description: Like frosted glass * Credits: Navigation icons taken from http://iconza.com. Other icons taken from http://thenounproject.com, including: Like, Dislike, Black Lock, Unlock, Pencil, Tag, Camera, Paperclip (Marie Coons), Folder (Sergio Calcara), Chain-link (Andrew Fortnum), Speaker (Harold Kim), Quotes (Henry Ryder), Video Camera (Anas Ramadan), and Left Arrow, Right Arrow, and Delete X (all three P.J. Onori). All under Attribution (CC BY 3.0). Others from The Noun Project are public domain or No Rights Reserved (CC0). - * Version: Version 0.2.3 + * Version: Version 0.2.4 * Author: Zach P * Maintainer: Zach P */ @@ -24,5 +24,7 @@ function frost_mobile_init(&$a) { $a->sourcename = 'Friendica mobile web'; + $a->videowidth = 250; + $a->videoheight = 200; } diff --git a/view/theme/frost-mobile/wallwall_item.tpl b/view/theme/frost-mobile/wallwall_item.tpl index 113987246c..e4d6b60bb4 100644 --- a/view/theme/frost-mobile/wallwall_item.tpl +++ b/view/theme/frost-mobile/wallwall_item.tpl @@ -18,12 +18,12 @@
    $item.item_photo_menu
- + -->
- {{ if $item.lock }}
$item.lock
+ {{ if $item.lock }}$item.lock {{ else }}
{{ endif }}
$item.location