SMF and Coppermine personal gallery

Started by Shadowc, April 15, 2004, 10:21:57 PM

Previous topic - Next topic

Shadowc

A mod to connect SMF users to coppermine User personal pictures.

It's a function in coppermine where users can have their personal galleries, i want a function to add a link in SMF users profile, and posts that take the visitor to the users gallery.
A icon next to IM or plain text "Visit users personal images"

David

A Charter Member has already written and released a full Coppermine integration mod.
This space for rent.

Shadowc

No i don't mean the integration bridge.

A icon next to the IM icon that points to the users personal gallery in coppermine, coppermine has a function so every user can have their own personal gallery in coppermine.

I already use the itegration bridge to my gallery http://www.edgeflyfishing.com/coppermine/index.php

And my users have thier personal gallerys at: http://www.edgeflyfishing.com/coppermine/index.php?cat=1

My idea is to have an icon that takes you directly to the posting users private gallery.


Shadowc

Tnx Unknown.

But that was not what i was looking for, but i have solved the problem with users personal gallery and coppermine, i added this code in Display.template.php after the avatar code.

// Add for personal gallery

echo '
', '<a href="http://www.edgeflyfishing.com/coppermine/index.php?cat=';, $message['member']['id']+10000, '"/>Personal Gallery</a><br />';

// End

You can check it out in any post in my forum.
http://www.edgeflyfishing.com/forum


Tomer

Quote from: Shadowc on April 16, 2004, 05:12:49 PM
Tnx Unknown.

But that was not what i was looking for, but i have solved the problem with users personal gallery and coppermine, i added this code in Display.template.php after the avatar code.

// Add for personal gallery

echo '
', '<a href="http://www.edgeflyfishing.com/coppermine/index.php?cat=';, $message['member']['id']+10000, '"/>Personal Gallery</a><br />';

// End

You can check it out in any post in my forum.
http://www.edgeflyfishing.com/forum



I would suggest you also add a link to there gallery in there profile...
But very nice. :D

Shadowc

Quote from: Lamper on April 16, 2004, 05:33:10 PM
Quote from: Shadowc on April 16, 2004, 05:12:49 PM
Tnx Unknown.

But that was not what i was looking for, but i have solved the problem with users personal gallery and coppermine, i added this code in Display.template.php after the avatar code.

// Add for personal gallery

echo '
', '<a href="http://www.edgeflyfishing.com/coppermine/index.php?cat=';, $message['member']['id']+10000, '"/>Personal Gallery</a><br />';

// End

You can check it out in any post in my forum.
http://www.edgeflyfishing.com/forum



I would suggest you also add a link to there gallery in there profile...
But very nice. :D

Great idea, tnx i will fix this.

Alisha

Great thanks for the EDIT! Worked Great! Yes, even for me! :) THANKS SOO MUCH!

Although now, I would like to change this from a text link to am image to match my theme. How would I go about changing this line of code??

// Add for personal gallery

echo '
', '<a href="http://www.edgeflyfishing.com/coppermine/index.php?cat=', $message['member']['id']+10000, '"/>Personal Gallery</a><br />';

// End



Can I change this in here? Or do I have to change it someplace else?

Burpee

Um... I think it would suffice to just replace the text by an image tag...


// Add for personal gallery

echo '
', '<a href="/coppermine/index.php?cat=', $message['member']['id']+10000, '"/><img src="images/gallery.gif" border="0" alt"Personal Gallery" /></a><br />';

// End

Alisha

Wohoooo I was thinking that! But didn't know about in PHP if that would work!

Now, I just have to make the images! :) lol

THANKS :)

NoRad

So how can I check to see if the gallery exists before displaying the link?

NoRad

// Now print the second column where the members avatar/text is shown.
echo '
<td class="windowbg" valign="middle" align="center" width="150">
', $context['member']['avatar']['image'], '<br /><br />
<a href="http://www.louipimps.com/gallery/index.php?cat=', $context['member']['id']+10000, '"/><img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/gallery.gif" alt="Personal Gallery" border="0"></a><br /><br />
', $context['member']['blurb'], '
</td>
</tr>';



BTW - This is my code modification so far incase anybody wants to use it. I had problems using the other code in this thread. This places a Gallery image below your avatar and above the personal text. Make sure you change my hardcoded URL. Anybody know how to redo that URL so that it's relative (and works) ?? I have issues backing out of the forum/ folder using the code I've seen elsewhere.

[Unknown]

// Now print the second column where the members avatar/text is shown.
echo '
<td class="windowbg" valign="middle" align="center" width="150">
', $context['member']['avatar']['image'], '<br /><br />
<a href="/gallery/index.php?cat=', $context['member']['id'] + 10000, '"><img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/gallery.gif" alt="Personal Gallery" border="0" /></a><br /><br />
', $context['member']['blurb'], '
</td>
</tr>';


That should work.  You had "<a ... /><img ...></a>" where you wanted "<a ...><img ... /></a>".

-[Unknown]

quake101

Great idea!
Where do I add this? I can't find the file. :(

[Unknown]

The Display template, Themes/yourtheme/Display.template.php.

-[Unknown]

quake101

ahh, if i don't have one for my theme i can just copy the one out of the default theme and use it right?

NoRad

Yes.

I know this is a little off-topic, but there is some relation here... I have a public gallery for silly photos. User links to their personal gallery from profile and uploads a photo. It does not warn them that they don't have a gallery because it sees that they can contribute to the public gallery. They upload the photos and the only place to put them is in the public gallery. Bleh!

So what I'm thinking is one of two solutions:

1. When user account is created in SMF, it creates a default album for their photos in coppermine.
or
2. When user uploads in coppermine it will prompt them to create albums if they don't have them.

I know neither solution is fool proof, but I've had this problem occur 4 times in one week.

Aravot

// Now print the second column where the members avatar/text is shown.
echo '
<td class="windowbg" valign="middle" align="center" width="150">
', $context['member']['avatar']['image'], '<br /><br />
<a href="/gallery/index.php?cat=', $context['member']['id'] + 10000, '"><img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/gallery.gif" alt="Personal Gallery" border="0" /></a><br /><br />
', $context['member']['blurb'], '
</td>
</tr>';


The above code didn't work for me had to change $context['member']['id'] + 10000, to $message['member']['id'] + 10000, like below

// Now print the second column where the members avatar/text is shown.
echo '

<a href="/gallery/index.php?cat=', $message['member']['id'] + 10000, '"><img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/gallery.gif" alt="Personal Gallery" border="0" /></a><br /><br />';

russ

#18
I was wondering if it would be possible to put the same ....

// Now print the second column where the members avatar/text is shown.
echo '

<a href="/gallery/index.php?cat=', $message['member']['id'] + 10000, '"><img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/gallery.gif" alt="Personal Gallery" border="0" /></a><br /><br />';


.... in a different page, for instance index.template.php as i would like a link to the users invidual galleries to appear else where

:) thanks! :)

update - ive tried putting it in index.template.php but the link only points to 10000 which is anonymous....

Aravot

Quote from: russ on February 01, 2005, 06:37:27 AM
update - ive tried putting it in index.template.php but the link only points to 10000 which is anonymous....

Try changing
$message['member']['id'] + 10000 to $context['member']['id'] + 10000, and see if it works

Advertisement: