Quote:
Originally Posted by poetic
any demo's??
|
Sure. Here is the code for an HTML file that will get 25 threads by their dates of last post and display them in a marquee:
PHP Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML4 . 01Transitional//EN">
<html dir="rtl">
<head>
<title>marquee</title>
<style>
body {
font-family: tahoma;
font-size:10 pt;
font-weight: bold;
color: #6C3809;
}
a {
text-decoration: none;
color: #6C3809;
}
a:active {
color: #9A611A;
}
a:hover {
color: #CAA577;
}
</style>
</head>
<body>
<script src="http://www.multaqana.org/vb/external2.php?type=JS&limit=25&orderby=lastpost"></script>
<marquee direction="right" scrolldelay="100">
<script>
URL = "http://www.multaqana.org/vb/";
i =0 ;
for (t in threads) {
document.write('<a href="', URL, 'showthread.php?t=', threads[t].threadid, '" target="_blank">', threads[t].title, '</a> :: ');
}
</script>
</marquee>
</body>
</html>
Notes:
1. This file is designed for right-to-left languages. If you want it for a left-to-right language, then you will have to change the "dir" attribute in the "html" tag to "ltr" and the "direction" attribute in the "marquee" tag to "left".
2. This file was not checked for best browser compatability and standards compliance.
3. The file is static (server-wise). It doesn't have to be a ".php" file. The "magic" happens by the interaction between the client-side javascript code and the external2.php content provider.
4. You will also need to change the "src" attribute of the first "script" tage, and the URL variable in the second script to point to your own forum.
5. The best way of making use of this script is to insert it in your forum as an iframe. This way, you will always have the threads with the latest posts displayed on all pages.