DutchToxophilite wrote:Hi.
Yesterday I tried to install this MOD with automod and ran into issues...
Okay, so to make this mod work with the soft delete mod you already have installed, you need to change the install instructions to reflect that your viewforum and viewtopic are no longer standard (since they have been changed by the soft delete mod). In particular:
In viewforum, instead of doing this:
Code: Select all
#
#-----[ FIND ]------------------------------------------
#
" . (($auth->acl_get('m_approve', $forum_id)) ? '' : 'AND topic_approved = 1');
#
#-----[ REPLACE WITH ]------------------------------------------
#
" . (($auth->acl_get('m_approve', $forum_id)) ? 'AND topic_approved <> ' . POST_DRAFT : 'AND topic_approved = 1');
// start mod save full drafts (and end mod too)...added test in preceding line to exclude drafts
you should change the install instructions to do this:
Code: Select all
#
#-----[ FIND ]------------------------------------------
#
" . (($auth->acl_get('m_approve', $forum_id)) ? '' : 'AND topic_approved = 1') .
($auth->acl_get('m_harddelete', $topic_data['forum_id']) || $auth->acl_get('m_delete', $topic_data['forum_id'])) ? '' : (($auth->acl_get('f_delete', $topic_data['forum_id'])) ? " AND (topic_deleted = '0' OR topic_deleted = '{$user->data['user_id']}')" : " AND topic_deleted = '0'");
#
#-----[ REPLACE WITH ]------------------------------------------
#
" . (($auth->acl_get('m_approve', $forum_id)) ? 'AND topic_approved <> ' . POST_DRAFT : 'AND topic_approved = 1') .
($auth->acl_get('m_harddelete', $topic_data['forum_id']) || $auth->acl_get('m_delete', $topic_data['forum_id'])) ? '' : (($auth->acl_get('f_delete', $topic_data['forum_id'])) ? " AND (topic_deleted = '0' OR topic_deleted = '{$user->data['user_id']}')" : " AND topic_deleted = '0'");
// start mod save full drafts (and end mod too)...added test two lines up to exclude drafts
And in viewtopic, instead of doing this:
Code: Select all
#
#-----[ FIND ]------------------------------------------
#
" . (($auth->acl_get('m_approve', $forum_id)) ? '' : 'AND post_approved = 1');
#
#-----[ REPLACE WITH ]------------------------------------------
#
" . (($auth->acl_get('m_approve', $forum_id)) ? 'AND post_approved <> ' . POST_DRAFT : 'AND post_approved = 1');
// start mod save full drafts (and end mod too)...added test in preceding $sql definition to exclude drafts
you should change the install instructions to do this:
Code: Select all
#
#-----[ FIND ]------------------------------------------
#
" . (($auth->acl_get('m_approve', $forum_id)) ? '' : 'AND post_approved = 1') .
($auth->acl_get('m_harddelete', $forum_id) || $auth->acl_get('m_delete', $forum_id)) ? '' : (($auth->acl_get('f_delete', $forum_id)) ? " AND (post_deleted = '0' OR post_deleted = '{$user->data['user_id']}')" : " AND post_deleted = '0'");
#
#-----[ REPLACE WITH ]------------------------------------------
#
" . (($auth->acl_get('m_approve', $forum_id)) ? 'AND post_approved <> ' . POST_DRAFT : 'AND post_approved = 1') .
($auth->acl_get('m_harddelete', $forum_id) || $auth->acl_get('m_delete', $forum_id)) ? '' : (($auth->acl_get('f_delete', $forum_id)) ? " AND (post_deleted = '0' OR post_deleted = '{$user->data['user_id']}')" : " AND post_deleted = '0'");
// start mod save full drafts (and end mod too)...added test in preceding $sql definition to exclude drafts
Let me know if that does the job.