• Page 1 of 1
  • 1
uCause Community » uCoz Modules » Forum » how can ?
how can ?
DevilDate: Thursday, 2011-11-03, 8:07 PM | Message # 1
Member
Group: Senior Members
Messages: 55
Awards: 1
Reputation: 3
Status: :-(
For starters, we have two codes css and javascript. They must be put in html page between <head> and </ head>
Code
<style type="text/css">
img.expando{
border: none;
vertical-align: top;
}
</style>


JavaSCRIPT:

Code
<script language="JavaScript">
if (document.images){
(function(){
var cos, a = /Apple/.test(navigator.vendor), times = a? 20 : 40, speed = a? 40 : 20;
var expConIm = function(im){
im = im || window.event;
if (!expConIm.r.test (im.className))
im = im.target || im.srcElement || null;
if (!im || !expConIm.r.test (im.className))
return;
var e = expConIm,
widthHeight = function(dim){
return dim[0] * cos + dim[1] + 'px';
},
resize = function(){
cos = (1 - Math.cos((e.ims[i].jump / times) * Math.PI)) / 2;
im.style.width = widthHeight (e.ims[i].w);
im.style.height = widthHeight (e.ims[i].h);
if (e.ims[i].d && times > e.ims[i].jump){
++e.ims[i].jump;
e.ims[i].timer = setTimeout(resize, speed);
} else if (!e.ims[i].d && e.ims[i].jump > 0){
--e.ims[i].jump;
e.ims[i].timer = setTimeout(resize, speed);
}
}, d = document.images, i = d.length - 1;
for (i; i > -1; --i)
if(d[i] == im) break;
i = i + im.src;
if (!e.ims[i]){
im.title = '';
e.ims[i] = {im : new Image(), jump : 0};
e.ims[i].im.onload = function(){
e.ims[i].w = [e.ims[i].im.width - im.width, im.width];
e.ims[i].h = [e.ims[i].im.height - im.height, im.height];
e (im);
};
e.ims[i].im.src = im.src;
return;
}
if (e.ims[i].timer) clearTimeout(e.ims[i].timer);
e.ims[i].d = !e.ims[i].d;
resize ();
};

expConIm.ims = {};

expConIm.r = new RegExp('\\bexpando\\b');

if (document.addEventListener){
document.addEventListener('mouseover', expConIm, false);
document.addEventListener('mouseout', expConIm, false);
}
else if (document.attachEvent){
document.attachEvent('onmouseover', expConIm);
document.attachEvent('onmouseout', expConIm);
}
})();
}
</script>

After you put those codes, to apply on an image will need to use this code, you can put it anywhere on the web page
Code
<img class="expando" border="0" src="LINK img" width="100" height="100">


The question is how can I go this code and the forum, I tried and I failedtags-zB11how, can, ?
 
0 Thanked you For This Useful Post:
AnimorphDate: Thursday, 2011-11-03, 8:24 PM | Message # 2
uCause forum Admin
Group: Developer
Messages: 2835
Awards: 73
Status: :-(
Devil, can you please be more specific about what you want to achieve with your forum ?
 
0 Thanked you For This Useful Post:
jackassDate: Friday, 2011-11-04, 11:27 AM | Message # 3
Member
Group: Senior Members
Messages: 262
Awards: 4
Reputation: 8
Status: :-(
Animorph, from JS looks like image resize after click smile

Quote
resize = function(){


 
0 Thanked you For This Useful Post:
AnimorphDate: Friday, 2011-11-04, 7:11 PM | Message # 4
uCause forum Admin
Group: Developer
Messages: 2835
Awards: 73
Status: :-(
jackass, I know what it is but i want to know what he wants to resize in forum
 
0 Thanked you For This Useful Post:
DevilDate: Friday, 2011-11-04, 10:25 PM | Message # 5
Member
Group: Senior Members
Messages: 55
Awards: 1
Reputation: 3
Status: :-(
Animorph, when you click on a picture related to increase slightly

Message edited by Devil - Friday, 2011-11-04, 10:25 PM
 
0 Thanked you For This Useful Post:
AnimorphDate: Saturday, 2011-11-05, 2:08 AM | Message # 6
uCause forum Admin
Group: Developer
Messages: 2835
Awards: 73
Status: :-(
Devil, it works perfectly in the forum for example i use it in uCause now to show it to you with the avatars in forum
 
0 Thanked you For This Useful Post:
DevilDate: Sunday, 2011-11-06, 10:45 PM | Message # 7
Member
Group: Senior Members
Messages: 55
Awards: 1
Reputation: 3
Status: :-(
Animorph, to me it does not work

Added (2011-11-06, 10:45 PM)
---------------------------------------------
Why not work?

 
0 Thanked you For This Useful Post:
AnimorphDate: Monday, 2011-11-07, 0:36 AM | Message # 8
uCause forum Admin
Group: Developer
Messages: 2835
Awards: 73
Status: :-(
Devil, it should work look at the forum i have in here it works
 
0 Thanked you For This Useful Post:
uCause Community » uCoz Modules » Forum » how can ?
  • Page 1 of 1
  • 1
Search:


"Making uCoz web designs simple and easy to use"
- uCause Developers