Pages: 1 :: [one page] |
|
Author |
Thread Statistics | Show CCP posts - 0 post(s) |
Yeux Gris
|
Posted - 2006.01.24 08:16:00 -
[1]
Anyone know how to do this?
I know. prolly been mentioned in the last 2 months. I have been mostly afk during that time.
any help is welcomed.
|
Dark Shikari
|
Posted - 2006.01.24 11:09:00 -
[2]
Save this to a PHP file in your image directory on your server.
Quote:
<?php
$extList = array(); $extList['gif'] = 'image/gif'; $extList['jpg'] = 'image/jpeg'; $extList['jpeg'] = 'image/jpeg'; $extList['png'] = 'image/png';
// You don't need to edit anything after this point.
// --------------------- END CONFIGURATION -----------------------
$img = null; $folder = "/afs/csl.tjhsst.edu/user/jgarrett/web-docs/a";
if (substr($folder,-1) != '/') { $folder = $folder.'/'; }
if (isset($_GET['img'])) { $imageInfo = pathinfo($_GET['img']); if ( isset( $extList[ strtolower( $imageInfo['extension'] ) ] ) && file_exists( $folder.$imageInfo['basename'] ) ) { $img = $folder.$imageInfo['basename']; } } else { $fileList = array(); $handle = opendir($folder); while ( false !== ( $file = readdir($handle) ) ) { $file_info = pathinfo($file); if ( isset( $extList[ strtolower( $file_info['extension'] ) ] ) ) { $fileList[] = $file; } } closedir($handle);
if (count($fileList) > 0) { $imageNumber = time() % count($fileList); $img = $folder.$fileList[$imageNumber]; } }
if ($img!=null) { $imageInfo = pathinfo($img); $contentType = 'Content-type: '.$extList[ $imageInfo['extension'] ]; header ($contentType); readfile($img); } else { if ( function_exists('imagecreate') ) { header ("Content-type: image/png"); $im = @imagecreate (100, 100) or die ("Cannot initialize new GD image stream"); $background_color = imagecolorallocate ($im, 255, 255, 255); $text_color = imagecolorallocate ($im, 0,0,0); imagestring ($im, 2, 5, 5, "IMAGE ERROR", $text_color); imagepng ($im); imagedestroy($im); } }
?>
-- Proud member of the [23].
The Tachikomas are DEAD! Click sig for video.
|
Brother Benthor
|
Posted - 2006.01.25 00:31:00 -
[3]
I tryied this but i keep getting a blank square image with the text "IMAGE ERROR" when I use this link. My folder structure to get to my siggys is http://www.optikalilusion.com/eve/benthor/[siggys] (named eve_signature_v#.gif) and I uploaded the random.php to the same folder as they are. What did I do wrong? what can I do to fix it?
Like my siggy? press it + |
Dark Shikari
|
Posted - 2006.01.25 00:40:00 -
[4]
Originally by: Brother Benthor I tryied this but i keep getting a blank square image with the text "IMAGE ERROR" when I use this link. My folder structure to get to my siggys is http://www.optikalilusion.com/eve/benthor/[siggys] (named eve_signature_v#.gif) and I uploaded the random.php to the same folder as they are. What did I do wrong? what can I do to fix it?
You have to input your directory. I edited my post to show. -- Proud member of the [23].
The Tachikomas are DEAD! Click sig for video.
|
Brother Benthor
|
Posted - 2006.01.25 09:35:00 -
[5]
Originally by: Dark Shikari
Originally by: Brother Benthor I tryied this but i keep getting a blank square image with the text "IMAGE ERROR" when I use this link. My folder structure to get to my siggys is http://www.optikalilusion.com/eve/benthor/[siggys] (named eve_signature_v#.gif) and I uploaded the random.php to the same folder as they are. What did I do wrong? what can I do to fix it?
You have to input your directory. I edited my post to show.
thk u :)
Like my siggy? press it + |
Dark Shikari
|
Posted - 2006.01.25 10:26:00 -
[6]
Originally by: Brother Benthor Edited by: Brother Benthor on 25/01/2006 09:58:34
Originally by: Dark Shikari
Originally by: Brother Benthor I tryied this but i keep getting a blank square image with the text "IMAGE ERROR" when I use this link. My folder structure to get to my siggys is http://www.optikalilusion.com/eve/benthor/[siggys] (named eve_signature_v#.gif) and I uploaded the random.php to the same folder as they are. What did I do wrong? what can I do to fix it?
You have to input your directory. I edited my post to show.
Im sorry for my stupidity, but im not very experienced in .PHP (n000bbb :P) I did what u told me and replace the folder name with both type of folder structure:
http://www.optikalilusion.com/eve/benthor and /public_html/eve/benthor (ftp folder structure)
and still not working ...
No you have to replace that with the full directory tree. I doubt that your root directory is /public_html! -- Proud member of the [23].
The Tachikomas are DEAD! Click sig for video.
|
Brother Benthor
|
Posted - 2006.01.25 10:55:00 -
[7]
Edited by: Brother Benthor on 25/01/2006 10:54:57
Originally by: Dark Shikari
Originally by: Brother Benthor Edited by: Brother Benthor on 25/01/2006 09:58:34
Originally by: Dark Shikari
Originally by: Brother Benthor I tryied this but i keep getting a blank square image with the text "IMAGE ERROR" when I use this link. My folder structure to get to my siggys is http://www.optikalilusion.com/eve/benthor/[siggys] (named eve_signature_v#.gif) and I uploaded the random.php to the same folder as they are. What did I do wrong? what can I do to fix it?
You have to input your directory. I edited my post to show.
Im sorry for my stupidity, but im not very experienced in .PHP (n000bbb :P) I did what u told me and replace the folder name with both type of folder structure:
http://www.optikalilusion.com/eve/benthor and /public_html/eve/benthor (ftp folder structure)
and still not working ...
No you have to replace that with the full directory tree. I doubt that your root directory is /public_html!
I DID IT :D HURRAYYYYYY thx dark, and thk u for your time
Like my siggy? press it + |
My grandfather
|
Posted - 2006.01.25 11:20:00 -
[8]
hmm still can't get it to work right. Is there anything else besides the folder name that needs to be put in? I've tried every possible file tree, but I still can't seem to reach it
|
Brother Benthor
|
Posted - 2006.01.25 11:22:00 -
[9]
Originally by: My grandfather hmm still can't get it to work right. Is there anything else besides the folder name that needs to be put in? I've tried every possible file tree, but I still can't seem to reach it
i had to go to my website control panel, manage files and folder, so i could know the exact folder path, cause if I use ftp it will directly take me to the website folder, and not my root. in my case it starts with something like /home/bla bla bla
Like my siggy? press it + |
Dark Shikari
|
Posted - 2006.01.25 11:22:00 -
[10]
Originally by: My grandfather hmm still can't get it to work right. Is there anything else besides the folder name that needs to be put in? I've tried every possible file tree, but I still can't seem to reach it
Well there shouldn't be a linebreak there--its just because the text is so big.
And it has to start at / -- Proud member of the [23].
The Tachikomas are DEAD! Click sig for video.
|
|
Dark Shikari
|
Posted - 2006.01.25 11:23:00 -
[11]
Edited by: Dark Shikari on 25/01/2006 11:24:10
Originally by: Brother Benthor
Sig
ROFLMAO!
Here's a trick with your PHP sig--it allows you to have a different sig every time you post, even on the same thread.
My sig is at http://tjhsst.edu/~jgarrett/a/a.php, so I do the following:
http://tjhsst.edu/~jgarrett/a/a.php?random=[RND*] without the *. -- Proud member of the [23].
The Tachikomas are DEAD! Click sig for video.
|
My grandfather
|
Posted - 2006.01.25 11:24:00 -
[12]
Originally by: Dark Shikari
Originally by: My grandfather hmm still can't get it to work right. Is there anything else besides the folder name that needs to be put in? I've tried every possible file tree, but I still can't seem to reach it
Well there shouldn't be a linebreak there--its just because the text is so big.
And it has to start at /
Both are correct in my code...
right now I have this: $folder = "/home.scarlet.be/~famdebu/sigs/"; This is the folder all my images are in, and if I want to link to an image in a web page or anything, this is the adress I use.
|
Dark Shikari
|
Posted - 2006.01.25 11:29:00 -
[13]
Originally by: My grandfather
Originally by: Dark Shikari
Originally by: My grandfather hmm still can't get it to work right. Is there anything else besides the folder name that needs to be put in? I've tried every possible file tree, but I still can't seem to reach it
Well there shouldn't be a linebreak there--its just because the text is so big.
And it has to start at /
Both are correct in my code...
right now I have this: $folder = "/home.scarlet.be/~famdebu/sigs/"; This is the folder all my images are in, and if I want to link to an image in a web page or anything, this is the adress I use.
But that's not the directory folder on the web server!
The web server has something like /usr/webpages/stored/blah/blah/whatever/famdebu/sigs.
You could try ~/sigs and see if that works, as ~ means YOUR USER's root directory. -- Proud member of the [23].
The Tachikomas are DEAD! Click sig for video.
|
My grandfather
|
Posted - 2006.01.25 11:37:00 -
[14]
Originally by: Dark Shikari
Originally by: My grandfather
Originally by: Dark Shikari
Originally by: My grandfather hmm still can't get it to work right. Is there anything else besides the folder name that needs to be put in? I've tried every possible file tree, but I still can't seem to reach it
Well there shouldn't be a linebreak there--its just because the text is so big.
And it has to start at /
Both are correct in my code...
right now I have this: $folder = "/home.scarlet.be/~famdebu/sigs/"; This is the folder all my images are in, and if I want to link to an image in a web page or anything, this is the adress I use.
But that's not the directory folder on the web server!
The web server has something like /usr/webpages/stored/blah/blah/whatever/famdebu/sigs.
You could try ~/sigs and see if that works, as ~ means YOUR USER's root directory.
How can I get to know that web server URL then? I've tried everything now, and now I get 3 possible adresses:
the one I said above, http://home.scarlet.be/~famdebu/sigs, which I use for every link to anything in the folder, ftp://home.scarlet.be/pubwww/sigs, where I ftp to, and ftp://[email protected]/pubwww/sigs, which I get when I right-click and show info on files in my ftp-client.
none of these work, none of these work if I cut a little in them (like /~famdebu/sigs and such)...
|
Brother Benthor
|
Posted - 2006.01.25 11:38:00 -
[15]
Originally by: Dark Shikari Edited by: Dark Shikari on 25/01/2006 11:24:10
Originally by: Brother Benthor
Sig
ROFLMAO!
Here's a trick with your PHP sig--it allows you to have a different sig every time you post, even on the same thread.
My sig is at http://tjhsst.edu/~jgarrett/a/a.php, so I do the following:
http://tjhsst.edu/~jgarrett/a/a.php?random=[RND*] without the *.
i did it :) much better ahahahah :)
Like my siggy? press it + |
Dark Shikari
|
Posted - 2006.01.25 11:39:00 -
[16]
Originally by: My grandfather
Originally by: Dark Shikari
Originally by: My grandfather
Originally by: Dark Shikari
Originally by: My grandfather hmm still can't get it to work right. Is there anything else besides the folder name that needs to be put in? I've tried every possible file tree, but I still can't seem to reach it
Well there shouldn't be a linebreak there--its just because the text is so big.
And it has to start at /
Both are correct in my code...
right now I have this: $folder = "/home.scarlet.be/~famdebu/sigs/"; This is the folder all my images are in, and if I want to link to an image in a web page or anything, this is the adress I use.
But that's not the directory folder on the web server!
The web server has something like /usr/webpages/stored/blah/blah/whatever/famdebu/sigs.
You could try ~/sigs and see if that works, as ~ means YOUR USER's root directory.
How can I get to know that web server URL then? I've tried everything now, and now I get 3 possible adresses:
the one I said above, http://home.scarlet.be/~famdebu/sigs, which I use for every link to anything in the folder, ftp://home.scarlet.be/pubwww/sigs, where I ftp to, and ftp://[email protected]/pubwww/sigs, which I get when I right-click and show info on files in my ftp-client.
none of these work, none of these work if I cut a little in them (like /~famdebu/sigs and such)...
Those are WEB ADDRESSES, not hard disk folders. I could share my EVE directory on an FTP server, but it would still be under Program Files/CCP.
As I said, try ~/sigs. -- Proud member of the [23].
The Tachikomas are DEAD! Click sig for video.
|
My grandfather
|
Posted - 2006.01.25 11:44:00 -
[17]
Originally by: Dark Shikari
Originally by: My grandfather
Originally by: Dark Shikari
Originally by: My grandfather
Originally by: Dark Shikari
Originally by: My grandfather hmm still can't get it to work right. Is there anything else besides the folder name that needs to be put in? I've tried every possible file tree, but I still can't seem to reach it
Well there shouldn't be a linebreak there--its just because the text is so big.
And it has to start at /
Both are correct in my code...
right now I have this: $folder = "/home.scarlet.be/~famdebu/sigs/"; This is the folder all my images are in, and if I want to link to an image in a web page or anything, this is the adress I use.
But that's not the directory folder on the web server!
The web server has something like /usr/webpages/stored/blah/blah/whatever/famdebu/sigs.
You could try ~/sigs and see if that works, as ~ means YOUR USER's root directory.
How can I get to know that web server URL then? I've tried everything now, and now I get 3 possible adresses:
the one I said above, http://home.scarlet.be/~famdebu/sigs, which I use for every link to anything in the folder, ftp://home.scarlet.be/pubwww/sigs, where I ftp to, and ftp://[email protected]/pubwww/sigs, which I get when I right-click and show info on files in my ftp-client.
none of these work, none of these work if I cut a little in them (like /~famdebu/sigs and such)...
Those are WEB ADDRESSES, not hard disk folders. I could share my EVE directory on an FTP server, but it would still be under Program Files/CCP.
As I said, try ~/sigs.
sorry for my ignorance, but I still don't get it. How the hell am I supposed to know the file structure of my ISP's server? All I can do is use the space, it's not like I have my own server at home or anything. Or is this exactly the problem?
btw, I tried that, doesn't work either
|
Dark Shikari
|
Posted - 2006.01.25 11:52:00 -
[18]
You don't know the file structure. There's probably a command in PHP to get the current directory... also when you FTP it might show the file structure. -- Proud member of the [23].
The Tachikomas are DEAD! Click sig for video.
|
My grandfather
|
Posted - 2006.01.25 12:06:00 -
[19]
thx for you help Dark and Brother, I'll try again later on. Not important enough to put too much time in right now
|
Kurren
|
Posted - 2006.01.26 14:20:00 -
[20]
Originally by: Dark Shikari Edited by: Dark Shikari on 25/01/2006 00:39:40 Save this to a PHP file in your image directory on your server.
Quote:
<?php
$extList = array(); $extList['gif'] = 'image/gif'; $extList['jpg'] = 'image/jpeg'; $extList['jpeg'] = 'image/jpeg'; $extList['png'] = 'image/png';
// You don't need to edit anything after this point.
// --------------------- END CONFIGURATION -----------------------
$img = null; $folder = "HERE PUT YOUR FULL DIRECTORY NAME, like mine is /afs/csl.tjhsst.edu/user/jgarrett/web-docs/a";
if (substr($folder,-1) != '/') { $folder = $folder.'/'; }
if (isset($_GET['img'])) { $imageInfo = pathinfo($_GET['img']); if ( isset( $extList[ strtolower( $imageInfo['extension'] ) ] ) && file_exists( $folder.$imageInfo['basename'] ) ) { $img = $folder.$imageInfo['basename']; } } else { $fileList = array(); $handle = opendir($folder); while ( false !== ( $file = readdir($handle) ) ) { $file_info = pathinfo($file); if ( isset( $extList[ strtolower( $file_info['extension'] ) ] ) ) { $fileList[] = $file; } } closedir($handle);
if (count($fileList) > 0) { $imageNumber = time() % count($fileList); $img = $folder.$fileList[$imageNumber]; } }
if ($img!=null) { $imageInfo = pathinfo($img); $contentType = 'Content-type: '.$extList[ $imageInfo['extension'] ]; header ($contentType); readfile($img); } else { if ( function_exists('imagecreate') ) { header ("Content-type: image/png"); $im = @imagecreate (100, 100) or die ("Cannot initialize new GD image stream"); $background_color = imagecolorallocate ($im, 255, 255, 255); $text_color = imagecolorallocate ($im, 0,0,0); imagestring ($im, 2, 5, 5, "IMAGE ERROR", $text_color); imagepng ($im); imagedestroy($im); } }
?>
I really really really hate to ask you this because I know you're trying very hard to explain everything. But, me being a moron when it comes to programming languages, I still don't know what to do with this.
Do I just copy everything as is, only editing the yellow stuff for my link? Where do I copy it to? Can I link to an FTPed folder or does it have to be MY hard drive? AND, is this the coding that will make my signature randomize for each post?
Sorry again if I caused you a headache. *************************************************
Sobakai Resources, here for you! |
|
Lord Aradon
|
Posted - 2006.01.27 09:22:00 -
[21]
I'll help
1) put all your images into a folder you want to use 2) obtain the FULL directory tree for it, if your using FTP then login to your hosts C-Panel and use the file manager, the tree will start from the FIRST folder. 3) create a new .txt doc and rename it random.php 4) copy and paste the php code from DS's post into random.php 5) edit the yellow bit to reflect your directory tree 6) upload it to the file as mentioned in step 1 7) add ?random=241021 to the end of your url to acheive a random sig.
Hope that helps, if ive misunderstood anything please kick me and ill change the steps. ---- Join Us
Corp Websites|My Gallery |
Nadija
|
Posted - 2006.01.27 09:30:00 -
[22]
isn't there someway to do this using HTML... cuz i'm not rich enough to own a site, so my sigs are hosted on photobucket... or smart enough to use ftp
MY SIG BANNER GALLERY |
Village Bicycle
|
Posted - 2006.01.27 09:42:00 -
[23]
LOL at this thread.
(From Thomus' alt, cuz I can't be bothered to log out/in again. And i'm late from Uni...)
----------------------------- Alt o' Thomus The Forum ***** |
Dark Shikari
|
Posted - 2006.01.27 14:19:00 -
[24]
Originally by: Lord Aradon
7) add ?random=539292 to the end of your url to acheive a random sig.
You mean ?random=[RND*], without the *, right? -- Proud member of the [23].
The Tachikomas are DEAD! Click sig for video.
|
Lord Aradon
|
Posted - 2006.01.27 19:42:00 -
[25]
Originally by: Dark Shikari
Originally by: Lord Aradon
7) add ?random=783515 to the end of your url to acheive a random sig.
You mean ?random=[RND*], without the *, right?
D'OH ---- Join Us
Corp Websites|My Gallery |
|
|
|
Pages: 1 :: [one page] |