Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Sig Programming help

Options
  • 13-06-2005 6:03pm
    #1
    Closed Accounts Posts: 1,254 ✭✭✭


    I dont know much about programing (in fact probably nothing) but I was wondering could someone help me with something.
    It is about programming the signature (ie the pic below) so that it randomly displays and image from a choice of a couple of different ones. Is this possible?


Comments

  • Moderators, Recreation & Hobbies Moderators, Science, Health & Environment Moderators, Technology & Internet Moderators Posts: 91,690 Mod ✭✭✭✭Capt'n Midnight


    Is it possible - Yes

    Are animated sigs allowed - NO!


  • Closed Accounts Posts: 1,254 ✭✭✭Citizen_Erased


    Yeah I know but thats not what I mean. What I mean is just for it to chose one of the sigs and just show it like a normal sig but say the next time the thing loads it'll show a differant one of the sigs


  • Moderators, Recreation & Hobbies Moderators, Science, Health & Environment Moderators, Technology & Internet Moderators Posts: 91,690 Mod ✭✭✭✭Capt'n Midnight


    In that case you point it at a website that uses several images with the same name or generates one when you connect. The programming isn't done on the sig but on the site.

    If the war on terror hots up Bert will be replaced by Ernie !


  • Closed Accounts Posts: 1,254 ✭✭✭Citizen_Erased


    Ah , could you explain how I might set up such an arrangement. If a couple of files have the same name wont it still stick with one anyways?


  • Moderators, Recreation & Hobbies Moderators, Science, Health & Environment Moderators, Technology & Internet Moderators Posts: 91,690 Mod ✭✭✭✭Capt'n Midnight


    you put code on the site to cycle through the files.
    only one is there is there at a time.


  • Advertisement
  • Closed Accounts Posts: 1,254 ✭✭✭Citizen_Erased


    You appear to have mistaken me for someone who has intelligence. Can I do it through my boards.ie hosting? What kinda code cause I'm a tard so you may have to explain.


  • Closed Accounts Posts: 703 ✭✭✭SolarNexus


    This thread really has dragged on much longer than it should have, Capt'n Midnight I really dont understand your thinking which brought you to drag this thing on so long, but lets see if I can help somewhat:

    you need a website server which can process a server-side language such as PHP, JSP or ASP. You then upload your images and a script which will choose an image at random; you use this script as the image URL, which is odd I know but thats how it works.

    you'll be hard pressed to find a free php webserver, or any server-side script allowing free server, but regardless of which, this is the script:

    [PHP]<?php
    // settings //
    $imgCount = "2"; // the number of images you'll use
    $imgPath = "images/rand/"; // the location of the images
    $imgPrefix = "rand_"; // image name prefix (eg: images will be called "rand_0.jpg" etc.
    $imgType = "jpg"; // image type
    $errorImg = "error"; // image to show if cant show random images


    // functionality //
    $imgURL = $imgPath . $imgPrefix . mt_rand( 0 , $imgCount ) . "." . $imgType; // define the image path

    // browser config
    Header("Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0");
    Header("Content-Type: image/" . $imgType);

    // show the image
    if(!readfile($imgURL))
    readfile($errorImg); // If the script can't find the images, display this image instead
    ?>[/php]


  • Closed Accounts Posts: 1,254 ✭✭✭Citizen_Erased


    Okay cheers , Ill try a few things and see how I get along


Advertisement