Results 1 to 4 of 4

Thread: Featured Content Slider Help

  1. #1
    Join Date
    Jan 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Featured Content Slider Help

    1) Script Title: Featured Content Slider

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...tentslider.htm

    3) Describe problem: The way I have my featured area setup, the pagination on the slider is inside the <div class="contentdiv"> tag.

    In my code below the <div class="pagination" id="paginate-slider1"></div> does not display the slider because, I assume, it is inside the <div class="contentdiv">.

    I figure the only way I am going to be able to do this is manually generate my links, but I'm not sure how to go about it, any ideas?

    The attached file is what I'm trying to get it to look like.

    PHP Code:
                <div id="slider1" class="contentslide">
    <?php
            $featured 
    mysql_query("X");
            while (
    $row mysql_fetch_assoc($featured)) {
    ?>
                <div class="contentdiv">

                    <table cellpadding="0" cellspacing="0" border="0">
                    <tr>
                        <td style="border-left: 1px solid #B6B6B6; border-right: 1px solid #B6B6B6;"><a href="<?echo "$row[link]"?>"><img src="<?echo "$row[image]"?>" border="0"></a></td>
                    </tr>
                    </table>
                    
                    <table cellpadding="0" cellspacing="0" border="0">
                    <tr>
                        <td height="26" width="477" background="images/featured_slider.jpg">

                            <table cellpadding="0" cellspacing="0" border="0">
                            <tr>
                                <td width="33"><center><img src="images/consoles/<?echo "$row[console]"?>.gif"></SPAN></td>
                                <td width="277" style="padding-left: 12px;"><?echo "$row[title]"?></SPAN></td>
                                <td width="167"><div class="pagination" id="paginate-slider1"></div></td>
                            </tr>
                            </table>

                        </td>
                    </tr>
                    </table>

                </div>
    <?
            
    }
    ?>

                </div>

    <script type="text/javascript">
    //Define: ContentSlider("slider_ID", [autorotate_miliseconds], [custompaginatelinkstext], [customnextlinktext])
    ContentSlider("slider1")
    //OR ContentSlider("slider1", 3000)
    //ContentSlider("slider1", 3000, '<img src="images/1.jpg" />')
    //OR ContentSlider("slider1", 3000, linktextarray, "Foward")
    //OR ContentSlider("slider1", "", linktextarray)
    //OR ContentSlider("slider1", "", "", "Foward")
    </script>

  2. #2
    Join Date
    May 2006
    Location
    Sydney, Australia - Near the coast.
    Posts
    1,995
    Thanks
    0
    Thanked 8 Times in 7 Posts

    Default

    It looks like that your PHP code is wrong.
    Try this:
    PHP Code:
    <div id="slider1" class="contentslide">
    <?php
            $featured 
    mysql_query("X");
            while (
    $row mysql_fetch_assoc($featured)) {
    ?>
                <div class="contentdiv">

                    <table cellpadding="0" cellspacing="0" border="0">
                    <tr>
                        <td style="border-left: 1px solid #B6B6B6; border-right: 1px solid #B6B6B6;"><a href="<?echo $row[link]; ?>"><img src="<?echo "$row[image]"?>" border="0"></a></td>
                    </tr>
                    </table>
                    
                    <table cellpadding="0" cellspacing="0" border="0">
                    <tr>
                        <td height="26" width="477" background="images/featured_slider.jpg">

                            <table cellpadding="0" cellspacing="0" border="0">
                            <tr>
                                <td width="33"><center><img src="images/consoles/<? echo $row[console]; ?>.gif"></SPAN></td>
                                <td width="277" style="padding-left: 12px;"><? echo $row[title]; ?></SPAN></td>
                                <td width="167"><div class="pagination" id="paginate-slider1"></div></td>
                            </tr>
                            </table>

                        </td>
                    </tr>
                    </table>

                </div>
    <?
            
    }
    ?>
    Peter - alotofstuffhere[dot]com - Email Me - Donate via PayPal - Got spare hardware? Donate 'em to me :) Just send me a PM.
    Currently: enjoying the early holidays :)
    Read before posting: FAQ | What you CAN'T do with JavaScript | Form Rules | Thread Title Naming Guide

  3. #3
    Join Date
    Jan 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    The information from the database displays fine.

  4. #4
    Join Date
    Jun 2007
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    hi DOughboy

    I am running another mySQL database with php on my site. I would like to put the contents of the contentslider into another table, but I need some guidance. Would you be able to help?

    Thanks
    Sol

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •