Support Forum Softcomplex logo
About Us  | Services  | Download  | Order  | Support  | |
| Search | Today's Posts | Stats | Board Rules | Not logged in [ Login | Register ]
go to bottom
Last active: Never

Printable Version | Subscribe | Add to Favourites   Post new thread
Author: Subject: Dynamic Data Question (Yet Again)
nutsnbolts
Junior Member

Posts: 3
Registered: 3/26/2008
Member Is Offline
posted on 3/26/2008 at 12:44 AM Reply With Quote
Dynamic Data Question (Yet Again)


Not being a PHP guy, having a few problems understanding how to include "Dynamic" data. Here is schema... Have Scroller set up and running as expected using :
Code:
{
'file': '../cont8.html',
'content': '',
'pause_b': 0,
'pause_a':4
},
etc... etc....

in scroll.tpl0.js with 8 small external files. Have read the article
http://www.softcomplex.com/forum/viewthread.php?tid=2988#pid10207
"Solution For Dynamic Dbase Data"
And think I can implement to replace files with "content" from mysql dbase. This will allow a simple form to allow updating the scroller content rather than having to upload new files as content changes.

Question comes from following: Have allowed for max of 8 "files " or content blocks. How-to states
Quote:
One thing I did notice is that you need to make sure you're returning as many results as you have content elements. Meaning that if you have it set up to show five results but you've only got two records in your database it doesn't work -- something in the scroll code and I haven't looked at it yet to see why. If you're worried about that happening you simply move the ITEMS info into the while loop above and have it actually generate as many items as it finds results. If that makes no sense and you have this problem let me know and I'll post the code.

I will have this "problem" as some times dbase records will be as few as 3 or 4 up to max of 8. Since this post was in 2005 not sure the original poster is still around, and if someone could give me a little direction about moving the "Items" info into the while loop as stated I would really appreciate it.

TIA
David
View User's Profile View All Posts By User U2U Member
tigra
Administrator

Posts: 2049
Registered: 6/17/2002
Location: US, CO
Member Is Offline
posted on 3/26/2008 at 03:13 PM Reply With Quote

the idea of the posting is that instead of having fixed number of scrolled items

{
'file': '',
'content': ' <? echo (...) ?>',
'pause_b': 0,
'pause_a':4
},
...
{
'file': '',
'content': ' <? echo (...) ?>',
'pause_b': 0,
'pause_a':4
}

you'll need to generate as many as you need
<?
while (...have records...) {
?>
{
'file': '',
'content': ' <? echo (...) ?>',
'pause_b': 0,
'pause_a':4
}
<? } ?>

make sure you have them separated with commas and last one doesn't have comma after it.
View User's Profile View All Posts By User U2U Member
Post new thread

Related Links:
Product Page
Product Demonstrations Live Demos:
Multiple vertical scrolling
Horizontal scrolling
Free Download Free Download
Product Documentation Documentation:
Documenation Page
Change Log
Support Forum Technical Support
Support Forum
   

Go To Top


Powered by XMB 1.9.1 Nexus
Developed By Aventure Media & The XMB Group © 2002-2004