Parašė mckenzie· 2008 Lap. 15 17:11:28
#7
Žirklė parašė:
į global'ą įdėk $userdata.
Dekui buvai pamirses apie tai seniau irgi pan beda buvo.. :)
------------------------------------------
2. Db foruma perdarinejau ten ant org forumo yra pavadinimas virs kiekvieno posto koda istraukiau ir dedu i virsu ir neveikia.
Štai kodas:
echo "
<table cellpadding='0' cellspacing='1' width='100%' class='tbl-border'>
<tr>
<td class='tbl2'><a name='post_".$data['post_id']."' id='post_".$data['post_id']."'></a>".$data['post_subject']."</td>
</tr>
</table>";
Mastau gal virš šito dar reikia deti viena iš šitų eilučių
if ($rows != 0) {
$result = dbquery(
"SELECT p.*, fa.attach_id, fa.attach_name, fa.attach_ext, fa.attach_size, u.*, u2.user_name AS edit_name FROM ".$db_prefix."posts p
LEFT JOIN ".$db_prefix."forum_attachments fa USING(post_id)
LEFT JOIN ".$db_prefix."users u ON p.post_author = u.user_id
LEFT JOIN ".$db_prefix."users u2 ON p.post_edituser = u2.user_id AND post_edituser > '0'
WHERE p.thread_id='$thread_id' ORDER BY post_datestamp LIMIT $rowstart,$posts_per_page"
);
$numrows = dbrows($result);
while ($data = dbarray($result)) {
$message = $data['post_message'];
if ($data['post_showsig']) { $message = $message."\n\n<hr>".$data['user_sig']; }
if ($data['post_smileys']) { $message = parsesmileys($message); }
$message = parseubb($message);
$message = nl2br($message);
if ($data['post_edittime'] != "0") {
$edituser = "<a href='../profile.php?lookup=".$data['post_edituser']."'>".$data['edit_name']."</a>";
$edittime = showdate("forumdate", $data['post_edittime']);
}
$is_mod = in_array($data['user_id'], $forum_mods) && $data['user_level'] < "102" ? true : false;
Redagavo mckenzie· 2008 Lap. 15 17:11:27