Simple Machine Codes
May 24, 2020, 09:45:46 pm
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  

Avatar Gallery

Pages: [1]   Go Down
Author Topic: Avatar Gallery  (Read 479 times)
Agent Moose

Offline Offline

Gender: Male
Posts: 2,672

View Profile WWW
« on: May 03, 2008, 08:37:16 am »

var n = 0;
var Gallery = new Array();
var GName = new Array();

Gallery[n++] = ["GALLERY NAME1","IMAGE NAME","IMAGE"];

//Created by Agent Moose (
if(GName[i].match(/ /i)){
var ID1 = GName[i].split(" ").join("");
var ID1 = GName[i];
document.getElementById("cat").innerHTML += "<option value='' id='" + ID1 + "' onclick='Images(this);'>[" + GName[i] + "]</option>";
function Images(WORK){
if( == Gallery[x][0]){
document.getElementById("file").innerHTML += "<option value='" + Gallery[x][2] + "' onclick='Gal(this);'>" + Gallery[x][1] + "</option>";
function Gal(Image){
document.getElementById("avatar").src = Image.value;
var UserPic = document.getElementsByTagName("input");
if(UserPic[x].name == "userpicpersonal"){
UserPic[x].value = Image.value;
document.getElementById("avatar_choice_external").checked = "true";

This code is just like "Add More Avatars", but better name, and it is just better Tongue
Unlike Add More Avatars code, you can add more than just one gallery for this one.

GALLERY NAME = The Names of the Gallery.  To add more gallerys, just add more (,"")
So, for example, it would be like this:
GName = ["GALLERY NAME1","GALLERY NAME2","I Add This"];

The Second GALLERY NAME would be for the gallery you want the images to be in.
IMAGE NAME = The Name for the image.
IMAGE = The URL of that image.

Too add more images, add more of these lines:
Gallery[n++] = ["GALLERY NAME","IMAGE NAME","IMAGE"];

Again, Change GALLERY NAME to the gallery you would like the images to be in Smiley

Enjoy Smiley
Report Spam   Logged

Share on Facebook Share on Twitter

legend 1234
100 Club Member

Offline Offline

Gender: Male
Posts: 461

Legend 1234

View Profile WWW
« Reply #1 on: May 03, 2008, 10:02:56 am »

ooo sweet job moosey

thanks alot

legend 1234
Report Spam   Logged

Pages: [1]   Go Up
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