Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Topic started by: casper_shadowrider on June 05, 2004, 02:25:25 PM

Title: [solved] how to add link in profile to user gallery
Post by: casper_shadowrider on June 05, 2004, 02:25:25 PM
I am bridging my smf with coppermine.  When not bridged, coppermine has links to the users albums from the profile, but when bridged, it uses the smf user management and profile.

So what I want to do, is add a link in the profile, under the avatar (if used), that says 'See members pictures'.  It then needs to link to <a href="galleries/thumbnails.php?album=lastupby&uid=' user ID '">

Can anyone help with how and where in profile.php I need to add the code?

Even better, would be how to put such a link under the users avatar on the index pages.

ps, I searched, but could not find this, so if already discussed, my apologies.
Title: Re: how to add link in profile to user gallery
Post by: [Unknown] on June 06, 2004, 06:06:34 AM
You only need to change the Profile template to achieve this affect.

Please see:
http://unknown.network32.net/tutorial.smf_customize-profile

The URL you want will be:
galleries/thumbnails.php?album=lastupby&amp;uid=', $context['user']['id'], '

Possibly with _blank?

-[Unknown]
Title: Re: how to add link in profile to user gallery
Post by: casper_shadowrider on June 06, 2004, 08:34:59 AM
Thanks for that [Unknown],

But,

1.  Your link isn't working, getting a 'page not found' error.

2.  The url you gave me works, but it sends you to your own pics, not the member who's profile you are looking at.  When I looked at my own profile first, it seemed to work fine, but when I went to another users profile, the link still take me to my pics.  How can I change the code
$context['user']['id'] so it gets the user ID of the profile I am viewing?
Title: Re: how to add link in profile to user gallery
Post by: casper_shadowrider on June 06, 2004, 08:38:27 AM
Done it, just changed ['user'] to ['member'], and it works great, many thanks.

:D :D :D
Title: Re: [solved] how to add link in profile to user gallery
Post by: casper_shadowrider on June 06, 2004, 10:07:18 AM
I've manage to do this so the link shows both in the profile page, and on the message page.

To put the link on the message page, you need to open Display.template.php, and edit as follows;

Find, // Don't show these things for guests,
if (!$message['member']['is_guest'])


and add above it;
// show the user gallery
echo '
<table><tr><td><a href="galleries/thumbnails.php?album=lastupby&amp;uid=', $message['member']['id'], '">Members Pictures</a></td></tr></table>';


That will display the link under the user group, as below.
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.langportrd.f2s.com%2Fss%2Fscreen_028.jpg&hash=e0dbf960ba8481da3d14b8973b98ed2a3d196d59)  (https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.langportrd.f2s.com%2Fss%2Fscreen_027.jpg&hash=7e09b564f068947da37f89d6fe552ea9cdcba190)
Title: Re: [solved] how to add link in profile to user gallery
Post by: [Unknown] on June 07, 2004, 12:45:39 AM
http://unknown.network32.net/tutorial.smf_custom-profile

-[Unknown]
Title: Re: [solved] how to add link in profile to user gallery
Post by: lilqhgal on July 24, 2005, 06:18:28 PM
I know this is old, but I'm trying to implement coppermine into my smf/mambo site for my users.  I want a link to appear below their posts that goes to their gallery.  Following these directions, I got it to work right, however, when it links to the user's gallery, it pulls it from outside the iframe of the wrapper I have coppermine in with mambo.  Any ideas on how to get back inside the iframe?
Title: Re: [solved] how to add link in profile to user gallery
Post by: Gargoyle on July 24, 2005, 06:43:09 PM
This is very cool!
Title: Re: [solved] how to add link in profile to user gallery
Post by: Tony Reid on August 03, 2005, 08:48:01 AM
What if the member did not have a personal gallery? for instance my charters are the only ones with them.

Any idea on how to do this?

Tony

Title: Re: [solved] how to add link in profile to user gallery
Post by: DAB Empire on August 10, 2005, 04:30:48 PM
Unknown.  When template files are edited as you explain in your tutorial (say, I add a biography text field) where is that data stored in the database?
Title: Re: [solved] how to add link in profile to user gallery
Post by: [Unknown] on August 11, 2005, 12:04:22 AM
In the themes table with other theme options and settings.

-[Unknown]
Title: Re: [solved] how to add link in profile to user gallery
Post by: 061 on August 14, 2005, 01:23:32 PM
Quote from: [Unknown] on June 07, 2004, 12:45:39 AM
http://unknown.network32.net/tutorial.smf_custom-profile

-[Unknown]

