colonelwog 1485 Modules Team
| Posté : 10-06-2010 14:48
j'ai besoin d'un coup de main
je veux transformer cette liste grace a une base sql :
<?php
/* -------------------------------------------------------------- ------------------------------- */
/* ------------ Your slideshow content for this Frontpage Slideshow 1.7.x instance. ------------  ;*/
/* --------------------------------------------------------------------- ------------------------ */
/*
*** TIP ***
-----------
To add more slides to your FPSS slideshow, simple copy/paste and then change per your& nbsp;needs the data blocks marked with "slide&nbs p;elements".
*/
$slides = array(
// --- Start slide list ---
  ; // slide elements
  ; array(
  ; "slidelink" => "http://www.frontpageslideshow.net",
  ; "title" => "Frontpage&n bsp;Slideshow 1.7",
  ; "category" => "About&nb sp;Frontpage Slideshow",
  ; "tagline" => "Image&nbs p;taken from the movie \"Shoot 'em up\"",
  ; "text" => "\"Frontpage& nbsp;SlideShow\" is the most eye-catching way to& nbsp;display your featured articles, stories or e ven products in your php based website or&nb sp;CMS, like Time.com, Joost.com or Yahoo! Movies do. \"Frontpage SlideShow\" creates an uber-cool slideshow with text snippets laying on top& nbsp;of images. These \"slides\" are being rotate d one after the other with a nice fade& nbsp;effect. The slideshow features navigation and&nbs p;play/pause buttons, so the visitor has complete control over the slideshow's \"playback\"! And&n bsp;best of all, Frontpage Slideshow can be skinned!",
  ; "slideimage" => "ao4.jp g"
  ; ),
  ;
  ; // slide elements
  ; array(
"slidelink" => "http://www.frontpageslideshow.net",
  ; "title" => "Use Fr ontpage Slideshow on any PHP based site!",
  ; "category" => "About&nb sp;Frontpage Slideshow",
  ; "tagline" => "Image&nbs p;taken from the movie \"The Kingdom\"",
  ; "text" => "JoomlaWorks& nbsp;has developed this modification of Frontpage  ;Slideshow to work on every website that sup ports PHP as a minimum requirement. We call& nbsp;this modification the \"Static PHP\" version  ;of Frontpage Slideshow. It's ideal for use on non-Joomla!/Mambo websites, like for example y our corporate PHP based website or your Word press blog or Drupal website! You can obviou sly use this version on any CMS that is based on PHP!",
  ; "slideimage" => "the_ki ngdom_20070820114258369.jpg"
  ; ), &nbs p;
  ;
  ; // slide elements
  ; array(
"slidelink" => "http://www.frontpageslideshow.net/content/view/14/37/",
  ; "title" => "FPSS i s Search Engine Friendly!",
  ; "category" => "About&nb sp;Frontpage Slideshow",
  ; "tagline" => "Image&nbs p;taken from the movie \"Invaders\"",
  ; "text" => "Unlike Flash based slideshows, Frontpage Slideshow uses unobtrusive !javascript! and some CSS wizardry on ly. The content of the slides is laid o ut as html code, which means it can be& nbsp;\"read\" by search engines. The proper usage (and order) of h1, h2, p (and more)&nb sp;tags will make sure Google (or any other& nbsp;search engine) regularly \"scans\" your latest/fe atured items.",
  ; "slideimage" => "TVD_TR _02183_2.jpg"
  ; ), &nbs p;
  ;
  ; // slide elements (***TIP***: copy this data block and paste it below itself&nb sp;to add more slides)
  ; array(
"slidelink" => "http://www.joomlaworks.gr",
  ; "title" => "About JoomlaWorks",
  ; "category" => "",
  ; "tagline" => "Image&nbs p;taken from the movie \"Transformers\"",
  ; "text" => "JoomlaWorks& nbsp;is a team of professional web designers  ;and developers dedicated to delivering high-quality&n bsp;extensions and templates for Joomla! (the mos t popular open source Content Management System&n bsp;(CMS) worldwide) and Mambo (award winning CMS ). JoomlaWorks has established a solid reputation in the Joomla! & Mambo communities, hav ing developed some of the most popular and&n bsp;innovative free & commercial extensions && nbsp;templates, since 2006.",
  ; "slideimage" => "2007_t ransformers_014_1.jpg"
  ; ),
  ;
  ;
// --- End slide list ---
);
?>
en quelque chose de ce type :
<?php
/* -------------------------------------------------------------- ------------------------------- */
/* ------------ Your slideshow content for this Frontpage Slideshow 1.7.x instance. ------------  ;*/
/* --------------------------------------------------------------------- ------------------------ */
global $npds_prefix;
$resultat= mysql_query("SELECT * FROM ".$NPDS_Prefix."slideshow ");
$slides = mysql_num_rows($resultat);
/*
*** TIP ***
-----------
To add more slides to your FPSS slideshow, simple copy/paste and then change per your& nbsp;needs the data blocks marked with "slide&nbs p;elements".
*/
if($slides) { while($row = mysql_fetch_array($resultat)) {
$slides = array(
// --- Start slide list ---
  ; // slide elements
// --- Start slide list ---
array(
"slidelink" => "$row[link]",
"title" => "$row[title]",
"category" => "$row[subtitle]",
"tagline" => "$row[thumbdescriptif]",
"text" => "$row[description]",
"slideimage" => "$row[image]"),
);
}
}
?>
ça ne fonctionne pas car il me prends qu'un seul enregistrement |