Quote:
Originally Posted by Convergys
I am having problems with this...
When I view trhe attachments i have posted in the user cp, it shows, In Progress... Have i dont something wrong?
|
That is yet another modification to make. The txt is already updated but if you downloaded it before this post you might not have this changes:
################################################## #################
# Code modifications in file "profile.php"
################################################## #################
-------------------------------------------------------------------
at line 2327, search for this code:
-------------------------------------------------------------------
Code:
// Get attachment info
$attachments = $DB_site->query("
SELECT thread.forumid, post.postid, post.threadid AS p_threadid, post.title AS p_title, post.dateline AS p_dateline, attachment.attachmentid,
thread.title AS t_title, attachment.filename, attachment.counter, attachment.filesize AS size, IF(thumbnail = '', 0, 1) AS hasthumbnail,
user.username, thread.open, attachment.userid
FROM " . TABLE_PREFIX . "attachment AS attachment
LEFT JOIN " . TABLE_PREFIX . "post AS post ON (post.postid = attachment.postid)
LEFT JOIN " . TABLE_PREFIX . "thread AS thread ON (post.threadid = thread.threadid)
LEFT JOIN " . TABLE_PREFIX . "deletionlog AS deletionlog ON(attachment.postid = deletionlog.primaryid AND type = 'post')
LEFT JOIN " . TABLE_PREFIX . "user AS user ON (attachment.userid = user.userid)
WHERE attachment.userid = $userid
AND ((forumid IN (0$forumids) AND thread.visible = 1 AND post.visible = 1 AND deletionlog.primaryid IS NULL) " . iif($userid==$bbuserinfo['userid'], "OR attachment.postid = 0") . ")
ORDER BY attachment.attachmentid DESC
LIMIT " . ($limitlower - 1) . ", $perpage
");
------------------------------------------------------------------
change it to:
-------------------------------------------------------------------
Code:
$attachments = $DB_site->query("
SELECT thread.forumid, post.postid, post.threadid AS p_threadid, post.title AS p_title, if(post.postid,post.dateline,pmtext.dateline) AS p_dateline, attachment.attachmentid,
thread.title AS t_title, attachment.filename, attachment.counter, attachment.filesize AS size, IF(thumbnail = '', 0, 1) AS hasthumbnail,
user.username, thread.open, attachment.userid, attachment.private
FROM " . TABLE_PREFIX . "attachment AS attachment
LEFT JOIN " . TABLE_PREFIX . "post AS post ON (post.postid = attachment.postid)
LEFT JOIN " . TABLE_PREFIX . "pmtext AS pmtext ON (pmtext.pmtextid = attachment.private)
LEFT JOIN " . TABLE_PREFIX . "thread AS thread ON (post.threadid = thread.threadid)
LEFT JOIN " . TABLE_PREFIX . "deletionlog AS deletionlog ON(attachment.postid = deletionlog.primaryid AND type = 'post')
LEFT JOIN " . TABLE_PREFIX . "user AS user ON (attachment.userid = user.userid)
WHERE attachment.userid = $userid
AND ((forumid IN (0$forumids) AND thread.visible = 1 AND post.visible = 1 AND deletionlog.primaryid IS NULL) " . iif($userid==$bbuserinfo['userid'], "OR attachment.postid = 0") . ")
ORDER BY attachment.attachmentid DESC
LIMIT " . ($limitlower - 1) . ", $perpage
");
-------------------------------------------------------------------
at line 2360, search for this code:
-------------------------------------------------------------------
Code:
$show['inprogress'] = iif(!$post['postid'], true, false);
------------------------------------------------------------------
change it to:
-------------------------------------------------------------------
Code:
$show['inprogress'] = iif(!$post['postid'] && !$post['private'], true, false);
$show['privateattachment'] = iif($post['private'], true, false);
################################################## #################
# Template modifications in template "modifyattachmentsbit"
################################################## #################
-------------------------------------------------------------------
search for this:
-------------------------------------------------------------------
Code:
<div><strong>$vbphrase[thread]</strong>: <a href="showthread.php?$session[sessionurl]t=$post[p_threadid]">$post[t_title]</a></div>
<div><strong>$vbphrase[post]</strong>: <a href="showthread.php?$session[sessionurl]p=$post[postid]#post$post[postid]">$post[p_title]</a></div>
</div>
------------------------------------------------------------------
change it to:
-------------------------------------------------------------------
Code:
<if condition="$show[privateattachment]">
<div><strong>$vbphrase[in_private_message]</strong></div>
<else />
<div><strong>$vbphrase[thread]</strong>: <a href="showthread.php?$session[sessionurl]t=$post[p_threadid]">$post[t_title]</a></div>
<div><strong>$vbphrase[post]</strong>: <a href="showthread.php?$session[sessionurl]p=$post[postid]#post$post[postid]">$post[p_title]</a></div>
</div>
</if>
################################################## #################
# New phrases to add
################################################## #################
Add a new phrase and make sure it is in the posting group, otherwise it won't work
phrase: in_private_message
Text: Private Message
With that when you go to the manage attachment section of the usercp instead of saying "In progress" it will show the correct posting date and an indicator that it really was a private message and not a post