Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 12-07-2005, 07:30 PM
leftie leftie is offline
 
Join Date: Nov 2004
Posts: 64
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Link changes colours when mouse hovers over it.

I have visited a forum where if you hover the cursor over a link in the navbar or username or new post it changes through about four different colours. Does any one know what this is, I have tried a search but i really don't where to start it so i have had no success.
Please help.
Reply With Quote
  #2  
Old 12-09-2005, 01:13 AM
scotsnutta's Avatar
scotsnutta scotsnutta is offline
 
Join Date: Aug 2005
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by leftie
I have visited a forum where if you hover the cursor over a link in the navbar or username or new post it changes through about four different colors. Does any one know what this is, I have tried a search but i really don't where to start it so i have had no success.
Please help.
i'm a newbi here and dont know much about scripting but i'll try and help you. i use that style for my forum so all my links flash so from what i can work out this is how you do it:

go to your header template in your style manager

find
Code:
<!-- /logo -->
and below that paste this

Code:
 
<script language="JavaScript">
function stopError() {
	 return true;
}
window.onerror = stopError;
// -->
</script>
<!-- content table -->
$spacer_open
$_phpinclude_output
<script language="JavaScript">
function stopError() {
	 return true;
}
window.onerror = stopError;
// -->
</script>
<SCRIPT src="<A href="http://www.mjjlatino.net/foro/clientscript/rainbow.js"></SCRIPT">http://www.mjjlatino.net/foro/clientscript/rainbow.js"></SCRIPT>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function expandingWindow(website) {
var heightspeed = 2; // vertical scrolling speed (higher = slower)
var widthspeed = 7; // horizontal scrolling speed (higher = slower)
var leftdist = 0;	// distance to left edge of window
var topdist = 0;	 // distance to top edge of window
if (document.all) {
var winwidth = window.screen.availWidth - leftdist;
var winheight = window.screen.availHeight - topdist;
var sizer = window.open("","","left=" + leftdist + ",top=" + topdist + ",width=1,height=1,scrollbars=yes");
for (sizeheight = 1; sizeheight < winheight; sizeheight += heightspeed) {
sizer.resizeTo("1", sizeheight);
}
for (sizewidth = 1; sizewidth < winwidth; sizewidth += widthspeed) {
sizer.resizeTo(sizewidth, sizeheight);
}
sizer.location = website;
}
else
window.location = website;
}
// End -->
</script>
hope that works as i say i'm new to this, and your the first person i've tried to help!!

let me know how you get on
Reply With Quote
  #3  
Old 12-17-2005, 08:00 AM
Zia's Avatar
Zia Zia is offline
 
Join Date: Dec 2005
Location: golpo.net
Posts: 931
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nice..but he have'nt given a reply yet...
Reply With Quote
  #4  
Old 12-17-2005, 02:17 PM
tipoboy's Avatar
tipoboy tipoboy is offline
 
Join Date: Dec 2005
Location: scotland
Posts: 693
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

the code above can be narrowed down to this

<SCRIPT src="<A href="http://www.mjjlatino.net/foro/clientscript/rainbow.js">
</SCRIPT">
<SCRIPT LANGUAGE="JavaScript">

so i believe anyways i have this on my board also
Reply With Quote
  #5  
Old 01-03-2006, 06:34 PM
leftie leftie is offline
 
Join Date: Nov 2004
Posts: 64
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry for my late reply.
Thank you for your help. I have tried adding the code to the template but nothing happens.
Reply With Quote
  #6  
Old 01-04-2006, 12:16 AM
tipoboy's Avatar
tipoboy tipoboy is offline
 
Join Date: Dec 2005
Location: scotland
Posts: 693
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by leftie
Sorry for my late reply.
Thank you for your help. I have tried adding the code to the template but nothing happens.
ok download the "rainbow.js" file open it and copy the entire script into your header template via the style and templates section in your admincp
Reply With Quote
  #7  
Old 01-04-2006, 04:55 PM
leftie leftie is offline
 
Join Date: Nov 2004
Posts: 64
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry, still does not work.
Reply With Quote
  #8  
Old 01-04-2006, 09:33 PM
tipoboy's Avatar
tipoboy tipoboy is offline
 
