Icy Phoenix

     
 


Post new topic  Reply to topic 
Page 1 of 1
 
 
Reply with quote Download Post 
Post [Mod] Better Links Scrolling 
 
Hile, neighbors and friends...

To tell the truth, I don't like at all the way the "Links Block" scrolls. Dunno how is it in IE, but in FFox, it doesn't scroll to the top of the block and when you put the mouse over and move it way up, the scroll doesn't stop... So I've been investigating and have modified the block to include a javascript function to control the scrolling function...

---Open templates/xxx/blocks/links_block.tpl---

---SEARCH---
Code: [Download] [Hide]
  1. <!-- BEGIN links_scroll --> 


---AFTER ADD---
Code: [Download] [Hide]
  1. <script type="text/javascript">  
  2. /***********************************************  
  3. * Cross browser Marquee II- © Dynamic Drive (www.dynamicdrive.com)  
  4. * This notice MUST stay intact for legal use  
  5. * Visit http://www.dynamicdrive.com/ for this script and 100s more.  
  6. ***********************************************/  
  7.  
  8. var delayb4scrollx=2000 //Specify initial delay before marquee starts to scroll on page (2000=2 seconds)  
  9. var marqueespeedx=1 //Specify marquee scroll speed (larger is faster 1-10)  
  10. var pauseitx=1 //Pause marquee onMousever (0=no. 1=yes)?  
  11.  
  12. ////NO NEED TO EDIT BELOW THIS LINE////////////  
  13.  
  14. var copyspeedx=marqueespeedx  
  15. var pausespeedx=(pauseitx==0)? copyspeedx: 0  
  16. var actualheightx=''  
  17.  
  18. function scrollmarqueex(){  
  19. if (parseInt(cross_marqueex.style.top)>(actualheightx*(-1)+8))  
  20. cross_marqueex.style.top=parseInt(cross_marqueex.style.top)-copyspeedx+"px"  
  21. else  
  22. cross_marqueex.style.top=parseInt(marqueeheightx)+8+"px"  
  23. }  
  24.  
  25. function initializemarqueex(){  
  26. cross_marqueex=document.getElementById("vmarqueex")  
  27. cross_marqueex.style.top=0  
  28. marqueeheightx=document.getElementById("marqueecontainerx").offsetHeight  
  29. actualheightx=cross_marqueex.offsetHeight  
  30. if (window.opera || navigator.userAgent.indexOf("Netscape/7")!=-1){ //if Opera or Netscape 7x, add scrollbars to scroll and exit  
  31. cross_marqueex.style.height=marqueeheightx+"px"  
  32. cross_marqueex.style.overflow="scroll"  
  33. return  
  34. }  
  35. setTimeout('lefttime=setInterval("scrollmarqueex()",30)', delayb4scrollx)  
  36. }  
  37.  
  38. if (window.addEventListener)  
  39. window.addEventListener("load", initializemarqueex, false)  
  40. else if (window.attachEvent)  
  41. window.attachEvent("onload", initializemarqueex)  
  42. else if (document.getElementById)  
  43. window.onload=initializemarqueex  
  44. </script> 


---SEARCH---
Code: [Download] [Hide]
  1.     <marquee id="links_block" behavior="scroll" direction="up" scrolldelay="100" height="80" scrollamount="2" loop="true" onmouseover="this.stop()" onmouseout="this.start()">  
  2.         <div class="center-block-text">  
  3.             <div class="gen">  
  4.             <br />  
  5.             <!-- BEGIN links_row -->  
  6.             <a href="{static.links_row.LINK_HREF}" target="_blank" onmouseover="document.all.links_block.stop()" onmouseout="document.all.links_block.start()"><img src="{scroll.links_row.LINK_LOGO_SRC}" alt="{scroll.links_row.LINK_TITLE}" title="{scroll.links_row.LINK_TITLE}" width="{SITE_LOGO_WIDTH}" height="{SITE_LOGO_HEIGHT}" border="0"  vspace="3" /></a><br /><br />  
  7.             <!-- END links_row -->  
  8.             <br />  
  9.             </div>  
  10.         </div>  
  11.     </marquee> 


---REPLACE WITH---
Code: [Download] [Hide]
  1.         <div id="marqueecontainerx" style="position: relative; width: 95%; height: 100%; overflow: hidden; border: 0px; padding: 2px; padding-left: 4px;" onmouseover="copyspeedx=pausespeedx" onmouseout="copyspeedx=marqueespeedx">  
  2.             <div id="vmarqueex" style="position: absolute; width: 98%;">  
  3.                 <div align="center">  
  4.                     <div class="center-block-text">  
  5.                         <div class="gen">  
  6.                             <br />  
  7.                             <!-- BEGIN links_row -->  
  8.                                 <a href="{static.links_row.LINK_HREF}" target="_blank"><img src="{scroll.links_row.LINK_LOGO_SRC}" alt="{scroll.links_row.LINK_TITLE}" title="{scroll.links_row.LINK_TITLE}" width="{SITE_LOGO_WIDTH}" height="{SITE_LOGO_HEIGHT}" border="0"  vspace="3" /></a><br /><br />  
  9.                             <!-- END links_row -->  
  10.                             <br />  
  11.                         </div>  
  12.                     </div>  
  13.                 </div>  
  14.             </div>  
  15.         </div> 


You can see how it works in my test site and in my live site
 




____________
Icy Phoenix Latest 2.0 (working pending)
Style: Aphrodite and MG_Themes
Site: Spanish Stephen King fan forum
Mods: Medal System Mod. BBAntispam 1.2. Several own BBcodes.
 
XusquiSend private messageVisit poster's website  
Back to topPage bottom
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.

Support us
 
Reply with quote Download Post 
Post Re: [Mod] Better Links Scrolling 
 
Thanks Xusqui and moved to Customizations Forum
 




____________
ThE KuKa - www.phpBB-Es.COM - Custom Installations phpBB
 
ThE KuKaSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: [Mod] Better Links Scrolling 
 
Look good with IE7 - Nice fix.
 
 
 
Back to topPage bottom
Reply with quote Download Post 
Post Re: [Mod] Better Links Scrolling 
 
This is nice.

I will test it.
 




____________
Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
 
Mighty GorgonSend private messageSend e-mail to userVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: [Mod] Better Links Scrolling 
 
looks much better..

thanks for this
 




____________

Play Games at GamesCampus!
 
KugeLSichASend private messageVisit poster's website  
Back to topPage bottom
Post new topic  Reply to topic  Page 1 of 1
 


Display posts from previous:    

HideWas this topic useful?

Link this topic
URL
BBCode
HTML




 
Permissions List
You cannot post new topics
You cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events