Clan Adverts

Sponsors

CT on Facebook

Latest Product

User Box

Anonymous
38.107.179.220
Nickname:

Password:

Security Code
Security Code
Type Security Code


PND Downloads Feed

Phpnuke Downloads
How to Delete or Reset yo...
How to Delete or Reset your PHPNuke Admin Account
Lost your admin password ?  Cant login to your admin account ?This sh...
Back Online & Stuff
Back Online & Stuff
Look at us with our nifty website back up and running… Seriousl...
How to edit the admins in...
How to edit the admins in the forums
Here is a way to make someone admin in your forums on your Evo site. I...
Demo Splash Screen
Demo Splash Screen
Ped @ Clan Themes has released a simple splash screen entrance hack. ...
Free Phpnuke Business The...
Free Phpnuke Business Theme 6
This is the 6th Business theme for Phpnuke that Clan Themes has releas...
Tricked Out Slider
Tricked Out Slider
We have seen some great new things come out of Tricked Out News and th...

Custom Work

PHP Nuke Custom Work

www.clanthemes.com :: View topic - Adding java witrh variables into a block
Adding java witrh variables into a block

5 Replies / 722 Views


Post new topic   Reply to topic  

   www.clanthemes.com Forum Index » Blocks

View previous topic :: View next topic


clyde4210
Reputation: 395.3 Add RepSubtract Rep
Local time: 3:59 AM

blank.gif

OMG
OMG

0.11 posts per day
Medals: 0

Joined: Oct 24, 2007
Last Visit: 24 Jul 2009
Posts: 167
Points: 7534 

Post Adding java witrh variables into a block Posted: Fri May 22, 2009 11:01 pm

I have tried echo and content and cannot seem to get this to work, how would I actually put this into a block? Would I need to make tables or divs?, OR am I just missing something?

Code:
<script type="text/javascript">

