hedging
Noobie

Posts: 30

Thank u guyz for such great forum system
|
 |
Re:[done 1.4.0] Show Attachments in MessageIndex
« Reply #19 on: December 02, 2003, 11:45:47 PM » |
|
Sorry, I dont speak english well but ill try to explain...
Now i try to install this mod manualy to 1.5.4 It works but not for all topics with attachs. It works only on topics where attachs on first page. The problem is to have this mod works with attachs on every page of topic.
here piece of my code
if (count($topics)) { $result = mysql_query(" SELECT t.ID_LAST_MSG, t.ID_TOPIC, t.numReplies, t.locked, m.posterName, m.attachmentFilename, m.attachmentSize, m.ID_MEMBER, IFNULL(mem.realName, m.posterName) AS posterDisplayName, t.numViews, m.posterTime, m.modifiedTime, t.ID_FIRST_MSG, t.isSticky, t.ID_POLL, m2.posterName as mname, m2.attachmentSize as attachs, m2.ID_MEMBER as mid, IFNULL(mem2.realName, m2.posterName) AS firstPosterDisplayName, m2.subject as msub, m2.icon as micon, IFNULL(lt.logTime, 0) AS isRead, IFNULL(lmr.logTime, 0) AS isMarkedRead FROM {$db_prefix}topics as t, {$db_prefix}messages as m, {$db_prefix}messages as m2 LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER=m.ID_MEMBER) LEFT JOIN {$db_prefix}members AS mem2 ON (mem2.ID_MEMBER=m2.ID_MEMBER) LEFT JOIN {$db_prefix}log_topics AS lt ON (lt.ID_TOPIC=t.ID_TOPIC AND lt.ID_MEMBER=$ID_MEMBER) LEFT JOIN {$db_prefix}log_mark_read AS lmr ON (lmr.ID_BOARD=$currentboard AND lmr.ID_MEMBER=$ID_MEMBER) WHERE t.ID_TOPIC IN (" . implode(',', $topics) . ") AND m.ID_MSG=t.ID_LAST_MSG AND m2.ID_MSG=t.ID_FIRST_MSG ORDER BY $stickyOrder $ordrsql") or database_error(__FILE__, __LINE__);
// Begin printing the message index for current board. while ($row = mysql_fetch_assoc($result)) { if ($row['ID_POLL'] != '-1' && $modSettings['pollMode'] == 0) continue; $lastposter = $row['posterName']; $lastPosterID = $row['ID_MEMBER']; $mdate = $row['posterTime']; $mname = $row['mname'];
if ($row['attachmentFilename']!='') {$VBattach=1;} else $VBattach=0; $VBnamea=count($row['attachmentFilename']);
$attachs = $row['attachs']+$row['attachmentSize'];
as you see i try this $row['attachs']+$row['attachmentSize'] because every part of this shows only part of attachs. But this isnt solved the problem. Can you help me please?
|