PhotoPost Photo Gallery Sales PhotoPost Sales Toll Free Phone Number
Mon-Fri 9am-4pm EST
  PhotoPost Photo Sharing Photo Gallery    Visualize community tm
| | | | | | | | |

Go Back   PhotoPost Community > General Forums > General Discussion

General Discussion General use discussion forum for PhotoPost products.

Reply
 
Thread Tools Rate Thread Display Modes
Old September 23rd, 2004, 12:44 PM   #1
mlucek
Member
Verified Customer
 
Join Date: Feb 2004
Location: Beach/Lost Angeles
Posts: 147
Thumbs up PP -> PostNuke module in progress

OK .... based on Batmon's suggestions in this *Nuke thread, I'm going ahead and modifying PP to some extent to see how well it'll work as an embedded PostNuke module. Almost the same changes would apply to PHPNuke. This doesn't involve any external URL rewrites, so not web server dependent.

Progress so far:
- add "EMBEDDED' flag to main PHP files. Or maybe use the $Globals['vbulletin'] to tell if embedded or not ?
- have to add PostNuke header/footer calls to each main PHP file based on this flag. Allows PP to operate standalone too.
- This flag needed by printheader to NOT output the leading HTML code, else there's duplicate HTML tags <head><title><body> etc.
- also have to add in the style sheets based on same flag
- mod printfoot to not output closing </body></html> tags based on same flag
- use Batmon's url_link or equivalent to modify the PP URL's based on same flag, so they use the PostNuke URL syntax now.
- ?? I'm sure I'll run into other issues as I go.

Michael P/omegatron ..... any more thought to incorporating said changes into the code if it proves successful ? (pretty please)

Don't have a visible demo just yet, but looks hopeful so far. I'll try to get a demo up over the coming weekend.

Yes, I'm aware of something similar at www.anointed.net (nice job there too)

Yes, I know I can post this on www.photopostdev.com, but since these changes would be incorporated into the core code, I kinda feel this is the spot for now. Though I'll post it over there too.

Mike

Last edited by mlucek; October 23rd, 2004 at 01:08 AM.
mlucek is offline   Reply With Quote
Old September 24th, 2004, 12:18 PM   #2
mlucek
Member
Verified Customer
 
Join Date: Feb 2004
Location: Beach/Lost Angeles
Posts: 147
Update

PostNuke integration going slow, but is going .... biggest thing is adapting all the links so they'll be Nuke compatible. Not difficult, just tedious.

I added a PP_EMBEDDED variable to config-inc.php, so each code file can check to know whether to include the Postnuke header/footer and any PostNuke specific code. Maybe I'll just add another entry into the Globals array and use it that way. If this var is NOT set, PP operates just as it would outta the box.

Have to mod the links in the various template files. Any form also needs to have some PostNuke specific hidden var so the form action param generates the link correctly.

It's going !! Michael P/Omegatron, I hope you are listening ?? and are willing to entertain these changes ??
mlucek is offline   Reply With Quote
Old September 24th, 2004, 12:19 PM   #3
Michael P
PhotoPost Developer
Verified Customer
 
Join Date: Jan 2002
Posts: 11,833
I am and would be glad to check them out when you are done; as I've said more than a few times, I know almost nothing about Nuke and have been hoping someone would be able to tackle this.

Depending on the scope of changes we could either offer a Nuke version or integrate them into the current release.
__________________
Please do not PM me for support or sales questions. Thank you for your understanding.
Michael P is offline   Reply With Quote
Old September 24th, 2004, 01:14 PM   #4
mlucek
Member
Verified Customer
 
Join Date: Feb 2004
Location: Beach/Lost Angeles
Posts: 147
Thanks much, that's what I'm hoping for

I know the guy from www.anointed.net has gotten PP setup pretty nicely with PostNuke.

Personally, I'd rather not use web server URL rewrites as that can be a real pain to setup , requires some knowledge of .htaccess files/mod_rewrite, etc. That can be a real pain to debug and not compatible with all web servers (e.g. IIS ?). If this Postnuke integration works right outta the box, then it's more likely to be used by less experienced web site builders - i.e. the masses

I'll keep this thread posted

Mike
mlucek is offline   Reply With Quote
Old September 30th, 2004, 02:14 PM   #5
mlucek
Member
Verified Customer
 
