Support » Plugins » mg2 and WP 1.5

  • Does anybody have any experience integrating minigal mg2 into WP 1.5? I have been playing with this for awhile now and am just going around in circles…


Viewing 12 replies - 1 through 12 (of 12 total)
  • what is minigal mg2? I am sorry but not everyone here uses it, so you have to provide references, or ask at the appropriate thread after finding it.

    What have you done so far, with respect to trying to get it to work?

    Sorry, I though it was a popular product. mg2 ( is the latest version of minigal wich is an image gallery program that has good support for exif information.

    I have had some assistance from who has integrated the product into EBA-News Beta 7 but when I tried the same php include for the header file he used, it wouldn’t work. I have tried different things like using the WP get_header function or using a php include to wp-blog-header.php but am not having success.

    If anybody who has used mg2 they will notice there are “header” and “footer” type files under the templates directory. Apparently the key is to edit the imageview and thumbnail begin/end php scripts to use the includes but I have had no luck.



    I’m trying to do the exact same thing right now. I’m okay when it comes to html and css, but this is my first foray into php… I’m lost. I’ve tried using various php includes as well, with no luck.

    So, I’m hoping there’s a way to call the WP PHP functions from a directory outside the install directory. For example:

    WP is installed in my root directory, “public_html”. I’ve installed MG2 in a subdirectory, “public_html/photos” Is there a way to use a WP function… something simple like, <?php bloginfo(‘name’); ?>, from a php file in the “public_html/photos” directory?

    If that’s possible, I think it may solve most of my woes.


    I have now been able to accomplish the task. I am sure there are different ways to accomplist it, but this works nicely. In a nutshell:

    I have wordpress in /web/wordpress and mg2 in /web/wordpress/photos

    I am using a custom theme so I copied the contents of wp-content/themes/name/index.php from the top of the file up to and including the line <div id=”content”> and saved that to wordpress/photos/mgheader.php.

    I then made a file that contains:
    <?php get_footer(); ?>
    and saved that as /web/wordpress/photos/mgfooter.php.

    Now, whatever theme you are using for mg2, the important files are found in mg2_dir/skins/skin_name/templates and we will edit viewimage_begin and _end.php as well as thumbnails_begin and _end.php.

    In the thumbnails_begin.php and viewimage_begin.php go to around line 27 and you will see <body class=”mg2body”> well right below that line enter: <?php include (“/full_path_to_wordpress/photos/mg2header.php”); ?>

    In thumbnails_end.php and viewimage_end.php right before the </body> at the end enter a line that says <?php include(“/full_path_to_wordpress/photos/mg2footer.php”); ?>

    Of course, I am trying to remember everything off the top of my noodle that I did last night but that is the bulk of it. You will probably need to edit the mg2_dir/skins/skin_name/css/style.css to adjust some values to make it all fit.

    Give it a try and let me know how it works out for you…

    Really like this gallery looking forward to getting it to look like wordpress however I’m getting this error:

    Fatal error: Call to undefined function: get_header() in /homepages/8/d105226381/htdocs/stuart/wordpress/gallery/mg2header.php on line 1

    I’m new to php etc. the <php get_header> does this have to be redirected from /wordpress/gallery/ to /wordpress/ and how do you do that?

    I have exactly the same problem – good to know it’s not just me 😛

    I’ve sent an email to MailGuard, hopefully this will be sorted soon… 😉


    I have sent the info to Basilisk. After setting up a dev environment with a new wordpress install, mg2, and using the Gespaa theme, I determined that:

    If you are following my documentation, the following are the changes requried:

    In mg2header.php you only require the following:


    mg2footer.php is a single line:

    <?php get_footer(); ?>

    It’s all working great now 😀

    Just a pity that it needs to be changed for each skin….

    Thanks for all your help MailGuard!

    i tried this as well… only with a different custom theme (not sure if it matters… but i get a bunch of errors…

    Hi, I hope this thread isn’t abandoned and I can get some help.

    I’ve tried following the tutorial of MailGuard both from this thread, and from the MG2 site:

    I managed to get my first errors to go away, which was that the thumbnails_begin.php, etc… files weren’t finding the mg2header.php and mg2footer.php files. I just had to fix the URLs with direct ones.

    This is the gallery as it is right now:

    I’m not sure if I should be seeing my header from the blog or what. And the footer apparently seems to not be working, and I don’t know what to do about it.

    My mg2footer.php file contains <?php get_footer(); ?>

    My mg2header.php file contains <?php

    I didn’t even know what to do with the whole portion of MailGuard’s tutorial that talks about the style.css being renamed to mg2style.css. Then I realized he was talking about his own specific code that had style type="text/css" media="screen">
    @import url( <?php bloginfo('stylesheet_url'); ?> );

    Mine, a customized kubrick, only read this in the index.php portion that was supposed to be copied in his tutorial: <?php get_header(); ?>
    <div id="content" class="narrowcolumn">

    Can anyone enlighten me on how to get the pieces to click together so that the header/footer shows up and I’m done with this hang-up? It would be much appreciated.

    I believe I have a similar problem to manvsmonsters.

    My wordpress website is:

    and my photos website is:

    I am still getting:
    "Fatal error: Call to undefined function get_header()"


    <?php get_footer(); ?>

    Manvsmonsters, to quote your post:

    My mg2header.php file contains <?php

    Why do you link your theme, instead of the above suggested info for mg2header.php? (Not that myn is working either!)

    Thanks in adavnce, anyone.. ?

    HEY GUYS!!

    I love answering my own posts 🙁

    The answer to the problem of both myself, and of manvsmonsters, is that I was using a href include rather than a file path include to a php file.

    Thanks to my friend Tristan S. who helped me – Cheers buddy!

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘mg2 and WP 1.5’ is closed to new replies.