The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Staff widget with hovering + swamp images effect

5 posters

Go down

In progress Staff widget with hovering + swamp images effect

Post by itachi uchiha October 6th 2011, 10:16 am

Hey can someone tell me how to add this Staff widget ?

Staff widget with hovering + swamp images effect Untitl12

and when i put my mouse over the image it shows this.

Staff widget with hovering + swamp images effect Help_210

how do i do that ?
itachi uchiha
itachi uchiha
Forumember

Male Posts : 146
Reputation : 1
Language : English
Location : New Zealand

http://www.narutonexusrp.com/forum

Back to top Go down

In progress Re: Staff widget with hovering + swamp images effect

Post by Nera. October 6th 2011, 11:01 pm

Hi,

Make a forum widget.

AP > Modules > Forum Widget managment > Create a new widget.

Drag it with the mouse in the structure. Add this code in it. Replace the things in it I wrote in upercase.

Code:
<a href="" onMouseOver="document.MyImage.src='IMAGE TO APPEARE ON HOVER GOES HERE';" onMouseOut="document.MyImage.src='FIRST IMAGE GOES HERE';">
<img src="FIRST IMAGE GOES HERE" name="MyImage">
</a>

Customize the rest of the widget, this is for the image on mouse change/over if that's what you wanted.
Nera.
Nera.
Energetic

Female Posts : 7078
Reputation : 2017
Language : English
Location : -

Back to top Go down

In progress Re: Staff widget with hovering + swamp images effect

Post by itachi uchiha October 7th 2011, 2:23 pm

half is correct. heres the link to the site.

http://narutold.forumotion.com/

i want that hover mod if you can help me Very Happy
itachi uchiha
itachi uchiha
Forumember

Male Posts : 146
Reputation : 1
Language : English
Location : New Zealand

http://www.narutonexusrp.com/forum

Back to top Go down

In progress Re: Staff widget with hovering + swamp images effect

Post by Tobii October 8th 2011, 5:21 am

Sorry to budge in but, I'm having the same problem but no one answers me properly. Nera, you wrote 'first image goes here' twice? But which? Like the pic to hover over to show the name?
Tobii
Tobii
Forumember

Male Posts : 332
Reputation : 3
Language : English, Mandarin, French

http://naruto-thepath.boardonly.com/

Back to top Go down

In progress Re: Staff widget with hovering + swamp images effect

Post by Nera. October 8th 2011, 8:47 am

They used this http://www.idocs.com/tags/images/images_famsupp_84.html

Example (touch the piano man): http://movingagain.forumcroatian.com/h6-swamp Exclamation
Example is to show you that I have done it like that and it works fine, have tried it in the widget also. It's a test HTML page.

Add this to a widget. Fill in the blanks.

<img border="0px" align="middle" name="showperson" src="STATIC IMAGE LINK THAT SAYS HOVER IMAGES BELLOW HERE">
</br>
<a onmouseover="swap(this,'showperson','YOUR NAME HERE')" href="YOUR FORUM LINK HERE/u1"><img border="0" alt="Owner" src="YOUR AVATAR HERE"></a>

ADD THE WHOLE SCRIPT FROM THE LINK HERE

<script type="text/javascript">
setswap("showperson",
'YOUR NAME HERE', 'YOUR AVATAR HERE');
//
</script>

@Tobii The one that will be showen first when you land on forum. Add it for test purpuses and see what happens, it's the easiest to understand like that.
Nera.
Nera.
Energetic

Female Posts : 7078
Reputation : 2017
Language : English
Location : -

Back to top Go down

In progress Re: Staff widget with hovering + swamp images effect

Post by Yu Narukami October 9th 2011, 9:10 am

Sorry for posting this solved problem but I got the same thing here. I did try the code but seems that it only shows the static image and the avatar. But when I tried to hover the mouse towards the avatar, the static image remains the same.
Yu Narukami
Yu Narukami
Forumember

Posts : 49
Reputation : 1
Language : English

Back to top Go down

In progress Re: Staff widget with hovering + swamp images effect

Post by Nera. October 9th 2011, 9:16 am

Can I have a link to where you have done it?
Nera.
Nera.
Energetic

Female Posts : 7078
Reputation : 2017
Language : English
Location : -

Back to top Go down

In progress Re: Staff widget with hovering + swamp images effect

Post by Yu Narukami October 9th 2011, 9:26 am

http://narutoforbidden2.forumms.net/

Code:
<img border="0px" align="middle" name="showperson" src="http://img847.imageshack.us/img847/6791/stafftemplateb.png">
</br>
<a onmouseover="swap(this,'showperson','Minato')" href="http://narutoshinobiwars.forumms.net//u1"><img border="0" alt="Owner" src="http://img31.imageshack.us/img31/5074/celtia.png"></a> <script type="text/javascript">
setswap("showperson",
'Minato', 'http://img31.imageshack.us/img31/5074/celtia.png');
//
</script>

PS-The pic is just a tester
Yu Narukami
Yu Narukami
Forumember

Posts : 49
Reputation : 1
Language : English

Back to top Go down

In progress Re: Staff widget with hovering + swamp images effect

Post by Nera. October 9th 2011, 9:29 am

You did not follow this step.

Code:
ADD THE WHOLE SCRIPT FROM THE LINK HERE.
Nera.
Nera.
Energetic

Female Posts : 7078
Reputation : 2017
Language : English
Location : -

Back to top Go down

In progress Re: Staff widget with hovering + swamp images effect

Post by Yu Narukami October 9th 2011, 9:31 am

what script?

Code:
<a href="" onMouseOver="document.MyImage.src='IMAGE TO APPEARE ON HOVER GOES HERE';" onMouseOut="document.MyImage.src='FIRST IMAGE GOES HERE';">
<img src="FIRST IMAGE GOES HERE" name="MyImage">
</a>
<--- this one?
Yu Narukami
Yu Narukami
Forumember

Posts : 49
Reputation : 1
Language : English

Back to top Go down

In progress Re: Staff widget with hovering + swamp images effect

Post by Nera. October 9th 2011, 9:36 am

This is the answer you need. Not the one up.

Nera. wrote:They used this http://www.idocs.com/tags/images/images_famsupp_84.html

Example (touch the piano man): http://movingagain.forumcroatian.com/h6-swamp Exclamation
Example is to show you that I have done it like that and it works fine, have tried it in the widget also. It's a test HTML page.

Add this to a widget. Fill in the blanks.

<img border="0px" align="middle" name="showperson" src="STATIC IMAGE LINK THAT SAYS HOVER IMAGES BELLOW HERE">
</br>
<a onmouseover="swap(this,'showperson','YOUR NAME HERE')" href="YOUR FORUM LINK HERE/u1"><img border="0" alt="Owner" src="YOUR AVATAR HERE"></a>

ADD THE WHOLE SCRIPT FROM THE LINK HERE

<script type="text/javascript">
setswap("showperson",
'YOUR NAME HERE', 'YOUR AVATAR HERE');
//
</script>

@Tobii The one that will be showen first when you land on forum. Add it for test purpuses and see what happens, it's the easiest to understand like that.
Nera.
Nera.
Energetic

Female Posts : 7078
Reputation : 2017
Language : English
Location : -

Back to top Go down

In progress Re: Staff widget with hovering + swamp images effect

Post by Yu Narukami October 9th 2011, 9:40 am

Is there a video tutorial? Its so confusing.
Yu Narukami
Yu Narukami
Forumember

Posts : 49
Reputation : 1
Language : English

Back to top Go down

In progress Re: Staff widget with hovering + swamp images effect

Post by Nera. October 9th 2011, 9:43 am

No there is not. It's actually simple. All you did not do as I said s this step bolded in my answer.
ADD THE WHOLE SCRIPT FROM THE LINK HERE.
When I said the script from the link I ment it basiclly. Add the whole script from this link ( http://www.idocs.com/tags/images/images_famsupp_84.html ) there.
Nera.
Nera.
Energetic

Female Posts : 7078
Reputation : 2017
Language : English
Location : -

Back to top Go down

In progress Re: Staff widget with hovering + swamp images effect

Post by Yu Narukami October 9th 2011, 9:47 am

So simply I just add the script there and do nothing more?

EDIT:How to add more pics?
Yu Narukami
Yu Narukami
Forumember

Posts : 49
Reputation : 1
Language : English

Back to top Go down

In progress Re: Staff widget with hovering + swamp images effect

Post by Nera. October 9th 2011, 9:56 am

http://www.idocs.com/tags/images/images_famsupp_82.html

See there, you just have to fill it and you'll have more pictures. Replace this

Code:
<script type="text/javascript">
setswap("showperson",
'YOUR NAME HERE', 'YOUR AVATAR HERE');
//
</script>

With the one from the link in this post. And fill it to get more pictures. I'm sorry if I explain badly, I'm not a good English speaker.
Nera.
Nera.
Energetic

Female Posts : 7078
Reputation : 2017
Language : English
Location : -

Back to top Go down

In progress Re: Staff widget with hovering + swamp images effect

Post by Yu Narukami October 9th 2011, 10:09 am

How? I got the 1st one right but the 2nd one wrong
Yu Narukami
Yu Narukami
Forumember

Posts : 49
Reputation : 1
Language : English

Back to top Go down

In progress Re: Staff widget with hovering + swamp images effect

Post by Nera. October 9th 2011, 10:51 am

Example of how does it have to look for two people Exclamation

Script:


<img width="115px" height="115px" border="1" align="middle" name="showperson" style="border: 1px
black solid;" src="STATIC IMAGE GOES HERE, THE ONE THAT WILL DISPLAY PICTURES WHEN YOU HOVER OVER THEM">

SCRIPT FROM THE LINK GOES HERE - The big one from the link I gave you.

<script type="text/javascript">
setswap("showperson",
'NAME OF THE PERSON 1 GOES HERE',
'AVATAR OF THE PERSON 1 GOES HERE',
'NAME OF THE PERSON 2 GOES HERE',
'AVATAR OF THE PERSON 2 GOES HERE');
//
</script>

<a onmouseover="swap(this,'showperson','NAME OF THE PERSON 1 GOES HERE')" href="YOUR FORUM URL HERE/u1"><img border="0" alt="TITLE OF THE IMAGE" style="border: 1px
black solid; height: 62px; width: 26px;" src="AVATAR OF THE PERSON 1 GOES HERE"></a>

<a onmouseover="swap(this,'showperson','NAME OF THE PERSON 2 GOES HERE')" href="YOUR FORUM URL HERE/u2"><img border="0" alt="TITLE OF THE IMAGE" style="border: 1px black solid;" src="AVATAR OF THE PERSON 2 GOES HERE"></a>

Done on two persons example:


http://movingagain.forumcroatian.com/h6-swamp Exclamation
To do it on more persons just add all that you have for person 1 & 2 for others in the script.
Nera.
Nera.
Energetic

Female Posts : 7078
Reputation : 2017
Language : English
Location : -

Back to top Go down

In progress Re: Staff widget with hovering + swamp images effect

Post by True Blue October 9th 2011, 12:07 pm

Hello Yu Narukami

When you say: "2nd one wrong" do you mean your placing two or more on same webpage?

If you have more than one rollover on the same web page, you must use a different name value for each one. Using the same name value for two or more will confuse the browser and no effect will be seen. Wink

Love

Liz

Update:

The first image will be placed on the page as it normally would. The one main difference is you have to specify a name in the img tag like so...

<img src="image1.gif" name="MyImage">

This image can now be accessed by javascript as document.MyImage. Of course add in the width, height, alt, and border properties as desired too.

The next part is to create a link around that image. This will allow javascript to affect the image properties.

<a href="" onMouseOver="document.MyImage.src='image2.gif';" onMouseOut="document.MyImage.src='image1.gif';">
<img src="image1.gif" name="MyImage"></a>

SRC is the SouRCe of the image file.

document.MyImage.src specifies that something is happening to the src of the object named MyImage on this document (web page). Remember... JavaScript is a step language. It goes level by level to find and use something.

OnMouseOver and OnMouseOut are self explanitory. They will do this specified coding when this event happens. For the example, They are being used to specify a new src for the named image.

This type of rollover effect is very common for navigation uses. You can create two images being close to the same. One image may have regular text on it, the other having highlighted text. Put them together in a rollover effect and you have a neat navigation happening. Placing a value in the href will complete the navigation effect.



True Blue
True Blue
Forumember

Female Posts : 63
Reputation : 4
Language : english
Location : N.Ireland

Back to top Go down

In progress Re: Staff widget with hovering + swamp images effect

Post by Yu Narukami October 9th 2011, 12:47 pm

What? So confusing
Yu Narukami
Yu Narukami
Forumember

Posts : 49
Reputation : 1
Language : English

Back to top Go down

In progress Re: Staff widget with hovering + swamp images effect

Post by Nera. October 9th 2011, 12:53 pm

Just fill in the thigs I posted you in color in my previous post. That's all you need to do. See, I've done it here http://movingagain.forumcroatian.com/h6-swamp
Nera.
Nera.
Energetic

Female Posts : 7078
Reputation : 2017
Language : English
Location : -

Back to top Go down

In progress Re: Staff widget with hovering + swamp images effect

Post by Yu Narukami October 9th 2011, 12:58 pm

How to make the pics go down and not sideways.
Yu Narukami
Yu Narukami
Forumember

Posts : 49
Reputation : 1
Language : English

Back to top Go down

In progress Re: Staff widget with hovering + swamp images effect

Post by Nera. October 9th 2011, 1:00 pm

Add a </br> tag after the first picture.
Nera.
Nera.
Energetic

Female Posts : 7078
Reputation : 2017
Language : English
Location : -

Back to top Go down

In progress Re: Staff widget with hovering + swamp images effect

Post by Yu Narukami October 9th 2011, 1:29 pm

what? Only the first pic then the others will go sideways.
Yu Narukami
Yu Narukami
Forumember

Posts : 49
Reputation : 1
Language : English

Back to top Go down

In progress Re: Staff widget with hovering + swamp images effect

Post by Nera. October 9th 2011, 1:33 pm

Code:
<a onmouseover="swap(this,'showperson','NAME OF THE PERSON 1 GOES HERE')" href="YOUR FORUM URL HERE/u1"><img border="0" alt="TITLE OF THE IMAGE" style="border: 1px
black solid; height: 62px; width: 26px;" src="AVATAR OF THE PERSON 1 GOES HERE"></a>
</br>

Code:
<a onmouseover="swap(this,'showperson','NAME OF THE PERSON 2 GOES HERE')" href="YOUR FORUM URL HERE/u2"><img border="0" alt="TITLE OF THE IMAGE" style="border: 1px black solid;" src="AVATAR OF THE PERSON 2 GOES HERE"></a>

Add it like I did here. The more </br> you add the spacing will be bigger and they'll go down not sideways.

Example: http://movingagain.forumcroatian.com/h6-swamp

To make only the first picture go down add it only before the first picture.
Nera.
Nera.
Energetic

Female Posts : 7078
Reputation : 2017
Language : English
Location : -

Back to top Go down

In progress Re: Staff widget with hovering + swamp images effect

Post by itachi uchiha October 10th 2011, 6:28 am

What do you mean by title of the image ?
itachi uchiha
itachi uchiha
Forumember

Male Posts : 146
Reputation : 1
Language : English
Location : New Zealand

http://www.narutonexusrp.com/forum

Back to top Go down

In progress Re: Staff widget with hovering + swamp images effect

Post by Nera. October 10th 2011, 8:31 am

Just give some title to the image, like moderator or whatever.
Nera.
Nera.
Energetic

Female Posts : 7078
Reputation : 2017
Language : English
Location : -

Back to top Go down

In progress Re: Staff widget with hovering + swamp images effect

Post by itachi uchiha October 10th 2011, 10:05 am

The image title is not showing ? can you fix it

<img width="115px" height="115px" border="1" align="middle" name="showperson" style="border: 1px
black solid;" src="http://www.ribbons2go.com/images/5771-vertical-flat-staff-ribbon.jpg">

<SCRIPT TYPE="text/javascript">
<!--
// copyright 1998 Idocs, Inc. http://www.idocs.com/tags/
// Distribute this script freely, but please keep this
// notice with the code.

// var image information object
var mloi=new Object();

// set the image for swapping
function setswap()
{
if (! document.images)return;
var imgInfo=new Object();
imgInfo.defaultImg = new Image();
imgInfo.defaultImg.src = document.images[arguments[0]].src;
imgInfo.opts = new Object();
for (var i=1; i < arguments.length; i=i+2)
{
imgInfo.opts[arguments[i]]=new Image();
imgInfo.opts[arguments[i]].src = arguments[i+1];
}
mloi[arguments[0]] = imgInfo;
}

// set up the link for swapping
function swap(link,imgName,optName)
{
if (! document.images)return;
if (! link.swapReady)
{
link.imgName = imgName;
link.onmouseout = swapBack;
link.swapReady = true;
}
document.images[imgName].src=mloi[imgName].opts[optName].src;
}

function swapBack()
{document.images[this.imgName].src=mloi[this.imgName].defaultImg.src}

//-->
</SCRIPT>

<script type="text/javascript">
setswap("showperson",
'Sato',
'http://www.apexwallpapers.com/wp-content/uploads/2010/11/sasuke-4-115x115.jpg',
'Shi',
'http://www.naruto-arena.com/images/avatars/uploaded/2617987.jpg');
//
</script>

<a onmouseover="swap(this,'showperson','Sato')" href="http://n-b-s.forumotions.net/u3"><img border="1" alt="Owner" style="border: 1px black solid; height: 62px; width: 26px;" src="http://www.apexwallpapers.com/wp-content/uploads/2010/11/sasuke-4-115x115.jpg"></a>

<a onmouseover="swap(this,'showperson','NAME OF THE PERSON 2 GOES HERE')" href="YOUR FORUM URL HERE/u2"><img border="0" alt="TITLE OF THE IMAGE" style="border: 1px black solid;" src="AVATAR OF THE PERSON 2 GOES HERE"></a>

itachi uchiha
itachi uchiha
Forumember

Male Posts : 146
Reputation : 1
Language : English
Location : New Zealand

http://www.narutonexusrp.com/forum

Back to top Go down

In progress Re: Staff widget with hovering + swamp images effect

Post by Nera. October 10th 2011, 10:13 am

You did not fill in the last part for the second one. But OK, here you go

Code:
<img width="115px" height="115px" border="1" align="middle" name="showperson" style="border: 1px
black solid;" src="http://www.ribbons2go.com/images/5771-vertical-flat-staff-ribbon.jpg">

<SCRIPT TYPE="text/javascript">
<!--
// copyright 1998 Idocs, Inc. http://www.idocs.com/tags/
// Distribute this script freely, but please keep this
// notice with the code.

// var image information object
var mloi=new Object();

// set the image for swapping
function setswap()
{
if (! document.images)return;
var imgInfo=new Object();
imgInfo.defaultImg = new Image();
imgInfo.defaultImg.src = document.images[arguments[0]].src;
imgInfo.opts = new Object();
for (var i=1; i < arguments.length; i=i+2)
  {
  imgInfo.opts[arguments[i]]=new Image();
  imgInfo.opts[arguments[i]].src = arguments[i+1];
  }
mloi[arguments[0]] = imgInfo;
}

// set up the link for swapping
function swap(link,imgName,optName)
{
if (! document.images)return;
if (! link.swapReady)
  { 
  link.imgName    = imgName;
  link.onmouseout = swapBack;
  link.swapReady  = true;
  }
document.images[imgName].src=mloi[imgName].opts[optName].src;
}

function swapBack()
  {document.images[this.imgName].src=mloi[this.imgName].defaultImg.src}

//-->
</SCRIPT>

<script type="text/javascript">
setswap("showperson",
'Sato',
'http://www.apexwallpapers.com/wp-content/uploads/2010/11/sasuke-4-115x115.jpg',
'Shi',
'http://www.naruto-arena.com/images/avatars/uploaded/2617987.jpg');
//
</script>
</br>
</br>
<a onmouseover="swap(this,'showperson','Sato')" href="http://n-b-s.forumotions.net/u3"><img border="1" alt="Owner" style="border: 1px black solid; height: 62px; width: 26px;" src="http://www.apexwallpapers.com/wp-content/uploads/2010/11/sasuke-4-115x115.jpg"></a>


<a onmouseover="swap(this,'showperson','Shi')" href="http://n-b-s.forumotions.net/u3"><img border="1" alt="Owner" style="border: 1px black solid; height: 62px; width: 26px;" src="http://www.naruto-arena.com/images/avatars/uploaded/2617987.jpg"></a>

And how it looks:
http://movingagain.forumcroatian.com/h8-test

Cheers
Very good

Edit: I did not read the question correctly.

ALT, which is required, is used for replacement content in cases where the image is not displayed (such as text-mode browsers, audio readers, images unable to load, etc.). TITLE, which is optional, is used for supplementary information, such as to display as a tooltip.

So in order to have it displayed you must use title not alt. Very good
Nera.
Nera.
Energetic

Female Posts : 7078
Reputation : 2017
Language : English
Location : -

Back to top Go down

In progress Re: Staff widget with hovering + swamp images effect

Post by itachi uchiha October 10th 2011, 11:53 am

thank you so much
itachi uchiha
itachi uchiha
Forumember

Male Posts : 146
Reputation : 1
Language : English
Location : New Zealand

http://www.narutonexusrp.com/forum

Back to top Go down

In progress Re: Staff widget with hovering + swamp images effect

Post by Nera. October 10th 2011, 11:57 am

Welcome.

I'll leave the topic open for Yu Narukami & Tobi if they have any problems Very Happy
Nera.
Nera.
Energetic

Female Posts : 7078
Reputation : 2017
Language : English
Location : -

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum