Skip to content

Instantly share code, notes, and snippets.

@pfactum
Created July 24, 2012 12:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pfactum/3169666 to your computer and use it in GitHub Desktop.
Save pfactum/3169666 to your computer and use it in GitHub Desktop.
MiniGal Nano improvements
diff -Naur MiniGal Nano 0.3.5/config.php mgnew/config.php
--- MiniGal Nano 0.3.5/config.php 2010-12-06 11:43:00.000000000 +0200
+++ mgnew/config.php 2012-07-22 18:34:10.000000000 +0300
@@ -16,28 +16,28 @@
*/
// EDIT SETTINGS BELOW TO CUSTOMIZE YOUR GALLERY
-$thumbs_pr_page = "28"; //Number of thumbnails on a single page
-$gallery_width = "900px"; //Gallery width. Eg: "500px" or "70%"
+$thumbs_pr_page = "21"; //Number of thumbnails on a single page
+$gallery_width = "90%"; //Gallery width. Eg: "500px" or "70%"
$backgroundcolor = "white"; //This provides a quick way to change your gallerys background to suit your website. Use either main colors like "black", "white", "yellow" etc. Or HEX colors, eg. "#AAAAAA"
$templatefile = "mano"; //Template filename (must be placed in 'templates' folder)
$folder_color = "black"; // Color of folder icons: blue / black / vista / purple / green / grey
-$sorting_folders = "name"; // Sort folders by: [name][date]
+$sorting_folders = "date"; // Sort folders by: [name][date]
$sorting_files = "name"; // Sort files by: [name][date][size]
-$sortdir_folders = "ASC"; // Sort direction of folders: [ASC][DESC]
+$sortdir_folders = "DESC"; // Sort direction of folders: [ASC][DESC]
$sortdir_files = "ASC"; // Sort direction of files: [ASC][DESC]
//LANGUAGE STRINGS
-$label_home = "Home"; //Name of home link in breadcrumb navigation
-$label_new = "New"; //Text to display for new images. Use with $display_new variable
-$label_page = "Page"; //Text used for page navigation
-$label_all = "All"; //Text used for link to display all images in one page
-$label_noimages = "No images"; //Empty folder text
-$label_loading = "Loading..."; //Thumbnail loading text
+$label_home = "Домашня"; //Name of home link in breadcrumb navigation
+$label_new = "Нове"; //Text to display for new images. Use with $display_new variable
+$label_page = "Сторінка"; //Text used for page navigation
+$label_all = "Усі"; //Text used for link to display all images in one page
+$label_noimages = "Немає зображень"; //Empty folder text
+$label_loading = "Триває завантаження…"; //Thumbnail loading text
//ADVANCED SETTINGS
$thumb_size = 120; //Thumbnail height/width (square thumbs). Changing this will most likely require manual altering of the template file to make it look properly!
-$label_max_length = 30; //Maximum chars of a folder name that will be displayed on the folder thumbnail
+$label_max_length = 256; //Maximum chars of a folder name that will be displayed on the folder thumbnail
$display_exif = 1;
-?>
\ Наприкінці файлу немає нового рядка
+?>
diff -Naur MiniGal Nano 0.3.5/index.php mgnew/index.php
--- MiniGal Nano 0.3.5/index.php 2010-12-06 11:22:00.000000000 +0200
+++ mgnew/index.php 2012-07-22 23:01:44.000000000 +0300
@@ -46,6 +46,8 @@
$images = "";
$exif_data = "";
$messages = "";
+$album_geolocation = "";
+$album_description = "";
//-----------------------
// PHP ENVIRONMENT CHECK
@@ -200,6 +202,18 @@
fclose($file_handle);
}
+// 2.5. LOAD ALBUM DESCRIPTION
+if (file_exists($currentdir ."/description.txt"))
+{
+ $album_description = file_get_contents($currentdir ."/description.txt");
+}
+
+// 2.6. LOAD ALBUM GEOLOCATION
+if (file_exists($currentdir ."/geolocation.txt"))
+{
+ $album_geolocation = file_get_contents($currentdir ."/geolocation.txt");
+}
+
// 3. LOAD FILES
if ($file != "." && $file != ".." && $file != "folder.jpg")
{
@@ -393,6 +407,8 @@
$template = preg_replace("/<% bgcolor %>/", "$backgroundcolor", $template);
$template = preg_replace("/<% gallery_width %>/", "$gallery_width", $template);
$template = preg_replace("/<% version %>/", "$version", $template);
+ $template = preg_replace("/<% geolocation %>/", $album_geolocation, $template);
+ $template = preg_replace("/<% description %>/", $album_description, $template);
echo "$template";
}
diff -Naur MiniGal Nano 0.3.5/templates/mano.html mgnew/templates/mano.html
--- MiniGal Nano 0.3.5/templates/mano.html 2010-12-06 00:36:00.000000000 +0200
+++ mgnew/templates/mano.html 2012-07-24 11:40:01.000000000 +0300
@@ -68,6 +68,12 @@
overflow: auto;
width: 100%
}
+#metadata {
+ border-left: 1px solid;
+ margin-top: 10px;
+ margin-bottom: 5px;
+ padding-left: 5px;
+}
.hidden {
visibility: hidden;
position:absolute;
@@ -108,7 +114,7 @@
float: left;
position: relative;
width: 130px;
- height: 160px;
+ height: 200px;
overflow:hidden;
}
.gallery li:hover img {
@@ -152,6 +158,11 @@
<p class="credits"><em>by: </em><% author %></p>
<span id="breadcrumb_nav"><% breadcrumb_navigation %></span>
<div id="container">
+ <div id="metadata">
+ Місце зйомки: <b><% geolocation %></b>
+ <br /><br />
+ <% description %>
+ </div>
<ul class="gallery">
<% thumbnails %>
</ul>
@@ -159,9 +170,36 @@
<br />
<div id="page_nav"><% page_navigation %></div>
<br />
+<!-- DISQUS -->
+<div id="disqus_thread"></div>
+<script type="text/javascript">
+ /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
+ var disqus_shortname = 'disqus-site-shortname'; // required: replace example with your forum shortname
+
+ /* * * DON'T EDIT BELOW THIS LINE * * */
+ (function() {
+ var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
+ dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
+ (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
+ })();
+</script>
+<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
+<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
+<!-- END DISQUS -->
+<br />
<!-- CREDITS - DO NOT REMOVE OR YOU WILL VOID MiniGal Nano TERMS OF USE -->
<hr id="bottom" />
<div class="backlink" align="center"><a href="http://www.minigal.dk" title="Powered by MiniGal Nano" target="_blank">Powered by MiniGal Nano <% version %></a></div>
<br /><br />
+<script type="text/javascript">
+ var _gaq = _gaq || [];
+ _gaq.push(['_setAccount', 'UA-XXXXXXX-X']);
+ _gaq.push(['_trackPageview']);
+ (function() {
+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+ })();
+</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment