Great
I'm not a specialist of php or things like that I'm just a simple "guy that adapt things using his brain" ...
So here it is ... you'll need the original modification.xml file because I'll not write all code but jsut adaptations ;-) ... I'l send to mouser the modification_smf2.0b3 file (I've not modified the headers and things like that ... it's not my source code ... I respect the authors as much as I can)
in display.template.php1. find// Show the post itself, finally!
echo '
</div></td>
</tr></table>
...
2. Select code until...
// If we had unapproved attachments clean up.
if ($last_approved_state == 0)
echo '
</fieldset>';
echo '
</div>';
}
3. Copy the code from original modification.xml file
4. modify PART 2 by
//---------------------------------------------------------------------------
// PART 2 - original code
// Show the post itself, finally!
// ATTN: it's not clear if this mod interferes with the inline modificiation feature new to 1.1RC2 and 1.1RC3 (see last img src line below)
echo '
</div></td>
</tr></table>
<hr width="100%" size="1" class="hrcolor" />';
if ($ignoring)
echo ' <div id="msg_', $message['id'], '_ignored_prompt" style="display: none;">', $txt['ignoring_user'], ' <a href="#msg', $message['id'], '" onclick="return ignoreToggles[', $message['id'], '].toggle()">', $txt['show_ignore_user_post'], '</a></div>';
echo '
<div class="post" id="msg_', $message['id'], '"', '>';
if (!$message['approved'] && $message['member']['id'] != 0 && $message['member']['id'] == $context['user']['id'])
echo '
<div style="margin: 2ex; padding: 1ex; border: 2px dashed #cc3344; color: black; font-weight: bold;">
', $txt['post_awaiting_approval'], '
</div>';
echo '
', $message['body'], '
</div>', $message['can_modify'] ? '
<img src="' . $settings['images_url'] . '/icons/modify_inline.gif" alt="' . $txt['quick_modify'] . '" title="' . $txt['quick_modify'] . '" align="right" id="modify_button_' . $message['id'] . '" style="cursor: ' . ($context['browser']['is_ie5'] || $context['browser']['is_ie5.5'] ? 'hand' : 'pointer') . '; display: none;" onclick="oQuickModify.modifyMsg(\'' . $message['id'] . '\', \'' . $context['session_id'] . '\')" />' : '' , '
</td>
</tr>';
// Now for the attachments, signature, ip logged, etc...
echo '
<tr id="msg_', $message['id'], '_footer">
<td valign="bottom" class="smalltext" width="85%">
<table width="100%" border="0" style="table-layout: fixed;"><tr>
<td colspan="2" class="smalltext" width="100%">';
//---------------------------------------------------------------------------
4. modify PART 4 by
//---------------------------------------------------------------------------
// PART 4 - original code but MODIFIED to skip inlined images
// Assuming there are attachments...
if (!empty($message['attachment'])) {
echo '
<hr width="100%" size="1" class="hrcolor" />
<div style="overflow: auto; width: 100%;">';
$last_approved_state = 1;
foreach ($message['attachment'] as $attachment)
{
// Show a special box for unapproved attachments...
if ($attachment['is_approved'] != $last_approved_state)
{
$last_approved_state = 0;
echo '
<fieldset>
<legend>', $txt['attach_awaiting_approve'], ' [<a href="', $scripturl, '?action=attachapprove;sa=all;mid=', $message['id'], ';sesc=', $context['session_id'], '">', $txt['approve_all'], '</a>]</legend>';
}
//---------------------------------------------------------------------------
5. Modify last part starting by \\back to orginal code with this code
//---------------------------------------------------------------------------
// Back to original code
if ($attachment['is_image'])
{
if ($attachment['thumbnail']['has_thumb'])
echo '
<a href="', $attachment['href'], ';image" id="link_', $attachment['id'], '" onclick="', $attachment['thumbnail']['javascript'], '"><img src="', $attachment['thumbnail']['href'], '" alt="" id="thumb_', $attachment['id'], '" border="0" /></a><br />';
else
echo '
<img src="' . $attachment['href'] . ';image" alt="" width="' . $attachment['width'] . '" height="' . $attachment['height'] . '" border="0" /><br />';
}
echo '
<a href="' . $attachment['href'] . '"><img src="' . $settings['images_url'] . '/icons/clip.gif" align="middle" alt="*" border="0" /> ' . $attachment['name'] . '</a> ';
if (!$attachment['is_approved'])
echo '
[<a href="', $scripturl, '?action=attachapprove;sa=approve;aid=', $attachment['id'], ';sesc=', $context['session_id'], '">', $txt['approve'], '</a>] | [<a href="', $scripturl, '?action=attachapprove;sa=reject;aid=', $attachment['id'], ';sesc=', $context['session_id'], '">', $txt['delete'], '</a>] ';
echo '
(', $attachment['size'], ($attachment['is_image'] ? ', ' . $attachment['real_width'] . 'x' . $attachment['real_height'] . ' - ' . $txt['attach_viewed'] : ' - ' . $txt['attach_downloaded']) . ' ' . $attachment['downloads'] . ' ' . $txt['attach_times'] . '.)<br />';
}
echo '
</div>';
}
//---------------------------------------------------------------------------
In Post.template.php file7. After code
// What about smileys?
if (!empty($context['smileys']['postform']))
insert the suggested code in modification.xml file.
8. Modify sentence
<select onchange="surroundText(this.options[this.selectedIndex].value,\'\', document.forms.', $context['post_form'], '.', $context['post_box_name'], '); this.selectedIndex = 0; document.forms.', $context['post_form'], '.', $context['post_box_name'], '.focus(document.forms.', $context['post_form'], '.', $context['post_box_name'], '.caretPos);" style="margin-bottom: 1ex;">
by
<select onchange="surroundText(this.options[this.selectedIndex].value,\'\', document.getElementById(\''. $context['post_box_name'].'\')); this.selectedIndex = 0; document.forms.', $context['post_form'], '.', $context['post_box_name'], '.focus(document.forms.', $context['post_form'], '.', $context['post_box_name'], '.caretPos);" style="margin-bottom: 1ex;">
That's all folks ! Your favorite mod is back in your SMF2.0b3 forum
Mouser, I'll send you the file tomorrow .. I need to sleep
Bye
SliN