/***********************************************
* Translucent Slideshow script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

var trans_width='200px' //slideshow width
var trans_height='200px' //slideshow height
var pause=3000 //SET PAUSE BETWEEN SLIDE (3000=3 seconds)
var degree=10 //animation speed. Greater is faster.

var slideshowcontent=new Array()
//Define slideshow contents: [image URL, OPTIONAL LINK, OPTIONAL LINK TARGET]
slideshowcontent[0]=["http://3.bp.blogspot.com/_zvjc7jPvmtw/ShM2OSkM-YI/AAAAAAAAIVU/_ht0zlYg0OI/s200/Kishani---3.jpg", "http://srifashions.blogspot.com", "_new"]
slideshowcontent[1]=["http://4.bp.blogspot.com/_zvjc7jPvmtw/ShM23kVsUaI/AAAAAAAAIVs/p7XZZ2ktp9A/s200/Kishani---1.jpg", "http://srifashions.blogspot.com", ""]
slideshowcontent[2]=["http://2.bp.blogspot.com/_zvjc7jPvmtw/Sg8fJF84jSI/AAAAAAAAIP0/i-5-QLznefk/s200/Sachini-Ayendra---11.jpg", "http://srifashions.blogspot.com", ""]
slideshowcontent[3]=["http://3.bp.blogspot.com/_zvjc7jPvmtw/Sg8huo1raYI/AAAAAAAAIQM/UU_vusqpM1g/s200/Sachini-Ayendra---2.jpg", "http://srifashions.blogspot.com", ""]
slideshowcontent[4]=["http://2.bp.blogspot.com/_zvjc7jPvmtw/Sg3PJ_wvCtI/AAAAAAAAIOs/jFJVPYnZCCA/s200/Chaturika-Peris---5.jpg", "http://srifashions.blogspot.com", ""]
slideshowcontent[5]=["http://4.bp.blogspot.com/_zvjc7jPvmtw/Sg2wjFAgcTI/AAAAAAAAINs/kc28MXud2M0/s200/Ashika-Manasinghe---9.jpg", "http://srifashions.blogspot.com", ""]
slideshowcontent[6]=["http://1.bp.blogspot.com/_zvjc7jPvmtw/Sg2wrT6g69I/AAAAAAAAIN8/wKSBoV5K6Ys/s200/Ashika-Manasinghe---11.jpg", "http://srifashions.blogspot.com", ""]
slideshowcontent[7]=["http://3.bp.blogspot.com/_zvjc7jPvmtw/Sg2vx7is8dI/AAAAAAAAIM8/aLtNcccgucc/s200/Ashika-Manasinghe---3.jpg", "http://srifashions.blogspot.com", ""]
slideshowcontent[8]=["http://1.bp.blogspot.com/_zvjc7jPvmtw/SgyPD9kn53I/AAAAAAAAIME/kKwEieAAfHQ/s200/natasha-rathnayake---8.jpg", "http://srifashions.blogspot.com", ""]
slideshowcontent[9]=["http://2.bp.blogspot.com/_zvjc7jPvmtw/SgyN7c1GoKI/AAAAAAAAILc/t7W1pZYa_jY/s200/natasha-rathnayake---3.jpg", "http://srifashions.blogspot.com", ""]

////NO need to edit beyond here/////////////

var bgcolor='white'

var imageholder=new Array()
for (i=0;i<slideshowcontent.length;i++){
imageholder[i]=new Image()
imageholder[i].src=slideshowcontent[i][0]
}

var ie4=document.all
var dom=document.getElementById&&navigator.userAgent.indexOf("Opera")==-1

if (ie4||dom)
document.write('<div style="position:relative;width:'+trans_width+';height:'+trans_height+';overflow:hidden"><div id="canvas0" style="position:absolute;background-color:'+bgcolor+';width:'+trans_width+';height:'+trans_height+';left:-'+trans_width+';filter:alpha(opacity=20);-moz-opacity:0.2;"></div><div id="canvas1" style="position:absolute;background-color:'+bgcolor+';width:'+trans_width+';height:'+trans_height+';left:-'+trans_width+';filter:alpha(opacity=20);-moz-opacity:0.2;"></div></div>')
else if (document.layers){
document.write('<ilayer id=tickernsmain visibility=hide width='+trans_width+' height='+trans_height+' bgColor='+bgcolor+'><layer id=tickernssub width='+trans_width+' height='+trans_height+' left=0 top=0>'+'<img src="'+slideshowcontent[0][0]+'"></layer></ilayer>')
}

var curpos=trans_width*(-1)
var curcanvas="canvas0"
var curindex=0
var nextindex=1

function getslidehtml(theslide){
var slidehtml=""
if (theslide[1]!="")
slidehtml='<a href="'+theslide[1]+'" target="'+theslide[2]+'">'
slidehtml+='<img src="'+theslide[0]+'" border="0">'
if (theslide[1]!="")
slidehtml+='</a>'
return slidehtml
}

function moveslide(){
if (curpos<0){
curpos=Math.min(curpos+degree,0)
tempobj.style.left=curpos+"px"
}
else{
clearInterval(dropslide)
if (crossobj.filters)
crossobj.filters.alpha.opacity=100
else if (crossobj.style.MozOpacity)
crossobj.style.MozOpacity=1
nextcanvas=(curcanvas=="canvas0")? "canvas0" : "canvas1"
tempobj=ie4? eval("document.all."+nextcanvas) : document.getElementById(nextcanvas)
tempobj.innerHTML=getslidehtml(slideshowcontent[curindex])
nextindex=(nextindex<slideshowcontent.length-1)? nextindex+1 : 0
setTimeout("rotateslide()",pause)
}
}

function rotateslide(){
if (ie4||dom){
resetit(curcanvas)
crossobj=tempobj=ie4? eval("document.all."+curcanvas) : document.getElementById(curcanvas)
crossobj.style.zIndex++
if (crossobj.filters)
document.all.canvas0.filters.alpha.opacity=document.all.canvas1.filters.alpha.opacity=20
else if (crossobj.style.MozOpacity)
document.getElementById("canvas0").style.MozOpacity=document.getElementById("canvas1").style.MozOpacity=0.2
var temp='setInterval("moveslide()",50)'
dropslide=eval(temp)
curcanvas=(curcanvas=="canvas0")? "canvas1" : "canvas0"
}
else if (document.layers){
crossobj.document.write(getslidehtml(slideshowcontent[curindex]))
crossobj.document.close()
}
curindex=(curindex<slideshowcontent.length-1)? curindex+1 : 0
}

function jumptoslide(which){
curindex=which
rotateslide()
}

function resetit(what){
curpos=parseInt(trans_width)*(-1)
var crossobj=ie4? eval("document.all."+what) : document.getElementById(what)
crossobj.style.left=curpos+"px"
}

function startit(){
crossobj=ie4? eval("document.all."+curcanvas) : dom? document.getElementById(curcanvas) : document.tickernsmain.document.tickernssub
if (ie4||dom){
crossobj.innerHTML=getslidehtml(slideshowcontent[curindex])
rotateslide()
}
else{
document.tickernsmain.visibility='show'
curindex++
setInterval("rotateslide()",pause)
}
}

if (window.addEventListener)
window.addEventListener("load", startit, false)
else if (window.attachEvent)
window.attachEvent("onload", startit)
else if (ie4||dom||document.layers)
window.onload=startit

</script>



Thanks.
 

 
View user's profileSend private messageVisit poster's website Reply with quote

Snype
Reputation: 305.5 Add RepSubtract Rep
votes: 8
Local time: 8:59 AM
Location: lincolshire
uk.gif



0.60 posts per day
Medals: 1 (View more...)
Site Supporter (Amount: 1)
Respected Member
Respected Member
Joined: May 20, 2008
Last Visit: 06 Nov 2011
Posts: 812
Points: 60742 

Post Adding java witrh variables into a block Posted: Sat May 23, 2009 1:10 am

Shop Purchases:
Call of Duty 4 SAS Theme

i managed to get it to show it just showed outside the block and no matter what i did i couldnt get it into the block

and i use include ("test.html"); which was place inside the blocks folder and then i made the block so it called the html file bu like i say didnt work hope someone sorts it for you Dont Know
 

WebSite > http://www.phpnukeblog.info Xfire > DDsnype MSN > ritchietaylor@live.co.uk Email > admin@phpnukeblog.info  
View user's profileSend private messageVisit poster's websiteMSN Messenger Reply with quote

DreAdeDcoRpSE
Reputation: 2221.6 Add RepSubtract Rep
votes: 28
Local time: 3:59 AM
Location: Back of your Mind
usa.gif

Forums Moderator
Forums Moderator

1.53 posts per day
Medals: 3 (View more...)
Site Supporter (Amount: 1)
Site Admin
Site Admin
Joined: Sep 22, 2007
Last Visit: 10 Feb 2012
Posts: 2459
Points: 128885 

Post Adding java witrh variables into a block Posted: Sat May 23, 2009 1:20 am

Shop Purchases:
Enemy Territory Theme (Aviator) for PHP Nuke · Clan Roster 2.0 ·  · Modern Warfare 3 Xtreme Theme

Here you go. Just download the attached file.

Also, you may want to give this a look.
http://www.clanthemes.com/tutorials-view-173-block-break-down.html

I did test this on my site and it did work. Not good for a side block, for the images were to wide, just a heads up.

block-Pic_Slides.zip
 Description:

Download
 Filename:  block-Pic_Slides.zip
 Filesize:  2.11 KB
 Downloaded:  7 Time(s)

 

 
View user's profileSend private messageVisit poster's website Reply with quote


clyde4210
Reputation: 395.3 Add RepSubtract Rep
Local time: 3:59 AM

blank.gif

OMG
OMG

0.11 posts per day
Medals: 0

Joined: Oct 24, 2007
Last Visit: 24 Jul 2009
Posts: 167
Points: 7534 

Post Adding java witrh variables into a block Posted: Sat May 23, 2009 1:23 am

thanks for the help.
 

 
View user's profileSend private messageVisit poster's website Reply with quote

DreAdeDcoRpSE
Reputation: 2221.6 Add RepSubtract Rep
votes: 28
Local time: 3:59 AM
Location: Back of your Mind
usa.gif

Forums Moderator
Forums Moderator

1.53 posts per day
Medals: 3 (View more...)
Dedication (Amount: 1)
Site Admin
Site Admin
Joined: Sep 22, 2007
Last Visit: 10 Feb 2012
Posts: 2459
Points: 128885 

Post Re: Adding java witrh variables into a block Posted: Sat May 23, 2009 1:34 am

Shop Purchases:
Enemy Territory Theme (Aviator) for PHP Nuke · Clan Roster 2.0 ·  · Modern Warfare 3 Xtreme Theme

A second look at the code, if you alter these 2 spots.

var trans_width='200px' //slideshow width
var trans_height='200px' //slideshow height

and change the 200px to 160 then it should fit in there n/p. I am pretty sure 160 or less is the ideal width.
 

 
View user's profileSend private messageVisit poster's website Reply with quote

clyde4210
Reputation: 395.3 Add RepSubtract Rep
Local time: 3:59 AM

blank.gif

OMG
OMG

0.11 posts per day
Medals: 0

Joined: Oct 24, 2007
Last Visit: 24 Jul 2009
Posts: 167
Points: 7534 

Post Adding java witrh variables into a block Posted: Sat May 23, 2009 1:49 am

yeah did that after looking at it. also noticed where my mistake was. i was adding \n"; at the end after </script>. I also looked in my files for the template and should hit myself for forgetting it was there.

Thanks for the help.

p.s. i also realized i have a random image block that i could have used with that code.

Pint Pint
 

 
View user's profileSend private messageVisit poster's website Reply with quote

Post new topic   Reply to topic  
   www.clanthemes.com Forum Index » Blocks


 
5 Replies / 722 Views
Page 1 of 1
All times are GMT
Display posts from previous:   
 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum