Embed javascript slideshow?

3.3 Forum ONLY: If you've run into a problem, such as an error message, blank page, or similar problem, this is where to look. Post any installation or other problems or questions here, and I and other users will try to help.
  
20 Jun '12 Wed Jun 20, 2012 14:21    
RedGerry
Sponsor  Sponsor
  •  

Post Embed javascript slideshow?

Firstly let me apologise for not being at my sharpest today. Euro2012 match last night seen way too many beers consumed!

I'm wanting to embed a javascript routine into an article to play a slideshow of images. I know such features exist globally but this is a one-off for one article.

So what's my easiest, least hastle, doing without-any-codehacks method?

Code:
<script type="text/javascript">
var myimages=new Array()
myimages[0]=["http://123v.com/images/123v/sshow/install-carport-1.jpg", "", ""]
myimages[1]=["http://123v.com/images/123v/sshow/install-carport-2.jpg", "", ""]
myimages[2]=["http://123v.com/images/123v/sshow/install-carport-3.jpg", "", ""]
myimages[3]=["http://123v.com/images/123v/sshow/install-carport-4.jpg", "", ""]
myimages[4]=["http://123v.com/images/123v/sshow/install-carport-5.jpg", "", ""]
myimages[5]=["http://123v.com/images/123v/sshow/install-carport-6.jpg", "", ""]
myimages[6]=["http://123v.com/images/123v/sshow/install-carport-7.jpg", "", ""]
myimages[7]=["http://123v.com/images/123v/sshow/install-carport-8.jpg", "", ""]
myimages[8]=["http://123v.com/images/123v/sshow/install-carport-9.jpg", "", ""]
myimages[9]=["http://123v.com/images/123v/sshow/install-carport-10.jpg", "", ""]
myimages[10]=["http://123v.com/images/123v/sshow/install-carport-11.jpg", "", ""]
myimages[11]=["http://123v.com/images/123v/sshow/install-carport-12.jpg", "", ""]
myimages[12]=["http://123v.com/images/123v/sshow/install-carport-13.jpg", "", ""]
myimages[13]=["http://123v.com/images/123v/sshow/install-carport-14.jpg", "", ""]
myimages[14]=["http://123v.com/images/123v/sshow/install-carport-15.jpg", "", ""]
myimages[15]=["http://123v.com/images/123v/sshow/install-carport-16.jpg", "", ""]
myimages[16]=["http://123v.com/images/123v/sshow/install-carport-17.jpg", "", ""]
myimages[17]=["http://123v.com/images/123v/sshow/install-carport-18.jpg", "", ""]
new dropinslideshow(myimages, 800, 600, 3500)
</script>



RedGerry's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)

Suse 11.4 LAMP under zypper -DF9.3.3.1

 
 
 
 
  
22 Jun '12 Fri Jun 22, 2012 10:01    
rosbif
BetaTester  BetaTester
  •  

Post Re: Embed javascript slideshow?

Can't you just use one of layingback's featured content slider templates? As I've used here



rosbif's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)

Linux/2.2.11/4.1.22/5.2.17/9.3.4.1

 
 
 
 
  
23 Jun '12 Sat Jun 23, 2012 08:07    
layingback
Site Admin  
  •  

Post Re: Embed javascript slideshow?

Stick the javascript into the template? At end of the one in which you call it.

Just copy the PN template of choice and rename to something other than index*.html and then it will never get accidentally overwritten in an upgrade. Will mean adding a new Section, but not a bad idea (to separate content from display methods somewhat).

If images are in coppermine, then the standard PN slideshow will display - but in a pop-up.

Have meant to add an all-CSS slideshow for some time to display in overlay instead, but time, time, time .... Laughing



layingback's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)

2.6.32 / 1.3 - 2.4 / 5.5 - 5.6 / 5.4 - 5.5 / 9.4

 
 
 
 
  
25 Jun '12 Mon Jun 25, 2012 11:03    
RedGerry
Sponsor  Sponsor
  •  

Post Re: Embed javascript slideshow?

I've went for the standard option by adding these into a dedicated album.

So what template are you using rosbif to get the embedded auto-play option? I get the GO icon which launches a pop-up slideshow.

Can you advise how I get rid of the not-required paging tags?

123v.com/Pro_News/aid=...rport.html



RedGerry's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)

Suse 11.4 LAMP under zypper -DF9.3.3.1

 
 
 
 
  
25 Jun '12 Mon Jun 25, 2012 11:43    
layingback
Site Admin  
  •  

Post Re: Embed javascript slideshow?

rosbif is using one of these layingback.net/Pro_News/aid=79.html layingback.net/Pro_News/aid=80.html

The paging tags are the virtual pagination template. Either switch to the base template (without the p in the name) or, look for and remove any [page] code in the article.