Join Date: Feb 2004
Location: Beach/Lost Angeles
Posts: 147
Thumbs up

Update

Things going well with the PostNuke semi-integration. Have most of the main screens up and running within PostNuke. May hold off on the admin screens till I see if the dev's here like what they see. There's one global var I created PP_EMBEDDED_MODULE so you can switch off the PostNuke stuff and run it standalone. May be better to have it autodetect if it's embedded in *nuke, etc, and adjust itself accordingly.

Michael P - one note - PostNuke uses a global $name, so there's a conflict with the PP $name var, I had to rename all the instances of $name to something a bit more descriptive, e.g. uname, dirname, fname) for the functions in which $name is used. Not a big deal, only took about 15 mins

I think semi-integration will open PP to a wider audience - PostNuke, PHPNuke , MaxDev, etc. Heck, can probably do the same thing for ReviewPost and PP Classifieds.

No demo just yet, wanna get it a bit more cleaned up before show it, so stay tuned.

Mike
mlucek is offline   Reply With Quote
Old October 1st, 2004, 05:25 PM   #6
mlucek
Member
Verified Customer
 
Join Date: Feb 2004
Location: Beach/Lost Angeles
Posts: 147
PostNuke authentication snag

Michael P: The authentication process built in to PP verifies the user login/password via the PostNuke users table. But that's only if you click the Login button from PP.

So there's no check to see if the user is already logged in/out via PostNuke. i.e. no pass-thru authentication. Guess I'm left to my own devices on that one. I'm this far along, I might as well fix that too

So if I do this correctly, the auth should work just like it does for your VB integration - seamless. User logs in/out of PN effectively logs in/out of PP.

Hmmmmm, maybe if I authenticate via phpBB, that'll work easier too ? since supposedly you've already implemented that ? But don't want to force the user to have the PNphpBB module installed. Or at least use that as a model for the PostNuke auth code.

I hope this is the last real gotcha. Should checked that at the beginning 2 weeks ago. Grrrrrrrrrrr
mlucek is offline   Reply With Quote
Old October 1st, 2004, 05:38 PM   #7
Chuck S
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 75,523
Photopost integrates with the Nuke phpBB. So a user has to have phpBB installed. Photopost reads the same cookie as nuke so if your logged in through nuke your logged in through Photopost

I have done enough Nuke installs to know that. So I would look at your integration and see what your dont have lined up in your cookie settings

You have something out of whack there.
__________________
Photopost Developer and Support Engineer

Please do not PM me for support or sales questions. Thank you for your understanding.
Chuck S is offline   Reply With Quote
Old October 1st, 2004, 06:17 PM   #8
mlucek
Member
Verified Customer
 
Join Date: Feb 2004
Location: Beach/Lost Angeles
Posts: 147
omegatron Thanks for the reply

