1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Gallery2 Simple Embed

Discussion in 'Programming' started by elkiwi, Sep 30, 2005.

  1. #1
    Can anyone help me? I'm trying to embed Gallery2 into a simple php page. I don't need any logins or session data, I just want to display the gallery in an existing page.
    SEMrush
    I've read the embedd instuctions but they seem to relate only to cms systems.

    <?php 
    require_once(dirname(__FILE__) . '/gallery2/embed.php');
    $ret = GalleryEmbed::init(array(
    'embedUri' => 'people.php', embedPath => '/', 'relativeG2Path' => 'gallery2/',
    'loginRedirect' => 'people.php', 'activeUserId' => ''));
    GalleryEmbed::init();
    $params = array( 'blocks' => 'randomImage',
             'show' => 'date|views|fullSize' );
    $content = GalleryEmbed::getImageBlock($params);     
    if ($content) print_r($content);
    GalleryEmbed::done();
    ?> 
    Code (markup):
    That just produces errors

    The gallery is here

    If anyone can help I'd be very greatful.
     
    elkiwi, Sep 30, 2005 IP
    SEMrush