$latestposts=$DB_site->query("SELECT postid,LEFT(pagetext,20) AS text FROM post ORDER BY dateline DESC LIMIT 10");
while ($latestpost=$DB_site->fetch_array($latestposts)) {
if ($marquee) {
$marquee .= " "; // String to seperate between each link
}
$marquee .= "<a href=\"showthread.php?s=$session[sessionhash]&postid=$latestpost[postid]\">$latestpost[text] ...</a>"; // Link and text for post
}
Now you can use $marquee in your marquee tag for the content.
This will only select the first 20 characters of the post, and add ... after it (with a link to the post).
$latestposts=$DB_site->query("SELECT postid,LEFT(pagetext,20) AS text FROM post ORDER BY dateline DESC LIMIT 10");
while ($latestpost=$DB_site->fetch_array($latestposts)) {
if ($marquee) {
$marquee .= " "; // String to seperate between each link
}
$marquee .= "<a href=\"showthread.php?s=$session[sessionhash]&postid=$latestpost[postid]\">$latestpost[text] ...</a>";
}
?>
<marquee-code-here value="<? echo("$marquee"); ?>">
and put it in your forum's root.
Now just use SSI to include it
Code:
<!--#include file="vbb/marquee.php"-->
and also change the actually code for the marquee as I don't know it.
$latestposts=$DB_site->query("SELECT postid,LEFT(pagetext,20) AS text FROM post WHERE forumid<>14 AND forumid<>43 AND forumid<>87 ORDER BY dateline DESC LIMIT 10");
while ($latestpost=$DB_site->fetch_array($latestposts)) {
if ($marquee) {
$marquee .= " "; // String to seperate between each link
}
$marquee .= "<a href=\"showthread.php?s=$session[sessionhash]&postid=$latestpost[postid]\">$latestpost[text] ...</a>";
}
?>
<marquee-code-here value="<? echo("$marquee"); ?>">
error with this. it worker before I made the change to exclude forums.
<b>Warning</b>: Cannot add header information - headers already sent by (output started at /home/realweb/public_html/marquee.php:13) in <b>/home/realweb/public_html/forums/admin/functions.php</b> on line <b>1486</b><br>
<!-- Database error in vBulletin: Invalid SQL: SELECT postid,LEFT(pagetext,20) AS text FROM post WHERE forumid<>45 AND forumid<>30 AND forumid<>33 AND forumid<>93 AND forumid<>40 AND forumid<>41 AND forumid<>38 AND forumid<>39 AND forumid<>42 AND forumid<>43 AND forumid<>46 AND forumid<>54 AND forumid<>48 AND forumid<>61 AND forumid<>50 AND forumid<>51 AND forumid<>52 AND forumid<>53 AND forumid<>55 AND forumid<>56 AND forumid<>57 AND forumid<>58 AND forumid<>59 AND forumid<>60 AND forumid<>62 AND forumid<>75 AND forumid<>70 AND forumid<>72 AND forumid<>69 AND forumid<>67 AND forumid<>68 AND forumid<>71 AND forumid<>76 AND forumid<>77 AND forumid<>78 AND forumid<>79 AND forumid<>80 AND forumid<>81 AND forumid<>82 AND forumid<>83 AND forumid<>90 AND forumid<>91 AND forumid<>88 AND forumid<>89 AND forumid<>92 ORDER BY dateline DESC LIMIT 10
mysql error: Unknown column 'forumid' in 'where clause'
mysql error number: 1054
Date: Saturday 01st of September 2001 06:04:47 AM
Script: /marquee.php
Referer:
-->
</td></tr></table>
<p>There seems to have been a slight problem with the database.
Please try again by pressing the refresh button in your browser.</p>An E-Mail has been dispatched to our <a href="mailto:support@realwebhost.net">Technical Staff</a>, who you can also contact if the problem persists.</p><p>We apologise for any inconvenience.</p><pre>
Database error in vBulletin: Invalid SQL: SELECT postid,LEFT(pagetext,20) AS text FROM post WHERE forumid<>45 AND forumid<>30 AND forumid<>33 AND forumid<>93 AND forumid<>40 AND forumid<>41 AND forumid<>38 AND forumid<>39 AND forumid<>42 AND forumid<>43 AND forumid<>46 AND forumid<>54 AND forumid<>48 AND forumid<>61 AND forumid<>50 AND forumid<>51 AND forumid<>52 AND forumid<>53 AND forumid<>55 AND forumid<>56 AND forumid<>57 AND forumid<>58 AND forumid<>59 AND forumid<>60 AND forumid<>62 AND forumid<>75 AND forumid<>70 AND forumid<>72 AND forumid<>69 AND forumid<>67 AND forumid<>68 AND forumid<>71 AND forumid<>76 AND forumid<>77 AND forumid<>78 AND forumid<>79 AND forumid<>80 AND forumid<>81 AND forumid<>82 AND forumid<>83 AND forumid<>90 AND forumid<>91 AND forumid<>88 AND forumid<>89 AND forumid<>92 ORDER BY dateline DESC LIMIT 10
mysql error: Unknown column 'forumid' in 'where clause'
mysql error number: 1054
Date: Saturday 01st of September 2001 06:04:47 AM
Script: /marquee.php
Referer: