]> git.mjollnir.org Git - s9y.git/commitdiff
Guess what: More media manager improvements.
authorgarvinhicking <garvinhicking>
Fri, 21 Apr 2006 12:44:55 +0000 (12:44 +0000)
committergarvinhicking <garvinhicking>
Fri, 21 Apr 2006 12:44:55 +0000 (12:44 +0000)
Is anybody even reading this? I could write poems and stuff here.
Or why not even use this functionality as my daily blog. There are
dozens of means to not get heard.

You're reading this? Well. Have a nice weekend. :-)

69 files changed:
docs/NEWS
include/functions.inc.php
include/functions_entries.inc.php
include/functions_images.inc.php
include/functions_trackbacks.inc.php
include/tpl/config_local.inc.php
lang/UTF-8/serendipity_lang_bg.inc.php
lang/UTF-8/serendipity_lang_cn.inc.php
lang/UTF-8/serendipity_lang_cs.inc.php
lang/UTF-8/serendipity_lang_cz.inc.php
lang/UTF-8/serendipity_lang_da.inc.php
lang/UTF-8/serendipity_lang_de.inc.php
lang/UTF-8/serendipity_lang_en.inc.php
lang/UTF-8/serendipity_lang_es.inc.php
lang/UTF-8/serendipity_lang_fa.inc.php
lang/UTF-8/serendipity_lang_fi.inc.php
lang/UTF-8/serendipity_lang_fr.inc.php
lang/UTF-8/serendipity_lang_hu.inc.php
lang/UTF-8/serendipity_lang_is.inc.php
lang/UTF-8/serendipity_lang_it.inc.php
lang/UTF-8/serendipity_lang_ja.inc.php
lang/UTF-8/serendipity_lang_ko.inc.php
lang/UTF-8/serendipity_lang_nl.inc.php
lang/UTF-8/serendipity_lang_no.inc.php
lang/UTF-8/serendipity_lang_pt.inc.php
lang/UTF-8/serendipity_lang_pt_PT.inc.php
lang/UTF-8/serendipity_lang_ro.inc.php
lang/UTF-8/serendipity_lang_ru.inc.php
lang/UTF-8/serendipity_lang_se.inc.php
lang/UTF-8/serendipity_lang_ta.inc.php
lang/UTF-8/serendipity_lang_tn.inc.php
lang/UTF-8/serendipity_lang_tr.inc.php
lang/UTF-8/serendipity_lang_tw.inc.php
lang/UTF-8/serendipity_lang_zh.inc.php
lang/addlang.txt
lang/plugin_lang.php
lang/serendipity_lang_bg.inc.php
lang/serendipity_lang_cn.inc.php
lang/serendipity_lang_cs.inc.php
lang/serendipity_lang_cz.inc.php
lang/serendipity_lang_da.inc.php
lang/serendipity_lang_de.inc.php
lang/serendipity_lang_en.inc.php
lang/serendipity_lang_es.inc.php
lang/serendipity_lang_fa.inc.php
lang/serendipity_lang_fi.inc.php
lang/serendipity_lang_fr.inc.php
lang/serendipity_lang_hu.inc.php
lang/serendipity_lang_is.inc.php
lang/serendipity_lang_it.inc.php
lang/serendipity_lang_ja.inc.php
lang/serendipity_lang_ko.inc.php
lang/serendipity_lang_nl.inc.php
lang/serendipity_lang_no.inc.php
lang/serendipity_lang_pt.inc.php
lang/serendipity_lang_pt_PT.inc.php
lang/serendipity_lang_ro.inc.php
lang/serendipity_lang_ru.inc.php
lang/serendipity_lang_se.inc.php
lang/serendipity_lang_ta.inc.php
lang/serendipity_lang_tn.inc.php
lang/serendipity_lang_tr.inc.php
lang/serendipity_lang_tw.inc.php
lang/serendipity_lang_zh.inc.php
plugins/serendipity_event_trackexits/serendipity_event_trackexits.php
plugins/serendipity_plugin_entrylinks/serendipity_plugin_entrylinks.php
serendipity_admin_image_selector.php
templates/default/admin/media_items.tpl
templates/default/admin/media_showitem.tpl

index c145e952950e1fc38b16447a3f17a2406522d400..55a5f5c796df10fb33a5d8f7523871479c12fc2a 100644 (file)
--- a/docs/NEWS
+++ b/docs/NEWS
@@ -42,12 +42,13 @@ Version 1.1-alpha4()
            through serendipity_admin_image_selector.php?serendipity[image]=X
          - Integrate imageselectorplus plugin options for giving a target
            to links
-
-     TODO:
          - New option for image_Selector to save a specific sized version