Quote:
Photopost integrates with the Nuke phpBB. So a user has to have phpBB installed. Photopost reads the same cookie as nuke so if your logged in through nuke your logged in through Photopost
That's assuming that phpBB gets initialized when the user logs in to PHPNuke. I don't know if that's true or not. Under PostNuke with the PNphpBB module installed, phpBB doesn't appear to get initialized until the user actually calls up the phpBB module itself or a phpBB block appears somewhere on the given page (that'll initiate the phpBB session). So no phpbbmysl session gets started until that happens, hence no phpbbmysel_sid cookie, hence no login to PP.

Quote:
I have done enough Nuke installs to know that. So I would look at your integration and see what your dont have lined up in your cookie settings
I've only been trying with the supplied postnuke.php forum file. Just realized earlier today that that file does NOT use any session data. i.e. the POSTNUKESID cookie var which is needed to check the authentication.

Think I'll try the supplied phpBB integration file and see how that works to get an idea what needs to be done.

Since the idea is to just use phpBB in that case, the setlogin function would never be called cause the user is already logged in via nuke or phpBB. What is the ramification of not calling setlogin ? Or is that call even necessary then ? I see that it's doing some session management but couldn't follow it's purpose ? Similar issue with logout never being called since the user would logout via Nuke instead ?

Or is the login/logout buttons duplicating the phpBB login/logout functions so the user can logout either way ?

Some insight into that would be greatly appreciated do I can continue with this integration Thanks !

Mike
mlucek is offline   Reply With Quote
Old October 1st, 2004, 06:34 PM   #9
Chuck S
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 75,523
You might want to be looking at the nuke.php file instead of phpbb2.php file

Have not done too much postnuke installs as thats an uncommon forum. We dont have alot of postnuke customers. Nuke as you will see uses the phpbb forum heavily in their authentication that would give you an idea. HOWEVER

Given the two severily separate systems that Nuke and PostNuke are I would concentrate on one or the other. Postnuke does not use phpBB integration yet Nuke module does. I can guarantee on that if you login to Nuke your logged into Photopost. As far as PostNuke not much I can comment on. However I would not modify it. I would instead as I said above try and see why you are not logged in to Photopost or PostNuke when logging to each other. Are your cookies set right? Remember Photopost does not use sessions. We just use a sessions COOKIE to help authenticate if the user has one on their computer. Photopost uses cookies exclusively.
__________________
Photopost Developer and Support Engineer

Please do not PM me for support or sales questions. Thank you for your understanding.
Chuck S is offline   Reply With Quote
Old October 5th, 2004, 09:09 PM   #10
mlucek
Member
Verified Customer
 
Join Date: Feb 2004
Location: Beach/Lost Angeles
Posts: 147
omegatron - PostNuke only uses cookies to store the session id, the user authenication then uses that session id internally to tell if the user is logged in or not. I think it's a simple change to skip the cookie-based username/password that PP uses.

PostNuke has a few API routines to check if the user is logged in/out and to retrieve the user name/id. Shouldn't take to long to adapt the postnuke.php file to use those.

Also will have to adjust the CSS files cause it basically overwrites the equivalent styles (e.g. links) that PostNuke uses.

continuing on .............
mlucek is offline   Reply With Quote
Old October 5th, 2004, 09:59 PM   #11
Chuck S
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 75,523
Just a note on sessions versus cookies. True sessions do not use cookies. The sessions are passed in a url. Thus to switch to sessions there are no cookies.

Now we have many integrations we have written with session cookies. Thats nothing as a session cookie holds a session id and expires when the browser is closed. I beleive we write session cookies with VB3 VB2 IB2 IB phpBB Nuke PostNuke so there would be no adjustment needed.

For help on adjusting CSS you might want look at the style match's we have done already in the Threads VB3 IB or IB2 files
__________________
Photopost Developer and Support Engineer

Please do not PM me for support or sales questions. Thank you for your understanding.
Chuck S is offline   Reply With Quote
Old October 7th, 2004, 03:49 PM   #12
mlucek
Member
Verified Customer
 
Join Date: Feb 2004
Location: Beach/Lost Angeles
Posts: 147
Quote:
Originally Posted by omegatron
Just a note on sessions versus cookies. True sessions do not use cookies. The sessions are passed in a url. Thus to switch to sessions there are no cookies.
True. Passing session id's in the url is one method as is using the mentioned session cookies. Most code can use both depending on if the user has cookies enabled. If not, then the code usually falls back to adding the session id to the url.

I now have the PostNuke passthru authentication working with PP, was simply a matter of using the builtin PostNuke routines for that No cookies were involved/harmed in this change

Quote:
For help on adjusting CSS you might want look at the style match's we have done already in the Threads VB3 IB or IB2 files
Will check there, thanks.

Demo on the horizon
mlucek is offline   Reply With Quote
Old October 7th, 2004, 04:09 PM   #13
Chuck S
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 75,523
Right but hense you get into what I have said all along about sessions

I doubt we would ever rewrite all our url's to be session capable. That is why we strictly use cookies. Our Integrations work on two levels with most forums. One $checkpass is set to 1 if the session cookie equals a users session table entry or through identification from the userid cookie.

If you strictly go with sessions that is not a good thing so don't make the mistake of going down that road True sessions are an old technology and everyone uses cookies nowadays as they do not want to login each time they go back to their sites.

Look forward to your demo. Now this is POSTNUKE right?
__________________
Photopost Developer and Support Engineer

Please do not PM me for support or sales questions. Thank you for your understanding.
Chuck S is offline   Reply With Quote
Old October 8th, 2004, 05:29 PM   #14
mlucek
Member
Verified Customer
 
Join Date: Feb 2004
Location: Beach/Lost Angeles
Posts: 147
Quote:
Originally Posted by omegatron
Look forward to your demo. Now this is POSTNUKE right?
Yes, this will be PhotoPost (PP) , working as a PostNuke (PN) module (though not really PostNuke API compliant), using PostNuke user authentication (NOT phpBB), using PostNuke style URL's, no external URL rewriting involved.

This will probably also then work with PHPNuke with minor changes. Will also work with MaxDev, as do most PostNuke modules, since MaxDev is just a fork of PostNuke.

Have the major pieces of PP working inside PN now. Mostly just been tedious tiny changes (albeit a lot of them ) to anything that uses:

...Globals['maindir']/ ...

to now go thru a URL generating routine which checks another var to see if PP is running standalone (functions as 4.8.2 does now) or under the guise of PN which then generates PN style URL's.


Last edited by mlucek; October 8th, 2004 at 05:58 PM.
mlucek is offline   Reply With Quote
Old October 13th, 2004, 04:16 PM   #15
mlucek
Member
Verified Customer
 
Join Date: Feb 2004
Location: Beach/Lost Angeles
Posts: 147
Update: almost done ..... converted all the admin to work w/PostNuke auth. Demo still on the horizon. Think I'll just create a basic PostNuke site and put PP in there.
mlucek is offline   Reply With Quote
Old October 22nd, 2004, 01:34 PM   #16
skj310
Registered User
 
Join Date: Apr 2004
Location: somewhere north
Posts: 31
so how did your integration with PN go?
all working and away from iframes?

hoping you might pass on your instructions ... is it as simple as following the suggestions in this topic as well as the code samples from batmon?
skj310 is offline   Reply With Quote
Old October 22nd, 2004, 02:33 PM   #17
mlucek
Member
Verified Customer
 
Join Date: Feb 2004
Location: Beach/Lost Angeles
Posts: 147
Thumbs up

Quote:
Originally Posted by skj310
so how did your integration with PN go?
all working and away from iframes?

hoping you might pass on your instructions ... is it as simple as following the suggestions in this topic as well as the code samples from batmon?
Going VERY WELL !! NO FRAMES/IFRAMES or server URL rewriting used. Yes, it kinda goes the way batmon suggested and beyond.

Now called as a PN module:

.../modules.php?op=modload&name=Photopost&file=index

ALL the necessary URL's now go thru a function to change the syntax to PN style, e.g.:

.../modules.php?op=modload&name=Photopost&file=showmembers&cat=500

.../modules.php?op=modload&name=Photopost&file=showphoto&photo=27&sort=1&cat=500&page=1

The PN passthru authentication is working - sign in to PN, you're signed into PP. The auth is based on PostNuke, NOT PNphpBB tables so you don't need PNphpBB installed.

PP admin screens function as expected. Didn't try to merge that into the PN admin scheme, not worth it, maybe I'll ad an icon there though. PP admin screens use FRAMES and as you know, PN is not very FRAME friendly.

I still need to figure out a quirk with the PN user NOT being logged in, i.e. guest/anonymous user. The default PN user groups are Users and Admins which are imported by PP when you install it with the postnuke integration option. A guest/anonymous user is also a member of the Users group even if they are NOT logged in. Problem is then that the guest/anon user has all the permissions of a user who is logged in. So I need to figure out a scheme to get around that .... maybe force the guest/anon user into a PP specific group for non-registered folks. So would have to create an additional PP user group when installing and then check if guest user - which I have to do anyway to see if user logged in ...

Probably too much info for you ... but at least it jogs my mind a bit to see it in writing

These changes were not difficult, just very tedious since I had to modify probably over 200 links to now call the url generating function. Touched almost every PHP file and about 1/2 the template files (which are just PHP/HTML code anyway). All these changes are (or should be ) transparent to the original PP code (4.8.2), so PP will operate standalone just as it does now. All this is based on a setting in the config file.

There's a few other minor quirks to work out, CSS stuff, had to fix some file paths in the admin screens to look for the installed directory instead of assuming the default dir. PN modules actually operate out of the PN root dir, not where the module is actually installed

/

versus

/modules/Photopost/...

Coupla other things that escape me right now too, no showstoppers though.

Michael P/Omegatron have both expressed interest in this integration, so I'm hoping they'll like what they see and we can work out something to merge it into the PP baseline ??

I will put up a public demo up soon, and put an annoucement on the PN forums. Work/life has been getting in the way of that for the last few weeks.

This could be great PR, cause it then opens the door to 1000's of other sites for integration with PHPNuke/MaxDev and other related CMS's. This should work the same w/MaxDev, since's it's just a PN fork. PHPNuke has slightly different URL syntax, but that should be trivial now to just mod the url gen function for that, then add the appropriate PHPNuke authentication. Although supposedly the PHPNuke auth via phpBB is already in place.

Since ReviewPost and the Classified modules seem to be derivatives of the PP code, these techniques could be applied to those too and make those mod's PN/*nuke friendly !! Opens those mod's up to 1000's of site !! = $$$

Mike
mlucek is offline   Reply With Quote
Old October 22nd, 2004, 03:52 PM   #18
skj310
Registered User
 
Join Date: Apr 2004
Location: somewhere north
Posts: 31
good to hear ...

you mentioned a change to the config-inc.php? What did you add? something about a pp-embedded var ... i don't think i understand what you were aiming at with that?

Quote:
I still need to figure out a quirk with the PN user NOT being logged in, i.e. guest/anonymous user. The default PN user groups are Users and Admins which are imported by PP when you install it with the postnuke integration option. A guest/anonymous user is also a member of the Users group even if they are NOT logged in. Problem is then that the guest/anon user has all the permissions of a user who is logged in. So I need to figure out a scheme to get around that .... maybe force the guest/anon user into a PP specific group for non-registered folks. So would have to create an additional PP user group when installing and then check if guest user - which I have to do anyway to see if user logged in ...
could be related to this slice of code:
Quote:
// login for guests
$ubbgroups[0] = -1;
found in forums/nuke.php for me, but probably forums/postnuke.php for you. With an anon group id of -1 i was always having problems with anon users having same status as other regular users. To fix this i had to determine the anon user id and then modify that code to reflect appropriate IDnum. That help?
skj310 is offline   Reply With Quote
Old November 10th, 2004, 09:03 PM   #19
mlucek
Member
Verified Customer
 
Join Date: Feb 2004
Location: Beach/Lost Angeles
Posts: 147
Thumbs up

OK, FINALLY !!

Here's a link to the Postnuke/Photopost module demo:

Postnuke Photopost module demo
  • NO web server URL rewrites
  • NO FRAMES/IFRAMES (yeah !!!)
  • NO HTML wrapping of any sorts (check out the HTML page source if you like )
  • Functions more or less as a Postnuke module, though not API compliant, so no permissions or anything like that.
  • Fully functional Photopost 4.8.2, including the admin portion, categories/permissions, etc.
  • Uses Postnuke user management.
  • Uses Postnuke passthru authentication, NOT PNphBB2/phpBB2 authentication - log into Postnuke, you're logged into Photopost, log out and you're logged out.
  • Demo uses PN 0.7.2.6, seems to work ok with 0.7.5, though not extensively tested there.

Check it out - can leave comments/questions here or on the message boards at my site:

Message boards

M.P./Omegatron - give it a look see and try it out. I hope we can get this out to others that are interested !!

Mike

Last edited by mlucek; November 10th, 2004 at 09:32 PM.
mlucek is offline   Reply With Quote
Old November 10th, 2004, 09:07 PM   #20
Chuck S
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 75,523
Warning: ob_start(): output handler 'ob_gzhandler' cannot be used after 'URL-Rewriter' in /hsphere/local/home/mlucek/mikesjourneys.com/modules/Photopost/pp-inc.php on line 146

You can write up a modification to post on Photopostdev if you want to get this out asap.


I have already rewritten the POSTNUKE module to use the postnuke session period nothing else no phpbb etc and thats going to be included in the next minor release of Photopost coming out soon.
__________________
Photopost Developer and Support Engineer

Please do not PM me for support or sales questions. Thank you for your understanding.
Chuck S is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PhotoPost 5.1 Development Progress Michael P General Discussion 13 May 20th, 2005 10:20 AM


All times are GMT -5. The time now is 11:37 AM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.