badtant
04-26-2006, 02:29 PM
hi!
i've modified the Ultimate Fade-in slideshow 1.5 quite much to satisfy my needs.
i've changed so that any content can be shown (not just images) and i've also created an ajax functionality which updates the array of content automaticly.
my url:
http://www2.hemsida.net/badtant/test/index.html
first i specify the content to be in the slide like this (shout0 and shout1):
<div id="shoutarray">
<div id="shout0"><blockquote><div><p>If it sounds country, man, that's what it is: It's a country song!</p></div></blockquote><cite><a href="/badtant" class="member-image" title="badtant is online. View profile."><img src="http://alias.passagen.se.stage.sol.basefarm.net/images/c4/ca/c4ca4238a0b923820dcc509a6f75849b/e914a1625a57cce9b1642926ccfea42e_125x125.jpg" alt="" /></a><span class="online-status online"><a href="metropol_member_view.shtml" title="badtant is online. View profile.">1 badtant</a></span></cite></div>
<div id="shout1"><blockquote><div><p>Vinden vilar</p></div></blockquote><cite><a href="/Liliss_234" class="member-image" title="Liliss_234 is online. View profile."><img src="http://alias.passagen.se.stage.sol.basefarm.net/images/1f/0e/1f0e3dad99908345f7439f8ffabdffc4/881fa3ea209bb22f7dffe2cf78681880_125x125.jpg" alt="" /></a><span class="online-status offline"><a href="metropol_member_view.shtml" title="Liliss_234 is offline. View profile.">2 Liliss_234</a></span></cite></div>
</div>
the content is later read into my js array "shoutcast" with the function updateShoutArray (available in shoutbox.js)
then the fadeshow is created as usual with:
new fadeshow(shoutcast, 4000, 0);
--------------
when it all runs i have an ajax feature which updates the content every 30 seconds:
onload="setInterval('getShouts()',30000);"
getShouts (in ajax.js) updates the div shoutarray with new content and then cals the newShouts function (in shoutbox.js)
now the file shoutsigen.html is read for new content (should later be replaced with a dynamic page).
newShouts calls updateShoutArray (function was also was used earlier) that reads the new content and put it in the js array shoutcast.
then changeShoutArray is called to put the new array into my slideshow.
changeShoutArray was copied from this thread:
http://www.dynamicdrive.com/forums/showthread.php?t=8158
--------------
all this works great but there is one problem. because of missing functionality in velocity (http://jakarta.apache.org/velocity/) that i currently use, i can't put the first array of content that i want to use directly in the div called shoutarray (the first thing i explained). it has to be read from the same file (shoutsigen.html) that i later collect new content from.
i've tried using SSI to include the file but SSI isn't supported here.
there doesn't seem to be a way to include the content properly, at least i can't find any... does anybody have an idea?
if not, maybe i can work around this problem somehow? but i really can't figure out how...
any ideas of how to fix this problem would be great!
i hope you can understand my explanation of how this thing i've created works =)
here's a zip-file with all my files if you want to download an laborate with it:
http://www2.hemsida.net/badtant/test/test.zip
feel free to use it on your own sites too if you find it usefull =)
thanks!!
i've modified the Ultimate Fade-in slideshow 1.5 quite much to satisfy my needs.
i've changed so that any content can be shown (not just images) and i've also created an ajax functionality which updates the array of content automaticly.
my url:
http://www2.hemsida.net/badtant/test/index.html
first i specify the content to be in the slide like this (shout0 and shout1):
<div id="shoutarray">
<div id="shout0"><blockquote><div><p>If it sounds country, man, that's what it is: It's a country song!</p></div></blockquote><cite><a href="/badtant" class="member-image" title="badtant is online. View profile."><img src="http://alias.passagen.se.stage.sol.basefarm.net/images/c4/ca/c4ca4238a0b923820dcc509a6f75849b/e914a1625a57cce9b1642926ccfea42e_125x125.jpg" alt="" /></a><span class="online-status online"><a href="metropol_member_view.shtml" title="badtant is online. View profile.">1 badtant</a></span></cite></div>
<div id="shout1"><blockquote><div><p>Vinden vilar</p></div></blockquote><cite><a href="/Liliss_234" class="member-image" title="Liliss_234 is online. View profile."><img src="http://alias.passagen.se.stage.sol.basefarm.net/images/1f/0e/1f0e3dad99908345f7439f8ffabdffc4/881fa3ea209bb22f7dffe2cf78681880_125x125.jpg" alt="" /></a><span class="online-status offline"><a href="metropol_member_view.shtml" title="Liliss_234 is offline. View profile.">2 Liliss_234</a></span></cite></div>
</div>
the content is later read into my js array "shoutcast" with the function updateShoutArray (available in shoutbox.js)
then the fadeshow is created as usual with:
new fadeshow(shoutcast, 4000, 0);
--------------
when it all runs i have an ajax feature which updates the content every 30 seconds:
onload="setInterval('getShouts()',30000);"
getShouts (in ajax.js) updates the div shoutarray with new content and then cals the newShouts function (in shoutbox.js)
now the file shoutsigen.html is read for new content (should later be replaced with a dynamic page).
newShouts calls updateShoutArray (function was also was used earlier) that reads the new content and put it in the js array shoutcast.
then changeShoutArray is called to put the new array into my slideshow.
changeShoutArray was copied from this thread:
http://www.dynamicdrive.com/forums/showthread.php?t=8158
--------------
all this works great but there is one problem. because of missing functionality in velocity (http://jakarta.apache.org/velocity/) that i currently use, i can't put the first array of content that i want to use directly in the div called shoutarray (the first thing i explained). it has to be read from the same file (shoutsigen.html) that i later collect new content from.
i've tried using SSI to include the file but SSI isn't supported here.
there doesn't seem to be a way to include the content properly, at least i can't find any... does anybody have an idea?
if not, maybe i can work around this problem somehow? but i really can't figure out how...
any ideas of how to fix this problem would be great!
i hope you can understand my explanation of how this thing i've created works =)
here's a zip-file with all my files if you want to download an laborate with it:
http://www2.hemsida.net/badtant/test/test.zip
feel free to use it on your own sites too if you find it usefull =)
thanks!!