TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,913
  • Total Topics: 21,308
  • Online today: 884
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 1
  • Guests: 435
  • Total: 436
  • @rjen

Rotating Avatars

Started by Lord Anubis, February 11, 2009, 01:10:48 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Lord Anubis

Sorry folks, don't know where this tip/trick should go, but wanted to share it with the TP community  ;D

Have you ever been tired of your same old avatar all the time, and just too lazy to change it?

Well this script will keep your avatar lively and fun    :2funny:

For instance, reload this page and you will see that my avatar changed...don't ask how anymore

here's a quick simple method to get this to work (works with SMF, but for some other forum software it doesn't)

Okay how to do it:

1.  In the root of your domain create a folder called "avatars" (without the quotes of course)
2.  Download the attachment below (rotate.zip), unzip the rotate.php file and upload it to the "avatars" folder
3.  Add your avatars to this folder...these can be .jpeg, .png, or .gif
4.  In a SMF forum where you add your avatar, pick "I have my own pic:"
     and add  "http://www.yourwebsite.com/avatars/rotate.php"
5.  Enjoy this lil trick ;)


ZarPrime

Hi LA,

Ahhh, pretty cool trick.  I don't know if I'll use it on sites that I Admin, but it is a pretty neat trick.

Good job. :up:
.ZarPrime

cepsi

lol i already get moaned at that i change my avatar too often! neat trick tho!

ccbtimewizard

Interesting script. I myself wrote one just like it, but using more elaborate techniques.

http://img23.imageshack.us/img23/9396/02212009131450.png

(download attached files)

Change $path (variable within AvatarControl.php) to any directory (you could even make it hidden like I sorta did) that contains all your image files. Upload avatar.php in any location that you want it to appear in.

You need to name all the images you want to use like so, and place them in the directory you defined in $path:

1.png
2.png
3.gif
4.jpg


You can use .png, .gif, .jpg, and .jpeg. If you want to add more, edit $formats (variable within AvatarControl.php) to include it.

You must have only ONE image with a certain number, so you can't have 1.jpg and 1.png in the same folder, otherwise it will NOT load image one. This script was created to RANDOMIZE your avatars, so they'll appear in ANY order.

You can substitute the .php extension in the link to your image with .png by editing .htaccess file or creating a .htaccess file in the directory where avatar.php is and have it contain the following:

RewriteEngine on
RewriteRule avatar.png avatar.php


You *might* need to change the paths on that according to how you set it up, but by default it works without the direct paths. ;)

SmokyBlue

works nice on my site, thanks CCB.. i did get yours going.. finally! :2funny:

rumboogy


This website is proudly hosted on Crocweb Cloud Website Hosting.