Either that or I have a bug, because with no [page] code present it is supposed to default back to non-virtual pagination (needs to because not every article in a section will be a long one necessarily).



layingback's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)

2.6.32 / 1.3 - 2.4 / 5.5 - 5.6 / 5.4 - 5.5 / 9.4

 
 
 
 
  
25 Jun '12 Mon Jun 25, 2012 13:34    
RedGerry
Sponsor  Sponsor
  •  

Post Re: Embed javascript slideshow?

I've purchased the additional templates. You were quite correct with your 'p' virtual paging. Thats fixed now.

Layout is great and thumbnails are generated but have I missed uploading some javascript somewhere?

123v.com/Pro_News/aid=...rport.html



RedGerry's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)

Suse 11.4 LAMP under zypper -DF9.3.3.1

 
 
 
 
  
25 Jun '12 Mon Jun 25, 2012 13:47    
layingback
Site Admin  
  •  

Post Re: Embed javascript slideshow?

Indeed you are missing pnfcs.js. File /modules/Pro_News/includes/load_js.inc should locate the template being used by name, and load the correct js.

If you are using a different template name, you need to add

PHP:
			$modheader .= "<script type=\"text/javascript\" src=\"modules/Pro_News/includes/pnfcs.js\"></script>\n";

or similar where indicated in that file.



layingback's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)

2.6.32 / 1.3 - 2.4 / 5.5 - 5.6 / 5.4 - 5.5 / 9.4

 
 
 
 
  
25 Jun '12 Mon Jun 25, 2012 14:04    
RedGerry
Sponsor  Sponsor
  •  

Post Re: Embed javascript slideshow?

Sorry, being slow again...

PHP:
<script type="text/javascript" src="modules/Pro_News/includes/scripts.js"></script>



This is generated in the header but can find no call to pnfcs.js or load_js.inc

What file am I adding the modheader statement into?

Addt'l: Using the template: index3fcs.html



RedGerry's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)

Suse 11.4 LAMP under zypper -DF9.3.3.1

 
 
 
 
  
25 Jun '12 Mon Jun 25, 2012 14:48    
layingback
Site Admin  
  •  

Post Re: Embed javascript slideshow?

load_js.inc is called directly in modules/Pro_News/index.php line 37.

Unless you are storing the templates somewhere unusual, load_js.inc should find index3fcs.html in the themes/{yourtheme}/template/pronews/article/ folder and add the line

Code:
<script type="text/javascript" src="modules/Pro_News/includes/pnfcs.js"></script>

right after the pro_news.css one.

That declares the featuredcontentslider field and more. The calls to pnfcs.js are all done in the index3fcs.html template for you.

That modheader line isn't making into your HTML for some reason, so I suggest that you manually add it to load_js.inc for now and see if that fixes it for you. (Then we can try to discover why it isn't happening automatically.) Or just comment out the if file_exists tests on lines 39-40, 42-43 temporarily and load them all for now.

Not seen this problem before, maybe a permissions issue failing the file_exists test?



layingback's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)

2.6.32 / 1.3 - 2.4 / 5.5 - 5.6 / 5.4 - 5.5 / 9.4

 
 
 
 
  
25 Jun '12 Mon Jun 25, 2012 15:14    
RedGerry
Sponsor  Sponsor
  •  

Post Re: Embed javascript slideshow?

ahh, ok. Have now copied Pro_News templates into my chosen theme and all works. Previously only had them in 'default'. Thanks again layingback for your speedy and concise support Smile



RedGerry's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)

Suse 11.4 LAMP under zypper -DF9.3.3.1

 
 
 
 
  
25 Jun '12 Mon Jun 25, 2012 15:31    
layingback
Site Admin  
  •  

Post Re: Embed javascript slideshow?

That's odd. It checks - or tries to - in both the current theme and the default theme, I think. Lines 39 and 40 in load_js.inc

But glad it's working!



layingback's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)

2.6.32 / 1.3 - 2.4 / 5.5 - 5.6 / 5.4 - 5.5 / 9.4

 
 
 
 
  
26 Jun '12 Tue Jun 26, 2012 08:35    
layingback
Site Admin  
  •  

Post Re: Embed javascript slideshow?

Problem now identified!



layingback's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)

2.6.32 / 1.3 - 2.4 / 5.5 - 5.6 / 5.4 - 5.5 / 9.4

 
 
 
 
  
26 Jun '12 Tue Jun 26, 2012 16:32    
RedGerry
Sponsor  Sponsor
  •  

Post Re: Embed javascript slideshow?

Always a great feeling lol



RedGerry's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)

Suse 11.4 LAMP under zypper -DF9.3.3.1

 
 
 
 
Link  QR 
Share this Printer Friendly Page  facebook   google+   linkedin   twitthis  
Show more ...


Forum Permissions - 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 cannot download files in this forum