the way that is designed is if they are a user, it will check to see if the the avatar is empty, if its not, then it will show their avatar image. Now, if it is empty, it will show the avatar blank.gif. Of course, your going to want to make sure you have a blank.gif avatar. Like this one here is mine,
Pretty much that's how I would do it, and now, if I wanted to display that image anywhere on that page I have that coding on, all I would do is this.
I would place this code where I wanted to display the avatar,
As you can see, I used a max width and a max height instead of setting a width and height because overall, by doing it this way it will not distort the image in any way. That of course would have to be adjusted to the size of the avatar you want to be shown.
Joined: Jul 03, 2013
Last Visit: 06 May 2019
Thanks Given: 0 Received: 0
Posted: Mon Oct 03, 2016 12:40 pm Post subject: Re: Some Coding Help??
There's a file called hardcode.php which handles all the sql db info. It asks for a table and column where the avatar url is stored. I don't know if this is possible or if i would have to find where it sets the variable and code it with the path manually...
/* Custom driver */ $usertable='nuke_users'; //specifies the name of the table in which your user information is stored. $row_username='username'; //specifies the name of the field in which the user's name/display name is stored. $row_userid='user_id'; //specifies the name of the field in which the user's id is stored (usually id or userid)
$avatar_table_name='nuke_users'; //specifies the table where avatar information is stored $avatar_column_name='user_avatar'; //specifies the column name where the avatar url is stored $avatar_userid='user_id'; //specifies the userid to the user to get the user's avatar $avatar_reference_user='username'; //specifies the reference to the user to get the user's avatar in user table $avatar_reference_avatar='username'; //specifies the reference to the user to get the user's avatar in avatar $avatar_field_name=$avatar_column_name; //to avoid unnecessary file changes , *do not change
Obviously what I have set for the avatar is not correct, lol...
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum