Get logged in user name for other php pages
|
stuporglue
Joined: 2006-06-16
Posts: 10 |
Posted: Fri, 2006-06-16 04:47
|
|
I have a site that is mostly static, but users can log in to see their pictures. I'm pretty sure I'm not embedding Gallery, since my site doesn't have it's own authentication. I'd like to display "Welcome $UserName" when the user is on other pages of the site, but is still logged in to gallery. What would be the best way to access this? I was going to use a smarty file with something like this below, but I can't find the $smarty object to do a $smarty->display('username.tpl') with. Quote:
{if $user.isGuest} I'be been poking at the code, but I can't seem to come up with a clean way to get at the user name. Is there one? Thanks! |
|
| Login or register to post comments |

Posts: 43
Why don't you try embedding Gallery into another CMS software, like jommla or drupal. As I know, i will make he users of your Gallery become the CMS's users, and it will solve your authenticationless topic.
[ KORPDATA ] Innovando Soluciones Empresariales
Posts: 10
"Why don't you try embedding Gallery into another CMS software, like jommla or drupal. As I know, i will make he users of your Gallery become the CMS's users, and it will solve your authenticationless topic."
Thanks for the reply!
Mostly because I don't need anything that heavy. The site is pretty simple and the only part that needs to be private is the users picture gallery. It's my wife's photography business: http://-------------.com . The rest of the site is somewhat static (ie. no daily/weekly posts or whatever) so I just do it by hand.
I'll keep trying to figgure out how to do it.
Edit: The site has moved, and we're not using gallery any more on it so I removed this link
Posts: 43
Then try the aboutpage module, it is really easy to implement and to modify.
http://codex.gallery2.org/index.php/Gallery2:User_Contributions
About Page dazza
[ KORPDATA ] Innovando Soluciones Empresariales
Posts: 10
I'll look at it.
Thanks!
Posts: 10
If anyone is following this: I started working on a module for this feature. I started a thread at http://gallery.menalto.com/node/50769 because I got stuck.