the url isnt working...i have been trying to get it for last 2 days i think either my service dont get me to network32.net or ur server is generally closed at time i get online :(...can u plz give me some other link for this turorial
Title: Re: [solved] how to add link in profile to user gallery
Post by: [Unknown] on August 14, 2005, 11:04:59 PM
http://www.unknownbrackets.com/tutorials/custom-profile

-[Unknown]
Title: Re: [solved] how to add link in profile to user gallery
Post by: 3guk on August 17, 2005, 05:09:34 PM
Quote from: Tony on August 03, 2005, 08:48:01 AM
What if the member did not have a personal gallery? for instance my charters are the only ones with them.

Any idea on how to do this?

Tony



Then you would need something like if $context['group'] == group number echo'

in the echo section you put the link code, replace group number with the group id.

Don't quote me on the above code, im not that familiar with SMf code yet but i know its something like that.
Title: Re: [solved] how to add link in profile to user gallery
Post by: norwegian on August 17, 2005, 06:05:01 PM
there show how put in  message page, and how i can put that in profile template ??


and if possible showing the number of user (pics)
Title: Re: [solved] how to add link in profile to user gallery
Post by: DAB Empire on August 31, 2005, 03:31:48 PM
I used the same line of code, above, in the Display template and it works great.  However, if I use the same link in the Profile template it does not add the user ID at the end of the url.  The url ends "...uid= " and has noting after the =.  What do I change for this to link properly in the Profile template?

Here is what I have in the Profile template.  The entire link appears correct, except to be missing the user id.

// Show the users Coppermine gallery in Profile summary
echo '
<tr>
<td colspan="2"><hr size="1" width="100%" class="hrcolor" />
</td>
<tr>
<td>
<a href="../../../gallery/thumbnails.php?album=lastupby&amp;uid=', $message['member']['id'], '">My Ride Pics</a>
</td>';

// Some more information.
Title: Re: [solved] how to add link in profile to user gallery
Post by: [Unknown] on August 31, 2005, 11:39:50 PM
Replace $message with $context for the Profile template.

-[Unknown]
Title: Re: [solved] how to add link in profile to user gallery
Post by: DAB Empire on September 14, 2005, 01:59:16 PM
How could I have the link target their Mambo wrapped album?  Currently I have:

<table><tr><td><a href="../rides/index.php?cat=', $message['member']['id']+10000, '" target="_blank"/>My Ride Pics</a></td></tr></table>';

The Mambo wrapped link to eliterides.com/rides is now:

http://www.eliterides.com/index.php?option=com_wrapper&Itemid=179

So, I need something like:

<table><tr><td><a href="index.php?option=com_wrapper&Itemid=179/index.php?cat=', $message['member']['id']+10000, '" target="_blank"/>My Ride Pics</a></td></tr></table>';

I'm not sure exactly what it should be though.
Title: Re: [solved] how to add link in profile to user gallery
Post by: v2maxx on January 15, 2006, 12:24:53 PM
Hi there!
I just upgraded to SMF 1.1 RC2 and tried to incorporate the member's gallery but when i lick on the link, nothing happens (it takes me to the index page of the forum!)

Any suggestions? ;)
Title: Re: [solved] how to add link in profile to user gallery
Post by: ssoltz on February 22, 2006, 04:55:22 PM
This is great...but...so far I have not seen any instructions on how to do this so that the "user gallery" links can be displayed INSIDE of SMF's IFRAME if you have it installed that way.

My members would get lost this way. If this cannot be done, I guess I will have to "target=_blank" it, which I'd rather not do.

Let me know!
Title: Re: [solved] how to add link in profile to user gallery
Post by: snork13 on February 22, 2006, 05:39:40 PM
Quote from: ssoltz on February 22, 2006, 04:55:22 PM
This is great...but...so far I have not seen any instructions on how to do this so that the "user gallery" links can be displayed INSIDE of SMF's IFRAME if you have it installed that way.

My members would get lost this way. If this cannot be done, I guess I will have to "target=_blank" it, which I'd rather not do.

Let me know!

i would use a custom action...i use action=gallery, and added the action to the index, but i think this topic is something different :D
Title: Re: [solved] how to add link in profile to user gallery
Post by: Fallen Angel on November 27, 2007, 07:27:47 AM
This code works for me;


// Show the user gallery
echo '
<table><tr><td><a href="index.php?action=gallery;su=user;u=', $message['member']['id'], '">My Galleries</a></td></tr></table>';


Add that in Display.template.php just before:

// Don't show these things for guests.
if (!$message['member']['is_guest'])
{
Title: Re: [solved] how to add link in profile to user gallery
Post by: myaicons on January 10, 2008, 10:37:57 AM
are these instructions outdated for the new version of smf ????  it started in 2004 and its been 4 years???!


i just started my bridge with smf and coppermine a couple days ago and want the function to see a link to the users gallery or recent photos from coppermine in his or her smf profile and message posts.

anyone please help??!!
Title: Re: [solved] how to add link in profile to user gallery
Post by: Tony Reid on January 10, 2008, 10:47:44 AM
The above code should still work.