SMFHacks.com
** Home Forum Index Hacks Products Login Register Search
Welcome, Guest. Please login or register.
May 23, 2012, 10:28:09 am

Login with username, password and session length
Members
Total Members: 10069
Latest: tetsujrock
Stats
Total Posts: 28682
Total Topics: 4975
Online Today: 94
Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Users: 0
Guests: 77
Total: 77
+ 
|-+ 
| |-+ 
| | |-+ 
| | | |-+ 
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Go Down Print
Author Topic: User gallery link from userCP/profile  (Read 5254 times)
TeamVTEC
Newbie
*
Offline Offline

Posts: 45


View 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:
<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
Logged
SMFHacks
Administrator
Hero Member
*****
Offline Offline

Posts: 9676


View 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:
<a href="', $scripturl, '?action=gallery;su=user;u=', $context['member']['id']
But not sure if usercp has $context['member']['id'] defined.
Logged
TeamVTEC
Newbie
*
Offline Offline

Posts: 45


View 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.

Logged
SMFHacks
Administrator
Hero Member
*****
Offline Offline

Posts: 9676


View Profile
« Reply #3 on: October 26, 2006, 04:27:27 pm »

Change
Code:
<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:
<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>
Logged
TeamVTEC
Newbie
*
Offline Offline

Posts: 45


View Profile
« Reply #4 on: October 26, 2006, 04:33:51 pm »

still the same error, no change

http://forum.sirfanaticsholland.com/index.php?action=usercp
Logged
SMFHacks
Administrator
Hero Member
*****
Offline Offline

Posts: 9676


View Profile
« Reply #5 on: October 26, 2006, 04:43:06 pm »

Guests will get that error since their is no user id set should work for logged in members.
Logged
SMFHacks
Administrator
Hero Member
*****
Offline Offline

Posts: 9676


View Profile
« Reply #6 on: October 26, 2006, 04:44:50 pm »

Oops had a bad comma in their
change
Code:
<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:
<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>
Logged
TeamVTEC
Newbie
*
Offline Offline

Posts: 45


View Profile
« Reply #7 on: October 26, 2006, 04:50:32 pm »

still nothing Grin see for yourself, the '?action=gallery;su=user;u=' doesn't seem to point to users numbers when clickin on it
Logged
SMFHacks
Administrator
Hero Member
*****
Offline Offline

Posts: 9676


View 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:
global $db_prefix, $scripturl, $txt, $user_info,$settings, $modSettings,$ID_MEMBER;
Then change the MyGallery part to
Code:
<a href="', $scripturl, '?action=gallery;su=user;u=', $ID_MEMBER,'"><img border="0" src="usercp/ecran.png" width="80" height="80"></a></font></td>


Logged
TeamVTEC
Newbie
*
Offline Offline

Posts: 45


View Profile
« Reply #9 on: October 26, 2006, 05:01:23 pm »

Hehe good job buddy Wink
Logged
Pages: [1] Go Up Print 
« previous next »
Jump to:  

Recent
[May 21, 2012, 08:54:11 am]

[May 20, 2012, 11:06:52 am]

[May 20, 2012, 05:58:11 am]

[May 19, 2012, 06:16:58 pm]

[May 19, 2012, 05:42:37 pm]

[May 18, 2012, 03:08:38 pm]

[May 17, 2012, 06:07:46 pm]

[May 17, 2012, 02:22:07 pm]

[May 17, 2012, 12:38:16 pm]

[May 15, 2012, 09:32:27 pm]
Random Picture
Donate to SMFHacks.com
Help Support the SMFHacks.com mod making.
Powered by SMF 1.1.16 | SMF © 2006-2011, Simple Machines LLC
TinyPortal v0.9.7 © Bloc
SMF and SimpleMachines are registered trademarks of Simple Machines. SMFHacks.com is not affiliated with nor endorsed by Simple Machines.
Page created in 0.242 seconds with 19 queries.