Ik gebruik om mijn site ( http://www.autohd.nl ) smoothgallery voor een weergave van de laatste nieuwsposts.
Dit gebeurde eerst altijd in de volgorde waarin de posts staan op de site dus van nieuwste naar oudste. Op deze manier vond ik het niet echt wat toevoegen aan de site, dit deed het naar mijn inzien wel als de nieuwsposts random worden geroteerd.
Hiervoor heb ik code toegevoegd die te vinden was op het forum van smoothgallery. Het werkt in principe goed alleen duurt het nu ong 10 sec. voor dat de gallery is geladen, als ik het oude bestand terugzet die het van nieuwste naar oudste doet laad hij wel direct. Heeft iemand enig idee waar dit aan kan liggen? Ik kan eventueel ook de code posten maar dat is een aardige lap, laat het even weten als het nodig is.
Alvast bedankt,
S. Amende
- Jscript Smoothgallery vraag
-
20-08-2009, 23:00 #1
- Berichten
- 294
- Lid sinds
- 15 Jaar
Jscript Smoothgallery vraag
-
In de schijnwerper
Handmatige SEO + linkbuilding voor slechts 150 euro per maand!Freelance / WerkTe Koop: 3 Geweldige Websites - Winprijzen.be, Wedstrijden.be & Prijzen.be als pakketWebsite te koopZzp schrijvers gezocht - doorlopende opdracht linkbuilding artikelen (geen bureaus)Freelance / WerkBacklinks & Linkbuilding Pakketten van R&B WebpromotionsFreelance / Werk -
21-08-2009, 08:10 #2
- Berichten
- 231
- Lid sinds
- 17 Jaar
Kun je alleen de aanpassing plaatsen?
-
21-08-2009, 11:13 #3
- Berichten
- 294
- Lid sinds
- 15 Jaar
Op de site van Smoothgallery heb ik dit advies gevolgd:
Insert the following line to the Options sections at the start. (leave out the comma if inserted at the end of the options)
rande: true,
then change the nextItem Function to the following.
nextItem: function() {
this.fireEvent('onNextCalled');
if (this.options.rande){
this.nextIter = Math.floor(Math.random()*this.maxIter);
this.goTo(this.nextIter);
} else {
this.nextIter = this.currentIter+1;
if (this.nextIter >= this.maxIter)
this.nextIter = 0;
this.galleryInit = 0;
this.goTo(this.nextIter);
}
},
Also change the line in the startSlideShow Function from
this.currentIter = 0;
to this
if (this.options.rande){
this.currentIter=Math.floor(Math.random()*this.max Iter)
} else {
this.currentIter = 0;
}
Ik weet vrijwel zeker dat ik hierin geen fout heeft gemaakt omdat ik het al 5 keer overnieuw heb geprobeerd en nog steeds hetzelfde probleem heb.
-
23-08-2009, 12:17 #4
- Berichten
- 751
- Lid sinds
- 15 Jaar
Post je oude en je nieuwe even,
Je moet even kijken wat het verschil is, als de oude het wel doet.. is er toch echt iets gewijzigd in de nieuwe.
-
23-08-2009, 14:12 #5
- Berichten
- 294
- Lid sinds
- 15 Jaar
ok zal het hieronder neerzetten.
Hier heb ik rande: true, toegevoegd.
Code:this.setOptions({ showArrows: true, showCarousel: true, showInfopane: true, embedLinks: true, fadeDuration: 500, timed: false, rande: true, delay: 9000,
Code:nextItem: function() { this.fireEvent('onNextCalled'); this.nextIter = this.currentIter+1; if (this.nextIter >= this.maxIter) this.nextIter = 0; this.galleryInit = 0; this.goTo(this.nextIter); },
Code:nextItem: function() { this.fireEvent('onNextCalled'); if (this.options.rande){ this.nextIter = Math.floor(Math.random()*this.maxIter); this.goTo(this.nextIter); } else { this.nextIter = this.currentIter+1; if (this.nextIter >= this.maxIter) this.nextIter = 0; this.galleryInit = 0; this.goTo(this.nextIter); } },
Code:startSlideShow: function() { this.fireEvent('onStart'); this.loadingElement.style.display = "none"; this.lastIter = this.maxIter - 1; this.currentIter = 0; this.galleryInit = 0; this.galleryElements[parseInt(this.currentIter)].set({opacity: 1}); if (this.options.showInfopane) this.showInfoSlideShow.delay(1000, this); var textShowCarousel = formatString(this.options.textShowCarousel, this.currentIter+1, this.maxIter); if (this.options.showCarousel&&(!this.options.carouselPreloader)) this.carouselBtn.setHTML(textShowCarousel).setProperty('title', textShowCarousel); this.prepareTimer(); if (this.options.embedLinks) this.makeLink(this.currentIter); },
Code:startSlideShow: function() { this.fireEvent('onStart'); this.loadingElement.style.display = "none"; this.lastIter = this.maxIter - 1; if (this.options.rande){ this.currentIter=Math.floor(Math.random()*this.maxIter) } else { this.currentIter = 0; } this.galleryInit = 0; this.galleryElements[parseInt(this.currentIter)].set({opacity: 1}); if (this.options.showInfopane) this.showInfoSlideShow.delay(1000, this); var textShowCarousel = formatString(this.options.textShowCarousel, this.currentIter+1, this.maxIter); if (this.options.showCarousel&&(!this.options.carouselPreloader)) this.carouselBtn.setHTML(textShowCarousel).setProperty('title', textShowCarousel); this.prepareTimer(); if (this.options.embedLinks) this.makeLink(this.currentIter); },
Plaats een
- + Advertentie
- + Onderwerp
Marktplaats
Webmasterforum
- Websites algemeen
- Sitechecks
- Marketing
- Domeinen algemeen
- Waardebepaling
- CMS
- Wordpress
- Joomla
- Magento
- Google algemeen
- SEO
- Analytics
- Adsense
- Adwords
- HTML / XHTML
- CSS
- Programmeren
- PHP
- Javascript
- JQuery
- MySQL
- Ondernemen algemeen
- Belastingen
- Juridisch
- Grafisch ontwerp
- Hosting Algemeen
- Hardware Info
- Offtopic