Titre: Scroller
Posté par: bidouille7 le le 11-09-2012 a 16:22:23
Bonjour. J'ai un scroller à droite sur la page d'acceuil de mon site et il affiche les images qui sont déjà sur la page dans la présentation aléatoire des annonces. J'aimerais que l'on me dise comment changer pour que d'autres images d'autres annonces s'affichent au même lieu et place. Le site est www.alenchere.com Merci pour votre aide et à bientôt. |
Titre: Re:Scroller
Posté par: WebD le le 12-09-2012 a 03:35:44
Salut, Il faudrait savoir comment est fait ton site. Tourne-t-il sous une plateforme ou est-ce un site codé à la main?
Essai d'analyser le code, je pense que cela doit se faire par requete SQL essai de changer les paramètres de la requête en rajoutant un ORDER BY rand() par exemple.
A+ |
Titre: Re:Scroller
Posté par: bidouille7 le le 12-09-2012 a 11:01:17
Bonjour. merci de t'être penché sur ce problème. Je précise que je n'y connais pratiquement rien en programmation,surtout sur ce sujet. Le site a été créé avec un script tout fait, et j'ai fait rajouter ce scroller par un internaute qui a bien voulu le faire. Malheureusement celui-ci n'a plus le temps et ne veut plus s'en occuper. C'est pourquoi je demande de l'aide. Qui peut m'apporter cette aide? Merci et à plus. |
Titre: Re:Scroller
Posté par: KB le le 12-09-2012 a 11:06:34
| Tu veux qu'on t'explique comment le faire dans ce cas, donne nous le code) ou tu veux que quelqu'un le fasse pour toi? |
Titre: Re:Scroller
Posté par: bidouille7 le le 12-09-2012 a 14:15:53
re.Je voudrais simplement que l'on me dise ce qu'il faut changer et ou le changer. Je vous mets le code mais il sera en 2 parties, car ici la totalité ne passe pas. Merci. <script type="text/javascript" language="JavaScript"> <!-- // Use Freely as long as following disclaimer is intact :: //--------------------------------------------------------------- // Cross Browser Multi-Directional Scroller v1.1 18th January 2005 // This script written by Rik Comery. www.ricom.co.uk // For support, visit the "Resources" section at www.ricom.co.uk // All rights reserved. Article = new Array; i=0; /* DEFINE SCROLLER ELEMENTS Define new scroller elements here in the following format. Article = new Array ("display text", "URL", "frame target to load link in");i++ Note: If you do not want the item to be a link, change the URL value to "none". */ <? $numb=0; for ($i=0;$i<$j;$i++) { for ($k=0;$k<$layout['nb_feat_hp'];$k++) { if ($name[$numb]!="") { ?> Article = new Array ("<div class='feat3'><div class='c1feat' style='padding: 3px;'><b> » </b><a href='<?=$site_url.processLink('auctiondetails', array('itemname' => $name[$numb], 'id' => $id[$numb]));?>'><? echo titleResize($name[$numb]);?></a></div><a href='<?=$site_url.processLink('auctiondetails', array('itemname' => $name[$numb], 'id' => $id[$numb]));?>'><img src='<? echo (($pic[$numb]!="")?"makethumb.php?pic=".$pic[$numb]."&w=".$layout['w_feat_hp']."&sq=Y":"themes/".$setts['default_theme']."/img/system/noimg.gif");?>' border='0' alt='<?=$name[$numb];?>' vspace='3' hspace='3'></a><div class='smallfont c2' style='padding: 3px;'><b><?=strtoupper($lang[startbid]);?>:</b> <? echo displayAmount(getSqlField("SELECT * FROM probid_auctions WHERE id='".$id[$numb]."'","bidstart"),$currency[$numb]);?><br><b><?=$lang[currbid];?>:</b> <? echo displayAmount(getSqlField("SELECT * FROM probid_auctions WHERE id='".$id[$numb]."'","maxbid"),$currency[$numb]);?><br><b><?=$lang[ends];?>:</b> <? echo displaydatetime(getSqlField("SELECT * FROM probid_auctions WHERE id='".$id[$numb]."'","enddate"),$setts['date_format']);?></div></div>", "<?=$site_url.processLink('auctiondetails', array('itemname' => $name[$numb], 'id' => $id[$numb]));?>", "");i++; <? $numb++; } } } ?> /////// Article = new Array ("Welcome to Ricom Productions", "http://ricom.co.uk", "_blank");i++ orientation = "vertical" // Orientation of scroller (Horizontal or vertical) scrollerWidth = "200" // Width of entire scroller. scrollerHeight = "1800"; // Height of Scroller. borderWidth = 5 // Width of border. (use 0 for no border). borderColour = "#7EF3E3" // Colour of scroller border. (Use either hexadecimal or text values. e.g. "#FF0000" or "Red") backColour = "F9F6AC" // Colour of scroller background. (Use either hexadecimal or text values. e.g. "#FF0000" or "Red") staticColour = "#FFFFFF" // Colour of scroller items that are NOT a link. (including scrollerDivider characters) stopScroll = 1 // Pause the scroller on mouseOver. (use 0 for no.) textAlignment="center" // Alignment of each scroller item. Only really makes a difference on vertical scroller // (center, left, right, justify) // Scroller Links linkFont = "arial" // Font of scroller links; linkWeight = "normal" // Weight of scroller links; linkColour = "#FFFFFF" // Colour of scroller links linkSize = "1" // Size of links (in points) linkDecoration = "none" // Decoration of links. (underline, overline, none) // Scroller Links On MouseOver slinkFont = "Tahoma" // Font of scroller links; slinkWeight = "normal" // Weight of scroller links; slinkColour = "#FFFFFF" // Colour of scroller links slinkSize = "" // Size of links (in points) slinkDecoration = "none" // Decoration of links. (underline, overline, none) scrollerDivider = "<div><img src='themes/<?=$setts['default_theme'];?>/img/pixel.gif' width='1' height='5'></div>" // Character to place between each scroller item. // <img> tags can be used if an image is required. // Use "0" for nothing. For Vertical scrollers, it is best to use "<br>" /* Because Netscape version 4 does not support this scroller, configure the values below so NS4 users do not see an error. In the scroller's place will be a static title which can be a link if require. The appearance of the static text (colour, scroller border etc) will be exactly the same as for the working version in other browsers. */ ns4Text = "Click Here to view our articles"; // Alternative text to display in Netscape 4. ns4URL = ""; // URL of link in NS4. If no URL is required, enter "none" ns4Target = "_top"; // Frame target for link in NS4 ////// DO NOT EDIT BELOW THIS LINE /////////////////////////////////////////////////////////////////// //Browser Sniffer var isIE = (document.getElementById && document.all)?true:false; var isNS4 = (document.layers)?true:false; var isNS6 = (document.getElementById && !document.all)?true:false; var isLoaded=false; // Build the scroller and place it on the page function buildScroller() { if(isNS4){ scroller='<table border="0" cellpadding="0" cellspacing="0" width="'+scrollerWidth+'" bgcolor="'+borderColour+'"><tr><td>' scroller+='<table border="0" cellpadding="3" cellspacing="1" width="100%" height="'+scrollerHeight+'" bgcolor="'+backColour+'"><tr><td align="center" nowrap><p>'; if(ns4URL.toLowerCase()!="none"){scroller+='<a href="'+ns4URL+'" class="rcScroller" target="'+ns4Target+'">'+ns4Text+'</a>';} else{scroller+=ns4Text;} scroller+='</p></td></tr></table></td></tr></table>' }else{ scroller='<table border="0" cellpadding="0" cellspacing="0" style="width:'+scrollerWidth+';height:'+scrollerHeight+';border:'+borderWidth+'px solid '+borderColour+';background-color:'+backColour+'">'; scroller+='<tr valign="middle"><td><div id="div" style="'; if(orientation.toLowerCase()=="vertical"){scroller+='height:'+scrollerHeight+';';} scroller+='width:'+scrollerWidth+'; position:relative; background-color:'+backColour+'; overflow:hidden">'; scroller+='<div id="div1" style="position:relative; left:0; z-index:1">'; scroller+='<table border="0" name="table" id="table"'; if(orientation.toLowerCase()=="vertical"){scroller+='style="width:'+scrollerWidth+'"';} scroller+='><tr>'; y=0; while (y<4) { for (x=0; x<(Article.length); x++) { if(orientation.toLowerCase()=="vertical"){scroller+='<tr>';} scroller+='<td '; if(orientation.toLowerCase()=="horizontal"){scroller+='nowrap';} if(stopScroll==1){scroller+=' onMouseOver="stopScroller();" onMouseOut="setWidth()"';} scroller+='><p>'; if(Article[x][1].toLowerCase()!="none"){scroller+='<a class="rcScroller" href="'+Article[x][1]+'" target="'+Article[x][2]+'" >'+Article[x][0]+'</a>'; }else{scroller+=Article[x][0];} scroller+='</p></td>'; if(orientation.toLowerCase()=="vertical"){scroller+='</tr>';} if(scrollerDivider.toLowerCase() != "none"){scroller+='<td nowrap><p>'+scrollerDivider+'</p></td>';} } y++ } scroller+='</tr></table></div></div></td></tr></table>'; } document.writeln(scroller); } |
Titre: Re:Scroller
Posté par: bidouille7 le le 12-09-2012 a 14:16:51
re.Voici la 2ème partie: // Ensure the width of the scroller is divisible by 2. This allows smooth flowing of the scrolled content function setWidth() { tableObj=(isIE)?document.all("table"):document.getElementById("table"); obj=(isIE)?document.all.div1:document.getElementById("div1"); objWidth=(orientation.toLowerCase()=="horizontal")?getOffset(tableObj,"width"):getOffset(tableObj,"height"); HalfWidth=Math.floor(objWidth/2); newWidth = (HalfWidth*2)+2; obj.style.width=newWidth moveLayer(obj, newWidth); } // Move the layer by one pixel to the left function moveLayer(obj, width) { maxLeft = (0-(width/2)+2)/2 if(orientation.toLowerCase()=="horizontal"){ obj.style.left=(parseInt(obj.style.left) <= maxLeft)?0:parseInt(obj.style.left)-1 }else{ if(obj.style.top==""){obj.style.top=0;} // alert(obj.style.top) if (parseInt(obj.style.top)<(0-(width/2)+6)){ obj.style.top = 0 }else{ obj.style.top = parseInt(obj.style.top)-1 } } timer = setTimeout ("moveLayer(obj, "+width+");", 25); } // Get width and height of layer function getOffset(obj, dim) { if(dim=="width") { oWidth = obj.offsetWidth return oWidth } else if(dim=="height") { oHeight = obj.offsetHeight return oHeight } } function loadScroller(){ if(isNS4){ scroller='<table border="0" cellpadding="0" cellspacing="0" width="'+scrollerWidth+'" bgcolor="'+borderColour+'"><tr><td>' scroller+='<table border="0" cellpadding="0" cellspacing="0" width="100%" height="'+scrollerHeight+'" bgcolor="'+backColour+'"><tr><td align="center" nowrap>'; if(ns4URL.toLowerCase()!="none"){scroller+='<a href="'+ns4URL+'" class="smallfont" target="'+ns4Target+'">'+ns4Text+'</a>';} else{scroller+=ns4Text;} scroller+='</td></tr></table></td></tr></table>' }else{ scroller='<table border="0" cellpadding="0" cellspacing="0" style="width:'+scrollerWidth+';height:'+scrollerHeight+';border:'+borderWidth+'px solid '+borderColour+';background-color:'+backColour+'">'; scroller+='<tr valign="middle"><td><div id="div" style="'; if(orientation.toLowerCase()=="vertical"){scroller+='height:'+scrollerHeight+';';} scroller+='width:'+scrollerWidth+'; position:relative; background-color:'+backColour+'; overflow:hidden">'; scroller+='<div id="div1" style="position:relative; left:0; z-index:1">'; scroller+='<table cellpadding="0" cellspacing="0" border="0" name="table" id="table"'; if(orientation.toLowerCase()=="vertical"){scroller+='style="width:'+scrollerWidth+'"';} scroller+='><tr>'; y=0; while (y<4) { for (x=0; x<(Article.length); x++) { if(orientation.toLowerCase()=="vertical"){scroller+='<tr>';} scroller+='<td '; if(orientation.toLowerCase()=="horizontal"){scroller+='nowrap';} if(stopScroll==1){scroller+=' onMouseOver="stopScroller();" onMouseOut="setWidth()"';} scroller+='>'; if(Article[x][1].toLowerCase()!="none"){scroller+='<a class="rcScroller" href="'+Article[x][1]+'" target="'+Article[x][2]+'" >'+Article[x][0]+'<\/a>'; }else{scroller+=Article[x][0];} scroller+='<\/td>'; if(orientation.toLowerCase()=="vertical"){scroller+='<\/tr>';} if(scrollerDivider.toLowerCase() != "none"){scroller+='<td nowrap>'+scrollerDivider+'<\/td>';} } y++ } scroller+='<\/tr><\/table><\/div><\/div><\/td><\/tr><\/table>'; } document.getElementById("boundry").innerHTML=scroller; setWidth(); } // Ensure the width of the scroller is divisible by 2. This allows smooth flowing of the scrolled content
function runScroller(){ if(!isNS4){setWidth()} } function stopScroller() { clearTimeout(timer) } ////// END OF SCRIPT /////////////////////////////////////////////////////////////////// //--> </script> |
Titre: Re:Scroller
Posté par: bidouille7 le le 14-09-2012 a 11:00:55
| Bonjour. Toujours personne pour m'aider? A plus. |
Titre: Re:Scroller
Posté par: bidouille7 le le 24-09-2012 a 10:18:45
| Bonjour. Je constate que vous ne vous bousculez pas au portillon pour m'apporter votre aide et une solution à mon problème. Merci et à plus. |
Titre: Re:Scroller
Posté par: gagnedescodes le le 23-03-2013 a 11:20:29
Salut Bidouille7
J'aurai voulu voir ton site pour bien comprendre ton problème et ensuite me pencher sur ton code mais tu as un soucis de base de donnée. Es-ce que ton soucis et toujours d'actualité?
N'hésite pas à me contacter directement tu connais mon mail. |
Titre: Re:Scroller
Posté par: bidouille7 le le 23-03-2013 a 17:20:29
Bonjour. le site en question est www.alenchere.com Le scroller est à droite et il contient les mêmes images que cells qui sont dans les encadrés. Or je voudrais que ces images soient différentes car elles sont dans la base de données.
Merci et à plus. |
Titre: Re:Scroller
Posté par: gagnedescodes le le 23-03-2013 a 18:08:52
| Je n'arrive toujours pas y accéder tu as des problèmes de permission sur ta base. |
Titre: Re:Scroller
Posté par: bidouille7 le le 23-03-2013 a 18:14:59
| Oui mon site a été hacké et j'ai des soucis pour tout remettre en ordre. Je regarderai celà demain. Merci pour ton aide et à plus. |
Titre: Re:Scroller
Posté par: gagnedescodes le le 23-03-2013 a 18:23:04
| Pas de soucis n'hésite pas au besoin. |
Titre: Re:Scroller
Posté par: pppplus le le 23-03-2013 a 21:05:14
Access denied for user 'alencher'@'localhost' (using password: YES)
Ce n'est pas du hacking, mais juste un problème de connexion à la base de données. Donc, il faut vérifier les identifiants de connexion. |
Titre: Re:Scroller
Posté par: bidouille7 le le 10-04-2013 a 10:03:40
| Bonjour. Alenchere est de nouveau accessible. Le seul problème est que les images ne s'affichent plus. Merci et à plus. |
Titre: Re:Scroller
Posté par: gagnedescodes le le 11-04-2013 a 09:08:55
Salut
Tu as deux cas de figures. La première c'est des images que tu appelle qui sont pas de le dossier appeler, et la deuxième c'est que tu doit utilisé un fichier pour redimensionner les photos qui a du être modifier et donc aucune photo n'est trouvé. |
Titre: Re:Scroller
Posté par: bidouille7 le le 11-04-2013 a 11:05:04
Bonjour. Du fait que j'ai été obligé de tout supprimer sur le serveur à cause du hackeur, j'ai remis des fichiers que j'avais sauvegardé mais anciens. De plus en chargeant le fichier "uplimg" j'ai dû faire une mauvaise manip et beaucoup d'images ont dû disparaitre.. même quand je clique sur une annonce, j'ai un message d'erreur et je ne peux pas accéder au descriptif de cette annonce. Je ne sais pas pourquoi. Voilà le message: Forbidden
You don't have permission to access /auctiondetails.php on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. Apache/2.2.23 (Unix) mod_ssl/2.2.23 OpenSSL/1.0.0-fips mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 mod_jk/1.2.35 mod_perl/2.0.6 Perl/v5.10.1 Server at www.alenchere.com Port 80
Merci et à plus. |
Forum-webmaster | Actionné par YaBB SE
© 2001-2003, YaBB SE Dev Team. Tous droits réservés.
|