SMF For Free Support Forum
Signup For Free Forum
July 30, 2010, 06:17:21 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Welcome to SMF For Free. The best free SMF Host
 
   Home   Help Search Arcade Gallery Login Register  

Pages: [1]
  Print  
Author Topic: The "No Avatar" Option  (Read 1292 times)
0 Members and 1 Guest are viewing this topic.
OutOfOrder
SMF For Free Sr. Member
*
Offline Offline

Posts: 385


Creator of the X-treme Gaming Forums


View Profile WWW
« on: December 13, 2008, 04:25:14 pm »

Forum Url: http://funcentral.smfforfree2.com
I had recently (well actually about a week- 2 weeks ago) made a topic about a code that would place an image as a default image for a user. This means that if they do not select an avatar, they will have this as their basic avatar (their default avatar).

Since no one has replied to the topic that I made, I have assumed that there is no such code/ option on the SMF For Free forums that do something like this. So I have created a new topic here so that someone can please add this to the forums.

Thanks!

-OutOfOrder-
Logged

Colette Brunel
SMF For Free Sr. Member
*
Offline Offline

Posts: 423



View Profile
« Reply #1 on: December 13, 2008, 06:02:39 pm »

Code:
$("img:contains('View Profile')").before("<img src='http://somewhere.com/images/default_avatar.png' alt='*' /><br />");

However that makes everyone have a default avatar even if they actually set themselves an avatar. It's either a universal default avatar or everyone has their own choice.
Logged
simply sibyl
Global Moderator
*
Offline Offline

Posts: 13697



View Profile WWW
« Reply #2 on: December 13, 2008, 06:05:31 pm »

Forum Url: http://funcentral.smfforfree2.com
I had recently (well actually about a week- 2 weeks ago) made a topic about a code that would place an image as a default image for a user. This means that if they do not select an avatar, they will have this as their basic avatar (their default avatar).

Since no one has replied to the topic that I made, I have assumed that there is no such code/ option on the SMF For Free forums that do something like this. So I have created a new topic here so that someone can please add this to the forums.

Thanks!

-OutOfOrder-

If you do not get a reply for several days you can always bump the topic up but please dont keep making new topics for it

moved to the codes board as that is the only way this could be achieved
Logged

OutOfOrder
SMF For Free Sr. Member
*
Offline Offline

Posts: 385


Creator of the X-treme Gaming Forums


View Profile WWW
« Reply #3 on: December 14, 2008, 03:16:16 pm »

oh.. sorry... i thought that because no one had replied to that one, that no such thing existed, so i put it in the suggestions section.. because that was what it was... a suggestion...

ok. maybe this is too hard to do...

here is a better question, how do you change/ block some of the avatar selections?

For example, you can see "no pic" and then [Actors] and then [Anime Avatar], etc.

How do you block some of those and then also change some of them?

i think this will be an easier question because that is what has been done to this forum. (i see that there are only 2 choices sections on this forum).

Logged

simply sibyl
Global Moderator
*
Offline Offline

Posts: 13697



View Profile WWW
« Reply #4 on: December 14, 2008, 03:27:02 pm »

You cannot change them on your hosted forum
Smf for Free is able to do more here at support as he has access to, and can edit files we do not have access to -  you'll notice some things are different here.
« Last Edit: December 14, 2008, 03:28:51 pm by simply sibyl » Logged

OutOfOrder
SMF For Free Sr. Member
*
Offline Offline

Posts: 385


Creator of the X-treme Gaming Forums


View Profile WWW
« Reply #5 on: December 17, 2008, 06:17:17 am »

ok.

i will try to make a code that will do what i want then... and then maybe if it works release it to the public for general use.

Logged

OutOfOrder
SMF For Free Sr. Member
*
Offline Offline

Posts: 385


Creator of the X-treme Gaming Forums


View Profile WWW
« Reply #6 on: December 17, 2008, 03:38:32 pm »

does anyone have any clues on how to make this?

i can make it if someone can please tell me what i need to target and what i need to put inorder to change the pic from nothing to something...

please someone..

thanks in advance!
Logged

Colette Brunel
SMF For Free Sr. Member
*
Offline Offline

Posts: 423



View Profile
« Reply #7 on: December 17, 2008, 06:25:20 pm »

I've already answered your original topic-question.

In reference to the profile-default-avatar change code, you can perhaps manipulate the javascript that creates that area. By that area, I mean this script when you're editing your profile info:

Code:
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var files = ["Actors/Brad_Pitt.jpg", "Actors/Bruce_Campbell.jpg", "Actors/Bruce_Willis.jpg", "Actors/Cameron_Diaz.jpg", "Actors/Charisma_Carpenter.jpg", "Actors/Christopher_Lambert.jpg", "Actors/Claudia_Schiffer.jpg", "Actors/David_Boreanaz.jpg", "Actors/David_Spade.jpg", "Actors/Denise_Richards.jpg", "Actors/Emilio_Estevez.jpg", "Actors/Eva_Habermann.jpg", "Actors/Freddie_Prinze_Jr.jpg", "Actors/Gwyneth_Paltrow.jpg", "Musicians/Alanis_Morissette.jpg", "Musicians/Avril_Lavigne.jpg", "Musicians/Bob_Marley.jpg", "Musicians/Britney_Spears.jpg", "Musicians/Cardigans.jpg", "Musicians/Christina_Aguilera.jpg", "Musicians/Dido.jpg", "Musicians/Eminem.jpg", "Musicians/Jewel.jpg", "Musicians/Jon_Bon_Jovi.jpg", "Musicians/Korn.jpg", "Musicians/Limp_Bizkit.jpg", "Musicians/Linkin_Park.jpg", "Musicians/Nirvana.jpg", "Musicians/No_Doubt.jpg", "Musicians/Queen.jpg", "Musicians/Shakira.jpg", "Musicians/U2.jpg"];
var avatar = document.getElementById("avatar");
var cat = document.getElementById("cat");
var selavatar = "";
var avatardir = "http://smfsupport.com/support/cavatars/";
var size = avatar.alt.substr(3, 2) + " " + avatar.alt.substr(0, 2) + String.fromCharCode(117, 98, 116);
var file = document.getElementById("file");

