Sourceview :: Discussion

Discussion in 'GR Classic Archive' started by spartan117, Jan 13, 2008.

  1. 13d Lucidity

    13d Lucidity Well-Known Member

    Age:
    36
    Posts:
    2,882
    Likes Received:
    0
    Joined:
    Jul 22, 2005
    Location:
    Australia
    is it possible to have a "class" eg div box class or w/e so that i can create as many or as few as i want.

    but same size etc is perfect.
     
  2. Northern.

    Northern. Well-Known Member

    Age:
    36
    Posts:
    628
    Likes Received:
    0
    Joined:
    Apr 16, 2007
    Location:
    England, Cumbria
  3. Ravr

    Ravr _______________

    Age:
    36
    Posts:
    3,670
    Likes Received:
    0
    Joined:
    Dec 26, 2005
    Location:
    The Netherlands
    wow your's is way better XD nice design
     
  4. Northern.

    Northern. Well-Known Member

    Age:
    36
    Posts:
    628
    Likes Received:
    0
    Joined:
    Apr 16, 2007
    Location:
    England, Cumbria
    cheers man, u got any ideas for images 4 the logo?

    this is what I got sofar....I'm not happy with it...

    [​IMG]

    C&C is welcome :)
     
  5. tt speedy1

    tt speedy1 Senior Member

    Age:
    32
    Posts:
    673
    Likes Received:
    0
    Joined:
    Nov 2, 2006
    Location:
    FL
    you should add some coding bits, make it kinda like techish you know what i mean?

    mind me editing it a bit?


    edit:
    kinda going for this effect, with some techish
    [​IMG]

    the techish like this kinda?
    [​IMG]
     
  6. travmanx

    travmanx Senior Member

    Age:
    37
    Posts:
    733
    Likes Received:
    0
    Joined:
    Oct 3, 2007
    Location:
    USA
    [​IMG]

    [​IMG]
     
  7. Ravr

    Ravr _______________

    Age:
    36
    Posts:
    3,670
    Likes Received:
    0
    Joined:
    Dec 26, 2005
    Location:
    The Netherlands
    omg pwnage >

    [​IMG]

    PIE!!! xD

    btw i really made this myself xD although its up too you to take this serious :P
     
  8. travmanx

    travmanx Senior Member

    Age:
    37
    Posts:
    733
    Likes Received:
    0
    Joined:
    Oct 3, 2007
    Location:
    USA
    Travmanx's PHP Function

    These are for learning and web usage, these may not be placed in any pack or placed anywhere else except GR (unless used in scripts).

    Code:
    <?php
    
    /**
     * @author Travis
     * Function - Format Number
     * Used to keep your database phone numbers clean (US numbers only) 
     * Just make sure users are inputting like this ########## not ###-###-#### or (###)-###-#### or it will give error
     * @copyright 2008
     */
    
    function formatNumber($number){
    $number = ereg_replace("[^0-9]",'',$number);
    $area = substr($number,0,3);
    $pf = substr($number,3,3);
    $end = substr($number,6,4);
    $number = $area."-".$pf."-".$end;
    return($number);
    }
    echo formatNumber(1234567890);
    
    ?>
    Code:
    <?php
    
    /**
     * @author Travis
     * Function Resize and Save external images
     * @copyright 2008
     */
    
    function resize($filename, $height, $width){
        if((!$filename) OR (!$height) OR (!$width)){
            die("One of the required input values was not set.");
        } else{
    $imdata = getimagesize($filename);
    $w = $imdata[0];
    $h = $imdata[1];
    $o = imagecreatefromjpeg($filename);
    $n = imagecreatetruecolor($width,$height);
    imagecopyresampled($n,$o,0,0,0,0,$width,$height,$w,$h);
    return imagejpeg($n);
    imagedestroy($n);
    move_uploaded_file($filename, "/images/a.jpg");
    }
    }
    header("Content-type: image/jpeg");
    echo resize("http://www.gamerenders.com/forum/style_images/gr4/logo.jpg",100,100);
    
    
    ?>
    Code:
    <?php
    
    /**
     * @author Travis
     * List files in your directory
     * @copyright 2008
     */
    
    function listfiles($dir){
        $files=array();
        $pageext=array("html","php","php3","js","asp");
        $imgext=array("jpg","jpeg","png","bmp","gif");
        $img=0;
        $page=0;
        $other=0;
    
        if(is_dir($dir)){
            $handle = opendir($dir);
            while($files=readdir($handle)){
                if($files == 0){
                    echo("The current directory is empty");
                    } elseif(is_file($dir.$file)){
                            $extexp = explode(".",$files);
                            $files[] = $file;
                            if($extexp == $imgext[1]){
                                $img++;
                            } else if($extexp == $pageext[1]){
                                $page++;
                            } else {
                                $other++;
                            }
                        }
                    }
                    closedir($handle);
                    sort($files);
                echo            $msg = "There are ".$page." pages, ".$img." images and ".$other." other files in directory: /".$dir. "/";
            echo $msg2 = "Here are a list of files currently in the directory
    ".$files;
            return($files);
            return($extexp);
            return($msg2);
                }
            }
    
    
    listfiles("/new");
    
    
    
    ?>
    More to come!

    I will put up a .ZIP file as soon as I get some more.
     
  9. Ravr

    Ravr _______________

    Age:
    36
    Posts:
    3,670
    Likes Received:
    0
    Joined:
    Dec 26, 2005
    Location:
    The Netherlands
    wow nice and usefull scripts ;) gj on them :D
    maybe a preview with them would come handy for ppl who dont really know what u mean with those scripts :)


    PS: i do know what those are meant for xD
     
  10. travmanx

    travmanx Senior Member

    Age:
    37
    Posts:
    733
    Likes Received:
    0
    Joined:
    Oct 3, 2007
    Location:
    USA
    Thanks

    I have a bruteforce script done for cracking md5 hashes, but I will not post it on this site forthe reason that its used for hacking/crackring passwords.
     
  11. Northern.

    Northern. Well-Known Member

    Age:
    36
    Posts:
    628
    Likes Received:
    0
    Joined:
    Apr 16, 2007
    Location:
    England, Cumbria
    ummm hacking lol

    and ravr why a pie? lol
     
  12. Ravr

    Ravr _______________

    Age:
    36
    Posts:
    3,670
    Likes Received:
    0
    Joined:
    Dec 26, 2005
    Location:
    The Netherlands
    dunno xD i was messing around :P this came out xD
     
  13. travmanx

    travmanx Senior Member

    Age:
    37
    Posts:
    733
    Likes Received:
    0
    Joined:
    Oct 3, 2007
    Location:
    USA
    So far I like Vengence., I just wish it was .png
     
  14. Ravr

    Ravr _______________

    Age:
    36
    Posts:
    3,670
    Likes Received:
    0
    Joined:
    Dec 26, 2005
    Location:
    The Netherlands
  15. .ToMMy

    .ToMMy Well-Known Member

    Age:
    35
    Posts:
    438
    Likes Received:
    0
    Joined:
    Jan 4, 2007
    Location:
    Arizona
    Code:
    <?php
    // Code is copyright of ToMMyFX.com 2008, do not redistribute as your own please.
    // Code is for a Random Image to display when the page is refreshed.
    //count files code, basically this function will go to the $strDirName (place where the images are kept) and count the number of files for the second part of the code.
    // IMages must be numbered 1, 2, 3, 4 and they must be .jpg
    function countFiles($strDirName)
    {
    if ($hndDir = opendir($strDirName))
    {
    $intCount = 0;
    while (false !== ($strFilename = readdir($hndDir)))
    {
    if ($strFilename != "." && $strFilename != "..")
    {
    $intCount++;
    }
    }
    closedir($hndDir);
    }
    else
    {
    $intCount = -1;
    }
    
    return $intCount;
    }
    //end count code.
    //the require('functions.php is where the code up there ^^^ will be. I usually keep all of my functions on a serperate page so I dont confuse myself).
    require('functions.php');
    $num_files = countFiles("**CHANGE THIS TO WHERE YOUR IMAGES ARE(the folder)**");
    $rand_img = rand(1,$num_files) . ".jpg";
    echo "<img src=\"**CHANGE THIS TO WHERE YOUR IMAGES ARE(the folder)**/$rand_img\"/>";
     

Share This Page