Starting Elgg Integration Project

mrtrombone

Joined: 2007-08-31
Posts: 2
Posted: Fri, 2007-08-31 10:23

Hi

I am just starting to try and create an Gallery2 plugin for Elgg and am having a few problems.

When I open gallery2 straight form my browser everything looks normal. I see this
[IMG]http://i196.photobucket.com/albums/aa249/mrtrombone/GalleryMain.jpg[/IMG]

However when I open from Elgg I get the following
[IMG]http://i196.photobucket.com/albums/aa249/mrtrombone/GalleryElgg.jpg[/IMG]

As you can see I cannot see any images (including the gallery logos) and there is no css.
At the moment I am using the demo main.php without any changes, except for specifying the path to gallery

Any help appreciated

Cheers
Mark

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Fri, 2007-08-31 10:38

something like this:

        $header_text = '';
	$needDone = false;
		
	G2B_G2_init(); // call your gallery init function
	$g2_data = GalleryEmbed::handleRequest(); // gallery data array
		
	$needDone = true;
	
	// get the javascript and css links from the <head> html from G2
	if ( isset( $g2_data['headHtml'] ) )
	{
		$javascript = array();
		$css = array();

		list( $title, $css, $javascript ) = GalleryEmbed::parseHead( $g2_data['headHtml'] );
	
		foreach( $css as $stylesheet )
			$header_text .= $stylesheet."\n";
		
		foreach( $javascript as $script )
			$header_text .= $script."\n";
	}

	if ( $needDone )
		GalleryEmbed::done();
		
 	return $header_text;

These sample functions are readily available in the current integration packages found in the codex for you to browse.
-s
FlashYourWeb and Your Gallery

 
mrtrombone

Joined: 2007-08-31
Posts: 2
Posted: Fri, 2007-08-31 19:34

Thanks for your reply.
It turned out my embeduri was not correct.

Cheers

 
gpo

Joined: 2008-05-05
Posts: 68
Posted: Sat, 2008-10-11 12:18

Where did you get the bridge module for elgg, can you share it ?

 
pipwax

Joined: 2003-12-29
Posts: 1
Posted: Fri, 2009-05-29 19:13

I am interested in this project! I would like to help!