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 ?:D (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.
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 ??
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.
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 :)
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 :p
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.
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 :cool:
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
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.
omegatron Thanks for the reply :)
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 !
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
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 ............. :)
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
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 :p
Demo on the horizon :)
Right but hense you get into what I have said all along about sessions ;)
Look forward to your demo. Now this is POSTNUKE right?
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 :p) to anything that uses:
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.
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.
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?
Now called as a PN module:
ALL the necessary URL's now go thru a function to change the syntax to PN style, e.g.:
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. :p
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 :D
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 :p) 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
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 !! = $$$
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?
OK, FINALLY !!
Here's a link to the Postnuke/Photopost module demo:
Postnuke Photopost module demo
Check it out - can leave comments/questions here or on the message boards at my site:
M.P./Omegatron - give it a look see and try it out. I hope we can get this out to others that are interested !!
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.
|All times are GMT -5. The time now is 08:39 PM.|
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0