Welcome to Geeklog, Anonymous Thursday, December 26 2024 @ 11:16 am EST

Geeklog Forums

Making it work with geeklog


Status: offline

LostPuppy

Forum User
Junior
Registered: 08/13/04
Posts: 19
So i have written a little script for my geeklog site and i have tested it on a regular php page and it works fine.

One of the feilds that needs to be filled out is 'name' , i would like to make that automatically be the loged in ID of the user, also if they are not loged in i don't want them to be able to see the submit button. How can I do this? and what kind of includes do i need to use (COM_HEADER or what not) and can i do it out side of my geeklog interface (example i want it to have a different look and feel then the rest of my site).

Thanks so much
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Include lib-common.php. You then have access to the global $_USER array. $_USER['username'] contains the current user's name and is empty for anonymous users.

bye, Dirk
 Quote

Status: offline

LostPuppy

Forum User
Junior
Registered: 08/13/04
Posts: 19
thanks for the help , i got it all working nicly

You can see it running at http://www.thenakedgeek.com/lan2/ , our actual geeklog site is at http://www.thenakedgeek.com/

it was easier then i thought it would be , just used if statements USERNAME == "" dont else do , kinda thing
 Quote

All times are EST. The time is now 11:16 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content