From 711719ce0ce340fbcda7559bf20582e85e4b1e3d Mon Sep 17 00:00:00 2001 From: root Date: Wed, 7 May 2014 12:01:12 -0700 Subject: [PATCH 1/4] Made some changes to img tags to enforce max-width everywhere, and to the page headers to allow user scaling. --- include/bbcode.php | 12 ++++++------ view/tpl/head.tpl | 2 +- view/tpl/photo_view.tpl | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/include/bbcode.php b/include/bbcode.php index 326676b72..92d979638 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -606,24 +606,24 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true) { // Images // [img]pathtoimage[/img] if (strpos($Text,'[/img]') !== false) { - $Text = preg_replace("/\[img\](.*?)\[\/img\]/ism", '' . t('Image/photo') . '', $Text); + $Text = preg_replace("/\[img\](.*?)\[\/img\]/ism", '' . t('Image/photo') . '', $Text); } if (strpos($Text,'[/zmg]') !== false) { - $Text = preg_replace("/\[zmg\](.*?)\[\/zmg\]/ism", '' . t('Image/photo') . '', $Text); + $Text = preg_replace("/\[zmg\](.*?)\[\/zmg\]/ism", '' . t('Image/photo') . '', $Text); } // [img float={left, right}]pathtoimage[/img] if (strpos($Text,'[/img]') !== false) { - $Text = preg_replace("/\[img float=left\](.*?)\[\/img\]/ism", '' . t('Image/photo') . '', $Text); + $Text = preg_replace("/\[img float=left\](.*?)\[\/img\]/ism", '' . t('Image/photo') . '', $Text); } if (strpos($Text,'[/img]') !== false) { - $Text = preg_replace("/\[img float=right\](.*?)\[\/img\]/ism", '' . t('Image/photo') . '', $Text); + $Text = preg_replace("/\[img float=right\](.*?)\[\/img\]/ism", '' . t('Image/photo') . '', $Text); } if (strpos($Text,'[/zmg]') !== false) { - $Text = preg_replace("/\[zmg float=left\](.*?)\[\/zmg\]/ism", '' . t('Image/photo') . '', $Text); + $Text = preg_replace("/\[zmg float=left\](.*?)\[\/zmg\]/ism", '' . t('Image/photo') . '', $Text); } if (strpos($Text,'[/zmg]') !== false) { - $Text = preg_replace("/\[zmg float=right\](.*?)\[\/zmg\]/ism", '' . t('Image/photo') . '', $Text); + $Text = preg_replace("/\[zmg float=right\](.*?)\[\/zmg\]/ism", '' . t('Image/photo') . '', $Text); } // [img=widthxheight]pathtoimage[/img] diff --git a/view/tpl/head.tpl b/view/tpl/head.tpl index e7b41523f..54aa5d41c 100755 --- a/view/tpl/head.tpl +++ b/view/tpl/head.tpl @@ -1,6 +1,6 @@ - + + + + {{$head_css}} {{$js_strings}} From 874b8d40ff14e39bac4875efbaee2f24121d20bd Mon Sep 17 00:00:00 2001 From: root Date: Sat, 10 May 2014 11:22:00 -0700 Subject: [PATCH 3/4] Changed some comments. --- mod/photo.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mod/photo.php b/mod/photo.php index b351ce17f..9302278b6 100644 --- a/mod/photo.php +++ b/mod/photo.php @@ -104,8 +104,7 @@ function photo_init(&$a) { if(substr($photo,-2,1) == '-') { $resolution = intval(substr($photo,-1,1)); $photo = substr($photo,0,-2); - // Serve high-resolution images regardless (this is rude): - // [Note: this can be improved by setting a cookie to indicate that the user is viewing on a high-resolution display] + // If viewing on a high-res screen, attempt to serve a higher resolution image: if ($resolution == 2 && ($cookie_value > 1)) { $resolution = 1; From d1e0479f58e32c63160c7ad9dbd0c1c2363a1b6c Mon Sep 17 00:00:00 2001 From: root Date: Sat, 10 May 2014 11:35:16 -0700 Subject: [PATCH 4/4] Removed some unnecessary changes. --- view/tpl/head.tpl | 2 +- view/tpl/photo_view.tpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/view/tpl/head.tpl b/view/tpl/head.tpl index 496758079..a212fd486 100755 --- a/view/tpl/head.tpl +++ b/view/tpl/head.tpl @@ -1,6 +1,6 @@ - +