Welcome to Geeklog, Anonymous Friday, March 29 2024 @ 03:53 am EDT

Geeklog Forums

Intergrating with another PHP program


Jacques

Anonymous
Are there any instructions available for intergrating Geeklog with another PHP program? I have looked around but have not found anything. All I really want to do is have one login function - for the rest they can stay seperate. Any help would be appreciated.
PS. This is my 3rd Geeklog site - You guys are awesome!! I will be making some donations as soon as I can - Seriously!
 Quote

Status: offline

trinity

Forum User
Regular Poster
Registered: 01/30/05
Posts: 80
Well its not the kind of thing thats easly documented.

Every php app is writen diferently and uses its own database. The key thing is modifying the app to use the same user database as geeklog or automateing a sync between the two systems. As far as wrapping the theme around the app there are two ways to do this. you can eather use the external site plugin, or you can get your hands dirty and modify the apps code and turn it into a plugin. There ae documents avaliable on how to create a plugin on this site as well as a plugin development template. The best place to find what plugin API hooks are avalable is to look at the plugin libs under /system. I am some day going to finish writeing a plugin API doc. i started it for my own use but i think the comunity would have use for it.

So many things i want to do...so little time
Banging your head
glFusion - Technology Fused with Style - www.gllabs.org
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
As Trinity said, the Plugin API would be one way to go. The other would be to just try and include lib-common.php and go from there.

As has been posted here a couple of times already, to wrap something in Geeklog's framework you'll only need about 5 lines of PHP code like this:
Text Formatted Code
require_once ('lib-common.php');

echo COM_siteHeader ('menu');
echo COM_startBlock ('Some block title here'); // optional

// whatever you want to wrap goes here

echo COM_endBlock (); // optional
echo COM_siteFooter ();
 

Of course, if you try to wrap a complex script like that, you're risking variable name conflicts. But it's worth a try if you're after a quick'n'dirty solution ...

bye, Dirk
 Quote

All times are EDT. The time is now 03:53 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content