Avatar Variable Problem
3 posters
Page 1 of 1
Avatar Variable Problem
http://www.avacweb.com/t129-user-avatar-variable
^
I follow that tutorial but it is not working for me.
I'm using this JS script
And this for the html
I placed the "Log In" widget at the top right side of my forum so what's wrong?
Here's my forum, http://animeph.4umer.com/.
^
I follow that tutorial but it is not working for me.
I'm using this JS script
- Code:
$(function() {
var sidebar = document.getElementById('right');
var default = 'http://i855.photobucket.com/albums/ab117/jan2xonline/default_avatar_zpsa91409e3.jpg';
if(!sidebar) return;
var x = $('.module', sidebar)[0].getElementsByTagName('img');
$('.AVATAR').html('<img src="' + (x.length > 0 ? x[0].src : default) + '">');
});
And this for the html
- Code:
<span class="AVATAR">
testingggggggg</span>
I placed the "Log In" widget at the top right side of my forum so what's wrong?
Here's my forum, http://animeph.4umer.com/.
Re: Avatar Variable Problem
Try changing the widget to the left and do not forget to change it in the JavaScript.
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Re: Avatar Variable Problem
Where did you add the HTML code?
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Re: Avatar Variable Problem
What exactly are you trying to do with this tutorial? Did you read the last reply by LGForum? http://www.avacweb.com/t129p15-user-avatar-variable#10341
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Re: Avatar Variable Problem
^
Yes and I'm not planning to make a last post avatar or avatar in chatbox. I'm just trying to make a custom user control panel sir.
Yes and I'm not planning to make a last post avatar or avatar in chatbox. I'm just trying to make a custom user control panel sir.
Re: Avatar Variable Problem
So this will be a widget?
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Re: Avatar Variable Problem
Have you checked that all your javascripts are error-free?
LGforum- Hyperactive
- Posts : 2265
Reputation : 264
Language : English
Location : UK
Re: Avatar Variable Problem
I tried to check the error console and got this
I clicked this "23325.js:1" and got this
And that's the script for the avatar variable right?
- Code:
Failed to load resource http://an.z5x.net/ttj?id=1092879
Uncaught SyntaxError: Unexpected token default 23325.js:1
I clicked this "23325.js:1" and got this
- Code:
$(function(){var sidebar=document.getElementById('right');var default='http://i855.photobucket.com/albums/ab117/jan2xonline/default_avatar_zpsa91409e3.jpg';if(!sidebar)return;var x=$('.module',sidebar)[0].getElementsByTagName('img');$('.AVATAR').html('<img src="'+(x.length>0?x[0].src:default)+'">')});
And that's the script for the avatar variable right?
Re: Avatar Variable Problem
Change everywhere in the avatar script where it says 'default' to something else like 'def' or just give it a capital 'D' or something. There's 2 places where you'll need to change it.
LGforum- Hyperactive
- Posts : 2265
Reputation : 264
Language : English
Location : UK
Re: Avatar Variable Problem
I tried def like this
and still not working sir.
- Code:
$(function() {
var sidebar = document.getElementById('right');
var def = 'http://i855.photobucket.com/albums/ab117/jan2xonline/default_avatar_zpsa91409e3.jpg';
if(!sidebar) return;
var x = $('.module', sidebar)[0].getElementsByTagName('img');
$('.AVATAR').html('<img src="' + (x.length > 0 ? x[0].src : def) + '">');
});
and still not working sir.
Re: Avatar Variable Problem
Is there no error anymore then?
LGforum- Hyperactive
- Posts : 2265
Reputation : 264
Language : English
Location : UK
Re: Avatar Variable Problem
^
The only error left in error console is this,
The only error left in error console is this,
- Code:
Failed to load resource http://an.z5x.net/ttj?id=1092879
Similar topics
» Avatar Variable Problem Invision
» avatar variable
» Avatar problem
» Avatar variable
» Avatar Problem
» avatar variable
» Avatar problem
» Avatar variable
» Avatar Problem
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum