Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+- Forum Stats

Members
Total Members: 4255
Latest: andreios
New This Month: 3
New This Week: 1
New Today: 0
Stats
Total Posts: 43259
Total Topics: 7518
Most Online Today: 64
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 117
Total: 117

Author Topic: User gallery link from userCP/profile  (Read 12399 times)

0 Members and 1 Guest are viewing this topic.

Offline TeamVTEC

  • Member
  • *
  • Posts: 45
    • View Profile
User gallery link from userCP/profile
« on: October 26, 2006, 03:49:18 pm »
question time, i have the user CP mod and I've changed one of the options to "My Gallery" so that when users look at their profile they can click to their personal gallery.
But how do i achieve this? i tried different things like:

http://forum.sirfanaticsholland.com/index.php?action=gallery;user;u=
http://forum.sirfanaticsholland.com/index.php?action=gallery;su=user;u=

here's the part of code i use:

Code: [Select]
<a href="', $scripturl, '?action=gallery;su=user;u=', $context['member']['id'], $context['session_id'], '"><b>My Gallery</a><br>
</b></font><font face="Verdana" size="1">Click here to take a look in your personal Gallery, to change and upload your pictures.</font></td>

http://forum.sirfanaticsholland.com/index.php?action=usercp

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16436
    • View Profile
Re: User gallery link from userCP/profile
« Reply #1 on: October 26, 2006, 04:00:47 pm »
I would need to the usercp code
It should be something like this
Code: [Select]
<a href="', $scripturl, '?action=gallery;su=user;u=', $context['member']['id']
But not sure if usercp has $context['member']['id'] defined.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline TeamVTEC

  • Member
  • *
  • Posts: 45
    • View Profile
Re: User gallery link from userCP/profile
« Reply #2 on: October 26, 2006, 04:16:33 pm »
i get this:

An Error Has Occurred!
No user selected.



here's the complete code attached hope that helps.


Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16436
    • View Profile
Re: User gallery link from userCP/profile
« Reply #3 on: October 26, 2006, 04:27:27 pm »
Change
Code: [Select]
<a href="', $scripturl, '?action=gallery;su=', $context['member']['id'], $context['session_id'], '"><img border="0" src="usercp/ecran.png" width="80" height="80"></a></font></td>
To
Code: [Select]
<a href="', $scripturl, '?action=gallery;su=user,u=', $context['member']['id'],'"><img border="0" src="usercp/ecran.png" width="80" height="80"></a></font></td>
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline TeamVTEC

  • Member
  • *
  • Posts: 45
    • View Profile
Re: User gallery link from userCP/profile
« Reply #4 on: October 26, 2006, 04:33:51 pm »

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16436
    • View Profile
Re: User gallery link from userCP/profile
« Reply #5 on: October 26, 2006, 04:43:06 pm »
still the same error, no change

http://forum.sirfanaticsholland.com/index.php?action=usercp
Guests will get that error since their is no user id set should work for logged in members.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16436
    • View Profile
Re: User gallery link from userCP/profile
« Reply #6 on: October 26, 2006, 04:44:50 pm »
Oops had a bad comma in their
change
Code: [Select]
<a href="', $scripturl, '?action=gallery;su=user,u=', $context['member']['id'],'"><img border="0" src="usercp/ecran.png" width="80" height="80"></a></font></td>
To
Code: [Select]
<a href="', $scripturl, '?action=gallery;su=user;u=', $context['member']['id'],'"><img border="0" src="usercp/ecran.png" width="80" height="80"></a></font></td>
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline TeamVTEC

  • Member
  • *
  • Posts: 45
    • View Profile
Re: User gallery link from userCP/profile
« Reply #7 on: October 26, 2006, 04:50:32 pm »
still nothing ;D see for yourself, the '?action=gallery;su=user;u=' doesn't seem to point to users numbers when clickin on it

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16436
    • View Profile
Re: User gallery link from userCP/profile
« Reply #8 on: October 26, 2006, 04:56:01 pm »
Bah
$context['member']['id'] is not defined anywhere thats' why it does not work
Change the globals of the file to
Code: [Select]
global $db_prefix, $scripturl, $txt, $user_info,$settings, $modSettings,$ID_MEMBER;Then change the MyGallery part to
Code: [Select]
<a href="', $scripturl, '?action=gallery;su=user;u=', $ID_MEMBER,'"><img border="0" src="usercp/ecran.png" width="80" height="80"></a></font></td>


Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline TeamVTEC

  • Member
  • *
  • Posts: 45
    • View Profile
Re: User gallery link from userCP/profile
« Reply #9 on: October 26, 2006, 05:01:23 pm »
Hehe good job buddy ;)

 

Related Topics

  Subject / Started by Replies Last post
12 Replies
9931 Views
Last post February 04, 2007, 09:55:09 pm
by evaki
2 Replies
4878 Views
Last post January 18, 2008, 12:18:30 am
by MazdaClubTR
5 Replies
9089 Views
Last post April 30, 2008, 07:20:47 pm
by SMFHacks
1 Replies
2758 Views
Last post August 20, 2018, 02:40:58 pm
by SMFHacks
5 Replies
950 Views
Last post July 04, 2022, 11:00:01 pm
by Hatshepsut

+- Recent Topics

No thumbnails on new uploads by SMFHacks
March 27, 2024, 02:10:41 pm

Display the Contact Page for guests by SMFHacks
March 27, 2024, 10:55:43 am

is it possible to add support for odysee.com by fvlog19
March 21, 2024, 08:47:51 am

Request for admin notification by davejo
March 10, 2024, 01:31:59 am

I need help with torrent upload by Ineedsmfhelp
March 09, 2024, 10:01:13 pm

an idea for new mod (( content type with different display )) by SMFHacks
February 27, 2024, 01:36:27 pm

[Mod] RSS Feed Poster by SMFHacks
February 27, 2024, 11:57:18 am

find duplicate pictures by fvlog19
February 14, 2024, 02:22:40 pm

Error uploading video. by SMFHacks
February 08, 2024, 02:04:16 pm

Gallery icon as last added image by fvlog19
February 01, 2024, 01:04:56 pm

Powered by EzPortal