Browse Source

Bug fix from images

pecesama 17 years ago
parent
commit
22e1dd3387
1 changed files with 5 additions and 6 deletions
  1. 5 6
      index.php

+ 5 - 6
index.php View File

121
                                                 
121
                                                 
122
                                                 $x = @getimagesize($fileName);                                          
122
                                                 $x = @getimagesize($fileName);                                          
123
                                                 if ($x[0] > 500) {                                                      
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
                                                 $input = array("{Date_Added}", "{Permalink}", "{PhotoURL}", "{PhotoAlt}", "{Caption}", "{Effect}", "{URL_Tumble}");
131
                                                 $input = array("{Date_Added}", "{Permalink}", "{PhotoURL}", "{PhotoAlt}", "{Caption}", "{Effect}", "{URL_Tumble}");
132
                                                 $output = array($formatedDate, $permalink, $photoPath, strip_tags($register["description"]), $register["description"], $effect, $conf->urlGelato);
132
                                                 $output = array($formatedDate, $permalink, $photoPath, strip_tags($register["description"]), $register["description"], $effect, $conf->urlGelato);
213
                                 if ($x[0] > 500) {                                      
213
                                 if ($x[0] > 500) {                                      
214
                                         $photoPath = $conf->urlGelato."/classes/imgsize.php?w=500&img=".$register["url"];
214
                                         $photoPath = $conf->urlGelato."/classes/imgsize.php?w=500&img=".$register["url"];
215
                                 } else {
215
                                 } else {
216
-                                        //$photoPath = $register["url"];
217
 										$photoPath = str_replace("../", $conf->urlGelato."/", $register["url"]);
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
                                 $input = array("{Date_Added}", "{Permalink}", "{PhotoURL}", "{PhotoAlt}", "{Caption}", "{Effect}", "{URL_Tumble}");
221
                                 $input = array("{Date_Added}", "{Permalink}", "{PhotoURL}", "{PhotoAlt}", "{Caption}", "{Effect}", "{URL_Tumble}");
223
                                 $output = array($formatedDate, $permalink, $photoPath, strip_tags($register["description"]), $register["description"], $effect, $conf->urlGelato);
222
                                 $output = array($formatedDate, $permalink, $photoPath, strip_tags($register["description"]), $register["description"], $effect, $conf->urlGelato);