<?xml version="1.0" encoding="UTF-8"?>    <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
      <channel>
        <title>Adding (news)records to news scroller</title>
        <link>https://interactivetools.com/forum/forum-posts.php?Adding-news-records-to-news-scroller-69792</link>
        <description></description>
        <pubDate>Wed, 20 May 2026 03:43:44 -0700</pubDate>
        <language>en-us</language>
        <atom:link href="https://interactivetools.com/forum/forum-posts.php?rss=1&amp;Adding-news-records-to-news-scroller-69792" rel="self" type="application/rss+xml" />

                <item>
          <title>Re: [kovali] Adding (news)records to news scroller</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2200903#post2200903</link>
          <description><![CDATA[Hi Kovali,<br /><br />I know that it was a while ago, but would you be willing to share the php code that you finally came up with?<br /><br />Thanks,<br /><br />Jerry Kornbluth]]></description>
          <pubDate>Sun, 03 Jan 2010 12:00:17 -0800</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2200903#post2200903</guid>
        </item>
                <item>
          <title>Re: [kovali] Adding (news)records to news scroller</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2196109#post2196109</link>
          <description><![CDATA[Hi Koen<br /><br />Thanks for the update! Glad to hear you got things going :).  Keep us up to date with how you are making out.<br />]]></description>
          <pubDate>Tue, 03 Mar 2009 16:09:19 -0800</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2196109#post2196109</guid>
        </item>
                <item>
          <title>Re: [ross] Adding (news)records to news scroller</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2196104#post2196104</link>
          <description><![CDATA[Hi Ross,  <br /><br />After having some fun with a &quot;Beginners PHP Manual&quot; and a lot of Googling I managed to fix the problem myself and I'm very happy with the result, thx anyway ! <br /><br />Koen<br />]]></description>
          <pubDate>Tue, 03 Mar 2009 13:51:20 -0800</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2196104#post2196104</guid>
        </item>
                <item>
          <title>Re: [kovali] Adding (news)records to news scroller</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2196069#post2196069</link>
          <description><![CDATA[Hi there.<br /><br />We are starting to get into a little more than I think we can really do through the forums. Would you be interested in going through consulting for this? Basically, I would just set the code up for you myself. I could also spend some time explaining how it all works.<br /><br /> Send me an email through consulting@interactivetools.com and we'll go from there.<br /><br />Thanks!<br />]]></description>
          <pubDate>Mon, 02 Mar 2009 15:02:41 -0800</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2196069#post2196069</guid>
        </item>
                <item>
          <title>Re: [ross] Adding (news)records to news scroller</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2196052#post2196052</link>
          <description><![CDATA[Hi Ross, thanks for wanting to help me out with this. <br /><br />I tried it but no succes yet... There are some things that i don't really understand: <br /><br />Where does the variable <font size="3">&lt;?php echo $record['num'] ?&gt; </font>come from? Do i have to create/insert it with the cms?<br /> <br /><br />On the other hand, I came up with some (bad?) code like this (to increase the number of 'pausecontent []' from 0 to 1,2,3,...): It's not working yet but i think you can guess what i want to achieve: <br /><br />&lt;script type=&quot;text/javascript&quot;&gt; <br />&lt;?php<br />$number = -1;<br />$count = &quot;$number +1&quot;;<br /> ?&gt;<br />&lt;?php foreach ($nieuwsRecords as $record): ?&gt;  <br />pausecontent[&lt;?php echo $count ?&gt;]='&lt;a href=&quot;&lt;?php echo $record['_link'] ?&gt;&quot;&gt;&lt;?php echo $record['title'] ?&gt;&lt;/a&gt;&lt;?php echo $record['content'] ?&gt;' <br />&lt;?php endforeach; ?&gt; <br />&lt;/script&gt; <br /><br />The actual url of the page is: <a target="_blank" href="http://www.coox-motors.be/site/indextest.php">http://www.coox-motors.be/site/indextest.php</a> so you can check all the code if you want to.<br />As an example, the scroller is working ok here but with static data only. <br /><br />Hope you can get me a little more on the right track :-) <br /><br />Koen<br />]]></description>
          <pubDate>Sat, 28 Feb 2009 11:14:24 -0800</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2196052#post2196052</guid>
        </item>
                <item>
          <title>Re: [kovali] Adding (news)records to news scroller</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2196029#post2196029</link>
          <description><![CDATA[Hi there.<br /><br />Thanks for posting!<br /><br />We normally like to focus on our own scripts but I think I can at least get you on the right track.<br /><br />It's a little hard for me to test this out as I don't have all the script for your slider but something like this should get things going:<br /><br /><code>&lt;script type=&quot;text/javascript&quot;&gt;<br />var pausecontent=new Array()<br />&lt;?php foreach ($nieuwsRecords as $record): ?&gt;<br />	pausecontent[&lt;?php echo $record['num'] ?&gt;]='&lt;a href=&quot;&lt;?php echo $record['_link'] ?&gt;&quot;&gt;&lt;?php echo $record['title'] ?&gt;&lt;/a&gt;&lt;?php echo $record['content'] ?&gt;'<br />&lt;?php endforeach; ?&gt;<br />&lt;/script&gt;</code><br /><br />I am basically setting up a foreach loop to print out one line of javascript for every record. You may need to change a few of the variables around to get it to line up with your own site.<br /><br />Let me know how you make out :)<br />]]></description>
          <pubDate>Fri, 27 Feb 2009 12:47:44 -0800</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2196029#post2196029</guid>
        </item>
                <item>
          <title>Adding (news)records to news scroller</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2196016#post2196016</link>
          <description><![CDATA[Hi, <br /><br />I want to insert the 3 first records of a news listing to a javascript news scroller, so that the scroller will always show the latest (3) news (title + content) added into the cms. Below is my code: <br /><br />TOP OF PAGE:<br />&lt;?php<br />  <br />  require_once &quot;/home/cooxmoto/public_html/beheer/lib/viewer_functions.php&quot;; <br /><br />  list($nieuwsRecords, $nieuwsMetaData) = getRecords(array(<br />    'tableName'   =&gt; 'nieuws',<br /> 'limit'       =&gt; '3',<br />    'loadUploads' =&gt; '0',<br />    'allowSearch' =&gt; '0',<br />  )); <br /><br />?&gt; <br /><br />2 VARIABLES USED: &lt;?php echo $record['title'] ?&gt;    and   &lt;?php echo $record['content'] ?&gt; <br /><br /> JAVASCRIPT (where the actual content is added):<br />&lt;script type=&quot;text/javascript&quot;&gt;<br />var pausecontent=new Array()<br />pausecontent[0]='&lt;a href=&quot;news.php&quot;&gt;Title (1)&lt;/a&gt;Content (1)'<br />pausecontent[1]='&lt;a href=&quot;news.php&quot;&gt;Title (2)&lt;/a&gt;Content (2)'<br />pausecontent[2]='&lt;a href=&quot;news.php&quot;&gt;Title (3)&lt;/a&gt;Content (3)'<br />&lt;/script&gt; <br /><br />The script works well with static data, but i want it to fetch the 3 latest records and display them automatically. I hope it can be done, but i'm a newbie to PHP so pls can you help ? Thanks !! <br /><br />  <br /><br />I also want to limit the amount of words (characters) of the content each time, i think this can be done with this function?: <br /><br />&lt;?php<br />function cutText($string, $setlength) {     $length = $setlength;     if($length&lt;strlen($string)){         while (($string{$length} != &quot; &quot;) AND ($length &gt; 0)) {             $length--;         }         if ($length == 0) return substr($string, 0, $setlength);         else return substr($string, 0, $length);     }else return $string; }<br />?php&gt;<br />]]></description>
          <pubDate>Thu, 26 Feb 2009 16:32:53 -0800</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2196016#post2196016</guid>
        </item>
              </channel>
    </rss>
  