News Slider

Results 1 to 4 of 4
  1. #1
    Member Leans is offline
    MemberRank
    Jul 2014 Join Date
    94Posts

    News Slider

    I've been editing this cms but am having a problem with this News Slider I added it doesn't seem to be reading the java script to make to make it slide like a slideshow.


    News Slider code:
    PHP Code:
    <div id="promo-box">
        <div id="promo-bullets"></div>
    <?php$to5 mysql_query("SELECT * FROM cms_news ORDER BY ID DESC LIMIT 5") or die(mysql_error());?>
    <?php $i 
    0; while($newsobject mysql_fetch_assoc($to5)){ $i++; ?>
            <div class="promo-container" style="background-image: url(%www%/Top_Story_Images/<?php echo $newsobject['image']; ?>)<?php if($i != '1'){ ?>; display: none<?php ?>">            <div class="promo-content-container">                <div class="promo-content">                    <div class="title"><?php echo $newsobject['title']; ?></div>                    <div class="body"><?php echo $newsobject['shortstory']; ?></div>                </div>            </div>            <div class="promo-link-container"><div class="enter-hotel-btn"><div class="open enter-btn">             <a href="%www%/index.php?p=news&id=<?php echo $newsobject['id']; ?>">Read the full article &raquo;</a>        <b></b>    </div></div><div style="color:#FFF;margin-top:25px;margin-left:-210px;">Posted on: <b><?php echo date('F d, Y'$newsobject['published']); ?></b></div>            </div>        </div>        <?php }?>
    </div><script type="text/javascript">document.observe("dom:loaded", function(){    PromoSlideShow.init();});</script>
    lightmepage.js
    Code:
    var PromoSlideShow=function(){var b=[];var f=0;var e=false;var a=false;var d=function(g){if(!e&&!a&&f!=g){a=true;Effect.Fade(b[f],{duration:0.8,from:1,to:0});f=g;if(f>=b.length||f<=-1){f=0}Effect.Appear(b[f],{duration:0.8,from:0,to:1,afterFinish:function(){a=false}});c(f)}};var c=function(g){$$("#promo-bullets a").each(function(h){h.removeClassName("active")});$$("#promo-bullets a")[g].addClassName("active")};return{init:function(){b=$$("#promo-box .promo-container");if(b.length<2){return}if($("promo-bullets")){$("promo-bullets").insert('<a href="#" class="active">0</a>');for(var g=1;g<b.length;g++){$("promo-bullets").insert('<a href="#">'+g+"</a>")}$$("#promo-bullets a").each(function(i){i.observe("click",function(j){Event.stop(j);
    e=false;d(parseInt(j.target.innerHTML,10));e=true})})}var h=6000;setInterval(function(){d(f+1)},h)}}}();function recordOutboundLink(c,a){if(typeof(_gaq)=="undefined"||!_gaq){return}var b="Outbound Links";_gaq.push(["_trackEvent",b,c,a])};
    Any suggestions?


  2. #2
    apt-get install xcowsay 3M1L is offline
    MemberRank
    Jul 2012 Join Date
    SwedenLocation
    268Posts

    Re: News Slider

    Do u get any errors? I assume you know how to debug this.

  3. #3
    Member Leans is offline
    MemberRank
    Jul 2014 Join Date
    94Posts

    Re: News Slider

    Quote Originally Posted by 3M1L View Post
    Do u get any errors? I assume you know how to debug this.
    No I do not.

    - - - Updated - - -

    Well rechecking the error logs I did see this under the javascript on the news.
    Uncaught TypeError: undefined is not a function

  4. #4
    Member Leans is offline
    MemberRank
    Jul 2014 Join Date
    94Posts

    Re: News Slider

    Anyone got any idea why the promo bullets wont show up?



Advertisement