1. This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.
  2. In order to post messages and view attached files in this forum, you must be a licensed XenForo customer.
    If you can't post, enter your forum username in the Associated Forum Users form in your customer area.

Signature Badge Script

Discussion in 'Other Resources [Archive]' started by Floris, Jul 31, 2010.

  1. Disjunto Well-Known Member

    yeah, I made mine look crap so no one actually used it :)
  2. Eric Active Member

  3. Lucas Well-Known Member

    We do not want your server to look like that, for sure. But thanks for the sig! I'm actually learning PHP in College and loved looking at your code, it looks so simple and yet does such a useful tool. :)
  4. Kier XenForo Developer

    That is gruesome!
  5. Erik Audentio.com

    Nice, the code is formatted much better now. :)

    PHP:
    header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
    header('Last-Modified: ' gmdate('D, d M Y H:i:s') . ' GMT');
    header('Cache-Control: no-store, no-cache, must-revalidate');
    header('Cache-Control: post-check=0, pre-check=0'false);
    header('Pragma: no-cache');
    For anyone who wants to know, this is the proper way to make sure the image isn't cached by the browser. Me being lazy, I didn't include it and just left it up to the browser. :p
    If you want to achieve the opposite effect in order to reduce load on your server, you can do something like this:
    PHP:
    header('Last-Modified: ' gmdate('D, d M Y H:i:s') . ' GMT');
    header('Cache-Control: max-age=500, must-revalidate, public');
    Max-age is in seconds, so if you don't want any browser to request a new copy of the image until five minutes after they got their last copy, you would set max-age to 500. :) However, you should note that you can't force browsers to cache stuff. For some reason, my installation of Firefox on this computer doesn't cache anything, and I don't really know why. :p
  6. Erik Audentio.com

    Google Images. :D
  7. Disjunto Well-Known Member

    Shall I just leave you to work that out again?
    Trombones13 likes this.
  8. Brandon_R Guest

    The software haven't even been released yet and people are consuming it's REST resources. Awesome :) I can see the extendability here.
    Eriksrocks and Kier like this.
  9. Eric Active Member

    One of the main things I noticed was $black, had to move it after $final was defined and change $img to $final, otherwise:

    Code:
    [Sat Jul 31 15:28:06 2010] [error] [client *removed*] PHP Warning:  imagecolorallocate() expects parameter 1 to be resource, null given in /var/www/html/sig.php
  10. Erik Audentio.com

    If you're asking how to implement it, all you have to do is set a couple of headers before you output the image. See my post above. Otherwise I'm not sure what you're asking... :p
    Brandon_R likes this.
  11. Disjunto Well-Known Member

    No, I'm talking about maths :p
  12. Erik Audentio.com

    Well I was just providing an example. :p
    Nice catch. :) Updated. :)
  13. Derek Ivey Member

    Thanks for sharing your script Eriksrocks. Nice job!
  14. Peggy Just bein' me...

    Very nice to see people working together. :D
  15. Kier XenForo Developer

  16. Eric Active Member

  17. Erik Audentio.com

  18. Eric Active Member

    I got that feeling too, lol.
  19. Disjunto Well-Known Member

    I've made mine prettier now :) need to tweak it lots though
  20. Erik Audentio.com

    Dang, I'm making something like that right now and now you'll think I stole your idea. :p

    [IMG]

    Great minds think alike, right? :p

Share This Page