Simple Machine Codes
April 18, 2024, 01:01:04 am
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Welcome to SMC, the best place for your SMF For Free Codes
 
  Home Help Search Arcade Gallery Affiliates Code Index Staff List Calendar Members Login Register  

Add More Avatars

Pages: [1]   Go Down
  Print  
Author Topic: Add More Avatars  (Read 1585 times)
0 Members and 1 Guest are viewing this topic.
Agent Moose
Administrator

Offline Offline

Gender: Male
Posts: 2,672



View Profile WWW
« on: May 01, 2008, 07:57:22 pm »

Footers:
Code:
<script>
var n = 0;
var Gallery = new Array();
var GalName = "GALLERY NAME";
Gallery[n++] = ["IMAGE NAME","IMAGE URL"];

document.getElementById("cat").innerHTML += "<option value='http://smcodes.smfforfree3.com' id='NewGallery'>[" + GalName + "]</option>";
document.getElementById("NewGallery").onclick = function(){
for(x=0;x<Gallery.length;x++){
document.getElementById("file").innerHTML += "<option value='" + Gallery[x][1] + "' onclick='Gal(this);'>" + Gallery[x][0] + "</option>";
};};
function Gal(Image){
document.getElementById("avatar").src = Image.value;
var UserPic = document.getElementsByTagName("input");
for(x=0;x<UserPic.length;x++){
if(UserPic[x].name == "userpicpersonal"){
UserPic[x].value = Image.value;
};};
document.getElementById("avatar_choice_external").checked = "true";
};
</script>
This lets you add more Avatars to the galleries already there.

GALLERY NAME = the Name for the new gallery
IMAGE NAME = The name for the image
IMAGE URL = The URL of the image

To add more images, add more of these lines:
Code:
Gallery[n++] = ["IMAGE NAME","IMAGE URL"];

Enjoy Smiley
Report Spam   Logged

Share on Facebook Share on Twitter

GodGurl25
xXGodGurl25Xx
Members

Offline Offline

Gender: Female
Posts: 32



View Profile WWW
« Reply #1 on: May 01, 2008, 10:31:25 pm »

Oh! This one is cool! I'll try it later, hehe...  Wink
Report Spam   Logged

Hope I'm welcum here guys.
from:
xXGodGurl25Xx
legend 1234
100 Club Member

Offline Offline

Gender: Male
Posts: 461


Legend 1234


View Profile WWW
« Reply #2 on: May 02, 2008, 04:03:26 am »

oo sweet man thanks

legend 1234
Report Spam   Logged

robo123
Starter

Offline Offline

Posts: 24


View Profile
« Reply #3 on: May 07, 2008, 01:06:19 pm »

great code , thanks, you da best Cool
Report Spam   Logged
Agent Moose
Administrator

Offline Offline

Gender: Male
Posts: 2,672



View Profile WWW
« Reply #4 on: May 07, 2008, 01:07:41 pm »

Glad you like it Smiley

I would recommend this one though, it lets you add more than just one gallery:
http://smcodes.smfforfree3.com/index.php/topic,885.0.html
Report Spam   Logged

Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by EzPortal
Bookmark this site! | Upgrade This Forum
SMF For Free - Create your own Forum

Powered by SMF | SMF © 2016, Simple Machines
Privacy Policy