G2Mod [Bugfix/Modification]

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
reto
Forum Members
Forum Members
Posts: 24
Joined: Sat Feb 18, 2006 3:35 pm

G2Mod [Bugfix/Modification]

Post 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
Post Reply

Return to “Modules/Add-Ons”