View Single Post
Old September 28th, 2005, 03:04 PM   #11 (permalink)
Axe
Member
Verified Customer
 
Join Date: Dec 2002
Posts: 52
After having a look at his genURL() function, I don't see how it would require a separate version of the software.

Yes, he rewrote the URLs (kinda). He rewrote them to go through that function. That function looks to see if $Globals['vbversion'] is "postnuke", and if it is, send back a module URL, if it isn't, send back the URL as normal.

Once that's done, it doesn't need to be done again in future versions, and with that function in place, it'll still work as a normal standalone.

phpBB2 is setup in a similar fashion, whereby all links are sent through the append_sid() function. PNphpBB2 exploits this function for the same purpose Mike does in his genURL() function.

All of his other mods check to see if it's running inside PostNuke, and if it is, do the magic, if it isn't, then carry on as normal.

It'd take a while, sure, but like I said, it only needs to be done once, and wouldn't affect PhotoPost's standalonability.

The only other quick(er)-method would be simply caching the output buffer in a variable (ob_start(), ob_get_contents(), ob_end_clean()) and using a function to parse that variable searching & replacing PhotoPost URLs for the PostNuke module equivalents, and a couple of checks to include PostNuke's header & footer if it's running as a PostNuke module.

That would be much quicker to implement, the problem is, if the PostNuke site is running some mod_rewrite work for "Search Engine Friendly URLs", chances are they're already using the output buffer caching features of PHP for this, so you could end up with conflicts. In a stock PostNuke setup, it should work fine though.
Axe is offline   Reply With Quote