OSDN Git Service

NP_gallery v0.95
[nucleus-jp/nucleus-plugins.git] / NP_gallery / tags / v0.95 / gallery / update / np_gallery_update077.php
diff --git a/NP_gallery/tags/v0.95/gallery/update/np_gallery_update077.php b/NP_gallery/tags/v0.95/gallery/update/np_gallery_update077.php
new file mode 100644 (file)
index 0000000..e39d11b
--- /dev/null
@@ -0,0 +1,67 @@
+<?php\r
+\r
+require_once('./../../../../config.php');\r
+global $member;\r
+if (!($member->isLoggedIn() && $member->isAdmin())) exit('You are not admin.');\r
+include_once (dirname(__FILE__).'/../config.php');\r
+\r
+//from 0.77 to 0.80\r
+\r
+\r
+global $NPG_CONF;\r
+\r
+//add .80 templates -- sircambridge mods\r
+include(dirname(__FILE__).'/default_templates_080.inc');\r
+?>\r
+<p>The templates included with 0.8 use a different css technique to display the album thumbnails. To use these templates, you will need to add the three graphics files (shadow.gif, shadow2.png, shadow2.gif) to your skin directory. Then add the following lines to your css file. You will need to modify the location of the image files (bolded) to match your installation.</p>\r
+<hr />\r
+<p>\r
+.thumbnailoutside {<br>\r
+   width:155px !important;<br>\r
+        /*edit this height to give the description more room*/<br>\r
+   height:160px !important;<br>\r
+   float:left !important;<br>\r
+   text-align:center !important;<br>\r
+}\r
+</p>\r
+\r
+<p>\r
+.alpha-shadow {<br>\r
+   float:left;<br>\r
+   background: <b>url(/nucleus/skins/default/images/shadow.gif)</b> no-repeat bottom right;<br>\r
+   margin: 0px 0 0 10px !important;<br>\r
+   margin: 10px 0 0 10px;<br>\r
+   }\r
+</p>\r
+\r
+<p>\r
+.alpha-shadow div {<br>\r
+  background: <b>url(/nucleus/skins/default/images/shadow2.png)</b> no-repeat left top !important;<br>\r
+  background: <b>url(/nucleus/skins/default/images/shadow2.gif)</b> no-repeat left top;<br>\r
+  float: left;<br>\r
+  margin-top: 0px;<br>\r
+  padding: 0px 6px 6px 0px;<br>\r
+  }\r
+</p>\r
+\r
+<p>\r
+.alpha-shadow img {<br>\r
+  background-color: #fff;<br>\r
+  border: 1px solid #a9a9a9;<br>\r
+  padding: 4px !important;<br>\r
+  }\r
+</p>\r
+<hr />\r
+<?php\r
+\r
+//remove duplicates from views and add primary key to views\r
+sql_query('create temporary table dupfix SELECT vpictureid, MAX( views ) AS views FROM '.sql_table('plug_gallery_views').' GROUP BY vpictureid');\r
+sql_query('delete from '.sql_table('plug_gallery_views'));\r
+sql_query('alter table '.sql_table('plug_gallery_views').' add primary key(vpictureid)');\r
+sql_query('insert into '.sql_table('plug_gallery_views').' (vpictureid, views) select vpictureid, views from dupfix');\r
+\r
+setNPGoption('currentversion',80);\r
+\r
+echo 'NP_Gallery database updated to 0.8<br/>';\r
+\r
+?>\r