Okay, I spent the last hour trying to figure out how to put a button linking to my users coppermine galleries below their avatars, but still opening in a mambo page. I also found out how to make wrapped pages like coppermine to go back to the top of the page after clicking on a link. The solution not only works but also allows us to pass ANY variables to a wrapper. Note I just merged a whole bunch of different solutions together and hacked them up so they would work for us.
First, insert the following code before the words "// auto height control" in wrapper.php in your wrapper components folder.
// pass all except Mambo specific parameters to the wrapper
$allparams = '?';
if (isset( $_GET['option'] ))
$workarray = $_GET;
if (isset( $_POST['option'] ))
$workarray = $_POST;
reset($workarray);
while (list($key, $val) = each($workarray)) {
if (($key != 'option') && ($key != 'Itemid'))
$allparams = $allparams . $key . '=' . $val . '&';
}
$row->url = $row->url . $allparams;
Now open your display.template.php in your theme and add the following code after where you want the gallery link to occur, I placed mine below the personal text which you can find by searching for:
// Show their personal text?
// Add for personal gallery
echo '
', '<a href="' . $mosConfig_live_site . '/index.php?option=com_wrapper&Itemid=66&cat=', $message['member']['id']+10000, '"/><img border="0" src="' . $settings['images_url'] . '/gallery.gif" width="75" height="35" alt="" /></a><br />';
How this is going to work (this is for the info of those who want to use this elsewhere):
Now anytime you call a wrapper from smf or anywhere else anything that you add to the end of the link with &putparamatershere will get added on to the actual wrapped page. For example if you want to link to a user gallery the address is usually
http://www.yoursite.com/coppermine/index.php?cat=15031 but your coppermine wrapper is actually something like
http://www.yoursite.com/index.php?option=com_wrapper&Itemid=66, and it wraps
http://www.yoursite.com/coppermine/index.php. Now that we have edited wrapper.php if you call the wrapped item by saying
http://www.yoursite.com/index.php?option=com_wrapper&Itemid=66&cat=10001 the &cat=10001 will become ?cat=10001 and get appended to the
http://www.yoursite.com/coppermine/index.php and become a link to that users gallery,
http://www.yoursite.com/coppermine/index.php?cat=10001.
Let me know if you get this to work, or if you need help! This can really help with integrating other mambo/smf items.