Join Date: Dec 2005
Location: scotland
Posts: 693
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by leftie
Sorry, still does not work.
ok erm copy this scriptn into your header works on my forum, let me know how you get on

Code:
 
<SCRIPT LANGUAGE="JavaScript">
var rate = 20;
 
var obj;
var act = 0; 
var elmH = 0; 
var elmS = 128; 
var elmV = 255; 
var clrOrg; 
var TimerID; 
 
 
if (navigator.appName.indexOf("Microsoft",0) != -1 && parseInt(navigator.appVersion) >= 4) {
Browser = true;
} else {
Browser = false;
}
 
if (Browser) {
document.onmouseover = doRainbowAnchor;
document.onmouseout = stopRainbowAnchor;
}
 
function doRainbow()
{
if (Browser && act != 1) {
act = 1;
obj = event.srcElement;
clrOrg = obj.style.color;
TimerID = setInterval("ChangeColor()",100);
}
}
 
function stopRainbow()
{
if (Browser && act != 0) {
obj.style.color = clrOrg;
clearInterval(TimerID);
act = 0;
}
}
 
function doRainbowAnchor()
{
if (Browser && act != 1) {
obj = event.srcElement;
 
while (obj.tagName != 'A' && obj.tagName != 'BODY') {
obj = obj.parentElement;
if (obj.tagName == 'A' || obj.tagName == 'BODY')
break;
}
 
if (obj.tagName == 'A' && obj.href != '') {
act = 1;
clrOrg = obj.style.color;
TimerID = setInterval("ChangeColor()",100);
}
}
}
 
function stopRainbowAnchor()
{
if (Browser && act != 0) {
if (obj.tagName == 'A') {
obj.style.color = clrOrg;
clearInterval(TimerID);
act = 0;
}
}
}
 
function ChangeColor()
{
obj.style.color = makeColor();
}
 
function makeColor()
{
 
if (elmS == 0) {
elmR = elmV; elmG = elmV; elmB = elmV;
}
else {
t1 = elmV;
t2 = (255 - elmS) * elmV / 255;
t3 = elmH % 60;
t3 = (t1 - t2) * t3 / 60;
 
if (elmH < 60) {
elmR = t1; elmB = t2; elmG = t2 + t3;
}
else if (elmH < 120) {
elmG = t1; elmB = t2; elmR = t1 - t3;
}
else if (elmH < 180) {
elmG = t1; elmR = t2; elmB = t2 + t3;
}
else if (elmH < 240) {
elmB = t1; elmR = t2; elmG = t1 - t3;
}
else if (elmH < 300) {
elmB = t1; elmG = t2; elmR = t2 + t3;
}
else if (elmH < 360) {
elmR = t1; elmG = t2; elmB = t1 - t3;
}
else {
elmR = 0; elmG = 0; elmB = 0;
}
}
 
elmR = Math.floor(elmR);
elmG = Math.floor(elmG);
elmB = Math.floor(elmB);
 
clrRGB = '#' + elmR.toString(16) + elmG.toString(16) + elmB.toString(16);
 
elmH = elmH + rate;
if (elmH >= 360)
elmH = 0;
 
return clrRGB;
}
</SCRIPT>
Reply With Quote
  #9  
Old 01-05-2006, 07:17 PM
leftie leftie is offline
 
Join Date: Nov 2004
Posts: 64
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yahhhhhhh it works, thanks buddy. Thank you.
What was the problem m8 with the others codes.

Ps, it looks like you have worked hard in your script, perhaps you should include your credit and release it. :nervous:
Reply With Quote
  #10  
Old 01-06-2006, 01:21 PM
tipoboy's Avatar
tipoboy tipoboy is offline
 
Join Date: Dec 2005
Location: scotland
Posts: 693
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by leftie
Yahhhhhhh it works, thanks buddy. Thank you.
What was the problem m8 with the others codes.

Ps, it looks like you have worked hard in your script, perhaps you should include your credit and release it. :nervous:
i found the script at http://www.mjjlatino.net

all i did was open up the javascript file, and post up the code in it m8. i deserve no credit. at least i can say i helped someone though lol
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:52 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.08256 seconds
  • Memory Usage 2,253KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_code
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete