Offering cheap, compact, fast and easy to use templates. Contact me for more information.
Ok, first we go download the Zenphoto gallery. Then you look for the zp-config.php.example file, and change whatever settings you need in that to make it access your database. And might I add (due to how Plogger worked) that you set it up in the same database as sNews, but with a prefix, so that the gallery is likely to be able to use the sNews features aswell... (Now, this is not something I am sure of, but better safe than sorry)
After download, and zp-config.php.example change, rename that file to zp-config.php that is remove the example bit, and then upload the whole package to your server (I choose to place it as a subfolder to sNews). Now, we need to make some folders inside this one, writeable, so change the permissions on the albums/ and cache/ directories to be writable by the server, that is:
1. chmod 777 albums/ cache/
2. or use your FTP program.
Then browse to http://www.yoursite.com/zenphoto/zen/setup.php and follow the
simple instructions. Remember the prefix...
sNews 1.6 update
Both sNews and ZenPhoto use a function called strip(). And in order to make the 1.6 "swollow" our integration of Zenphoto we need to change the occurances of strip inside sNews.php. so we do it like this:
Find these occurances inside the snews.php:
1. .strip($title).
2. .strip($text).
3. function strip($text)
And change them into:
1. .snews_strip($title).
2. .snews_strip($text).
3. function snews_strip($text)
And your all done. Now lets continue...
Stop update
The easiest way to do this would be to simply:
Make a copy of your original index.php, insert everything inside Zenphoto themes/default/index.php body tag except the main divs (both opening and closing) and place it into the original index.php center function.
and do this:
1. Above the part of Zenphoto theme/default/index.php you add the upper part of your sNews index.php and change the path (remember we put it ina subfolder to sNews, so we need to access the sNews.php one level up) so it looks like thislike this:
session_start();
include ('../snews.php'); ?>
2. The and all variations of it in the index, album and image.php, should be exchanged for the sNews title functions aswell:
Now you have done the themes/default/index.php, this should be repeated on both album.php and image.php aswell, and you should be done.
Now the Zenphoto should be integrated into your sNews design, and the funny part remains, making it look like it actually belongs there, hehe... So open up the themes/default/zen.css and edit away.
A more idiotic way of explaining would be this:
1. As the Zenphoto at this stage is set to work from the default theme, you open the zenphotofolder/themes/default folder through your FTP, and you'll find 6 files there. The one's to pay attention to at this stage is the index, image and album.php files. Now, open up your default sNews index.php, and a copy of the Zenphoto theme/index.php, so that you have both up in eg Notepad++.
2. Above the part of Zenphoto theme/index.php you add the upper part of your sNews index.php and change the path (remember we put it ina subfolder to sNews, so we need to access the sNews.php one level up) so it looks like thislike this:
session_start();
include ('../snews.php'); ?>
3. CSS, you need your default sNews css as well, so in the head tag you add:
4. The and all variations of it in the index, album and image.php, should be exchanged for the sNews title functions aswell.
5. Ok, first steps is done. Now to the little more tricky (not much but you need to know where your different segments of the site begins and ends ;)). The original Zenphoto theme/index.php code (after body tag) begins with div id='main', right. My sNews index.php begins with div id='content', div id='header', div id='menu', div id='left' down to div id='center' in which the remaining Zenphoto theme/index.php code should go, so simply take everything from your original sNews.php file from the body tag, down to the opening tag of center (div id='center') and copy that into the Zenphoto theme/index.php. Now the first line after the center div in Zenphoto theme/index.php should read: Right. Now this snippet (the gallery code itself) ends with: After that last div, you fill the Zenphoto theme/default/index.php up with the rest of your code... 04.01.2007. 11:28
Works slick now.....add my thanks to the list
Click to add a comment