Show Case!

Results 1 to 9 of 9
  1. #1
    Hello! NubPro is offline
    MemberRank
    Dec 2009 Join Date
    C:\DesktopLocation
    1,592Posts

    Show Case!

    Not ads!
    Click Here to View
    Go look through here:
    http://xbuilder.elementfx.com/sigs.php

    Took me nearly 1 hours to finish and figure out.
    Todo list, I'm going to make a dynamic sigs and release them maybe tomorrow.

    Source Codes, have to be save in php format or else it wouldn't work and you are required to have a localhost which can able to view the codes.
    PHP Code:
    <?php

        $file 
    rand(13);

        
    $file .= '.jpg';

        echo 
    '<img src="sigs/'.$file.'" >';

    ?>
    <style type="text/css">
    <!--
    #txt {
      border:none;
      font-family:verdana;
      font-size:16pt;
      font-weight:bold;
      border-right-color:#FFFFFF;
      margin-left:-4px;
    }
    -->
    </style><script type="text/javascript">
    <!--
    /* This script and many more are available free online at
    The JavaScript Source :: http://javascript.internet.com
    Created by: Neill Broderick :: http://www.bespoke-software-solutions.co.uk/downloads/downjs.php */

    var mins
    var secs;

    function cd() {
         mins = 1 * m("00"); // change minutes here
         secs = 0 + s(":04"); // change seconds here (always add an additional second to your total)
         redo();
    }

    function m(obj) {
         for(var i = 0; i < obj.length; i++) {
              if(obj.substring(i, i + 1) == ":")
              break;
         }
         return(obj.substring(0, i));
    }

    function s(obj) {
         for(var i = 0; i < obj.length; i++) {
              if(obj.substring(i, i + 1) == ":")
              break;
         }
         return(obj.substring(i + 1, obj.length));
    }

    function dis(mins,secs) {
         var disp;
         if(mins <= 9) {
              disp = " 0";
         } else {
              disp = " ";
         }
         disp += mins + ":";
         if(secs <= 9) {
              disp += "0" + secs;
         } else {
              disp += secs;
         }
         return(disp);
    }

    function redo() {
         secs--;
         if(secs == -1) {
              secs = 59;
              mins--;
         }
         document.cd.disp.value = dis(mins,secs); // setup additional displays here.
         if((mins == 0) && (secs == 0)) {
               window.location = "sigs.php" // redirects to specified page once timer ends and ok button is pressed
         } else {
             cd = setTimeout("redo()",1000);
         }
    }

    function init() {
      cd();
    }
    window.onload = init;

    //-->
    </script>
    <form name="cd">
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<strong><font size="5">Refreshing in</font></strong>
    <input id="txt" readonly="true" type="text" value="00:03" border="0" name="disp">
    </form>
    :tongue:


  2. #2
    Enthusiast dazee is offline
    MemberRank
    Mar 2008 Join Date
    33Posts

    Re: Show Case!

    i thing this is useless...why? because i also think (just my opinion...not testet) this won`t work on a forum ... because you need to use
    PHP Code:
    header("Content-type: image/png"); 
    or something like this... and to load images with imagephp i`m not expert i think this should look like this...i don`t know if works or not..
    PHP Code:
    <?php
    session_start
    ();

    $url "http://example/sig.php";

    $max_img 3;
    if(!isset(
    $_SESSION['im_num'])){
    $image 1;
    }else{
    $image $_SESSION['im_num'];
    }
    $image_string "sigs/img_"$image .".png"//image should be in sigs with name img_x.png

    if($image >= $max_img$image 0;
    $im_number $image+1;
    $_SESSION['im_num'] = $im_number;

    header("Content-Type: image/png");

    $fp fopen($image_string'rb');
    fpassthru($fp);
    exit;
    ?>
    also image in tmage tag can`t be refreshed after page was sended to user...corect me if i`m wrong...test my script to se if it works...sig image refreses after page refresh:D
    ps: demo on my sig

  3. #3
    Hello! NubPro is offline
    MemberRank
    Dec 2009 Join Date
    C:\DesktopLocation
    1,592Posts

    Re: Show Case!

    Thanks!!!! Nice.
    I already have the this idea btw. You can remove the sig now lulz.
    I have a question. How can I make insert a text which has more than 1 and can changed every time been refreshed?

  4. #4
    Enthusiast dazee is offline
    MemberRank
    Mar 2008 Join Date
    33Posts

    Re: Show Case!

    Quote Originally Posted by Vicchai View Post
    Thanks!!!! Nice.
    I already have the this idea btw. You can remove the sig now lulz.
    I have a question. How can I make insert a text which has more than 1 and can changed every time been refreshed?
    i don`t think you can do that...you can do this with images...write on image and after that display it like a sig:D

  5. #5
    Hello! NubPro is offline
    MemberRank
    Dec 2009 Join Date
    C:\DesktopLocation
    1,592Posts

    Re: Show Case!

    Quote Originally Posted by dazee View Post
    i don`t think you can do that...you can do this with images...write on image and after that display it like a sig:D
    PHP Code:
    <?php
    header
    ("Content-Type: image/png");
    $im = @imagecreate(11020)
        or die(
    "Cannot Initialize new GD image stream");
    $background_color imagecolorallocate($im000);
    $text_color imagecolorallocate($im2331491);
    imagestring($im155,  "A Simple Text String"$text_color);
    imagepng($im);
    imagedestroy($im);
    ?>
    Is should look like this but I want the text change after refreshed.

  6. #6
    Enthusiast dazee is offline
    MemberRank
    Mar 2008 Join Date
    33Posts

    Re: Show Case!

    first i think image width whould be somewhere at 300-350:D or more maybe..
    second:D you can keep messages in an array loke this:
    PHP Code:
    $messages = array();
    $messages[1] = "text 1";
    $messages[2] = "text 2";
    $messages[3] = "text 3"
    but before that you nees to initialize sessions
    PHP Code:
    <?php 
    session_start
    ();
    this should be easy from now...just look up and see how it`s work
    PHP Code:
    //imagestring($im, 1, 5, 5,  "A Simple Text String", $text_color);
    imagestring($im155,  $message[$_SESSION['message']], $text_color); 

  7. #7
    Hello! NubPro is offline
    MemberRank
    Dec 2009 Join Date
    C:\DesktopLocation
    1,592Posts

    Re: Show Case!

    Quote Originally Posted by dazee View Post
    first i think image width whould be somewhere at 300-350:D or more maybe..
    second:D you can keep messages in an array loke this:
    PHP Code:
    $messages = array();
    $messages[1] = "text 1";
    $messages[2] = "text 2";
    $messages[3] = "text 3"
    but before that you nees to initialize sessions
    PHP Code:
    <?php 
    session_start
    ();
    this should be easy from now...just look up and see how it`s work
    PHP Code:
    //imagestring($im, 1, 5, 5,  "A Simple Text String", $text_color);
    imagestring($im155,  $message[$_SESSION['message']], $text_color); 
    I got a simple question, why do we need a session function?

  8. #8
    Enthusiast dazee is offline
    MemberRank
    Mar 2008 Join Date
    33Posts

    Re: Show Case!

    Quote Originally Posted by Vicchai View Post
    I got a simple question, why do we need a session function?
    where you will keep message number?

  9. #9
    Hello! NubPro is offline
    MemberRank
    Dec 2009 Join Date
    C:\DesktopLocation
    1,592Posts

    Re: Show Case!

    Quote Originally Posted by dazee View Post
    where you will keep message number?
    Okay I understood very clearly.
    Thanks.



Advertisement