• I’m working on a Plug-in to embed Gallery2, and gallery pictures. To that effort, I’m trying to integrate WordPress users into Gallery.

    The Gallery side I’m ok on. Its WordPress that’s giving me trouble.

    I can’t find all the hooks I need so I’m using the admin_head hook (a hook not in Skippy’s List BTW).

    I’ve looked at the following:
    wp_login
    password_reset
    retreive_password

    But what I need is when a User changes their username, full name, or password, I update gallery. So what I’m now doing without user_edit hooks, is I’m using admin_head and watching for $_POST[action] == update, and then the pages profile.php and user-edit.php. If an update is made to those pages, I can get the post arguments. I need to do this because both of those updates redirect to the edit page by changing the header, and I loose any arguments before another hook is run.

    Is this the right thing to do?

    Anyone want to help?

Viewing 15 replies - 1 through 15 (of 34 total)
  • hey arnoldjw!
    I’m really looking forward to this plug-in. Plz let me know if you need any help with testing,

    Thread Starter arnoldjw

    (@arnoldjw)

    Possible Features for Embedding Gallery into WordPress:

    • Have gallery wrapped in current theme.
    • – done

    • Single Signon to WP and G2
    • – done

    • User Synchronization between WP and G2
    • – 50% done

    • Easy Configure and Include G2 Image block (this would be settings in the admin you set, like in the side show a random image block etc.)
    • Adding a G2 image easily to a post
    • Link to a G2 album from a post.
    • Add an Image to WP and G2.
    • Use G2 to resize an Image.

    Anything else?

    Wow this looks to be a really good plugin if you can get it finished and working. Probably woulnd’t switch over to Gallery 2 from Gallery 1, till they go final.

    Wohaa!! I can’t wait to get my hands on this! One small request though, I would like to have the possibility to choose the Image size and alignment when I add it to the post. Exactly like LZIL does, look here to see what I mean: http://davidseah.com/archives/2004/09/26/lzil02/
    Go arnold, go!

    flashcore

    (@flashcore)

    Hey Arnoldjw,
    I’m one that would be purely interested in just the theme wrap of gallery2, at least for now. If you can point me in the right direction of that, or proffer some advice, i’d love to hear it.

    Thanks!
    -Jim

    trueepicure

    (@trueepicure)

    I’m very excited to see that this is happening! I can’t wait for the release of the plugin.

    Thread Starter arnoldjw

    (@arnoldjw)

    Hello Flashcore,

    When I say them wrap, I mean embed gallery withing my selected WP theme. If so then its just a matter of building a WP page like the index (the real index.php)

    basically include the wp-blog-header.php
    get the current theme get_themes(); and get_current_theme();

    Include the theme stylesheet and header and footer

    <?php include(ABSPATH . $current_template_dir . ‘/wp-footer.php’); ?>

    Inbetween the header and footer you can do a simple embedding of gallery. (see gallery’s embed.php file for help.)

    <code>
    $gallerypath = "../gallery2/";
    require_once(dirname(__FILE__) . '/'.$gallerypath.'embed.php');
    $ret = GalleryEmbed::init(array(
    'embedUri' => 'wp-gallery.php', 'relativeG2Path' => $gallerypath, 'loginRedirect' => '/baby/index.php',
    'activeUserId' => 5));
    if ($ret->isError()) {
    // $ret->getAsHtml() has error details..
    exit;
    }

    $g2data = GalleryEmbed::handleRequest();
    if ($g2data[‘isDone’]) {
    exit; // G2 has already sent output (redirect or binary data)
    }

    // Use $g2data[‘headHtml’] and $g2data[‘bodyHtml’]
    // to display G2 content inside embedding application

    echo $g2data[‘headHtml’];
    echo $g2data[‘bodyHtml’];

    require_once(dirname(__FILE__) . ‘/’.$gallerypath.’embed.php’);
    $ret = GalleryEmbed::logout();
    `

    sybur

    (@sybur)

    Hi Everyone,

    Like many of you I am using WordPress and Gallery2. Two of the best open source apps I’ve seen. What I would really like to do is put an image block w/the newest image in the gallery on the main page of my WordPress blog. I tried using the code in the Site Admin section of Gallery2 but the image wouldn’t load when included in the wordpress index.php. Can anyone help me with this? I am using WordPres 1.5 and Gallery2.

    Thank you,

    Justin

    Thread Starter arnoldjw

    (@arnoldjw)

    If you’re having trouble with the image block besure your webserver, can see itself at your virtual host.

    For other problems with Gallery2’s image block I’d try the Gallery Forums, or email me and I can try and help.

    Tek

    (@tek)

    All i want is a gallery that looks like the rest of my site and I cannot do this for the life of me!!

    i’m crap!

    ski3r

    (@ski3r)

    bump

    pjl

    (@pjl)

    Hi Arnold,

    I’m not entirely clear on a couple of the parameters of the GalleryEmbed::init() are.

    ’embedUri’ => ‘wp-gallery.php’:

    Is ‘wp-gallery.php’ the “Page Template”? I’m of course assuming that the embedding code from above goes into a WordPress page template. Is this not so?

    ‘loginRedirect’ => ‘…’:

    If we’re doing anonymous logins, I’m guessing a loginRedirect isn’t even necessary?

    Finally, is there a status on your plugin? I’m trying currently to embed G2 in my WordPress site using the Siriux layout in G2. I was able to view the overview of albums, but wasn’t able to go into any albums.

    Thanks a lot!

    Pat

    ski3r

    (@ski3r)

    bump bump bump…
    I’m starting to think this is a mission impossible. All I want is to add the gallery inside my WP theme. I don’t care about the admin interface, all I want is the look. Does anyone know how to make this? I guess I’ll have to start looking for another image gallery otherwise…

    ostekjeks

    (@ostekjeks)

    You’re not the only one with that wish … But if this project get shelved, what “album service” would you recommend?

    drewament

    (@drewament)

    ski3r & tek,

    Embed in current theme?? Like this?

    http://amentfamily.us

    I will put together a step-by-step write up….and post with-in the next week (if I don’t get backlogged with other projects()

    –Drew

Viewing 15 replies - 1 through 15 (of 34 total)
  • The topic ‘Gallery 2 Integration’ is closed to new replies.