i get a "Username not registered" when i try to display it in my index.php. it would be cool to have a members list page. like have it so instead of just displaying the username where it says "memeber total" it has a avatar above it too.
2 posters
avatar system
Linchpin311- Number of posts : 220
Age : 38
Localisation : Long Island
Registration date : 2007-05-14
- Post n°27
Re: avatar system
let me work on a member list type script for you. its not an overly hard script to write but im starting a new job today so im trying to focus on that. Ill probably end up doing it tonight or tomorrow.
anyway, so youre getting a "Username not registered" error. what does your URL look like? It should look something like www.example.com/somepage.php?username=some_username. You'll have to pass the username to the URL in the page before you want to display the avatar on. Because on the page we display the image we run a query based on $_GET['username']. As long as the username in the URL is valid and exists you should not be getting that "Username not registered" error. understand what were trying to do here?
anyway, so youre getting a "Username not registered" error. what does your URL look like? It should look something like www.example.com/somepage.php?username=some_username. You'll have to pass the username to the URL in the page before you want to display the avatar on. Because on the page we display the image we run a query based on $_GET['username']. As long as the username in the URL is valid and exists you should not be getting that "Username not registered" error. understand what were trying to do here?
mattastic- Number of posts : 25
Registration date : 2009-10-11
- Post n°28
Re: avatar system
thats would be awesome thanks and thats a good idea too because other could use it as well. the url just says /index.php at the end.
Linchpin311- Number of posts : 220
Age : 38
Localisation : Long Island
Registration date : 2007-05-14
- Post n°29
Re: avatar system
ok so you want your avatar displayed on the index page? try changing $req_user = trim($_GET['user']); to $req_user = $session->username;.
this will use the user who is currently logged in for the query and (hopefully) return his avatar.
this will use the user who is currently logged in for the query and (hopefully) return his avatar.
mattastic- Number of posts : 25
Registration date : 2009-10-11
- Post n°30
Re: avatar system
got it to work - thanks
mattastic- Number of posts : 25
Registration date : 2009-10-11
- Post n°31
Re: avatar system
anyone know how to get this to work with the forum here? https://jpmaster77forum.forumotion.com/hacks-and-modifications-f4/simple-message-board-t111.htm i want all the users avatar to appear under their username.
|
|