1
DefJef
how to get the user id?
  • 2005/8/28 2:19

  • DefJef

  • Just popping in

  • Posts: 53

  • Since: 2005/8/8 2


Hello,
Is there a variable I can use (within a theme) in order to represent a user id? My goal is to create dynamic link like the following:

http://www.domain.com/modules/myalbum/viewcat.php?uid=5

Because this seems to be the only way to get a "my pictures" page, when uid is your UID.

Thanks,
Jeff

2
jegelstaff
Re: how to get the user id?

Don't think so, but don't take my word for it. Others have more experience with that. You could modify header.php or footer.php to specifically pass the uid as a smarty variable to the theme, and then alter the theme in the necessary place to receive that value. I assume you are wanting to hard code a link into the page template so that users will always have access to their album from a link a menu, or something like that?

Good luck,

--Julian
Technical Architect - Freeform Solutions
Formulize - custom registration forms, ad hoc forms and reports

3
LazyBadger
Re: how to get the user id?

Which uid? Current logged in user?
If yes, you have this variable... Enable Smart-debug and discover a lot of useful global variables...

{$xoops_userid} is what your want, with it's second part {$xoops_isuser}, for eliminating anonymous
Quis custodiet ipsos custodes?

Webmaster of
XOOPS2.RU
XOOPS Modules Proving Ground
XOOPS Themes Exhibition

4
DefJef
Re: how to get the user id?
  • 2005/8/28 3:30

  • DefJef

  • Just popping in

  • Posts: 53

  • Since: 2005/8/8 2


exactly what I wanted to hear. I'm still learning.

Thanks,
Jeff

5
shank
Re: how to get the user id?
  • 2005/8/29 2:28

  • shank

  • Not too shy to talk

  • Posts: 144

  • Since: 2004/8/17


And don't forget, all smarty tags in XOOPS are also enclosed in <> tags. ie. <{$xoops_uid}>
s l s h a n k l e @ b e l l s o u t h . n e t

Login

Who's Online

437 user(s) are online (396 user(s) are browsing Support Forums)


Members: 0


Guests: 437


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits