Jump to content
xisto Community

thablkpanda

Members
  • Content Count

    345
  • Joined

  • Last visited

Everything posted by thablkpanda

  1. In my book that's just how things go down. I don't believe in coincidence either, I'm a evidence kinda guy.More like lucky IMO. What kind of system was it? I'm interested to know also, because if we're talking brand new AMD 64, Gig of ram kinda machine, then I'm thinking, damn, gotta love those neighbors. Otherwise, he'd still be kinda so/so in my book :)Panda
  2. Hey Trap, It's Mr. Panda, and I'm introducing a signature rotator script I came across several months ago. Unlike most other signature rotators on Xisto, this one does DOES NOT require the configuration process, and a new signature can be added, simply by uploading it to the proper directory. Seeing as this requires so much less configuration, I do hope it will be implemented by some of you 'Sig Masters' out there , that have to add another line of code to your rotator file each time you want to add a new sig. This simplifies the process greatly. Enough chit-chat. Let's get this one-time install over with - Necessary stuff - 1. Host supporting PHP (required) ,.htaccess,(optional) and CHMOD (optional) (Xisto does) 2. More than one signature file to rotate 3. Plain-Text editor, or specialized PHP Editor (PHP Designer 2005, Notepad, etc.) 4. FTP Client Procedure - Step 1 Create a new .php file, named 'index.php' (no quotes). Copy and Paste the following code into that PHP file, and save and close. <?php/* AUTOMATIC IMAGE ROTATOR Version 2.2 - December 4, 2003 Copyright (c) 2002-2003 Dan P. Benjamin, Automatic, Ltd. All Rights Reserved. hiveware.com/imagerotator.php automaticlabs.com/ DISCLAIMER Automatic, Ltd. makes no representations or warranties about the suitability of the software, either express or implied, including but not limited to the implied warranties of merchantability, fitness for a particular purpose, or non-infringement. Dan P. Benjamin and Automatic, Ltd. shall not be liable for any damages suffered by licensee as a result of using, modifying or distributing this software or its derivatives. ABOUT This PHP script will randomly select an image file from a folder of images on your webserver. You can then link to it as you would any standard image file and you'll see a random image each time you reload. When you want to add or remove images from the rotation-pool, just add or remove them from the image rotation folder. VERSION CHANGES Version 1.0 - Release version Version 1.5 - Tweaked a few boring bugs Version 2.0 - Complete rewrite from the ground-up - Made it clearer where to make modifications - Made it easier to specify/change the rotation-folder - Made it easier to specify/change supported image types - Wrote better instructions and info (you're them reading now) - Significant speed improvements - More error checking - Cleaner code (albeit more PHP-specific) - Better/faster random number generation and file-type parsing - Added a feature where the image to display can be specified - Added a cool feature where, if an error occurs (such as no images being found in the specified folder) *and* you're lucky enough to have the GD libraries compiled into PHP on your webserver, we generate a replacement "error image" on the fly. Version 2.1 - Updated a potential security flaw when value-matching filenames Version 2.2 - Updated a few more potential security issues - Optimized the code a bit. - Expanded the doc for adding new mime/image types. Thanks to faithful ALA reader Justin Greer for lots of good tips and solid code contribution!*//* ------------------------- ----------------------- Set $folder to the full path to the location of your images. For example: $folder = '/user/me/example.com/images/'; If the rotate.php file will be in the same folder as your images then you should leave it set to $folder = '.';*/ $folder = '.';/* If you'd like to enable additional image types other than gif, jpg, and png, add a duplicate line to the section below for the new image type. Add the new file-type, single-quoted, inside brackets. Add the mime-type to be sent to the browser, also single-quoted, after the equal sign. For example: PDF Files: $extList['pdf'] = 'application/pdf'; CSS Files: $extList['css'] = 'text/css'; You can even serve up random HTML files: $extList['html'] = 'text/html'; $extList['htm'] = 'text/html'; Just be sure your mime-type definition is correct!*/ $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;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); }}?> Make sure you saved, and closed .. Step 2 Open a FTP Client, I'm using FlashFXP, and login to your FTP site... In the public_html directory, create a new folder called "sig.png" (without quotes). Into this folder, upload the index.php file, along with more than one signature you want to rotate. The Index.php file is highlighted.. the rest are my signatures, and a .htaccess file that will be described later Finally, open your favorite browser (Should be Firefox) and visit http://forums.xisto.com/no_longer_exists/. (where yoursite.com is the root directory for wherever you're hosted). You should see one of your signatures, if not, check the Troubleshooting section. Refresh the page, and you should see another one of your sigs. Again, if not, see the Troubleshooting Section.. Of course, you'll replace your current signature with this by adding the following string into your signature block - yoursite.com/sig.png; Advanced Features/Suggestions If you'd like for only a certian signature to be shown in that directory, query it the following way... http://example.com/rotate.php?img=mikescreation.jpg Where 'mikescreation.jpg' is the signature's filename in the sig.png directory that you wish to show specifically. --- Wish to randomly select OTHER types of files, opposed to just images? Open up index.php and look for this block of code - $extList = array(); $extList['gif'] = 'image/gif'; $extList['jpg'] = 'image/jpeg'; $extList['jpeg'] = 'image/jpeg'; $extList['png'] = 'image/png'; To that list you'll add the MIME types of the other filetypes you wish to randomize in that folder. Save and upload, and you can randomize any other files you want. There are simplified instructions for that configuration above that block of code, courtesy of Dan P. Benjamin, the script's writer. Troubleshooting Question : Instead of getting my signature, when I visit my sig.png directory, I see a list of those signatures in that directory. Answer : Upload the following file, named '.htaccess' to your sig.png directory. The problem is a result of a indexing error, which is fixable by this line of code - DirectoryIndex index.php Save and close that file, as '.htaccess'. Nothing more. And upload it to the proper directory. Your signatures will randomize now. Closing In conclusion, any further questions will be answered promptly in this thread, I HAVE turned on E-mail notification. Also, This script was NOT written by me, It was created by Dan P. Benjamin, whose contact information you will find at the top of the index.php file. To reiterate, I did NOT write this script, I wrote the tutorial. Thanks for reading, happy Sigging (sp? ) - Mr. Panda
  3. No problemo. I wish you luck, there's no YAST for Debian, that I remember.. So It'll be interesting to see how you turn out. If you 'fail' per-se. I'll ISO my Suse 9.2 disks and send them to ya'. So you're sure you don't get some hijacked copy (Yea, I'm that nice) Panda
  4. Do you render these yourself? Or just compile? Either way this is cool to share with the 'Sig Padawans' like myself.. lol Like Star Wars, Padawan, Apprentice, Master... Ok fine, You don't get it. :)Panda
  5. OMG super props dude, whoever you made this sig for must be pimped-out.Nice work, I'ma see if I can find the original and compare them... did you get it from google?Don't really need to though, Mike's stuff is always the hotness.Panda
  6. Coolio, I'll get back to ya in a few.. My comp's down, posting on my -other- computer. I need to upload all the important crap to my network server.. yet I digress.Panda - get bak to ya lata.
  7. That number is One thousand two hundred and nine... talk about irony. lol Yes that's the correct way to speak, like Nguyen said.. (Just felt like seconding that) Panda
  8. I'm assuming that you run an intel-based system, or a AMD system, not a 64 bit processor.Most likely i386. If you've got a 64bit AMD processor, go ia64.Panda
  9. Yo,It's the panda, you already know. I'm extremely photoshop challenged, so I'm looking for someone to brush me a decent signature. I can add a panda render (of my own doing ) if someone shows some excellent brushwork...I'm looking for something along the lines of a black and white (complete contrast) that would look good with something like my avatar as a render.Hard to explain, but if you're willing to try, I'd appreciate it alot. Possibly a small credit donation to the one I like the best? Guess that doesn't fit the 'request' description.Panda
  10. Nah - Networking 101, here ya go.When you connect your modem to the phone/cable line, you really connect to a DHCP server at your provider's 'base'. That server 'randomly' assigns IP addresses to each computer (or group of computers) on the 'network'. However if your provider affixes you a fixed IP address, then that server verifys the MAC (Machine address code? lol) address of your hardware, and verifys it with their database. If it's the same, then it affixes you the IP address they gave you.Changing said IP address can be done by forcing the server to re-roll. It could be illegal by your provider's TOS, so check their stuff before playing too much, but it's not likely.True, if you're IP banned, you can re-roll your IPs and re-logon to whatever place it may be. That's why some people ban complete ranges of IP addresses, and eliminate chances of people visiting their site they don't want to.Panda - Hopes this explained it...
  11. Slightly illegal, but who cares?Nice, I paid $90~ for this calc. back in... 7th grade? Wow.. talk about ancient history.Don't see the point in having a calculator for 'just' at home, you can google complicated problems and get the answers at home.Whatever, sure this helps someone.Panda
  12. Eh, just means that your coding is cross-browser compatible. The standard set for the cross-browser coding is deemed by the World Wide Web Consortium... you'll find them here. If you wish to work on learning the 'correct' ways to code, applicable to the w3c's code. drop by here, w3schools. Personally, I see it as something for people with extra time on their hands. Biskie, feeling the layout, I liked the old one better though Panda
  13. Not too shabby. I know my Upload stinks, but who cares? I love my DL speed, it owns. Click and it's there Panda - Owns
  14. Lol I had the same issue for about fifty seconds after I checked my upgrade post, and my cpanel... then I thought about it, and slammed my keyboard on my head a few times... felt kinda slow.Panda
  15. I'm feeling this..Nice to add to your collection.Panda - doesn't feel like rating your stuff anymore - almost always a 9/10
  16. He has his username on the right hand side in a double drop shadow type thinger..I'm feeling the sig, I like the dog (whose name escapes me) on the bottom though... I'm odd I guess. Gives it an abstract look, different from these 'normal' sigs.I'd hit you with a 6/10. And Frozen, no offense, but the dude said he has better work, just wanted a review on something he threw together in a few mins.. 'pieces' is spelled I before E... :)Panda
  17. Not really.You're downloading an entire OS.Windows is around 1.5 gigs. So I'd consider small .isos and such a good size, even if they're around 500 mb.Panda - Recomends Debian. Google it -Panda
  18. Hotness...Damn, the T17 Graphics Crew isn't just a bunch of losers lol not that I thought so...Panda
  19. Gotta agree, our president is an idiot. However he doesn't have control over what most of us blame him with. Of course, that doesn't change the fact that he's an idiot.I'm wondering if you own a car DjLuki... There IS a reason. There's only so much oil these countries have given us, not enough to fill our reserves, and to reopen most gas stations. We burn through a heck of a lot of fuel each day. No country can give us enough to stall our usage. Panda -
  20. Askingboss - You're funny. Live video is A buncha steps from now, that'd require ALOT more satelites (enough for every google earth user..) if you want it to be up to date for each user.. a cache of looping video won't work. You amaze me at what you're expecting.Yeah this program has been around for a while, my ex-girlfriend and I used to play some odd game we didn't name, where we'd name the latitude and longitude of a place, and she'd guess where it is, and.. well it was more involved than that, but the TOS stops me from going any further....Panda - Wants a taco.
  21. Update: Score - Nguyen - 5 Mike - 0 Could we keep a format in all votes after now? to help organize things?
  22. - Coming from someone with some time on his hands apparently :)Most of us don't like to be pestered with phone calls from advertisers. Especially if I'm not getting paid to listen to these guys ramble about whatever.Panda - Keeps his info on the DL. Unless it's required, never his SS # though. No security is encrypted enough for that, and I'm not giving it to anyone anyway..Panda
  23. Nice idea. I'm definitely adding one to my blog.There'll be a place to donate, to the red cross, before I even get my CSS done ingeneous(sp?)Panda
  24. Slow loading page.. Still loading when I finished typing this post.. I do type 80 WPM though... Goldeneye is a classic, of course. I'm loving the old school. 9/10 for it's time. I also liked Super Smash Bros... I own a gamecube ONLY because of SSB:Melee.Panda
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.