Please login or register.

Login with username, password and session length
Advanced search  

News:

You need/want an older version of sNews ? Download an older/unsupported version here.

Pages: [1] 2 3 ... 6

Author Topic: Integrating Zenphoto in sNews.  (Read 34338 times)

Patric Ahlqvist

  • Nobodys perfect, but Im pretty effing close
  • Administrator
  • ULTIMATE member
  • ******
  • Karma: 65
  • Posts: 4957
  • I'm a self-made man and worships my creator.
    • p-ahlqvist.com
Integrating Zenphoto in sNews.
« on: January 03, 2007, 07:40:42 PM »

Having Zenphoto integrated into your site...

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...

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:

Quote
include ('../snews.php'); ?>
2. The
Quote
<?php printGalleryTitle(); ?>
and all variations of it in the index, album and image.php, should be exchanged for the sNews title functions aswell:

Quote
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:

Quote
include ('../snews.php'); ?>
3. CSS, you need your default sNews css as well, so in the head tag you add:

Quote
4. The
Quote
<?php printGalleryTitle(); ?>
and all variations of it in the index, album and image.php, should be exchanged for the sNews title functions aswell.

Quote
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:



Quote
Right. Now this snippet (the gallery code itself) ends with:
Quote
  'Manual sorting', NULL, 'credit'); ?>
After that last div, you fill the Zenphoto theme/default/index.php up with the rest of your code...
Logged
My sNews site
"It's only dead fish that goes with the flow... "
Updated, online again - Free designs

bakercad

  • Administrator
  • ULTIMATE member
  • ******
  • Karma: 105
  • Posts: 1670
    • http://exit20.com
Integrating Zenphoto in sNews.
« Reply #1 on: January 03, 2007, 07:58:57 PM »

pretty sweet P-man!  I highly suggest you create an addon!  Very nice.
Logged

Keyrocks

  • Doug
  • Administrator
  • ULTIMATE member
  • ******
  • Karma: 451
  • Posts: 6262
  • Semantically Challenged
    • snews.ca
Integrating Zenphoto in sNews.
« Reply #2 on: January 03, 2007, 09:55:40 PM »

I like they way your ZenPhoto project is going there Patric. I've only used it on one sNews site so far, but I did 2 separate installs of ZP to create two separate gallery systems, and I did not integrate them into the sNews template. Instead, I just used the same base template to create both the sNews template and the ZP templates, so they both look the same. I will be interested in how you do your integration when your are done.

I agree with bakerman - running ZP as an sNews addon - great combination. They are made for each other. :)
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

Jason Kingery

  • Sr. Member
  • ****
  • Karma: 1
  • Posts: 304
    • http://denial-design.com
Integrating Zenphoto in sNews.
« Reply #3 on: January 03, 2007, 10:08:29 PM »

yes, I must know more...

piXelatedEmpire

  • MIA
  • Thread Moderator
  • ULTIMATE member
  • *****
  • Karma: 37
  • Posts: 1454
  • currently MIA
Integrating Zenphoto in sNews.
« Reply #4 on: January 04, 2007, 01:10:50 AM »

oooh ditto... maybe put this in the webdesign or programming section of sNews 1.5?  Definately programming as I know you will be sharing with us how you integrated ZenPhoto into sNews *wink wink nudge nudge* :D
Logged
my apologies to the sNews crew, but I will be MIA for the forseeable future

mike1

  • Full Member
  • ***
  • Karma: 6
  • Posts: 205
Integrating Zenphoto in sNews.
« Reply #5 on: January 04, 2007, 04:29:32 AM »

any particular reason you switched?

EDIT: It doesn't validate.  oh my :O
Logged

Patric Ahlqvist

  • Nobodys perfect, but Im pretty effing close
  • Administrator
  • ULTIMATE member
  • ******
  • Karma: 65
  • Posts: 4957
  • I'm a self-made man and worships my creator.
    • p-ahlqvist.com
Integrating Zenphoto in sNews.
« Reply #6 on: January 04, 2007, 10:35:00 AM »

Quote from: Doug
integrate them into the sNews template. Instead, I just used the same base template to create both the sNews template and the ZP templates, so they both look the same.
OK, Key's... I certainly need som xplaining here... To me integrating (might be wrong) is making something apart of the sNews looks and into the sNews operationals... So what you did sounds like you manage to integrate it to me...

I might dissapoint someone here, but Zenphoto isn't possible to (at my level anyways) fully integrate into sNews system (read: as a physic part of sNews) due to how it's built, and due to it's template/theme dependancy. It is however possible to manipulate the Zenphoto theme in order to make it visually apart of sNews and this isn't hard to do... In short you simply add the session_start to three files inside Zenphoto, and also the functions your site is based on, and there you go...

It's quite easy actually, hence me changing from Plogger to Zenphoto rather than trying to get Plogger to validate... It took me less than 15 minutes to "integrate" it... Re styling it so it was a bit more...me took a bit longer though ;)

I'll be back with some instructions later...
Logged
My sNews site
"It's only dead fish that goes with the flow... "
Updated, online again - Free designs

slickopr1

  • Newbie
  • *
  • Karma: 0
  • Posts: 41
    • http://www.tricountyweb.com
Integrating Zenphoto in sNews.
« Reply #7 on: January 04, 2007, 12:16:15 PM »

Just checked out your tutorial and wanted to thank you for your hard work. I'll be converting from Plogger to ZenPhoto today and if I find any thing unclear I'll post a comment. Thanks again...
Logged

Patric Ahlqvist

  • Nobodys perfect, but Im pretty effing close
  • Administrator
  • ULTIMATE member
  • ******
  • Karma: 65
  • Posts: 4957
  • I'm a self-made man and worships my creator.
    • p-ahlqvist.com