-           (?fid=XXX&targetSize=XX)
-         - Track referrers by image selector and store as property
+           (?serendipity[image]=X&serendipity[step]=showItem
+            &serendipity[resizeWidth]=X&serendipity[resizeHeight]=Y
+         - Track referrers by image selector and show them on detail
+           page
 
+     TODO:
          - Move/rename images/directories (browse serendipity_entries to
            fix up image paths [using <img src="..." />]. Also move ALL
            images of a directory, like when moving s9y installations. Put
index 2fb28ff8a10209554f698912eaf57c45a95e595d..2ceb05c628f2509834974c9f2d4ca5a7923ab6a8 100644 (file)
@@ -521,7 +521,7 @@ function serendipity_sendMail($to, $subject, $message, $fromMail, $headers = NUL
 function serendipity_fetchReferences($id) {
     global $serendipity;
 
-    $query = "SELECT name,link FROM {$serendipity['dbPrefix']}references WHERE entry_id = '" . (int)$id . "'";
+    $query = "SELECT name,link FROM {$serendipity['dbPrefix']}references WHERE entry_id = '" . (int)$id . "' AND type = ''";
 
     return serendipity_db_query($query);
 }
index c97f68f63da97ff1f9bb1cbc35e342235c97fdeb..95433e8ed58073ef118621290f7efff463312012 100644 (file)
@@ -1226,7 +1226,7 @@ function serendipity_deleteEntry($id) {
     serendipity_db_query("DELETE FROM {$serendipity["dbPrefix"]}entrycat WHERE entryid=$id");
     serendipity_db_query("DELETE FROM {$serendipity["dbPrefix"]}entryproperties WHERE entryid=$id");
     serendipity_db_query("DELETE FROM {$serendipity["dbPrefix"]}comments WHERE entry_id=$id");
-    serendipity_db_query("DELETE FROM {$serendipity['dbPrefix']}references WHERE entry_id='$id'");
+    serendipity_db_query("DELETE FROM {$serendipity['dbPrefix']}references WHERE entry_id='$id' AND type = ''");
     serendipity_db_query("DELETE FROM {$serendipity['dbPrefix']}permalinks WHERE entry_id='$id'");
 }
 
index 57a2e0204bf39fa7870b5a9aab0bbddd9c17cf42..83b42e2bfc2c3f6f68b20d1b73a9544ec6624b5d 100644 (file)
@@ -577,9 +577,11 @@ function serendipity_insertImageInDatabase($filename, $directory, $authorid = 0,
  * @param   string      The directory to the image file
  * @param   string      The target size of the thumbnail (2-dimensional array width,height)
  * @param   string      Name of the thumbnail
+ * @param   bool        Store thumbnail in temporary place?
+ * @param   bool        Force enlarging of small images?
  * @return  array       The result size of the thumbnail
  */
-function serendipity_makeThumbnail($file, $directory = '', $size = false, $thumbname = false) {
+function serendipity_makeThumbnail($file, $directory = '', $size = false, $thumbname = false, $is_temporary = false, $force_resize = false) {
     global $serendipity;
 
     if ($size === false) {
@@ -596,27 +598,43 @@ function serendipity_makeThumbnail($file, $directory = '', $size = false, $thumb
 
 
     $infile  = $serendipity['serendipityPath'] . $serendipity['uploadPath'] . $directory . $file;
-    $outfile = $serendipity['serendipityPath'] . $serendipity['uploadPath'] . $directory . $f . '.' . $thumbname . '.' . $suf;
+    if ($is_temporary) {
+        $temppath = dirname($thumbname);
+        if (!is_dir($temppath)) {
+            @mkdir($temppath);
+        }
+        $outfile = $thumbname;
+    } else {
+        $outfile = $serendipity['serendipityPath'] . $serendipity['uploadPath'] . $directory . $f . '.' . $thumbname . '.' . $suf;
+    }
 
     $fdim    = @serendipity_getimagesize($infile, '', $suf);
     if (isset($fdim['noimage'])) {
         $r = array(0, 0);
     } else {
         if ($serendipity['magick'] !== true) {
-            $r = serendipity_resize_image_gd($infile, $outfile, $size);
+            if (is_array($size)) {
+                $r = serendipity_resize_image_gd($infile, $outfile, $size['width'], $size['height']);
+            } else {
+                $r = serendipity_resize_image_gd($infile, $outfile, $size);
+            }
         } else {
-            $r = array($size, $size);
-            $newSize = $size . 'x' . $size;
+            if (is_array($size)) {
+                $r = $size;
+            } else {
+                $r = array('width' => $size, 'height' => $size);
+            }
+            $newSize = $r['width'] . 'x' . $r['height'];
             if ($fdim['mime'] == 'application/pdf') {
                 $cmd     = escapeshellcmd($serendipity['convert']) . ' -antialias -flatten -scale '. serendipity_escapeshellarg($newSize) .' '. serendipity_escapeshellarg($infile) .' '. serendipity_escapeshellarg($outfile . '.png');
             } else {
-                if ( serendipity_ini_bool(ini_get('safe_mode')) === false ) {
+                if (!$force_resize && serendipity_ini_bool(ini_get('safe_mode')) === false) {
                     $newSize .= '>'; // Tell imagemagick to not enlarge small images, only works if safe_mode is off (safe_mode turns > in to \>)
                 }
                 $cmd     = escapeshellcmd($serendipity['convert']) . ' -antialias -resize '. serendipity_escapeshellarg($newSize) .' '. serendipity_escapeshellarg($infile) .' '. serendipity_escapeshellarg($outfile);
             }
             exec($cmd, $output, $result);
-            if ( $result != 0 ) {
+            if ($result != 0) {
                 echo '<div class="serendipityAdminMsgError">'. sprintf(IMAGICK_EXEC_ERROR, $cmd, $output[0], $result) .'</div>';
                 $r = false; // return failure
             } else {
@@ -1198,6 +1216,12 @@ function serendipity_resize_image_gd($infilename, $outfilename, $newwidth, $newh
         $newheight = $newsizes[1];
     }
 
+    if (is_null($newwidth)) {
+        $newsizes  = serendipity_calculate_aspect_size($width, $height, null, $newheight);
+        $newwidth  = $newsizes[0];
+        $newheight = $newsizes[1];
+    }
+
     $out = imagecreatetruecolor($newwidth, $newheight);
 
     /* Attempt to copy transparency information, this really only works for PNG */
@@ -1225,27 +1249,45 @@ function serendipity_resize_image_gd($infilename, $outfilename, $newwidth, $newh
  * @param   int     Target width
  * @return  int     Target height
  */
-function serendipity_calculate_aspect_size($width, $height, $newwidth) {
+function serendipity_calculate_aspect_size($width, $height, $orig_newwidth, $orig_newheight = null) {
 
     // calculate aspect ratio
-    $div_width  = $width  / $newwidth;
-    $div_height = $height / $newwidth;
+    if (!is_null($orig_newheight)) {
+        $div_width  = $width  / $orig_newheight;
+        $div_height = $height / $orig_newheight;
+    } else {
+        $div_width  = $width  / $orig_newwidth;
+        $div_height = $height / $orig_newwidth;
+    }
 
     if ($div_width <= 1 && $div_height <= 1) {
         // do not scale small images where both sides are smaller than the thumbnail dimensions
         $newheight = $height;
         $newwidth  = $width;
-    } elseif ($div_width >= $div_height) {
+    } elseif (is_null($orig_newheight) &&  $div_width >= $div_height) {
         // max width - calculate height, keep width as scaling base
         $newheight = round($height / $div_width);
         // make sure the height is at least 1 pixel for extreme images
         $newheight = ($newheight >= 1 ? $newheight : 1);
-    } else {
+        $newwidth = $orig_newwidth;
+    } elseif (is_null($orig_newwidth) && $div_width >= $div_height) {
+        // max width - calculate height, keep width as scaling base
+        $newwidth = round($width / $div_height);
+        // make sure the height is at least 1 pixel for extreme images
+        $newwidth = ($newwidth >= 1 ? $newwidth : 1);
+        $newheight = $orig_newheight;
+    } elseif (is_null($orig_newheight)) {
         // max height - calculate width, keep height as scaling base
-        $newheight = $newwidth;
+        $newheight = $orig_newwidth;
         $newwidth  = round($width / $div_height);
         // make sure the width is at least 1 pixel for extreme images
         $newwidth  = ($newwidth >= 1 ? $newwidth : 1);
+    } else {
+        // max height - calculate width, keep height as scaling base
+        $newwidth = $orig_newheight;
+        $newheight  = round($height / $div_width);
+        // make sure the width is at least 1 pixel for extreme images
+        $newheight = ($newheight >= 1 ? $newheight : 1);
     }
 
     return array($newwidth, $newheight);
@@ -2100,6 +2142,16 @@ function serendipity_parseMediaProperties(&$dprops, &$keywords, &$media, &$props
         $keywords = explode(';', $serendipity['mediaKeywords']);
     }
 
+    $media['references'] = serendipity_db_query("SELECT link, name
+                            FROM {$serendipity['dbPrefix']}references
+                           WHERE entry_id = " . $media['id'] . "
+                             AND type = 'media'
+                        ORDER BY name DESC
+                           LIMIT 15", false, 'assoc');
+    if (!is_array($media['references'])) {
+        $media['references'] = false;
+    }
+
     foreach($dprops AS $prop) {
         $type = 'input';
         $parts = explode(':', trim($prop));
index 83f3bb94f58095d45234144943b5636ec3dea0cd..975b5b93552293e98138f5e1de15f36b4303b7bf 100644 (file)
@@ -455,7 +455,8 @@ function serendipity_handle_references($id, $author, $title, $text) {
 
         $query = "SELECT COUNT(id) FROM {$serendipity['dbPrefix']}references
                                   WHERE entry_id = '". (int)$tmpid ."'
-                                    AND link = '" . serendipity_db_escape_string($locations[$i]) . "'";
+                                    AND link = '" . serendipity_db_escape_string($locations[$i]) . "'
+                                    AND type = ''";
 
         $row = serendipity_db_query($query, true, 'num');
         if ($row[0] > 0) {
@@ -467,7 +468,7 @@ function serendipity_handle_references($id, $author, $title, $text) {
             $checked_locations[$locations[$i]] = true; // Store trackbacked link so that no further trackbacks will be sent to the same link
         }
     }
-    serendipity_db_query("DELETE FROM {$serendipity['dbPrefix']}references WHERE entry_id='" . (int)$tmpid . "'");
+    serendipity_db_query("DELETE FROM {$serendipity['dbPrefix']}references WHERE entry_id='" . (int)$tmpid . "' AND type = ''");
 
     for ($i = 0; $i < $j; ++$i) {
         $query = "INSERT INTO {$serendipity['dbPrefix']}references (entry_id, name, link) VALUES(";
index df46aad256985c4e18c942caa587a7c6a460a01c..87159f72be604093d1227e163f0c279ca5b26ecc 100644 (file)
                                           'permission'  => 'siteConfiguration',
                                           'default'     => true),
 
+                                    array('var'         => 'dynamicResize',
+                                          'title'       => MEDIA_DYN_RESIZE,
+                                          'description' => MEDIA_DYN_RESIZE_DESC,
+                                          'type'        => 'bool',
+                                          'permission'  => 'siteConfiguration',
+                                          'default'     => false),
+
                                     array('var'         => 'mediaExif',
                                           'title'       => MEDIA_EXIF,
                                           'description' => MEDIA_EXIF_DESC,
index 4b329a9c8c03d27b24cc9c2709df839c2c9f9478..bf45c464ac12428aaaa6df8d7fc21a47f19415bd 100644 (file)
 @define('MEDIA_ENTRY', 'Isolated Entry');
 @define('MEDIA_TARGET_BLANK', 'Popup window (via target=_blank)');
 
+@define('MEDIA_DYN_RESIZE', 'Allow dynamic image resizing?');
+@define('MEDIA_DYN_RESIZE_DESC', 'If enabled, the media selector can return images in any requested size via a GET variable. The results are cached, and thus can create a large filebase if you make intensive use of it.');
+
index d72e55398d6e75e4ef6e3d509e7e85c94f2082cb..d92473f4d2203735845ea0382b2365662d369f78 100644 (file)
@@ -1,4 +1,4 @@
-<?php # $Id: serendipity_lang_cn.inc.php 1122 2006-04-19 11:07:47Z garvinhicking $
+<?php # $Id: serendipity_lang_cn.inc.php 1139 2006-04-21 10:56:07Z garvinhicking $
 # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
 # All rights reserved.  See LICENSE file for licensing details
 /* vim: set sts=4 ts=4 expandtab : */
 @define('MEDIA_ENTRY', 'Isolated Entry');
 @define('MEDIA_TARGET_BLANK', 'Popup window (via target=_blank)');
 
+@define('MEDIA_DYN_RESIZE', 'Allow dynamic image resizing?');
+@define('MEDIA_DYN_RESIZE_DESC', 'If enabled, the media selector can return images in any requested size via a GET variable. The results are cached, and thus can create a large filebase if you make intensive use of it.');
+
index 742f5609e9aaf608965771af3d1b2ec8f96442a1..ac2a2b3615c26fc8f7c3dcf939721ff6545bc868 100644 (file)
@@ -1,4 +1,4 @@
-<?php # $Id: serendipity_lang_cs.inc.php 1122 2006-04-19 11:07:47Z garvinhicking $
+<?php # $Id: serendipity_lang_cs.inc.php 1139 2006-04-21 10:56:07Z garvinhicking $
 # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
 # All rights reserved.  See LICENSE file for licensing details
 # Translation (c) 2005 Josef Klimosz <ok2wo@centrum.cz>
 @define('MEDIA_ENTRY', 'Isolated Entry');
 @define('MEDIA_TARGET_BLANK', 'Popup window (via target=_blank)');
 
+@define('MEDIA_DYN_RESIZE', 'Allow dynamic image resizing?');
+@define('MEDIA_DYN_RESIZE_DESC', 'If enabled, the media selector can return images in any requested size via a GET variable. The results are cached, and thus can create a large filebase if you make intensive use of it.');
+
index ff384707cc9d0b37e666dd98275ebce43eb1aebe..552217a46a9108b87b11d513e82b96009afe2ebd 100644 (file)
@@ -1,4 +1,4 @@
-<?php # $Id: serendipity_lang_cz.inc.php 1122 2006-04-19 11:07:47Z garvinhicking $
+<?php # $Id: serendipity_lang_cz.inc.php 1139 2006-04-21 10:56:07Z garvinhicking $
 # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
 # All rights reserved.  See LICENSE file for licensing details
 # Translation (c) 2004 Josef Klimosz <ok2wo@centrum.cz>
 @define('MEDIA_ENTRY', 'Isolated Entry');
 @define('MEDIA_TARGET_BLANK', 'Popup window (via target=_blank)');
 
+@define('MEDIA_DYN_RESIZE', 'Allow dynamic image resizing?');
+@define('MEDIA_DYN_RESIZE_DESC', 'If enabled, the media selector can return images in any requested size via a GET variable. The results are cached, and thus can create a large filebase if you make intensive use of it.');
+
index 6626c655a9f268086fc6be29c91edc74a287f529..9d5b74eb57b1abe2994dacec09cecd8668e745b4 100644 (file)
@@ -1,4 +1,4 @@
-<?php # $Id: serendipity_lang_da.inc.php 1122 2006-04-19 11:07:47Z garvinhicking $
+<?php # $Id: serendipity_lang_da.inc.php 1139 2006-04-21 10:56:07Z garvinhicking $
 # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
 # All rights reserved.  See LICENSE file for licensing details
 # Translation (c) by Tom Sommer, <ts@dreamcoder.dk>
 @define('MEDIA_ENTRY', 'Isolated Entry');
 @define('MEDIA_TARGET_BLANK', 'Popup window (via target=_blank)');
 
+@define('MEDIA_DYN_RESIZE', 'Allow dynamic image resizing?');
+@define('MEDIA_DYN_RESIZE_DESC', 'If enabled, the media selector can return images in any requested size via a GET variable. The results are cached, and thus can create a large filebase if you make intensive use of it.');
+
index 88d1375300605869af3bf6ed3c6bc835be5bb81f..f0baba4e3e1b46764567b6244659dc0dace7c8cc 100644 (file)
@@ -1,4 +1,4 @@
-<?php # $Id: serendipity_lang_de.inc.php 1122 2006-04-19 11:07:47Z garvinhicking $
+<?php # $Id: serendipity_lang_de.inc.php 1139 2006-04-21 10:56:07Z garvinhicking $
 # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
 # All rights reserved.  See LICENSE file for licensing details
 # Translation (c) Jannis Hermanns, Garvin Hicking and others
 @define('MEDIA_ENTRY', 'Isolated Entry');
 @define('MEDIA_TARGET_BLANK', 'Popup window (via target=_blank)');
 
+@define('MEDIA_DYN_RESIZE', 'Allow dynamic image resizing?');
+@define('MEDIA_DYN_RESIZE_DESC', 'If enabled, the media selector can return images in any requested size via a GET variable. The results are cached, and thus can create a large filebase if you make intensive use of it.');
+
index 09e9f315d1e765fcac621e1d207ee371ce0eab2d..cbbeab04e1d3ad19ec4ae339030cf017580b71c8 100644 (file)
@@ -1,4 +1,4 @@
-<?php # $Id: serendipity_lang_en.inc.php 1122 2006-04-19 11:07:47Z garvinhicking $
+<?php # $Id: serendipity_lang_en.inc.php 1139 2006-04-21 10:56:07Z garvinhicking $
 # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
 # All rights reserved.  See LICENSE file for licensing details
 /* vim: set sts=4 ts=4 expandtab : */
 @define('MEDIA_ENTRY', 'Isolated Entry');
 @define('MEDIA_TARGET_BLANK', 'Popup window (via target=_blank)');
 
+@define('MEDIA_DYN_RESIZE', 'Allow dynamic image resizing?');
+@define('MEDIA_DYN_RESIZE_DESC', 'If enabled, the media selector can return images in any requested size via a GET variable. The results are cached, and thus can create a large filebase if you make intensive use of it.');
+
index 9983b3a44bc2001c7bf900e3766928e9413f151b..fe81d56dd906bd17abc0c91815eb63a1f9fa4614 100644 (file)
@@ -1,4 +1,4 @@
-<?php # $Id: serendipity_lang_es.inc.php 1122 2006-04-19 11:07:47Z garvinhicking $
+<?php # $Id: serendipity_lang_es.inc.php 1139 2006-04-21 10:56:07Z garvinhicking $
 # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
 # All rights reserved.  See LICENSE file for licensing details
 # Translation (c) by Luis Cervantes <LuisCervantes@ono.com>,
@@ -880,3 +880,6 @@ Melvin TODO [20060128]: What spanish word do we use for "referrers" ??
 @define('MEDIA_ENTRY', 'Isolated Entry');
 @define('MEDIA_TARGET_BLANK', 'Popup window (via target=_blank)');
 
+@define('MEDIA_DYN_RESIZE', 'Allow dynamic image resizing?');
+@define('MEDIA_DYN_RESIZE_DESC', 'If enabled, the media selector can return images in any requested size via a GET variable. The results are cached, and thus can create a large filebase if you make intensive use of it.');
+
index 93039e08f84e3faca6f4ac14558127fdfed14925..80c3c8eac13a1e39b83af7a55b95d5e7980ac49b 100644 (file)
@@ -1,4 +1,4 @@
-<?php # $Id: serendipity_lang_fa.inc.php 1122 2006-04-19 11:07:47Z garvinhicking $
+<?php # $Id: serendipity_lang_fa.inc.php 1139 2006-04-21 10:56:07Z garvinhicking $
 # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
 # All rights reserved. See LICENSE file for licensing details
 # this translation, translated by Omid Mottaghi <http://oxygenws.com>
 @define('MEDIA_ENTRY', 'Isolated Entry');
 @define('MEDIA_TARGET_BLANK', 'Popup window (via target=_blank)');
 
+@define('MEDIA_DYN_RESIZE', 'Allow dynamic image resizing?');
+@define('MEDIA_DYN_RESIZE_DESC', 'If enabled, the media selector can return images in any requested size via a GET variable. The results are cached, and thus can create a large filebase if you make intensive use of it.');
+
index 1e3c1f4c528e054dcbd04c297c8819d2a6bd95c3..4f0db464bb4774dcbcf74b7070557fc4bc34ef84 100644 (file)
@@ -1,4 +1,4 @@
-<?php # $Id: serendipity_lang_fi.inc.php 1122 2006-04-19 11:07:47Z garvinhicking $
+<?php # $Id: serendipity_lang_fi.inc.php 1139 2006-04-21 10:56:07Z garvinhicking $
 # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
 # All rights reserved.  See LICENSE file for licensing details
 # Translation by Mauri Sahlberg <mos@iki.fi>
 @define('MEDIA_ENTRY', 'Isolated Entry');
 @define('MEDIA_TARGET_BLANK', 'Popup window (via target=_blank)');
 
+@define('MEDIA_DYN_RESIZE', 'Allow dynamic image resizing?');
+@define('MEDIA_DYN_RESIZE_DESC', 'If enabled, the media selector can return images in any requested size via a GET variable. The results are cached, and thus can create a large filebase if you make intensive use of it.');
+
index 6bc7e2ac01fa17aed3ef9ce12f76011997d1121b..bcf9b7735468320b5efd27aaae66cb9d4db28e4a 100644 (file)
@@ -1,4 +1,4 @@
-<?php # $Id: serendipity_lang_fr.inc.php 1122 2006-04-19 11:07:47Z garvinhicking $
+<?php # $Id: serendipity_lang_fr.inc.php 1139 2006-04-21 10:56:07Z garvinhicking $
 # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
 # All rights reserved.  See LICENSE file for licensing details
 # Translation by Sebastian Mordziol <argh@php-tools.net>
 @define('MEDIA_ENTRY', 'Isolated Entry');
 @define('MEDIA_TARGET_BLANK', 'Popup window (via target=_blank)');
 
+@define('MEDIA_DYN_RESIZE', 'Allow dynamic image resizing?');
+@define('MEDIA_DYN_RESIZE_DESC', 'If enabled, the media selector can return images in any requested size via a GET variable. The results are cached, and thus can create a large filebase if you make intensive use of it.');
+
index 568506f5957b6481958d9861a7014a3200238f86..cb2ab925b1bb167f7e3e0159e0cf2a6d38bb67c5 100644 (file)
 @define('MEDIA_ENTRY', 'Isolated Entry');
 @define('MEDIA_TARGET_BLANK', 'Popup window (via target=_blank)');
 
+@define('MEDIA_DYN_RESIZE', 'Allow dynamic image resizing?');
+@define('MEDIA_DYN_RESIZE_DESC', 'If enabled, the media selector can return images in any requested size via a GET variable. The results are cached, and thus can create a large filebase if you make intensive use of it.');
+
index ae391aa0a721ae0592b283a4bc5770143e438e91..4e09b6557387c893838825f0d1a398bdb2783b74 100644 (file)
@@ -1,4 +1,4 @@
-<?php # $Id: serendipity_lang_is.inc.php 1122 2006-04-19 11:07:47Z garvinhicking $
+<?php # $Id: serendipity_lang_is.inc.php 1139 2006-04-21 10:56:07Z garvinhicking $
 # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
 # All rights reserved.  See LICENSE file for licensing details
 # Translation by Ã–rn Arnarson <orn@arnarson.net>
 @define('MEDIA_ENTRY', 'Isolated Entry');
 @define('MEDIA_TARGET_BLANK', 'Popup window (via target=_blank)');
 
+@define('MEDIA_DYN_RESIZE', 'Allow dynamic image resizing?');
+@define('MEDIA_DYN_RESIZE_DESC', 'If enabled, the media selector can return images in any requested size via a GET variable. The results are cached, and thus can create a large filebase if you make intensive use of it.');
+
index b9ec78d422173d81cb765c2098f669b618950c4f..0969edcac5235ffe5e03e29c2443585448e9439b 100644 (file)
 @define('MEDIA_ENTRY', 'Isolated Entry');
 @define('MEDIA_TARGET_BLANK', 'Popup window (via target=_blank)');
 
+@define('MEDIA_DYN_RESIZE', 'Allow dynamic image resizing?');
+@define('MEDIA_DYN_RESIZE_DESC', 'If enabled, the media selector can return images in any requested size via a GET variable. The results are cached, and thus can create a large filebase if you make intensive use of it.');
+
index fce1ca507395caa0377b68096290640515124165..3937c1ad9c8812f13fd3c2ce92c852cf00788cc8 100644 (file)
@@ -1,4 +1,4 @@
-<?php # $Id: serendipity_lang_ja.inc.php 1122 2006-04-19 11:07:47Z garvinhicking $
+<?php # $Id: serendipity_lang_ja.inc.php 1139 2006-04-21 10:56:07Z garvinhicking $
 # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
 # All rights reserved.  See LICENSE file for licensing details
 # Translation (c) Tadashi Jokagi <elf2000@users.sourceforge.net>, 2004-2005.
 @define('MEDIA_ENTRY', 'Isolated Entry');
 @define('MEDIA_TARGET_BLANK', 'Popup window (via target=_blank)');
 
+@define('MEDIA_DYN_RESIZE', 'Allow dynamic image resizing?');
+@define('MEDIA_DYN_RESIZE_DESC', 'If enabled, the media selector can return images in any requested size via a GET variable. The results are cached, and thus can create a large filebase if you make intensive use of it.');
+
index 2c9769a7ef783ebbe67c4fcca9e1f6fb92b3e0a8..b9df8eec6e9132cc7ebe9649bb9c53863fdb6391 100644 (file)
@@ -1,4 +1,4 @@
-<?php # $Id: serendipity_lang_ko.inc.php 1122 2006-04-19 11:07:47Z garvinhicking $
+<?php # $Id: serendipity_lang_ko.inc.php 1139 2006-04-21 10:56:07Z garvinhicking $
 # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
 # All rights reserved.  See LICENSE file for licensing details
 # Translated by: Wesley Hwang-Chung <wesley96@gmail.com>
 @define('MEDIA_ENTRY', 'Isolated Entry');
 @define('MEDIA_TARGET_BLANK', 'Popup window (via target=_blank)');
 
+@define('MEDIA_DYN_RESIZE', 'Allow dynamic image resizing?');
+@define('MEDIA_DYN_RESIZE_DESC', 'If enabled, the media selector can return images in any requested size via a GET variable. The results are cached, and thus can create a large filebase if you make intensive use of it.');
+
index 4dd82d241d9a5e4d04938d40b39421b6fd4b6e70..54a0686e4b266b3f49b807539fdfff273ed4d717 100644 (file)
@@ -1,4 +1,4 @@
-<?php # $Id: serendipity_lang_nl.inc.php 1122 2006-04-19 11:07:47Z garvinhicking $
+<?php # $Id: serendipity_lang_nl.inc.php 1139 2006-04-21 10:56:07Z garvinhicking $
 # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
 # All rights reserved.  See LICENSE file for licensing details
 # Translation (c) by Christiaan Heerze <webmaster@heimp.nl>
 @define('MEDIA_ENTRY', 'Isolated Entry');
 @define('MEDIA_TARGET_BLANK', 'Popup window (via target=_blank)');
 
+@define('MEDIA_DYN_RESIZE', 'Allow dynamic image resizing?');
+@define('MEDIA_DYN_RESIZE_DESC', 'If enabled, the media selector can return images in any requested size via a GET variable. The results are cached, and thus can create a large filebase if you make intensive use of it.');
+
index b6727a584dab1ed228c5619968728c6aa99c59d4..c409782a32f933b25fa38eb69d80df0445bb3db3 100644 (file)
@@ -1,4 +1,4 @@
-<?php # $Id: serendipity_lang_no.inc.php 1122 2006-04-19 11:07:47Z garvinhicking $
+<?php # $Id: serendipity_lang_no.inc.php 1139 2006-04-21 10:56:07Z garvinhicking $
 # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
 # All rights reserved.  See LICENSE file for licensing details
 # Translation (c) by Jo Christian Oterhals <oterhals@gmail.com>
 @define('MEDIA_ENTRY', 'Isolated Entry');
 @define('MEDIA_TARGET_BLANK', 'Popup window (via target=_blank)');
 
+@define('MEDIA_DYN_RESIZE', 'Allow dynamic image resizing?');
+@define('MEDIA_DYN_RESIZE_DESC', 'If enabled, the media selector can return images in any requested size via a GET variable. The results are cached, and thus can create a large filebase if you make intensive use of it.');
+
index 7476d00c41597bb0c8aa94c82467a7b5180fc48e..49e845f443ee237120b55901d1c34dfa6677a6aa 100644 (file)
@@ -1,4 +1,4 @@
-<?php # $Id: serendipity_lang_pt.inc.php 1122 2006-04-19 11:07:47Z garvinhicking $
+<?php # $Id: serendipity_lang_pt.inc.php 1139 2006-04-21 10:56:07Z garvinhicking $
 # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
 # All rights reserved.  See LICENSE file for licensing details
 # Translation (c) by Agner Olson <agner@agner.net>
 @define('MEDIA_ENTRY', 'Isolated Entry');
 @define('MEDIA_TARGET_BLANK', 'Popup window (via target=_blank)');
 
+@define('MEDIA_DYN_RESIZE', 'Allow dynamic image resizing?');
+@define('MEDIA_DYN_RESIZE_DESC', 'If enabled, the media selector can return images in any requested size via a GET variable. The results are cached, and thus can create a large filebase if you make intensive use of it.');
+
index c850e976f0d47cc3654e82a0f79c54a56527c38b..b8ece4e615c22835337ab925e7816c07e9b79806 100644 (file)
 @define('MEDIA_ENTRY', 'Isolated Entry');
 @define('MEDIA_TARGET_BLANK', 'Popup window (via target=_blank)');
 
+@define('MEDIA_DYN_RESIZE', 'Allow dynamic image resizing?');
+@define('MEDIA_DYN_RESIZE_DESC', 'If enabled, the media selector can return images in any requested size via a GET variable. The results are cached, and thus can create a large filebase if you make intensive use of it.');
+
index ef03ca54c3913912eb569f93f61ce3d92e0d5b56..0a35b06cd97f35d121d2abbe93ed9545029c27ad 100644 (file)
 @define('MEDIA_ENTRY', 'Isolated Entry');
 @define('MEDIA_TARGET_BLANK', 'Popup window (via target=_blank)');
 
+@define('MEDIA_DYN_RESIZE', 'Allow dynamic image resizing?');
+@define('MEDIA_DYN_RESIZE_DESC', 'If enabled, the media selector can return images in any requested size via a GET variable. The results are cached, and thus can create a large filebase if you make intensive use of it.');
+
index 463ba30388b09da279f0fc965604b9fc27bfd385..4f919495ecfada605a7136b9f1514db3f0645826 100644 (file)
@@ -1,4 +1,4 @@
-<?php # $Id: serendipity_lang_ru.inc.php 1122 2006-04-19 11:07:47Z garvinhicking $
+<?php # $Id: serendipity_lang_ru.inc.php 1139 2006-04-21 10:56:07Z garvinhicking $
 # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
 # All rights reserved.  See LICENSE file for licensing details
 # Translation by Nightly <nightly@reys.net>
@@ -866,3 +866,6 @@ $i18n_filename_to   = array('_', 'a', 'A', 'b', 'B', 'v', 'V', 'g', 'G', 'd', 'D
 @define('MEDIA_ENTRY', 'Isolated Entry');
 @define('MEDIA_TARGET_BLANK', 'Popup window (via target=_blank)');
 
+@define('MEDIA_DYN_RESIZE', 'Allow dynamic image resizing?');
+@define('MEDIA_DYN_RESIZE_DESC', 'If enabled, the media selector can return images in any requested size via a GET variable. The results are cached, and thus can create a large filebase if you make intensive use of it.');
+
index cf4d04065669a0178e0c92f10de8d839b9dbf8f7..b3c85dd71c41461a48f0f676ec2fe508ef5b01b7 100644 (file)
 @define('MEDIA_ENTRY', 'Isolated Entry');
 @define('MEDIA_TARGET_BLANK', 'Popup window (via target=_blank)');
 
+@define('MEDIA_DYN_RESIZE', 'Allow dynamic image resizing?');
+@define('MEDIA_DYN_RESIZE_DESC', 'If enabled, the media selector can return images in any requested size via a GET variable. The results are cached, and thus can create a large filebase if you make intensive use of it.');
+
index 21fb2603efcb3f66e5b884404401440d26801524..d5f5ee04221d870f5edb9742927e45bb91228af5 100644 (file)
 @define('MEDIA_ENTRY', 'Isolated Entry');
 @define('MEDIA_TARGET_BLANK', 'Popup window (via target=_blank)');
 
+@define('MEDIA_DYN_RESIZE', 'Allow dynamic image resizing?');
+@define('MEDIA_DYN_RESIZE_DESC', 'If enabled, the media selector can return images in any requested size via a GET variable. The results are cached, and thus can create a large filebase if you make intensive use of it.');
+
index 17b40112f45086e45cb0a95cd47946765d096519..6398b5119905271a8d46b71ad25fdb9f9a316e83 100644 (file)
@@ -1,4 +1,4 @@
-<?php # $Id: serendipity_lang_tn.inc.php 1122 2006-04-19 11:07:47Z garvinhicking $
+<?php # $Id: serendipity_lang_tn.inc.php 1139 2006-04-21 10:56:07Z garvinhicking $
 # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
 # All rights reserved.  See LICENSE file for licensing details
 # Translated by CapriSkye <admin@capriskye.com>
@@ -865,3 +865,6 @@ $i18n_unknown = 'tw';
 @define('MEDIA_ENTRY', 'Isolated Entry');
 @define('MEDIA_TARGET_BLANK', 'Popup window (via target=_blank)');
 
+@define('MEDIA_DYN_RESIZE', 'Allow dynamic image resizing?');
+@define('MEDIA_DYN_RESIZE_DESC', 'If enabled, the media selector can return images in any requested size via a GET variable. The results are cached, and thus can create a large filebase if you make intensive use of it.');
+
index 34d6298b34b112260d799f068719ace79884dd92..f847b2365bbcbd332e49e80c7f566bee6c34b1eb 100644 (file)
 @define('MEDIA_ENTRY', 'Isolated Entry');
 @define('MEDIA_TARGET_BLANK', 'Popup window (via target=_blank)');
 
+@define('MEDIA_DYN_RESIZE', 'Allow dynamic image resizing?');
+@define('MEDIA_DYN_RESIZE_DESC', 'If enabled, the media selector can return images in any requested size via a GET variable. The results are cached, and thus can create a large filebase if you make intensive use of it.');
+
index b84ea92e5cfd45af063e0d78522d9248be17d9ad..11c4794ad0520bad148834a320f2fe1328cc93f5 100644 (file)
@@ -1,4 +1,4 @@
-<?php # $Id: serendipity_lang_tw.inc.php 1122 2006-04-19 11:07:47Z garvinhicking $
+<?php # $Id: serendipity_lang_tw.inc.php 1139 2006-04-21 10:56:07Z garvinhicking $
 # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
 # All rights reserved.  See LICENSE file for licensing details
 # Translated by CapriSkye <admin@capriskye.com>
@@ -865,3 +865,6 @@ $i18n_unknown = 'tw';
 @define('MEDIA_ENTRY', 'Isolated Entry');
 @define('MEDIA_TARGET_BLANK', 'Popup window (via target=_blank)');
 
+@define('MEDIA_DYN_RESIZE', 'Allow dynamic image resizing?');
+@define('MEDIA_DYN_RESIZE_DESC', 'If enabled, the media selector can return images in any requested size via a GET variable. The results are cached, and thus can create a large filebase if you make intensive use of it.');
+
index e21809b82a162160a4ccaef3aebd5377f367d7e3..a21b6400a16497c70ecb1d9ed17d9a1d6821a6d4 100644 (file)
@@ -1,4 +1,4 @@
-<?php # $Id: serendipity_lang_zh.inc.php 1122 2006-04-19 11:07:47Z garvinhicking $
+<?php # $Id: serendipity_lang_zh.inc.php 1139 2006-04-21 10:56:07Z garvinhicking $
 # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
 # All rights reserved.  See LICENSE file for licensing details
 /* vim: set sts=4 ts=4 expandtab : */
 @define('MEDIA_ENTRY', 'Isolated Entry');
 @define('MEDIA_TARGET_BLANK', 'Popup window (via target=_blank)');
 
+@define('MEDIA_DYN_RESIZE', 'Allow dynamic image resizing?');
+@define('MEDIA_DYN_RESIZE_DESC', 'If enabled, the media selector can return images in any requested size via a GET variable. The results are cached, and thus can create a large filebase if you make intensive use of it.');
+
index adc20ba0386f6166f186d58b55530ab2e03878de..a5c57d4b1b37a41b114e521c5b7cdabe01e025dd 100644 (file)
@@ -1,5 +1,3 @@
-@define('MEDIA_TARGET', 'Target for this link');
-@define('MEDIA_TARGET_JS', 'Popup window (via JavaScript, adaptive size)');
-@define('MEDIA_ENTRY', 'Isolated Entry');
-@define('MEDIA_TARGET_BLANK', 'Popup window (via target=_blank)');
+@define('MEDIA_DYN_RESIZE', 'Allow dynamic image resizing?');
+@define('MEDIA_DYN_RESIZE_DESC', 'If enabled, the media selector can return images in any requested size via a GET variable. The results are cached, and thus can create a large filebase if you make intensive use of it.');
 
index 4b87c0678487469b5cfc34dabf09a27075129f94..43b8fe8c631229e504978a82f5de0dae01f8f548 100644 (file)
@@ -138,3 +138,6 @@ foreach($const['missing'] AS $file => $constants) {
 @define('MEDIA_ENTRY', 'Isolated Entry');
 @define('MEDIA_TARGET_BLANK', 'Popup window (via target=_blank)');
 
+@define('MEDIA_DYN_RESIZE', 'Allow dynamic image resizing?');
+@define('MEDIA_DYN_RESIZE_DESC', 'If enabled, the media selector can return images in any requested size via a GET variable. The results are cached, and thus can create a large filebase if you make intensive use of it.');
+
index 497867ecad6b87aadf86b33c87568435eb095f7a..ebb90d7356131399d0cea71ba579136556b4535f 100644 (file)
 @define('MEDIA_ENTRY', 'Isolated Entry');
 @define('MEDIA_TARGET_BLANK', 'Popup window (via target=_blank)');
 
+@define('MEDIA_DYN_RESIZE', 'Allow dynamic image resizing?');
+@define('MEDIA_DYN_RESIZE_DESC', 'If enabled, the media selector can return images in any requested size via a GET variable. The results are cached, and thus can create a large filebase if you make intensive use of it.');
+
index 881470823c0bdb5a1c608ce3781cd3103ddeb1d0..c7b1c4493680b9cb97217033900eb9e46eec5b2f 100644 (file)
 @define('MEDIA_ENTRY', 'Isolated Entry');
 @define('MEDIA_TARGET_BLANK', 'Popup window (via target=_blank)');
 
+@define('MEDIA_DYN_RESIZE', 'Allow dynamic image resizing?');
+@define('MEDIA_DYN_RESIZE_DESC', 'If enabled, the media selector can return images in any requested size via a GET variable. The results are cached, and thus can create a large filebase if you make intensive use of it.');
+
index a7fc7e32b289159c17827d7f97af024795264fc3..04a40063858e8e44406a8c94bd229da5b27ad6d9 100644 (file)
 @define('MEDIA_ENTRY', 'Isolated Entry');
 @define('MEDIA_TARGET_BLANK', 'Popup window (via target=_blank)');
 
+@define('MEDIA_DYN_RESIZE', 'Allow dynamic image resizing?');
+@define('MEDIA_DYN_RESIZE_DESC', 'If enabled, the media selector can return images in any requested size via a GET variable. The results are cached, and thus can create a large filebase if you make intensive use of it.');
+
index fb09c233d7544d99d36da172211ddbe64d722cf0..465868a2da784c5be5382eaf1bdbc80d0445c4e3 100644 (file)
 @define('MEDIA_ENTRY', 'Isolated Entry');
 @define('MEDIA_TARGET_BLANK', 'Popup window (via target=_blank)');
 
+@define('MEDIA_DYN_RESIZE', 'Allow dynamic image resizing?');
+@define('MEDIA_DYN_RESIZE_DESC', 'If enabled, the media selector can return images in any requested size via a GET variable. The results are cached, and thus can create a large filebase if you make intensive use of it.');
+
index 17698498e822d4203b328b41ff476c05ac3768fe..f31c818c014858399ccfeb1e6395ff3ce0bc5835 100644 (file)
 @define('MEDIA_ENTRY', 'Isolated Entry');
 @define('MEDIA_TARGET_BLANK', 'Popup window (via target=_blank)');
 
+@define('MEDIA_DYN_RESIZE', 'Allow dynamic image resizing?');
+@define('MEDIA_DYN_RESIZE_DESC', 'If enabled, the media selector can return images in any requested size via a GET variable. The results are cached, and thus can create a large filebase if you make intensive use of it.');
+
index 9949345334ffc126ac8f24a9adba59d3ea7a54d5..2bc1c8f2035c7fb5a4018f7a385dfef5dceb56df 100644 (file)
 @define('MEDIA_ENTRY', 'Isolated Entry');
 @define('MEDIA_TARGET_BLANK', 'Popup window (via target=_blank)');
 
+@define('MEDIA_DYN_RESIZE', 'Allow dynamic image resizing?');
+@define('MEDIA_DYN_RESIZE_DESC', 'If enabled, the media selector can return images in any requested size via a GET variable. The results are cached, and thus can create a large filebase if you make intensive use of it.');
+
index 35ba0bb9480d1cf0e9058e23c3ee28c94cadb06e..64c7dcde240d592eeb89ff2b52c534d9167ec83f 100644 (file)
 @define('MEDIA_ENTRY', 'Isolated Entry');
 @define('MEDIA_TARGET_BLANK', 'Popup window (via target=_blank)');
 
+@define('MEDIA_DYN_RESIZE', 'Allow dynamic image resizing?');
+@define('MEDIA_DYN_RESIZE_DESC', 'If enabled, the media selector can return images in any requested size via a GET variable. The results are cached, and thus can create a large filebase if you make intensive use of it.');
+
index cb49967b9b700dfc9711e463175a5f40ac0b941b..d314bd73a3ece2bca3dc1e4f0de2f668281f636b 100644 (file)
@@ -880,3 +880,6 @@ Melvin TODO [20060128]: What spanish word do we use for "referrers" ??
 @define('MEDIA_ENTRY', 'Isolated Entry');
 @define('MEDIA_TARGET_BLANK', 'Popup window (via target=_blank)');
 
+@define('MEDIA_DYN_RESIZE', 'Allow dynamic image resizing?');
+@define('MEDIA_DYN_RESIZE_DESC', 'If enabled, the media selector can return images in any requested size via a GET variable. The results are cached, and thus can create a large filebase if you make intensive use of it.');
+
index b2e68bec72c366c481a3955c208f28f5072107dc..f2a665dbf61866e2b69d8ca5952035d4d7a543db 100644 (file)
 @define('MEDIA_ENTRY', 'Isolated Entry');
 @define('MEDIA_TARGET_BLANK', 'Popup window (via target=_blank)');
 
+@define('MEDIA_DYN_RESIZE', 'Allow dynamic image resizing?');
+@define('MEDIA_DYN_RESIZE_DESC', 'If enabled, the media selector can return images in any requested size via a GET variable. The results are cached, and thus can create a large filebase if you make intensive use of it.');
+
index 1e57a0eae3a9134a8bbd5dc5a156d1eaaccc5a52..6c6f5b8057853cfad19a8c6e1781151ee63743ac 100644 (file)
 @define('MEDIA_ENTRY', 'Isolated Entry');
 @define('MEDIA_TARGET_BLANK', 'Popup window (via target=_blank)');
 
+@define('MEDIA_DYN_RESIZE', 'Allow dynamic image resizing?');
+@define('MEDIA_DYN_RESIZE_DESC', 'If enabled, the media selector can return images in any requested size via a GET variable. The results are cached, and thus can create a large filebase if you make intensive use of it.');
+
index c86f2912bcc162d7b1f3030756e950a604f4751b..bf9dc704aa31027c13a897f13a111a158fddec27 100644 (file)
 @define('MEDIA_ENTRY', 'Isolated Entry');
 @define('MEDIA_TARGET_BLANK', 'Popup window (via target=_blank)');
 
+@define('MEDIA_DYN_RESIZE', 'Allow dynamic image resizing?');
+@define('MEDIA_DYN_RESIZE_DESC', 'If enabled, the media selector can return images in any requested size via a GET variable. The results are cached, and thus can create a large filebase if you make intensive use of it.');
+
index 6b3ddf03b7629939faf5dd7e7d5616c61ecba563..99ffe595795923670437a6255aa3129149c332ae 100644 (file)
 @define('MEDIA_ENTRY', 'Isolated Entry');
 @define('MEDIA_TARGET_BLANK', 'Popup window (via target=_blank)');
 
+@define('MEDIA_DYN_RESIZE', 'Allow dynamic image resizing?');
+@define('MEDIA_DYN_RESIZE_DESC', 'If enabled, the media selector can return images in any requested size via a GET variable. The results are cached, and thus can create a large filebase if you make intensive use of it.');
+
index e02a3a28554696be5ea6e45d8060afc1335ff23b..96b9773548e9923a8e18dccdc57970b00b57e350 100644 (file)
 @define('MEDIA_ENTRY', 'Isolated Entry');
 @define('MEDIA_TARGET_BLANK', 'Popup window (via target=_blank)');
 
+@define('MEDIA_DYN_RESIZE', 'Allow dynamic image resizing?');
+@define('MEDIA_DYN_RESIZE_DESC', 'If enabled, the media selector can return images in any requested size via a GET variable. The results are cached, and thus can create a large filebase if you make intensive use of it.');
+
index aa8e1bad8ed37fe9c7afe35b2f8805566ccd82ba..338a0f1a4b90064bc613dccc00273d74262565e5 100644 (file)
 @define('MEDIA_ENTRY', 'Isolated Entry');
 @define('MEDIA_TARGET_BLANK', 'Popup window (via target=_blank)');
 
+@define('MEDIA_DYN_RESIZE', 'Allow dynamic image resizing?');
+@define('MEDIA_DYN_RESIZE_DESC', 'If enabled, the media selector can return images in any requested size via a GET variable. The results are cached, and thus can create a large filebase if you make intensive use of it.');
+
index 7d889a56f50649cfd2b9b6bc534e129fda962b72..595fc7e4bb1896662238040bdcc7180c96b7f21d 100644 (file)
 @define('MEDIA_ENTRY', 'Isolated Entry');
 @define('MEDIA_TARGET_BLANK', 'Popup window (via target=_blank)');
 
+@define('MEDIA_DYN_RESIZE', 'Allow dynamic image resizing?');
+@define('MEDIA_DYN_RESIZE_DESC', 'If enabled, the media selector can return images in any requested size via a GET variable. The results are cached, and thus can create a large filebase if you make intensive use of it.');
+
index 300ad4a0c22ac4af81dbd1331c89d0637a1af732..e541fb12d8931b5266a6be898ec396412946e879 100644 (file)
 @define('MEDIA_ENTRY', 'Isolated Entry');
 @define('MEDIA_TARGET_BLANK', 'Popup window (via target=_blank)');
 
+@define('MEDIA_DYN_RESIZE', 'Allow dynamic image resizing?');
+@define('MEDIA_DYN_RESIZE_DESC', 'If enabled, the media selector can return images in any requested size via a GET variable. The results are cached, and thus can create a large filebase if you make intensive use of it.');
+
index 8e5898299f0d2d5e6814060db882ac6cc7003ae6..106dc66122e0ee9d59a4ac7551d7037dc69ce9d2 100644 (file)
 @define('MEDIA_ENTRY', 'Isolated Entry');
 @define('MEDIA_TARGET_BLANK', 'Popup window (via target=_blank)');
 
+@define('MEDIA_DYN_RESIZE', 'Allow dynamic image resizing?');
+@define('MEDIA_DYN_RESIZE_DESC', 'If enabled, the media selector can return images in any requested size via a GET variable. The results are cached, and thus can create a large filebase if you make intensive use of it.');
+
index 79fd0c5475d93b392f1c20cab0809f528607e3bf..35883f5987e60cc679be45870315c610be3ef5ce 100644 (file)
 @define('MEDIA_ENTRY', 'Isolated Entry');
 @define('MEDIA_TARGET_BLANK', 'Popup window (via target=_blank)');
 
+@define('MEDIA_DYN_RESIZE', 'Allow dynamic image resizing?');
+@define('MEDIA_DYN_RESIZE_DESC', 'If enabled, the media selector can return images in any requested size via a GET variable. The results are cached, and thus can create a large filebase if you make intensive use of it.');
+
index ab4961b37fdf8d6618bd6037f620bf315590a2dd..0c03a544dd4e76698731dbdfe232ef626fd60671 100644 (file)
 @define('MEDIA_ENTRY', 'Isolated Entry');
 @define('MEDIA_TARGET_BLANK', 'Popup window (via target=_blank)');
 
+@define('MEDIA_DYN_RESIZE', 'Allow dynamic image resizing?');
+@define('MEDIA_DYN_RESIZE_DESC', 'If enabled, the media selector can return images in any requested size via a GET variable. The results are cached, and thus can create a large filebase if you make intensive use of it.');
+
index b6558400c644b2cda7f4e53bb96c1fea03b95bcb..ebd7f2026f29f092c7316c054cf8b7c64d7f9a96 100644 (file)
 @define('MEDIA_ENTRY', 'Isolated Entry');
 @define('MEDIA_TARGET_BLANK', 'Popup window (via target=_blank)');
 
+@define('MEDIA_DYN_RESIZE', 'Allow dynamic image resizing?');
+@define('MEDIA_DYN_RESIZE_DESC', 'If enabled, the media selector can return images in any requested size via a GET variable. The results are cached, and thus can create a large filebase if you make intensive use of it.');
+
index ef03ca54c3913912eb569f93f61ce3d92e0d5b56..0a35b06cd97f35d121d2abbe93ed9545029c27ad 100644 (file)
 @define('MEDIA_ENTRY', 'Isolated Entry');
 @define('MEDIA_TARGET_BLANK', 'Popup window (via target=_blank)');
 
+@define('MEDIA_DYN_RESIZE', 'Allow dynamic image resizing?');
+@define('MEDIA_DYN_RESIZE_DESC', 'If enabled, the media selector can return images in any requested size via a GET variable. The results are cached, and thus can create a large filebase if you make intensive use of it.');
+
index 0ded5b801f2c47470c9d393b7ef12860d1b3bb1b..da5f43acd40d55202be76c1cfe996325b2729506 100644 (file)
@@ -866,3 +866,6 @@ $i18n_filename_to   = array('_', 'a', 'A', 'b', 'B', 'v', 'V', 'g', 'G', 'd', 'D
 @define('MEDIA_ENTRY', 'Isolated Entry');
 @define('MEDIA_TARGET_BLANK', 'Popup window (via target=_blank)');
 
+@define('MEDIA_DYN_RESIZE', 'Allow dynamic image resizing?');
+@define('MEDIA_DYN_RESIZE_DESC', 'If enabled, the media selector can return images in any requested size via a GET variable. The results are cached, and thus can create a large filebase if you make intensive use of it.');
+
index ca67be787e9af9dc75277f809295156f96e164bd..8b1b52982ea29e007f026e2a74342a732509436a 100644 (file)
 @define('MEDIA_ENTRY', 'Isolated Entry');
 @define('MEDIA_TARGET_BLANK', 'Popup window (via target=_blank)');
 
+@define('MEDIA_DYN_RESIZE', 'Allow dynamic image resizing?');
+@define('MEDIA_DYN_RESIZE_DESC', 'If enabled, the media selector can return images in any requested size via a GET variable. The results are cached, and thus can create a large filebase if you make intensive use of it.');
+
index 21fb2603efcb3f66e5b884404401440d26801524..d5f5ee04221d870f5edb9742927e45bb91228af5 100644 (file)
 @define('MEDIA_ENTRY', 'Isolated Entry');
 @define('MEDIA_TARGET_BLANK', 'Popup window (via target=_blank)');
 
+@define('MEDIA_DYN_RESIZE', 'Allow dynamic image resizing?');
+@define('MEDIA_DYN_RESIZE_DESC', 'If enabled, the media selector can return images in any requested size via a GET variable. The results are cached, and thus can create a large filebase if you make intensive use of it.');
+
index 224cb66843553aec3f24e71d02d82bf51c1ec5e6..f8de0b0db56916fbe5a1ccbf7b0542364e0f553b 100644 (file)
@@ -865,3 +865,6 @@ $i18n_unknown = 'tw';
 @define('MEDIA_ENTRY', 'Isolated Entry');
 @define('MEDIA_TARGET_BLANK', 'Popup window (via target=_blank)');
 
+@define('MEDIA_DYN_RESIZE', 'Allow dynamic image resizing?');
+@define('MEDIA_DYN_RESIZE_DESC', 'If enabled, the media selector can return images in any requested size via a GET variable. The results are cached, and thus can create a large filebase if you make intensive use of it.');
+
index 34d6298b34b112260d799f068719ace79884dd92..f847b2365bbcbd332e49e80c7f566bee6c34b1eb 100644 (file)
 @define('MEDIA_ENTRY', 'Isolated Entry');
 @define('MEDIA_TARGET_BLANK', 'Popup window (via target=_blank)');
 
+@define('MEDIA_DYN_RESIZE', 'Allow dynamic image resizing?');
+@define('MEDIA_DYN_RESIZE_DESC', 'If enabled, the media selector can return images in any requested size via a GET variable. The results are cached, and thus can create a large filebase if you make intensive use of it.');
+
index 7ed95cb6d4a5f0820375963f5d618165d5b7b6a5..7c426edb52946a6fc2422a58963a1838145f7957 100644 (file)
@@ -865,3 +865,6 @@ $i18n_unknown = 'tw';
 @define('MEDIA_ENTRY', 'Isolated Entry');
 @define('MEDIA_TARGET_BLANK', 'Popup window (via target=_blank)');
 
+@define('MEDIA_DYN_RESIZE', 'Allow dynamic image resizing?');
+@define('MEDIA_DYN_RESIZE_DESC', 'If enabled, the media selector can return images in any requested size via a GET variable. The results are cached, and thus can create a large filebase if you make intensive use of it.');
+
index 46248dea729c3c7b4f57c487da25428778d378a9..ddefb4a8b06df78d27384ee2f5c8d9305637d6a7 100644 (file)
 @define('MEDIA_ENTRY', 'Isolated Entry');
 @define('MEDIA_TARGET_BLANK', 'Popup window (via target=_blank)');
 
+@define('MEDIA_DYN_RESIZE', 'Allow dynamic image resizing?');
+@define('MEDIA_DYN_RESIZE_DESC', 'If enabled, the media selector can return images in any requested size via a GET variable. The results are cached, and thus can create a large filebase if you make intensive use of it.');
+
index 545de7ec3f51c7c0eca25d3edad07a45b0e1b92e..f9bc64dc5b2cb4bcf1d344f4aef229e80e198273 100644 (file)
@@ -113,7 +113,7 @@ class serendipity_event_trackexits extends serendipity_event
                     if (empty($serendipity['encodeExitsCallback_entry_id'])) {
                         $this->links = array();
                     } else {
-                        $this->links = serendipity_db_query("SELECT id, link FROM {$serendipity['dbPrefix']}references WHERE entry_id = {$serendipity['encodeExitsCallback_entry_id']}", false, 'both', false, 'link', 'id');
+                        $this->links = serendipity_db_query("SELECT id, link FROM {$serendipity['dbPrefix']}references WHERE entry_id = {$serendipity['encodeExitsCallback_entry_id']} AND type = ''", false, 'both', false, 'link', 'id');
                     }
 
                     foreach ($this->markup_elements as $temp) {
@@ -191,7 +191,7 @@ class serendipity_event_trackexits extends serendipity_event
         $is_out   = (stristr($buffer[0], 'onmouseout=')  !== false ? true : false);
 
         $link     = '<a%shref="%sexit.php?url%s=%s%s" ' . (!$is_title ? 'title="%s" ' : '%s') . (!$is_over ? ' onmouseover="window.status=\'%s\';return true;" ' : '%s') . (!$is_out ? 'onmouseout="window.status=\'\';return true;"' : '') . '%s>';
-        
+
         if (is_array($this->links) && !empty($this->links[$url])) {
             return sprintf(
                 $link,
index f619c826ce44ea785a419873d95e682f763b1b64..02225cf2b93083d9ad42dc1779764b7ba089a318 100644 (file)
@@ -141,7 +141,7 @@ class serendipity_plugin_entrylinks extends serendipity_plugin
             }
         }
 
-        $references = serendipity_db_query("SELECT link, max(name) as name FROM {$serendipity['dbPrefix']}references WHERE entry_id = " . $id . " GROUP BY link");
+        $references = serendipity_db_query("SELECT link, max(name) as name FROM {$serendipity['dbPrefix']}references WHERE entry_id = " . $id . " AND type = '' GROUP BY link");
         if (is_array($references)) {
             $links = '<ul style="margin: 5px; padding: 10px; text-align: left">';
             foreach($references AS $key => $row) {
index 1eb602fe760e82265effcaa5fcdba5c873b45380..48fbefb7c70d2d6dcd4fc86b1bd4e06c2c530d70 100644 (file)
@@ -165,6 +165,11 @@ switch ($serendipity['GET']['step']) {
         break;
 
     case 'showItem':
+        serendipity_plugin_api::hook_event('frontend_media_showitem_init', $media);
+
+        if ($media['perm_denied']) {
+            break;
+        }
         $media['case'] = 'showitem';
         $file          = serendipity_fetchImageFromDatabase((int)$serendipity['GET']['image']);
         $media['file'] = &$file;
@@ -177,6 +182,77 @@ switch ($serendipity['GET']['step']) {
 
         serendipity_prepareMedia($file);
 
+        $showfile = null;
+        if (($serendipity['GET']['resizeWidth'] || $serendipity['GET']['resizeHeight']) && $serendipity['dynamicResize'] && $media['file']['is_image']) {
+            $width  = (int)$serendipity['GET']['resizeWidth'];
+            $height = (int)$serendipity['GET']['resizeHeight'];
+            if (empty($width)) {
+                $width = NULL;
+            }
+            if (empty($height)) {
+                $height = NULL;
+            }
+
+            $showfile = $serendipity['serendipityPath'] . PATH_SMARTY_COMPILE . '/mediacache/cache_img' . (int)$serendipity['GET']['image'] . '_' . $width . '_' . $height;
+
+            if (!file_exists($cachefile)) {
+                serendipity_makeThumbnail(
+                    $media['file']['realname'],
+                    $media['file']['path'],
+                    array(
+                        'width'  => $width,
+                        'height' => $height
+                    ),
+                    $showfile,
+                    true
+                );
+            }
+        }
+
+        $hit = serendipity_db_query("SELECT id
+                                       FROM {$serendipity['dbPrefix']}references
+                                      WHERE link = '" . serendipity_db_escape_string($_SERVER['HTTP_REFERER']) . "'
+                                        AND entry_id = " . (int)$serendipity['GET']['image'] . "
+                                        AND type = 'media'", true, 'assoc');
+        if (!is_array($hit) || !isset($hit['id'])) {
+            serendipity_db_query("INSERT INTO {$serendipity['dbPrefix']}references
+                                              (entry_id, link, name, type)
+                                       VALUES (" . (int)$serendipity['GET']['image'] . ", '" . serendipity_db_escape_string($_SERVER['HTTP_REFERER']) . "', 1, 'media')");
+        } else {
+            serendipity_db_query("UPDATE {$serendipity['dbPrefix']}references
+                                     SET name = name + 1
+                                   WHERE id   = " . (int)$hit['id']);
+        }
+
+        $curl = ($_SERVER['HTTPS'] == 'on' ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'] . ($_SERVER['HTTP_PORT'] != 80 ? ':' . $_SERVER['HTTP_PORT'] : '');
+        switch($serendipity['GET']['show']) {
+            case 'redirect':
+                header('Location: ' . $curl . $file['links']['imagelinkurl']);
+                exit;
+                break;
+
+            case 'redirectThumb':
+                header('Location: ' . $curl . $file['show_thumb']);
+                exit;
+                break;
+
+            case 'full':
+                $showfile = $file['realfile'];
+                break;
+
+            case 'thumb':
+                $showfile = $file['location'];
+                break;
+        }
+
+        if (!empty($showfile) && file_exists($showfile)) {
+            header('Content-Type: ' . $file['displaymime']);
+            header('Content-Length: ' . filesize($showfile));
+            $fp = fopen($showfile, 'rb');
+            fpassthru($fp);
+            exit;
+        }
+
         $media['file']['props'] =& serendipity_fetchMediaProperties((int)$serendipity['GET']['image']);
         serendipity_plugin_api::hook_event('media_getproperties_cached', $media['file']['props']['base_metadata'], $media['file']['realfile']);
 
index d34a30797e19275cd846678f8dbf40cb201b9609..0a1135399dc79fbe00fa8677b2eb17fca9c93f40 100644 (file)
         {/foreach}
         </dl>
         </div>
+
+        {if $file.references}
+        <h3>{$CONST.REFERER}</h3>
+        <ul>
+        {foreach from=$file.references item="ref"}
+        <li>({$ref.name|@escape}) <a rel="nofollow" href="{$ref.link|@escape}">{$ref.link|@default:$CONST.NONE|@escape}</a></li>
+        {/foreach}
+        </ul>
+        {/if}
     {/if}
 
     {if $media.enclose AND (($smarty.foreach.mediafiles.iteration % $media.lineBreak) == 0)}
index 606d952c6c74b09bb96f1e282fd9aa00d83c1dd5..eafbaa7fb10e792cc90aa8f09da2f390c9bf3f02 100644 (file)
                 </dl>
                 </div>
                 {/if}
+
+                {if $media.file.references}
+                <h3>{$CONST.REFERER}</h3>
+                <ul>
+                {foreach from=$media.file.references item="ref"}
+                <li>({$ref.name|@escape}) <a rel="nofollow" href="{$ref.link|@escape}">{$ref.link|@default:$CONST.NONE|@escape}</a></li>
+                {/foreach}
+                </ul>
+                {/if}
             </div>
         </div>
     </div>