Simple Machine Codes
July 15, 2019, 07:58:37 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
  Print  
Author Topic: Avatar Gallery  (Read 472 times)
Agent Moose
Administrator

Offline Offline

Gender: Male
Posts: 2,672



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

Footers:
Code:
<script>
var n = 0;
var Gallery = new Array();
var GName = new Array();
GName = ["GALLERY NAME1","GALLERY NAME2"];

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

if(location.href.match(/sa=forumProfile/i)){
for(i=0;i<GName.length;i++){
//Created by Agent Moose (smcodes.smfforfree3.com)
if(GName[i].match(/ /i)){
var ID1 = GName[i].split(" ").join("");
}else{
var ID1 = GName[i];
};
document.getElementById("cat").innerHTML += "<option value='http://smcodes.smfforfree3.com' id='" + ID1 + "' onclick='Images(this);'>[" + GName[i] + "]</option>";
};
};
function Images(WORK){
for(x=0;x<Gallery.length;x++){
if(WORK.id == 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");
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 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:
Code:
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:
Code:
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

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
  Print  
 
Jump to:  

Powered by EzPortal
Bookmark this site! | Upgrade This Forum
SMF For Free - Create your own Forum | Buy traffic for your forum/website

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