Integrating Zenphoto in sNews.
« Reply #8 on: January 04, 2007, 02:45:10 PM »

Ok, updated it some... Correct HTML entities and code tags, and some errors that was present. I think it's possible to follow now... Lemme know, would ya ?
Logged
My sNews site
"It's only dead fish that goes with the flow... "
Updated, online again - Free designs

Keyrocks

  • Doug
  • Administrator
  • ULTIMATE member
  • ******
  • Karma: 451
  • Posts: 6262
  • Semantically Challenged
    • snews.ca
Integrating Zenphoto in sNews.
« Reply #9 on: January 04, 2007, 04:29:57 PM »

I gave your TUT a quick read Pat... unfortunately I don't have any time to experiment with it for a few days. But it appears your approach is much the same as mine - using the same template in both sNews and ZP.
But... yes... I believe were both on the same track. :)
In my case, though, I didn't use any of the sNews php function statements in the ZP theme file - just the HTML for the template that was used to create the sNews index.php file. As a reference visit the Greenstone Cruizers site and click on any of the gallery links in the top nav-bar. There are 2 instances of ZP running in an sNews 1.4 site, or for "Street" and one for "Off Road".
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

tobto

  • Jr. Member
  • **
  • Karma: 0
  • Posts: 72
    • seo service
Integrating Zenphoto in sNews.
« Reply #10 on: January 04, 2007, 05:11:09 PM »

thanks Patric!
Interesting, are there any possibility to glue up ZF with comment system of Snews? Maybe you know some other gallery script can do that?
Logged

Patric Ahlqvist

  • Nobodys perfect, but Im pretty effing close
  • Administrator
  • ULTIMATE member
  • ******
  • Karma: 65
  • Posts: 4957
  • I'm a self-made man and worships my creator.
    • p-ahlqvist.com
Integrating Zenphoto in sNews.
« Reply #11 on: January 04, 2007, 06:58:31 PM »

Quote from: keyrocks
I gave your TUT a quick read Pat... unfortunately I don't have any time to experiment with it for a few days. But it appears your approach is much the same as mine - using the same template in both sNews and ZP.
But... yes... I believe were both on the same track. :)
In my case, though, I didn't use any of the sNews php function statements in the ZP theme file - just the HTML for the template that was used to create the sNews index.php file. As a reference visit the Greenstone Cruizers site and click on any of the gallery links in the top nav-bar. There are 2 instances of ZP running in an sNews 1.4 site, or for "Street" and one for "Off Road".
Yea, the difference is the sNews php functions... I wanted them aswell on the ZP in order to maintain the feeling of it being a part of my site a tad more than without them... So, Doug... I guess great minds think alike, eh :lol:

Quote from: tobto
thanks Patric!
Interesting, are there any possibility to glue up ZF with comment system of Snews? Maybe you know some other gallery script can do that?
I don't really know what you mean, tobto... Making it a part of snews commentary system, saying you want comments enabled on the images ?? In such case you're in luck, as there is a comments function inZF, I only "turned it of" as I don't want it ;)... As far as SPAM protection goes... I don't know that either, that is a question for the more PHP knowlegable parties on this forum...
Logged
My sNews site
"It's only dead fish that goes with the flow... "
Updated, online again - Free designs

piXelatedEmpire

  • MIA
  • Thread Moderator
  • ULTIMATE member
  • *****
  • Karma: 37
  • Posts: 1454
  • currently MIA
Integrating Zenphoto in sNews.
« Reply #12 on: January 05, 2007, 01:11:48 AM »

I'm with tobto here, it would be fantastic if there was a way to integrate the comments function used by sNews with ZenPhoto so they act the same way as comments do in sNews (ie ability to approve/delete/edit etc through the admin panel).. then adding the CAPTCHA anti spam MOD would be a breeze.

Unfortunately I wont have a chance to have a look at the script until next week.
Logged
my apologies to the sNews crew, but I will be MIA for the forseeable future

Patric Ahlqvist

  • Nobodys perfect, but Im pretty effing close
  • Administrator
  • ULTIMATE member
  • ******
  • Karma: 65
  • Posts: 4957
  • I'm a self-made man and worships my creator.
    • p-ahlqvist.com
Integrating Zenphoto in sNews.
« Reply #13 on: January 05, 2007, 09:58:25 AM »

Ah, well... captchas for ZP do exist... http://gregoryb.dyndns.org/public/scripts/zenphoto_comment_protection.zip Demo: http://gregoryb.dyndns.org/zenphoto/

I have however another problem, not that it's a vital one as I dont' want comments on the photos but I don't like it to not function as it should, with the comments... The comments on my page isn't working... If somethings wrong in the ZP comments it should say:

There was an error submitting your comment. Name, a valid e-mail address, and a comment are required.

But instead it uses snews way of telling me that I did something wrong:

Your comment was not sent
Possible reasons: You left blank column or the comment is too short.
Back to article

Mhmmmmmmmmm ??
Logged
My sNews site
"It's only dead fish that goes with the flow... "
Updated, online again - Free designs

piXelatedEmpire

  • MIA
  • Thread Moderator
  • ULTIMATE member
  • *****
  • Karma: 37
  • Posts: 1454
  • currently MIA
Integrating Zenphoto in sNews.
« Reply #14 on: January 05, 2007, 10:44:22 AM »

That little CAPTCHA script is quite nice, how did you stumble across it?
Logged
my apologies to the sNews crew, but I will be MIA for the forseeable future
Pages: [1] 2 3 ... 6