Mercurial > hg > mgallery
comparison mgallery.php @ 151:4e25150aa868
Change js_path configuration setting to js_file.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 06 Sep 2017 17:34:36 +0300 |
parents | 28a2b6e6b527 |
children | 606b05c31d5e |
comparison
equal
deleted
inserted
replaced
150:28a2b6e6b527 | 151:4e25150aa868 |
---|---|
101 } | 101 } |
102 | 102 |
103 | 103 |
104 function mgPrintPageHeader($pageTitle, $pageExtra = "") | 104 function mgPrintPageHeader($pageTitle, $pageExtra = "") |
105 { | 105 { |
106 global $pageCSS, $pageCharset, $pageUrchin, $pageJSPath; | 106 global $pageCSS, $pageCharset, $pageUrchin, $pageJSFile; |
107 | 107 |
108 echo | 108 echo |
109 "<!DOCTYPE html>\n". | 109 "<!DOCTYPE html>\n". |
110 "<html>\n". | 110 "<html>\n". |
111 "<head>\n". | 111 "<head>\n". |
112 " <meta charset=\"".$pageCharset."\">\n". | 112 " <meta charset=\"".$pageCharset."\">\n". |
113 " <meta http-equiv=\"Content-type\" content=\"text/html;charset=".$pageCharset."\">\n". | 113 " <meta http-equiv=\"Content-type\" content=\"text/html;charset=".$pageCharset."\">\n". |
114 " <script type=\"text/javascript\" src=\"".$pageJSPath."mgallery.js\"></script>\n". | 114 " <script type=\"text/javascript\" src=\"".$pageJSFile."\"></script>\n". |
115 " <title>".strip_tags($pageTitle)."</title>\n". | 115 " <title>".strip_tags($pageTitle)."</title>\n". |
116 $pageExtra; | 116 $pageExtra; |
117 | 117 |
118 if (is_array($pageCSS)) | 118 if (is_array($pageCSS)) |
119 { | 119 { |
176 $galBaseURL.mgGetSetting("mgallery_php")."?path=". | 176 $galBaseURL.mgGetSetting("mgallery_php")."?path=". |
177 $path.($image !== FALSE ? $amp."image=".$image : ""); | 177 $path.($image !== FALSE ? $amp."image=".$image : ""); |
178 } | 178 } |
179 | 179 |
180 return str_replace("//", "/", $url); | 180 return str_replace("//", "/", $url); |
181 } | |
182 | |
183 | |
184 function mgGetLanguageSelector() | |
185 { | |
186 global $pageLang, $pageLanguages; | |
187 if (isset($pageLanguages) && count($pageLanguages) > 0) | |
188 { | |
189 $str = "<div id=\"languages\">"; | |
190 foreach ($pageLanguages as $id => $lang) | |
191 $str .= "<a class=\"lang_".$id."\" href=\"?lang=".$id."\">".$lang."</a>"; | |
192 return $str."</div>\n"; | |
193 } | |
194 else | |
195 return ""; | |
196 } | 181 } |
197 | 182 |
198 | 183 |
199 function mgGetNaviActive(&$galIndex, $index, $delta, &$res, &$url, $entities) | 184 function mgGetNaviActive(&$galIndex, $index, $delta, &$res, &$url, $entities) |
200 { | 185 { |
387 } | 372 } |
388 | 373 |
389 | 374 |
390 function mgGetPageInfoHeaderEnd() | 375 function mgGetPageInfoHeaderEnd() |
391 { | 376 { |
392 return mgGetLanguageSelector()."</div>"; | 377 global $pageLang, $pageLanguages; |
378 | |
379 $str = "<div id=\"languages\">"; | |
380 | |
381 if (isset($pageLanguages) && is_array($pageLanguages)) | |
382 { | |
383 foreach ($pageLanguages as $id => $lang) | |
384 $str .= "<a class=\"lang_".$id."\" href=\"?lang=".$id."\">".$lang."</a>"; | |
385 } | |
386 | |
387 return $str."</div></div>"; | |
393 } | 388 } |
394 | 389 |
395 | 390 |
396 function mgGetPageInfoFooter() | 391 function mgGetPageInfoFooter() |
397 { | 392 { |
454 // Read and process gallery settings | 449 // Read and process gallery settings |
455 // | 450 // |
456 mgReadSettings(); | 451 mgReadSettings(); |
457 | 452 |
458 $pageCSS = mgGetSetting("css"); | 453 $pageCSS = mgGetSetting("css"); |
459 $pageJSPath = mgGetSetting("js_path"); | 454 $pageJSFile = mgGetSetting("js_file"); |
460 $pageUrchin = mgGetSetting("urchin_file"); | 455 $pageUrchin = mgGetSetting("urchin_file"); |
461 $galBasePath = mgGetSetting("base_path"); | 456 $galBasePath = mgGetSetting("base_path"); |
462 $galBaseURL = mgGetSetting("base_url"); | 457 $galBaseURL = mgGetSetting("base_url"); |
463 $galImageURL = mgGetSetting("image_url", mgGetSetting("base_url")); | 458 $galImageURL = mgGetSetting("image_url", mgGetSetting("base_url")); |
464 | 459 |