Almotmaiz.Net |
03-28-2007 06:34 PM |
[how to] last threads with thread text ??
heloo every body ..
i wanna to build a new hack .. get me a last threads with thread text ..
i try do this .. (global_start)
PHP Code:
$Alzaabi = intval(500);
$AlzaabiGetNewsAlzaabiIDs = $db->query_read("
SELECT threadid FROM thread AS thread
WHERE visible = 1 AND open != 10
ORDER BY dateline
DESC LIMIT 0, 3
");
while ($AlzaabiIDs = $db->fetch_array($AlzaabiGetNewsAlzaabiIDs))
{
$AlzaabiNewstAlzaabiIDs[] = $AlzaabiIDs['threadid'];
$AlzaabiNewspAlzaabiIDs[] = $AlzaabiIDs['firstpostid'];
}
$AlzaabiGetNews = $db->query_read("
SELECT thread.threadid, post.title, thread.replycount, postusername, postuserid, thread.dateline AS postdateline, thread.lastposter, thread.lastpost, IF(views<=thread.replycount, thread.replycount+1, views) AS views, thread.forumid, post.postid, pagetext, allowsmilie
FROM thread AS thread
LEFT JOIN post AS post ON (post.postid = thread.firstpostid)
LEFT JOIN postparsed AS postparsed ON (postparsed.postid = post.postid AND postparsed.styleid = " . intval(STYLEID) . " AND postparsed.languageid = " . intval(LANGUAGEID) . ")
WHERE thread.threadid IN(" . implode(',', $AlzaabiNewstAlzaabiIDs) . ")
GROUP BY post.postid
ORDER BY thread.dateline
DESC LIMIT 0, 3
");
while ($AlzaabiNews = $db->fetch_array($AlzaabiGetNews))
{
$AlzaabiNews['message'] = $bbcode_parser->do_parse($AlzaabiNews['pagetext']);
if(strlen($AlzaabiNews['message']) > $Alzaabi){
$AlzaabiNews['message'] = substr($AlzaabiNews['message'], 0, strrpos(substr($AlzaabiNews['message'], 0, $Alzaabi), ' ')) . '...';
}else{
$AlzaabiNews['message'] = $AlzaabiNews['message'];
}
eval('$Alzaabi_News = "' . fetch_template('Alzaabi_News') . '";');
}
templets ..
HTML Code:
<table cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td><img border="0" src="images/KalbaEyes_tcat_02.gif" width="88" height="25"></td>
<td style="background-image: url('images/KalbaEyes_tcat_01.gif'); background-repeat: no-repeat; background-position: right center" width="100%">
<a href="$vboptions[bburl]/showthread.php?t=$AlzaabiNews[threadid]">$AlzaabiNews[title]</a>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="alt1">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td align="center">$AlzaabiNews[message]</td>
</tr>
<tr>
<td align="left">
<a href="$vboptions[bburl]/showthread.php?t=$AlzaabiNews[threadid]">Read more ..</a></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td><img border="0" src="images/shadow.gif" width="150" height="15"></td>
<td width="100%"> </td>
<td><img border="0" src="images/rshadow.gif" width="150" height="15"></td>
</tr>
</table>
<br />
wut's wrong with my Code ??:confused:
up !!!! ... where's Coders ???
:confused: :confused: :confused:
:confused: :confused:
:confused:
|