if (avatar.src.indexOf("blank.gif") > -1)
changeSel(selavatar);
else
previewExternalAvatar(avatar.src)

function changeSel(selected)
{
if (cat.selectedIndex == -1)
return;

if (cat.options[cat.selectedIndex].value.indexOf("/") > 0)
{
var i;
var count = 0;

file.style.display = "inline";
file.disabled = false;

for (i = file.length; i >= 0; i = i - 1)
file.options[i] = null;

for (i = 0; i < files.length; i++)
if (files[i].indexOf(cat.options[cat.selectedIndex].value) == 0)
{
var filename = files[i].substr(files[i].indexOf("/") + 1);
var showFilename = filename.substr(0, filename.lastIndexOf("."));
showFilename = showFilename.replace(/[_]/g, " ");

file.options[count] = new Option(showFilename, files[i]);

if (filename == selected)
{
if (file.options.defaultSelected)
file.options[count].defaultSelected = true;
else
file.options[count].selected = true;
}

count++;
}

if (file.selectedIndex == -1 && file.options[0])
file.options[0].selected = true;

showAvatar();
}
else
{
file.style.display = "none";
file.disabled = true;
document.getElementById("avatar").src = avatardir + cat.options[cat.selectedIndex].value;
document.getElementById("avatar").style.width = "";
document.getElementById("avatar").style.height = "";
}
}

function showAvatar()
{
if (file.selectedIndex == -1)
return;

document.getElementById("avatar").src = avatardir + file.options[file.selectedIndex].value;
document.getElementById("avatar").alt = file.options[file.selectedIndex].text;
document.getElementById("avatar").alt += file.options[file.selectedIndex].text == size ? "!" : "";
document.getElementById("avatar").style.width = "";
document.getElementById("avatar").style.height = "";
}

function previewExternalAvatar(src)
{
if (!document.getElementById("avatar"))
return;

var maxHeight = 65;
var maxWidth = 65;
var tempImage = new Image();

tempImage.src = src;
if (maxWidth != 0 && tempImage.width > maxWidth)
{
document.getElementById("avatar").style.height = parseInt((maxWidth * tempImage.height) / tempImage.width) + "px";
document.getElementById("avatar").style.width = maxWidth + "px";
}
else if (maxHeight != 0 && tempImage.height > maxHeight)
{
document.getElementById("avatar").style.width = parseInt((maxHeight * tempImage.width) / tempImage.height) + "px";
document.getElementById("avatar").style.height = maxHeight + "px";
}
document.getElementById("avatar").src = src;
}
// ]]></script>

Unsetting each variable or "hiding" the entire script via another script (using jQuery or similar) in the header and then creating your own by following similar formats would be the best way to go about this.
Logged
Agent Moose
Moderator
*****
Offline Offline

Posts: 825


Do not PM me for Code Support or Request


View Profile
« Reply #8 on: December 18, 2008, 04:31:01 pm »

I have tried to create a code like this, but It didn't look very well because there is no spot to actually insert an image to where it should go.

I can try again though Smiley
Logged

Check out Revolution X's Brand new Code Index!
OutOfOrder
SMF For Free Sr. Member
*
Offline Offline

Posts: 385


Creator of the X-treme Gaming Forums


View Profile WWW
« Reply #9 on: December 19, 2008, 01:34:47 pm »

I would love if you could do that!!

thanks!

I also found this: I think you have to download it and then it will work for some people's smf forums or something... maybe it will help you

http://custom.simplemachines.org/mods/index.php?mod=975
Logged

Agent Moose
Moderator
*****
Offline Offline

Posts: 825


Do not PM me for Code Support or Request


View Profile
« Reply #10 on: December 20, 2008, 06:21:31 pm »

Your request has been finished!

http://www.smfsupport.com/support/smf_for_free_codes_and_support/code_default_avatar-t23480.0.html
Logged

Check out Revolution X's Brand new Code Index!
OutOfOrder
SMF For Free Sr. Member
*
Offline Offline

Posts: 385


Creator of the X-treme Gaming Forums


View Profile WWW
« Reply #11 on: December 20, 2008, 06:24:36 pm »

thank you!!!  Grin
Logged

zammymage
SMF For Free Full Member
*
Offline Offline

Posts: 108



View Profile
« Reply #12 on: December 26, 2008, 03:11:37 am »

nice i would like this
Logged



Pages: [1]
  Print  
 
Jump to:  



Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC
Hostgator Hosting
Page created in 0.306 seconds with 16 queries. (Pretty URLs adds 0.057s, 2q)