Page 1 of 1

G2Mod [Bugfix/Modification]

Posted: Sat Feb 18, 2006 3:48 pm
by reto
Hi

I'm new to CMS MS - thanks for this great little cms, it's exactly what I was looking for for a long time...

Anyway. I'm using the G2Mod and found the integration of info (css, content type, etc) a bit "handmade". G2Mod is actually removing silently. I therefore suggest removing the function

Code: Select all

ContentPostRender(&$content)
..and editing the function showGallery() as follows:

Code: Select all

	function showGallery()
	{  
        if(isset($this->g2data))
		{
            if (isset($this->g2data['headHtml'])) {
                list($title, $css, $javascript) = GalleryEmbed::parseHead($this->g2data['headHtml']);
                print $css[0];
            }
            print $this->g2data['bodyHtml'];
		}
		elseif($this->openGallery2($this->cms->variables['page_id']))
        {
            if (isset($this->g2data['headHtml'])) {
                list($title, $css, $javascript) = GalleryEmbed::parseHead($this->g2data['headHtml']);
                print $css[0];
            }
            print $this->g2data['bodyHtml'];
		}
	}
If you need more than the css adjust the code to your needs. This results in proper inclusion of the CSS file provided by the gallery2 theme.

Hope this is useful.
Bye,
Reto