Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now

User profile

I made a customized form for file uploading of profile picture and users should also mention their position in the company or organization. I want it to display in the profile page of the user. How is that? I am using version 1.9.15

Comments

  • I want the form to be added here. 
    Note: Picture used on the screen shot is just for display of change I wanted to do
    Capture.JPG
    1177 x 459 - 59K
  • edited July 4
    Is this a custom form in osTicket with the fileuploader?

    If it is you might need to extend the class so that it's displayed the way you want.

    However the easiest way would probably be to create a custom uploader and puts all the avatars in a specific location and name the uploaded file like this {username}.{extension}

    Then you could do something like this

    <?php
    // open the file in a binary mode
    $name = 'images/mystery-oscar.png';
    if($_GET && isset($_GET["user"]) && file_exists('images/' . $_GET["user"] . '.png'))
    $name = 'images/micke7.png';
    $fp = fopen($name, 'rb');

    // send the right headers
    header("Content-Type: image/png");
    header("Content-Length: " . filesize($name));

    // dump the picture and stop the script
    fpassthru($fp);
    exit;
    ?>

    Then you just call the php file like this domain.com/avatar.php?user=micke1101 and you'll get my avatar (if i've uploaded one, else it'll be the default one) for example, and once you've that you can easily embed that into your profile page.
  • I see no avatar.php in my osticket. I am using 1.9.15, it doesn't have avatar.php nor class.avatar file. :(
  • edited July 4
    avatar.php is the new file you've to make with the code i posted.
  • Based on the screen schot I would say that they are using a 3rd party theme mod.


Sign In or Register to comment.