Firefox PHP

Place Phorum inside existing site body?

Posted by BryanB 
Re: Place Phorum inside existing site body?
February 06, 2013 06:54PM
I'm looking at the phorum codes, trying to figure out where all the URLs are generated.

If ALL forum links are generated as a link to my surrounding CMS, with an added _GET section that includes what ever is needed to call phorum inside my plugin:

$phorumUrl = "[localhost]; . $_GET['phorumParms']; // this is too simple. I might need an &Phorum_Request_Method=POST etc

But if I get the call URL constructed properly, then, inside my plugin, I can say:

$plugin_return_value_string = file_get_contents($phorumUrl); // where all your header redirects are taken care of by file_get_contents, which works without CURL because both are on my server. Then I can strip off html and body elements with a one line preg_replace. Now I can use it any way I want.....I don't care about admin stuff. All I need is list read and post to work this way.

....Or am I still out to lunch? Seems like it should work, if and only if I can get phorum to call my CMS instead of itself, with any needed _GETs tacked onto the end of the URL to my CMS.

This would be valuable to me for SEO and layout reasons. I get my layout without diving into the *.tpl template morass. That way IT IS part of my CMS.

Edited 2 time(s). Last edit at 02/06/2013 06:58PM by salmobytes.
Re: Place Phorum inside existing site body?
February 06, 2013 06:59PM
Well, as far as I know the file_get_contents will only output the raw html. Not any of the cookies needed for the authentication.
Also you will have to strip down the template to the bare minimum as a full page in the div won't work.

For your url handling - check how the portable code is doing it -> [] with its custom_get_url function.

Thomas Seifert
Phorum Development Team /
Custom Phorum and general software development
worry-free Phorum Hosting
Re: Place Phorum inside existing site body?
February 06, 2013 08:14PM
Ah. Cookies. Damn. I suppose that could be handled too. But it's starting to get ugly again. I will look at the github codes. Thank you.
Sorry, only registered users may post in this forum.

Click here to login