About this topic

  • Posted by Rashell 2 years ago. There are 20 posts. The latest reply is from byron.
  • This topic is not resolved

No tags yet.

  1. I was wondering if there was a way to create a user gallery on the fly for each member (similar to what the Author page does) that can be placed on another page or used in another area of the template?

    Could I just swipe code from a file and copy it to another page or widget area?

    Rashell

    BTW-love this plugin. find it more useful than nextgen.

  2. Rashell,

    Thanks for the comment! PhotoSmash certainly does things that some people need that really aren't available elsewhere.

    I think you can do a shortcode something like: [photosmash gallery_type='contributor' author=2 no_form=true]

    Note that you'd have to supply the Author's user ID (not their login name).

    I haven't tried it lately, but I think it will work. Give it a try and see if it does what you need. You can also use a custom layout if needed, just add: layout='my_layout' to the shortcode.
    Cheers,
    Byron

  3. Byron,

    Thank you so much!!!

    It does work

    just not for what I was trying to do. You see I have this plugin called Mingle (sort of like a FB for wordpress anywho...), it creates a dynamic user profile that isn't an author page. And it somehow hijacked other widgets so that if they link in anyway to the author page they are directed to this user profile rather than the typical "author" page. But PhotoSmash, which is the perfect photo gallery, goes to the "author" pages. So I have been trying to figure out how to combine them under one roof (so to speak) with the least amount of manual intervention.

    On top of all of that I'm using a template (Atahaulpa -sp?) that doesn't have an author.php so the easiest file I'd found to alter the code is in the mingle plugin. At least that was my assessment.

    Rashell

  4. Rashell,

    Thanks for the kind comment!

    Mingle looks very interesting. I've been wanting some of those features myself, so I might have to give it a try at some point.

    Something you might try would be to tweak the Mingle code and add something like:

    $author_id = get_query_var('author');

    echo do_shortcode("[photosmash gallery_type='contributor' author=" . $author_id . " no_form=true]");

    where you want the gallery to show.

    Not sure if that will work or not, but worth a try.
    Cheers,
    Byron

  5. i just updated the mingle plugin and whatever changed broke the compatibility of the 2 plugins altogether. Basically it makes it impossible to pull up the box to upload images. Photosmash is more important so I'm dumping the Mingle plugin.

    Just thought I'd give you the FYI since you were interested in the plugin.

    Bummer,

    Rashell

  6. Bummer indeed! I really would like some of the community features it has. But, I've read that they will be merging WP and WPMU, so we should be able to use BuddyPress at some point in the future. Hopefully that one will work.

    BB

  7. Mingle fixed the problem on their end, so I tried the shortcode you gave me. Didn't work. But I think it's another Mingle configuration thing. I tried using the author_post template tag and it gave me a strange output too. Anyway... waiting on BP or a fix from Mingle. Not a super supportive team over there, though. Who knows if I keep tinkering on the backend of things I may just figure it out...

    Thanks much,

    Rashell

  8. Hi Rashell,

    I'm hoping for Buddy Press too!

    Support can be tough.

    You mentioned that there wasn't an author.php. The next one that WP tries for in the hierarchy is archive.php and after that index.php. So, if you've got an archive.php, try that shortcode in there. I just tried it in my archive.php and it worked fine. I think it will work for you!

    So, if it does work, and other cases are using archive.php, just change it so it looks like this:

    $author_id = get_query_var('author');

    if($author_id){
    echo do_shortcode("[photosmash gallery_type='contributor' author=" . $author_id . " no_form=true]");
    }

    Hopefully that'll do it!
    Cheers,
    Byron

  9. Sorry to revive an old post but I'd be interested in having it work with Mingle, has anyone found a solution yet?

    BTW, Mingle's next release will have 2 hooks added for profiles, hopefully that'll help.

    Cheers,
    Gene

  10. Hey Gene - We meet again. ;) I was just searching through the forums here as well to see if anyone has found a solution for this. I'll try the last post that Bryon posted and see if that works. I am using Thesis Themes so they don't have an author.php. However, with Thesis you only have to edit the custom_functions.php file then possibly the custom.css.

    I am curious to see if Rashall was able to get her working.

  11. Here is the profile page for mingle. I believe this is where the code would need to be placed. However, not sure what code to put in from photosmash. I tired the code from the post that Bryon did but I didn't work. Any ideads on this?

    (<?php global $mngl_user, $mngl_friend, $mngl_options; ?>
    <?php $display_profile = ( $user->privacy == 'public' or
    MnglUser::is_logged_in_and_an_admin() or
    MnglUser::is_logged_in_and_visible() ); ?>

    <table class="mngl-profile-table">
    <tr>
    <td valign="top" class="mngl-profile-table-col-1 mngl-valign-top">
    <table>
    <tr>
    <td>
    <?php echo $avatar; ?>
    <?php echo $mngl_friends_controller->display_add_friend_button($mngl_user->id, $user->id); ?>
    <?php echo do_action('mngl-profile-display',$user->id); ?>
    </td>
    </tr>
    <tr>
    <td valign="top" class="mngl-valign-top">
    <?php if($display_profile) { ?>

    <?php if(isset($mngl_options->field_visibilities['profile_front']['bio']) and !empty($user->bio)) { ?>
    <p class="mngl-profile-bio"><?php echo MnglBoardsHelper::format_message($user->bio); ?></p>
    <?php } ?>
    <div class="mngl-profile-information">
    <?php if(isset($mngl_options->field_visibilities['profile_front']['name']) and !empty($user->first_name) and ($user->first_name != $user->screenname)) { ?>
    <p class="mngl-profile-field"><?php _e('Name', 'mingle'); ?>:
    <?php echo wptexturize(stripslashes($user->first_name)); ?>
    <?php if(!empty($user->last_name)){ ?>
    <?php echo " " . wptexturize(stripslashes($user->last_name)); ?>
    <?php } ?>
    </p>
    <?php } ?>
    <?php if(isset($mngl_options->field_visibilities['profile_front']['sex']) and !empty($user->sex)) { ?>
    <p class="mngl-profile-sex"><?php _e('Gender', 'mingle'); ?>:
    <?php echo $user->sex_display; ?></p>
    <?php } ?>

    <?php if(isset($mngl_options->field_visibilities['profile_front']['location']) and !empty($user->location)) { ?>
    <p class="mngl-profile-location"><?php _e('Location', 'mingle'); ?>:
    <?php echo wptexturize($user->location); ?></p>
    <?php } ?>
    <?php if(isset($mngl_options->field_visibilities['profile_front']['birthday']) and !empty($user->birthday)) { ?>
    <p class="mngl-profile-location"><?php _e('Birthday', 'mingle'); ?>:
    <?php echo wptexturize($user->birthday); ?></p>
    <?php } ?>
    <?php if(isset($mngl_options->field_visibilities['profile_front']['url']) and !empty($user->url)) { ?>
    <p class="mngl-profile-url"><?php _e('Website', 'mingle'); ?>:
    <?php echo make_clickable($user->url); ?></p>
    <?php } ?>
    </div>
    <?php } ?>

    $author_id = get_query_var('author');

    if($author_id){
    echo do_shortcode("[photosmash gallery_type='contributor' author=" . $author_id . " no_form=true]");
    }

    <p><?php _e('Friends', 'mingle'); ?>:<div class="mngl-profile-friend-grid-wrap"><?php echo $mngl_friends_controller->display_friends_grid($user->id); ?></div></p>
    </td>
    </tr>
    </table>
    </td>
    <td valign="top" class="mngl-profile-table-col-2">
    <table class="mngl-profile-body">
    <tr>
    <td>
    <div class="mngl-profile-name"><?php echo $user->screenname; ?></div>
    <?php
    if(!$display_profile)
    require( MNGL_VIEWS_PATH . '/mngl-boards/private.php' );
    ?>
    </td>
    </tr>
    <tr>
    <td>
    </td>
    </tr>
    <tr>
    <?php if($display_profile) { ?>
    <td valign="top" width="100%"><div class="mngl-board"><?php echo $mngl_boards_controller->display($user->id); ?></div></td>
    <?php } ?>
    </tr>
    </table>
    </td>
    </table>
    )

  12. Hi Darren, fancy meeting you here, LOL

    Hopefully, Byron will know what to add/modify in the above code.

    BTW, when they'll release Mingle .33, all tables should be changed to DIV's.

    Cheers,
    Gene

  13. Hi Byron,

    Sorry to be so persistent but is there some code modification/addition to "mesh" Mingle profiles with Photosmash?

    If you could come up with a patch or plugin to make the two work together, a lot of people would appreciate it. Mingle has been downloaded over 45,000 times and has quite a following who are looking for a compatible photo gallery plugin and I'm positive that a lot of them would gladly make a donation.

  14. Hey guys,

    Is that Profile page the logged-in user's profile or are they viewing someone else's profile?

    If it's the logged-in user's profile, then you should be able to change this line from Darren's code above:

    $author_id = get_query_var('author');

    To:

    $author_id = $user->ID;

    Or if that doesn't work, try:

    $author_id = $user->id;   \\ I noticed in the above code that this is how the Mingle function referred to the User ID.  In WP code, the $user object has ID as:  $user->ID

    If, however, the logged-in user is viewing someone else's profile, then we need to figure out what Mingle's equivalent of the WordPress user's ID is of the person's profile being viewed. That might be changing the same line to something like:

    $author_id = $mngl_user->id;

    Let me know if any of that does the trick...We'll write it up nice and neat so others can copy/paste.

    Cheers,
    Byron

  15. "Is that Profile page the logged-in user's profile or are they viewing someone else's profile?"

    Hi Byron,

    Actually, this is the public profile which can be viewed by other users (and the user himself, of course).

    Cheers,
    Gene

  16. Thanks, Gene.

    Hopefully this tweak will do the trick:

    \\Change this:
    $author_id = get_query_var('author');
    \\ to this:
    $author_id = $mngl_user->id;

    Cheers,
    Byron

  17. Thanks Bryon - for repsonding! I've been out of pocket for the last two weeks and just came back to check this post. Thank you again and I'll give this a try and let you know how it works out.

    Darren

  18. Please do...Thanks,
    BB

  19. Check this, i came to this solution when I was build a small socialnetwork ^^ http://wpmingle.com/forum/?mingleforumaction=viewtopic&t=193.0 I hope my way can help you guys

  20. Thanks, iMetal!

RSS feed for this topic