ソースを参照

Bug fix from images

pecesama 16 年 前
コミット
22e1dd3387
共有1 個のファイルを変更した5 個の追加6 個の削除を含む
  1. 5 6
      index.php

+ 5 - 6
index.php ファイルの表示

@@ -121,12 +121,12 @@
121 121
                                                 
122 122
                                                 $x = @getimagesize($fileName);                                          
123 123
                                                 if ($x[0] > 500) {                                                      
124
-                                                        $photoPath = $conf->urlGelato."/classes/imgsize.php?w=500&img=".$register["url"];
125
-                                                } else {
126
-                                                        $photoPath = $register["url"];
124
+													$photoPath = $conf->urlGelato."/classes/imgsize.php?w=500&img=".$register["url"];
125
+                                                } else {													
126
+													$photoPath = str_replace("../", $conf->urlGelato."/", $register["url"]);
127 127
                                                 }
128 128
                                                 
129
-                                                $effect = " onclick=\"Lightbox.show('".$register["url"]."', '".strip_tags($register["description"])."');\" ";
129
+                                                $effect = " onclick=\"Lightbox.show('".str_replace("../", $conf->urlGelato."/", $register["url"])."', '".strip_tags($register["description"])."');\" ";
130 130
                                                 
131 131
                                                 $input = array("{Date_Added}", "{Permalink}", "{PhotoURL}", "{PhotoAlt}", "{Caption}", "{Effect}", "{URL_Tumble}");
132 132
                                                 $output = array($formatedDate, $permalink, $photoPath, strip_tags($register["description"]), $register["description"], $effect, $conf->urlGelato);
@@ -213,11 +213,10 @@
213 213
                                 if ($x[0] > 500) {                                      
214 214
                                         $photoPath = $conf->urlGelato."/classes/imgsize.php?w=500&img=".$register["url"];
215 215
                                 } else {
216
-                                        //$photoPath = $register["url"];
217 216
 										$photoPath = str_replace("../", $conf->urlGelato."/", $register["url"]);
218 217
                                 }
219 218
                                 
220
-                                $effect = " onclick=\"Lightbox.show('".$register["url"]."', '".strip_tags($register["description"])."');\" ";
219
+                                $effect = " onclick=\"Lightbox.show('".str_replace("../", $conf->urlGelato."/", $register["url"])."', '".strip_tags($register["description"])."');\" ";
221 220
                                                 
222 221
                                 $input = array("{Date_Added}", "{Permalink}", "{PhotoURL}", "{PhotoAlt}", "{Caption}", "{Effect}", "{URL_Tumble}");
223 222
                                 $output = array($formatedDate, $permalink, $photoPath, strip_tags($register["description"]), $register["description"], $effect, $conf->urlGelato);