Image Signatures Group » Discussions

Idiot's Guide to Sig Making?

 
    • The_Lurker a dit :...
    • Utilisateur
    • 8 nov. 2005, 16h49m

    Idiot's Guide to Sig Making?

    I'd like to make a sig out of this image. Can anyone help with some very easy-to-follow instructions on how I can make it happen? Note, this is an example, not necessarily the exact file I want to use...I just threw this together quickly. And yes, I'm a Firefly/Serenity geek.


    "Epic Prog" Fridays - 8 PM Eastern (5 PM Pacific) www.progrock.com
  • ScrobblerSig(THx) lets you use a background image.

    • Brossibaer a dit :...
    • Utilisateur
    • 8 nov. 2005, 17h55m
    You need:
    1. the original ScrobblerSig-PHP-script (download here)
    2. the backgroundimage
    3. the font
    4. webspace (with PHP!) (If you don't have webspace: www.100webspace.com e.g. works very well for scrobblersigs.)

    Open the script with any texteditor and read the explanationsb first.
    Then start editing the variables...

    First of all you'll have to change the username. Look for this line:
    $username = "enter_your_username";
    And change it to:
    $username = "The_Lurker";

    You'll also have to change the backgroundimage-variable and the font-variable:
    $backgroundImage = "your_background.gif";
    $font = "your_font.ttf";

    Now adjust fontsize, foregroundcolor, the text of the lastPlayedLabel and the timezoneoffset, until it suits you. Maybe you need to adjust the padding, too.

    Well, just play around with the variables a bit...

    Now upload the script together with the backgroundimage and the font to your webspace.

    And that's it...

    • The_Lurker a dit :...
    • Utilisateur
    • 8 nov. 2005, 17h58m
    Thanks for the assist. I'll give it the old college try!

    "Epic Prog" Fridays - 8 PM Eastern (5 PM Pacific) www.progrock.com
  • I can't for the life of me get the text to appear on top of the background image.
    Anyone got any ideas where I'm going wrong? Am I missing something stupidly simple?
    I've got the text in a gray colour and the background image is black.

    • The_Lurker a dit :...
    • Utilisateur
    • 8 nov. 2005, 21h08m
    Well, I made my changes, but I don't want to pay for webspace until I know it works. Can anyone help a brother out with some webspace temporarily?

    "Epic Prog" Fridays - 8 PM Eastern (5 PM Pacific) www.progrock.com
    • Brossibaer a dit :...
    • Utilisateur
    • 8 nov. 2005, 21h10m

    Re:

    Quoth Brossibaer:
    You need:
    4. webspace (with PHP!) (If you don't have webspace: www.100webspace.com e.g. works very well for scrobblersigs.)


    ;)

    (Just make sure, that you've selected "FREE hosting" and "use subdomain".)

    • The_Lurker a dit :...
    • Utilisateur
    • 8 nov. 2005, 22h01m
    Ah, well now that's what I did wrong! lol

    How do you change that script to include multiple songs?

    "Epic Prog" Fridays - 8 PM Eastern (5 PM Pacific) www.progrock.com
  • Actually the script wasn't made to show more than 1 track. But if you know a bit PHP, it should be possible to modify it. Though I'm quite a newbie to PHP, I'll see what I can do...

    Edit: Ah, I forgot... BelleAndZEK has already modified the script to display more tracks. I'm sure he'll give you the code...

  • my try...

    OK, as I said I'm new to PHP, so I give no garantee. ;) (But it seems to work the way it should!)


    And at the beginning of the script, where all the variables are, you just add this variable:

    $numberOfTracks = 3;

    Then, where the actual code is, you replace this:

    //Check if a track is currently playing
    if($trackData[0] != "") {
    $track = $trackData[0];
    $label = $currentlyPlayingLabel;
    $date = time();
    }
    else {
    $track = $trackData[1];
    $label = $lastPlayedLabel;
    $date = strtotime($trackData[2]);
    }



    by this:

    if($numberOfTracks > 1) {
    for ($t=1; $t<($numberOfTracks*2); $t=$t+2) {
    $track = $track.$trackData[$t];
    }
    }
    else {
    $track = $trackData[1];
    $label = $lastPlayedLabel;
    $date = strtotime($trackData[2]);
    }


    (The "Check if a track is currently playing" didn't work anyway. So you might as well throw that part away. (If you wonder why it works in my sig... I've completly rewritten that part, and I'm also checking if the last track was played today or yesterday, to display that in the label.))


    If you set the numberOfTracks-variable to 1, the sig behaves just like the normal ScrobblerSig. But if you choose more than 1 (and up to 10) tracks, it displays the chosen number of tracks, but without any date or time information, and no lastPlayedLabel either. So just the tracks.

    Hope that suits your needs. But however you might wanna compare thsi to BelleAndZEK's script... ;)

    • The_Lurker a dit :...
    • Utilisateur
    • 9 nov. 2005, 14h37m
    Testing...


    "Epic Prog" Fridays - 8 PM Eastern (5 PM Pacific) www.progrock.com
    • The_Lurker a dit :...
    • Utilisateur
    • 9 nov. 2005, 14h50m
    Brossibaer,

    Thanks so much for your help. Looks like I've found a new hobby! lol


    One other question, is there a way to convert it from PHP to another format for forums that don't accept PHP image signatures?

    "Epic Prog" Fridays - 8 PM Eastern (5 PM Pacific) www.progrock.com
    • Brossibaer a dit :...
    • Utilisateur
    • 9 nov. 2005, 21h18m
    Nice result, Lurker.

    Try just adding "/jpg" at the end of the URL, i.e.:
    http://miccit.freefronthost.com/scrobblersig.php/jpg

    • The_Lurker a dit :...
    • Utilisateur
    • 10 nov. 2005, 17h06m
    Brossibaer, thanks again. That did the trick on one of the two forums, but sadly, not the other.

    "Epic Prog" Fridays - 8 PM Eastern (5 PM Pacific) www.progrock.com
    • spacefish a dit :...
    • Utilisateur
    • 11 nov. 2005, 8h25m
    You might try appending the URL with /0.jpg just so it looks like a regular filename. Also try .png

    • MaxNix a dit :...
    • Utilisateur
    • 19 nov. 2005, 12h33m

    Hi, I'm new to this and new to writing code...

    ...is there any way I can change the Scrobblersig PHP script to show other variables from my profile, like number of posts or number of plays? I don't have any of either yet :-)

    • Brossibaer a dit :...
    • Utilisateur
    • 19 nov. 2005, 13h38m
    Displaying the number of played tracks should be possible, I guess, with reading the profile information (http://ws.audioscrobbler.com/1.0/user/USERNAME/profile.xml) But don't ask me how to realise it in the script. I don't know enough php for that. ;)
    I don't think that displaying the number of posts is possible tough.

  • You'd have to screen-scrape your profile for number of posts, since there's no web service for it (yet).

  • I still can't do it man.. :(
    I can't put the songs on my image...I putted the name of the pic in the script and uploaded it...but it only get this;
    http://playmetalasfuck.freeprohost.com/sig-playmetal15.png

  • come on guys..tell me what I do wrong

    • Brossibaer a dit :...
    • Utilisateur
    • 24 nov. 2005, 23h08m
    Well, then tell us, what's wrong with it, Playmetal. ;) It seems to work, doesn't it...? I can see your last 5 tracks...

  • well yes, that works, but I can't put them on my backgroundiamge..

    • Brossibaer a dit :...
    • Utilisateur
    • 25 nov. 2005, 22h59m
    Ah ok. Have you set the background-variable correctly then? Maybe you should post your code, so we/I can see what's wrong with it...

  • //(u) Audioscrobbler username, see the allowAnyUser and allowWhitelistedUser options for info about
    //using this option in the url.
    $username = "playmetal15";

    /*
    * All of the "-label" options below can display the time the track is played by specifying time
    * variables:
    *- <date> Outputs the date according to the dateFormat option
    *- <time> Outputs the time according to the timeFormat option
    *- <zone> Outputs the timezone according to the timeZoneOffset and timeZoneLabel options. The
    * timeZoneLabel is output instead of the timeZoneOffset if it is present.
    *
    * Example
    *
    * "This song was played at <time> <zone> on <date>"
    */
    //(cpl) Text to display if track is currently playing
    $currentlyPlayingLabel = "Currently playing:";

    //(lpl) Text to display if track isn't currently playing
    $lastPlayedLabel = "Last song played @ <time> <zone> on <date>:";

    //(el1 and el2) Text to display if the song parse failed
    $errorLabel1 = "Error:";
    $errorLabel2 = "Unable to parse song title from audioscrobbler.com";

    /*
    * Time formats, see http://www.php.net/date for details about the dateFormat and timeFormat
    */
    //(df) Format used to replace the <date> pattern
    $dateFormat = "D, M j, Y";

    //(tf) Format used to replace the <time> pattern
    $timeFormat = "g:i A";

    //(tzo) Time between your time zone and GMT in [-]hour[:minute] format; that is the beginning minus
    //sign is optional and so are the minutes, if minutes are included separate from hours with a colon.
    //This is also used to replace the <zone> pattern if the timeZoneLabel option isn't specified.
    $timeZoneOffset = "+1";

    //(tzl) Replaces the <zone> pattern
    $timeZoneLabel = "EST";

    /*
    * Formatting options. The various "-color" options specify colors using the RRGGBB format, where
    * RR represents the hexadecimal numerical amount of red, GG the amount of green, and BB the amount
    * of blue; for example FF0000 is red, A9B200 is a dull golden color.
    */
    //(f) The filename of the truetype font to use. Native PHP font searching rules are used:
    // - If the .ttf extension is not specified it is appended.
    // - Most systems will search in the same directory as the script for the font and if it can't be
    // found search system font directories, this allows you to use any font on the system as well as
    // custom fonts.
    $font = "couri.ttf";

    //(fs) The size of the font in points
    $fontSize = 10;

    //(fc) The foreground color; the labelColor and trackColor parameters override this if set.
    $foregroundColor = "F9B800";

    //(lc) The color of the track label, the first line of text
    $labelColor = FF9B00;

    //(tc) The color of the track text, the second line of text
    $trackColor = F9F800;

    //(a) Whether antialiasing should be applied to the text; specify 1 for true and 0 for false in the
    //url. If set to true you should set the backgroundColor to match the background of the page the
    //image will appear on for best results.
    $antialias = false;

    //(ha) Horizontal alignment of the text, can be "left" or "right"
    $horizontalAlign = "left";

    //(b) Whether or not a border is drawn around the image; specify 1 for true and 0 for false in the
    //url.
    $border = false;

    //(bdc) The color of the image border, see the border option
    $borderColor = "A9B200";

    //(p) The padding to appear on the sides of the image; the horizontalPadding and verticalPadding
    //parameters override this if set.
    $padding = 0;

    //(hp) The padding to appear on the left and right side of the image
    $horizontalPadding = true;

    //(vp) The padding to appear on the top and bottom of the image
    $verticalPadding = true;

    //(bc) The background color
    $backgroundColor = "A9B200";

    //(bi) Background image to use; may be GIF, PNG, or JPEG format
    $backgroundImage = "met3.png";

    //(bt) Whether the backgroundColor appears; specify 1 for true and 0 for false in the url.
    $backgroundTransparent = true;

    //(it) The image format, may be "png" or "jpg"
    $imageType = "png";

    //(mw) The maximum width of the image, 0 means unrestricted; ignored if a backgroundImage is used.
    $maxWidth = 0;

    //(mh) The maximum height of the image, 0 means unrestricted; ignored if a backgroundImage is used.
    $maxHeight = 0;


    /*
    * The following options may NOT be specified in the url
    */
    //Whether or not parameters specified in the url are used; setting this to false will result in
    //fewer variations of images being cached on the server.
    $allowParameters = true;

    //Whether or not any username can be specified for the username option in the url; this takes
    //precedence over the allowWhitelistedUser option.
    $allowAnyUser = false;

    //Whether or not whitelisted users can be specified for the username option in the url, see the
    //whitelistedUserFilename option.
    $allowWhitelistedUser = true;

    //The filename of a list of usernames, one on each line, that are allowed to be specified for the
    //username option; also see the allowWhitelistedUser option.
    $whitelistedUserFilename = "scrobblersig-whitelist.txt";

    //Whether or not the browser's cache should be used to help minimize bandwidth usage
    $useBrowserCache = true;

    //Number of seconds information is cached from Audioscrobbler
    $cacheDuration = 160;

    //Number of seconds to wait for a response from the Audioscrobbler server
    $timeout = 10;

    $numberOfTracks = 5;

    • Manero a dit :...
    • Utilisateur
    • 26 nov. 2005, 13h03m
    Have you made sure the image is in the same directory as the script.

    Visit the Car Group - Anthing relating Cars
Les utilisateurs anonymes ne peuvent pas poster de messages. Merci de vous connecter ou de créer un compte pour pouvoir intervenir dans les forums.